implicit-0.0.3: Math-inspired programmatic 2&3D CAD: CSG, bevels, and shells; gcode export..

Graphics.Implicit.Definitions

Synopsis

# Documentation

type ℝ2 = (, )Source

type ℝ3 = (, , )Source

type = IntSource

(⋅) :: InnerSpace a => a -> a -> Scalar aSource

class ComponentWiseMultable a whereSource

Methods

(⋯*) :: a -> a -> aSource

(⋯/) :: a -> a -> aSource

Instances

 ComponentWiseMultable ℝ3 ComponentWiseMultable ℝ2

type M2 a = ((a, a), (a, a))Source

type M3 a = ((a, a, a), (a, a, a), (a, a, a))Source

type Polyline = [ℝ2]Source

A chain of line segments, as in SVG eg. [(0,0), (0.5,1), (1,0)] ---> /\

type Triangle = (ℝ3, ℝ3, ℝ3)Source

A triangle (a,b,c) = a trinagle with vertices a, b and c

type NormedTriangle = ((ℝ3, ℝ3), (ℝ3, ℝ3), (ℝ3, ℝ3))Source

A triangle ((v1,n1),(v2,n2),(v3,n3)) has vertices v1, v2, v3 with corresponding normals n1, n2, and n3

type TriangleMesh = [Triangle]Source

A triangle mesh is a bunch of triangles :)

A normed triangle mesh is a bunch of normed trianlges!!

In Implicit CAD, we consider objects as functions of `outwardness`. The boundary is 0, negative is the interior and positive the exterior. The magnitude is how far out or in. For more details, refer to http:christopherolah.wordpress.com20111106manipulation-of-implicit-functions-with-an-eye-on-cad/

type Obj2 = ℝ2 -> Source

A 2D object

type Obj3 = ℝ3 -> Source

A 3D object

type Box2 = (ℝ2, ℝ2)Source

A 2D box

type Box3 = (ℝ3, ℝ3)Source

A 3D box

type Boxed2 a = (a, Box2)Source

Boxed 2D object

type Boxed3 a = (a, Box3)Source

Boxed 3D object

A symbolic 2D object format. We want to have a symbolic object so that we can accelerate rendering & give ideal meshes for simple cases.

Instances

 Show SymbolicObj2 Object SymbolicObj2 ℝ2

A symbolic 3D format!

Constructors

 Rect3R ℝ ℝ3 ℝ3 Sphere ℝ Cylinder ℝ ℝ ℝ Complement3 SymbolicObj3 UnionR3 ℝ [SymbolicObj3] IntersectR3 ℝ [SymbolicObj3] DifferenceR3 ℝ [SymbolicObj3] Translate3 ℝ3 SymbolicObj3 Scale3 ℝ3 SymbolicObj3 Rotate3 (ℝ, ℝ, ℝ) SymbolicObj3 Rotate3V ℝ ℝ3 SymbolicObj3 Outset3 ℝ SymbolicObj3 Shell3 ℝ SymbolicObj3 EmbedBoxedObj3 BoxedObj3 ExtrudeR ℝ SymbolicObj2 ℝ ExtrudeRotateR ℝ ℝ SymbolicObj2 ℝ ExtrudeRM ℝ (Maybe (ℝ -> ℝ)) (Maybe (ℝ -> ℝ)) (Maybe (ℝ -> ℝ2)) SymbolicObj2 (Either ℝ (ℝ2 -> ℝ)) RotateExtrude ℝ (Maybe ℝ) (Either ℝ2 (ℝ -> ℝ2)) SymbolicObj2 ExtrudeOnEdgeOf SymbolicObj2 SymbolicObj2

Instances

 Show SymbolicObj3 Object SymbolicObj3 ℝ3

type Rectilinear2 = [Box2]Source

Rectilinear 2D set

type Rectilinear3 = [Box3]Source

Rectilinear 2D set

Now for something that makes me a bad person... I promise I'll use it for good, not evil! I don't want to reparse the program arguments everytime I want to know if XML errors are needed.