Skip to main content

fix_face_pcurves

Function fix_face_pcurves 

Source
pub fn fix_face_pcurves(
    model: &mut Model,
    face: &Shape,
    cap: f64,
    tol: Tolerances,
) -> OgeomResult<FixedTrims>
Expand description

Give a face’s pcurve-less edges the trims projection can honestly fit.

The reader heals boundary slop up to a millimetre and hands what it refuses over in untrimmed_faces, face shape included. This is the follow-up: the same projection fit, at the cap the caller chooses. Each fitted edge’s tolerance widens to the offset actually measured and to how far the fitted trim, lifted, stands from the curve anywhere along it, so the model says what it knows. An edge past the cap is reported, not touched. What the face shares with other shapes is copied first (Model::unshare), so their edges keep the trims they have.

A sphere face whose trim, once every edge has its trim, comes within ogeom_bool::POLE_MARGIN of a pole of its chart without running through it is then re-charted about an axis whose poles stand clear of it: beside a pole no fitted trim follows the curve, and the face would mesh short and classify wrong.

§Errors

OgeomError::Construction if face is not a face, holds no surface, or an edge carries no space curve to project; OgeomError::NotDone naming why where such a sphere face cannot be re-charted clear of its trim.