Skip to main content

Module project

Module project 

Source
Expand description

Polygonal hidden line removal: project, classify, draw.

The mesh does the occlusion work. The drawing’s curves come from two places: the model’s own edges, discretized by the same machinery every face boundary uses, and the tessellation’s silhouettes, the mesh edges where the surface turns away from the eye. Every sampled segment is classified by casting its midpoint toward the eye against the whole mesh: a triangle strictly in front hides it. Runs of same-classified segments merge back into polylines, so a curve that dips behind a boss comes out as visible, hidden, visible: three curves, which is what a drawing shows.

Polygonal, not exact: the classification is as fine as the tessellation and the sampling. That is the honest half of HLRBRep; the exact half (curve/surface interference resolved analytically) is deferred and the parity ledger says so; see docs/PARITY.md, hlr.projection.

Structs§

Drawing
A 2D drawing: the classified projection of a shape.
DrawnCurve
One polyline of the drawing, in view-plane coordinates.
View
The view for a drawing: an orthographic camera looking along -z of the frame it carries, with x right and y up on the sheet.

Enums§

Source
Where a drawn curve came from.
Visibility
Which side of the pencil a curve lands on.

Functions§

project
Project a shape into a classified 2D drawing.