Skip to main content

sew_within

Function sew_within 

Source
pub fn sew_within(
    model: &mut Model,
    faces: &[Shape],
    gap: f64,
    tol: Tolerances,
) -> OgeomResult<Sewn>
Expand description

Sew faces whose edges meet across a gap of up to gap.

As sew, with two edges taken for one where their ends and middle lie within gap of each other rather than within the confusion distance: surfaces built apart (an imported sheet, a fitted fill beside an exact extrusion) meet a few micrometres apart. The edge kept, and the vertices it ends on, widen their tolerances to reach the edge they replace, as healing does, so the shell checks clean. An edge that runs along two or more shorter edges of other faces is first split where their vertices meet it within gap, so each piece has a twin.

The widening is done in place on the given faces’ own edges and vertices; only what they share with other shapes is copied first. The faces given therefore carry the wider tolerances afterwards, and a later sew of the same faces joins what this one joined. To keep the faces as they were, sew a copy of them.

§Errors

As sew, and OgeomError::Construction if gap is not finite and non-negative.