Skip to main content

Module convert

Module convert 

Source
Expand description

Whole-shape conversion: everything as NURBS, and general affine transforms over a shape.

The geometry-level conversions are exact and were done long ago; what a shape needs is the operator that walks it and restates every dependent description, because conversion necessarily reparameterizes: a circle’s parameter is its angle and a rational quadratic’s is not. So every edge’s range moves to its converted curve’s domain, and every pcurve is re-derived against a surface whose parameterization has also moved. Re-deriving a pcurve is a fit (at the edge’s own parameters, so same-parameter holds by construction), which is why this waited for the adaptive fitting core.

The affine operator rides on top: an affine map moves a B-spline’s control points and nothing else, so the parameterizations of the converted shape survive the transform untouched, including every fitted pcurve, which is the point of converting first.

Functions§

baked_shape
Rebuild a solid with its placements baked into the geometry, keeping every surface and curve in its own analytic vocabulary.
general_transformed_shape
Rebuild a solid under a general affine transform.
normals_oppose
Whether new’s normal points against old’s where they meet, read off the middle of old’s chart: what a restatement reports when it replaces a surface by one of the same points.
restate_geometry
Rebuild a solid with its surfaces and curves restated by the caller, every placement baked in and every pcurve re-derived against the new surfaces at the new edges’ parameters.
to_nurbs
Rebuild a solid with every surface and curve in B-spline form.
to_nurbs_within
Rebuild a solid with every surface and curve in B-spline form: exactly where a closed form exists, as to_nurbs does, and fitted within tolerance where none does (an offset surface, a helix, an offset curve), where to_nurbs refuses.

Type Aliases§

CurveRestatement
A caller’s restatement of a curve over a range: the new curve and the range on it tracing the same points, or None to keep it.
SurfaceRestatement
A caller’s restatement of a surface: the new surface and whether its normal points against the old one’s, or None to keep it.