Skip to main content

Module divide

Module divide 

Source
Expand description

Dividing a shape into smaller pieces: faces cut along lines of their own parameters, edges cut at parameters of their own.

Every piece keeps the curve or surface it was cut from, and so its parameters: nothing is refitted, and a pcurve that held on the whole holds on each piece. A cut face’s new boundary is the surface’s own iso-curve, exact for every surface whose iso-curves have a closed form (planes, drums, cones, balls, tori, extrusions, revolutions and splines).

The divisions on top pick where to cut: at the knots where a spline is less smooth than asked (divide_by_continuity), wherever a face turns further than an angle (divide_by_angle), until no face is larger than an area (divide_by_area), and at every knot, each piece’s geometry then restated as the single Bézier span it covers (to_bezier).

Enums§

IsoLine
A line of a face’s parameters: u = at or v = at.

Functions§

divide_by_angle
Cut every face of shape whose angular parameters (a drum’s, cone’s, ball’s, torus’s or revolution’s turn) sweep more than max_angle, into equal pieces sweeping no more than it. A closed face comes apart at its seam into open ones.
divide_by_area
Cut every face of shape larger than max_area in half, across its longer extent, until none is.
divide_by_continuity
Cut every edge and face of shape where its spline is less smooth than at_least, so each piece is at least that smooth throughout. A knot is judged by its multiplicity, so G1 and G2 ask what C1 and C2 ask.
divide_face
Cut face of shape in two or more along line, and rebuild shape around the pieces. The edges the line crosses are cut where it crosses them, in every face that holds them.
to_bezier
shape with every curve and surface a single Bézier span: converted to splines, cut at every knot, and each piece’s geometry restated as the span it covers, parameters kept.