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.

A re-solve looks only at the faces the selection borders, so a result that meets a face it does not border can close incidence-clean on a body that passes through itself. crate::accept_sound is the floor on the way out of this entry, as it is for crate::move_faces: it repairs where the crossing can be proved and refuses by name where it cannot. draft_faces_unchecked is the re-solve alone, for a caller that runs its own acceptance on the result.