waterfall-cad-0.5.1.0: Declarative CAD/Solid Modeling Library
Safe HaskellNone
LanguageHaskell2010

Waterfall.Diagram

Synopsis

Documentation

data Diagram Source #

Diagram of a Waterfall part

This is similar to a collection of Path2D indexed by LineType and Visibility

data LineType Source #

Categorize the lines in a diagram

Constructors

OutLine

Represents lines at the edge of objects, the "silhouette"

Does not include those parts of the silhouette that are also sharp

SharpLine

Sharp edges, parts of an object with C0 Continuity

RawLine TypeOfResultingEdge 

Instances

Instances details
Show LineType Source # 
Instance details

Defined in Waterfall.Diagram

Eq LineType Source # 
Instance details

Defined in Waterfall.Diagram

Ord LineType Source # 
Instance details

Defined in Waterfall.Diagram

data Visibility Source #

Whether an edge is visible in a given projection, or not

Constructors

Visible 
Hidden 

solidDiagram :: V3 Double -> Solid -> Diagram Source #

Produce a diagram of a Solid

Uses an orthographic projection, viewed from the provided direction

pathDiagram :: LineType -> Visibility -> Path2D -> Diagram Source #

Produce a Diagram from a Path2D

 diagramLines lt v . pathDiagram lt v = pure

diagramLines :: LineType -> Visibility -> Diagram -> [Path2D] Source #

Access the lines in a Diagram as Path2D

diagramBoundingBox :: Diagram -> Maybe (V2 Double, V2 Double) Source #

Compute the Axis Aligned Bounding Box of a Diagram

Returns Nothing if the Diagram does not contain lines that are OutLine or Sharp