Skip to main content

draft_faces

Function draft_faces 

Source
pub fn draft_faces(
    solid: &BrepSolid,
    face_ids: &[u64],
    pull_direction: Vec3,
    neutral_point: Vec3,
    angle_radians: f64,
) -> Result<BrepSolid, KernelRefusal>
Expand description

Draft face_ids of solid by angle_radians for the pull direction pull_direction, about the neutral plane through neutral_point square to the pull. See the contract at the top of this file: a positive angle leans each face into the material as it goes along the pull (a boss narrows, a pocket or a hole widens); a negative one leans it out.

Each selected face must be a plane parallel to the pull or a cylinder whose axis is parallel to it. The other faces keep their carriers and are re-trimmed to the drafted ones; the body’s topology is unchanged, except on a convex polyhedron, where a draft that consumes a face is built as the intersection of the faces’ half-spaces. Anything else is refused by name.