Skip to main content

general_transformed_shape

Function general_transformed_shape 

Source
pub fn general_transformed_shape(
    model: &mut Model,
    shape: &Shape,
    transform: &GeneralTransform,
    tol: Tolerances,
) -> OgeomResult<Built>
Expand description

Rebuild a solid under a general affine transform.

A shear or an uneven scale is not a placement: it carries a circle to an ellipse and a sphere to something with no analytic name here, so the shape is converted to its exact B-spline form and the control points are moved, which an affine map does exactly. The pcurves fitted during conversion survive untouched, because an affine map does not reparameterize.

A similarity is the other case, and it is a placement. The kernel’s own types already draw that line: Transform is a similarity by construction and is kept apart from GeneralTransform precisely so analytic geometry survives one, so a similarity handed in here is applied as the placement it is. Converting it would be worse than wasteful: a restated plane is still that plane but no longer says so, and coincidence downstream is decided on what the geometry says. Two coplanar faces would stop being coplanar surfaces, no closed form would answer Same for them, and the boolean would be handed a coincident pair with nothing to recognize it by.

§Errors

As to_nurbs, or as transformed for a similarity.