Skip to main content

extrude_profile_brep_draft_roof

Function extrude_profile_brep_draft_roof 

Source
pub fn extrude_profile_brep_draft_roof(
    profile: &[NurbsCurve],
    direction: Vec3,
    distance: f64,
    draft_angle_rad: f64,
) -> Result<BrepSolid, KernelRefusal>
Expand description

The solid of profile extruded by distance along direction with its walls drafted inward by draft_angle_rad, whether or not the taper closes the section before the far end.

Where crate::extrude_profile_brep_draft builds, this is its solid, unchanged. Where it refuses because the taper closes the section (draft_section_closes), the solid under the leaning walls is built: a rectangle drafted past half its width ends in a ridge, an L in a ridge over each arm. Its faces are, in order: the walls, those of each side of the profile together and in the profile’s order (sides that run on in one line have one wall, told as the first of them); the face in the profile’s plane; and the face in the far plane, if the walls leave one. The extrusion runs square to the profile’s plane.

Refuses, by name: a profile with a side that is not straight (roof_side), a taper that is refused as closing but does not lean inward (roof_taper), a notch that has a notch of its own (roof_nested_notch; its sides must all turn the same way), and a result with a face that joins no wall standing on its own side (roof_wall: a wall would have cut material that is not under it).