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

Safe HaskellNone




type ℝ2 = (, )Source

type ℝ3 = (, , )Source

type = IntSource

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

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 :)

type NormedTriangleMesh = [NormedTriangle]Source

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

data SymbolicObj2 Source

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

type Rectilinear2 = [Box2]Source

Rectilinear 2D set

type Rectilinear3 = [Box3]Source

Rectilinear 2D set

xmlErrorOn :: IORef BoolSource

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.