Skip to main content

extrude_profile_exact

Function extrude_profile_exact 

Source
pub fn extrude_profile_exact(
    profile: &Profile,
    direction: DVec3,
    depth: f64,
    tolerance: Tolerance,
) -> Result<ExactBRep, GeomError>
Expand description

Extrude a supported profile into an exact, closed analytic B-rep.

The direction may point either way along the profile normal: an offset below the profile plane builds the mirror image of the prism above it, outward oriented (see the module docs). A direction within tolerance of the profile plane is refused as "extrusion direction in the profile plane". A direction leaning off the normal builds the oblique prism: its far cap is the profile moved by the whole offset, and an arc or a circle sweeps an oblique circular cylinder, built exactly as the elliptical cylinder it is (#280). An ellipse extrudes only along the normal (either way) and is refused as "oblique ellipse extrusion" otherwise; a family the builders do not cover returns a typed refusal instead of taking the tessellation path.