Skip to main content

offset_sphere_face

Function offset_sphere_face 

Source
pub fn offset_sphere_face(
    solid: &BrepSolid,
    face_id: u64,
    distance: f64,
) -> Result<BrepSolid, String>
Expand description

Push a SPHERICAL face along its outward normal by distance (positive grows the solid) by replacing its carrier with the concentric offset sphere and re-trimming its neighbours: planar caps through the centre keep their exact- scale great-circle rim, while off-centre planes, spheres, and coaxial ruled neighbours have their rim re-derived as S′ ∩ neighbour.

An OPEN rim (several arcs, as a pocket in a box corner has) is supported on the exact-scale path, with the fixed edges that end on its corners re-trimmed to follow them.

Refused cleanly (never a bad solid): non-coaxial cylinder/cone neighbours, general-revolution/torus/free-form neighbours, seam-crossing oblique or sphere-neighbour rims, non-closed RECOMPUTED rims, a rim corner that leaves its own fixed edge or collapses that edge’s trim, a vanished cap, and a push that collapses/inverts the solid.