Skip to main content

draft

Function draft 

Source
pub fn draft(
    topo: &mut Topology,
    solid: SolidId,
    draft_faces: &[FaceId],
    pull_direction: Vec3,
    neutral_point: Point3,
    angle_radians: f64,
) -> Result<SolidId, OperationsError>
Expand description

Apply a draft angle to selected faces of a solid.

Tapers the specified faces by angle_radians relative to pull_direction. The neutral plane is defined by neutral_point and pull_direction: vertices on the neutral plane stay fixed while vertices above/below are moved outward/inward.

ยงErrors

Returns an error if:

  • angle_radians is zero or negative
  • pull_direction is zero-length
  • Any draft face is NURBS
  • The solid is invalid