Expand description
Turning a solved sketch into profiles: closed loops of curves grouped into regions (an outer loop with its holes), and those loops into the NURBS curves that extrude and revolve consume.
Connectivity is structural. Two curves are joined exactly when they
share an endpoint (the same point, or points joined by
crate::Constraint::Coincident) — never because their ends happen to
be close. Curves hanging off a loop (open chains, e.g. a helper line) are
ignored; curves that branch (three or more meeting at a point) are an
error, since the regions they bound are ambiguous.
Nesting and orientation are answered on the real curves. Which loop
lies inside which, and which way a loop winds, both come from casting a
ray and counting crossings with the kernel’s own
curve_curve_intersect — the same thing
geop_core_topology::contains::face::loops_contain does for a face’s
trim, on the same NURBS curves the profile is made of. Polylines here are
for drawing only.
Structs§
- Profile
Edge - One curve of a loop, traversed forwards or backwards.
- Profile
Loop - A closed chain of curves, each ending where the next starts.
- Profile
Piece - One NURBS piece of a profile loop, and where it comes from in the sketch:
piece
indexof sketch curvesource(counted in the curve’s own direction), running from jointstartto jointendin the loop’s direction. - Region
- An area of the sketch: an outer loop (counter-clockwise) and the holes in it (clockwise).
Enums§
- Profile
Joint - Where a joint of a profile comes from in the sketch: a sketch point, or a
point a sketch curve had to be split at to become NURBS pieces (see
ProfileLoop::to_nurbs) —Split { curve, index }is where pieceindexofcurvestarts, counted in the curve’s own direction. A circle has no points of its own, so all of its joints are splits,index = 0included.
Functions§
- curve_
polyline - Points along a curve from its start to its end (a circle starts and ends at angle 0), dense enough for display and nesting tests.