Expand description
2D sketch data model: points, entities (lines, circles, arcs), and constraints, plus closed-profile extraction for the CSG backends.
A sketch lives in its node’s local XZ plane: sketch coordinates (x, y)
map to local (x, 0, y), matching how the mesh backends evaluate 2D
primitives. Constraint solving lives in the rscad-sketch crate (it
needs std + ezpz); this module only stores the data and derives closed
profile loops from it.
Structs§
- Profile
- Closed profile loops extracted from a sketch, ready for the CSG backends.
- Sketch
Data - A 2D sketch: points, entities, and the constraints between them.
- Sketch
Entity - Sketch
Intersection - An intersection between two entities, as found by
SketchData::nearest_intersection. - Sketch
Point - A free point in sketch coordinates.
Enums§
- Sketch
Constraint - Geometric constraints between sketch points and entities.
- Sketch
Entity Kind - Geometry carried by a sketch entity.
Constants§
- DEFAULT_
ARC_ SEGMENTS - Default tessellation density (segments per full circle) used when a consumer has no better setting.
Functions§
- profile_
loops - Extract closed loops from the sketch’s lines and arcs (chained through
shared or
Coincidentendpoints) plus standalone circles. - signed_
area - Signed loop area (positive = counter-clockwise = outer boundary after
profile_loopsnormalization).
Type Aliases§
- Sketch
Id - Stable identifier for sketch points and entities (one shared id space).