Expand description
Shared geometry helpers for the constructors in this crate, and
Profile, the named curve chain extrude and revolve sweep. Topology
construction itself goes straight through Part’s euler operators
(mvfs, mve, mef, mer, replace_face, …) — see extrude.rs for
a worked example of how they compose.
Structs§
- Profile
- A chain of profile curves, with a stable name for every curve and every
joint between them — what extrude and revolve build the names of the
faces, edges and vertices they sweep out of it from (see
geop_core_part’s crate docs). For a sketch these are its element ids; for a shape built in code, positions in the chain (Profile::closed).
Functions§
- arc2
- A degree-2 rational Bezier curve in parameter space from
p0top2through the (weighted) control pointmid, with middle weightw. - arc3
- A degree-2 rational Bezier curve in 3-D from
p0top2through the (weighted) control pointmid, with middle weightw. For an arc centered atcwithw = sqrt2_over_2(), passmid = p0 + p2 - c(i.e.c + (p0 - c) + (p2 - c), the sum of the two radius vectors relative to the arc’s actual center, offset back into absolute coordinates) to trace an exact 90-degree circular arc of radius|p0 - c| = |p2 - c|. - bilinear
- A bilinear (degree 1x1) surface patch with corners
P00, P01, P10, P11(control points laid out[P00, P10, P11, P01],num_v = 2). - embed_
curve - The planar 3-D curve
origin + x e1 + y e2for(x, y)alongcurve. An affine map of the control points, so it is exact for any NURBS. - embed_
point - Homogeneous
(w (origin + x e1 + y e2), w)for the homogeneous 2-D pointcp = (w x, w y, w): linear incp, so no division. - end_
point - Last control point of
curve, dehomogenized: its end. - line2
- A degree-1 line segment in parameter space from
p0top1, parametrized over[0, 1]. - line3
- A degree-1 line segment in 3-D from
p0top1, parametrized over[0, 1]. - polygon
- The closed polygon through
points(and back to the first), one line per side — the simplest profile loop forcrate::extrude::extrude. - polyline
- The open chain of lines through
points— the simplest profile forcrate::revolve::revolve_at_oriented. - pt2
- Lift a 2-D point into homogeneous coordinates with weight 1.
- pt3
- Lift a 3-D point into homogeneous coordinates with weight 1.
- sqrt2_
over_ 2 sqrt(2) / 2, the rational weight that makes a 3-point quadratic Bezier trace an exact 90-degree circular arc.- start_
point - First control point of
curve, dehomogenized: its start, for the clamped knot vectors every profile curve has.