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 comes 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 — and which way a
loop winds from its signed area, integrated from those curves
(loop_signed_area). Polylines are sampled from them too, for
drawing.
Structs§
- Chain
- Curves joined end to end, in order (see
Sketch::chain). - Piece
- One NURBS piece
curveof a chain of a sketch’s curves — a profile loop, or a 3-D sketch’s path — and where it comes from in the sketch: pieceindexof sketch curvesource(counted in the curve’s own direction), running from jointstartto jointendin the chain’s direction. - Profile
Edge - One curve of a loop, traversed forwards or backwards — of a text, one of its contours.
- Profile
Loop - A closed chain of curves, each ending where the next starts.
- 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. - Shape
- What a sketch draws to sweep: the areas its curves enclose — one, or several apart, as the letters of a text are — or, for a sweep into a sheet only, the one open chain they form, enclosing nothing.
Functions§
- curve_
nurbs - One sketch curve as NURBS pieces from its start to its end, built from
geometry— how many pieces, from the sketch as drawn, which is design data, so the pieces and their names do not depend on how precisely the geometry is known. A text’s are its contours’ pieces, one contour after the other (seetext_contours). - curve_
polyline - Points along a curve as drawn, from its start to its end (a circle
starts and ends at angle 0) — sampled from its NURBS pieces, dense enough
for drawing. A text is no one line: it is drawn contour by contour (see
curve_polylines). - curve_
polylines - The lines a curve is drawn as: a text one for each contour of its
glyphs, closed, any other curve its one line (see
curve_polyline). - text_
contours - The contours of the text
curve, built fromgeometry: each a loop of NURBS pieces (seetext::place).
Type Aliases§
- Profile
Piece - A piece of a planar sketch’s profile loop.