Skip to main content

revolve_profile_exact

Function revolve_profile_exact 

Source
pub fn revolve_profile_exact(
    profile: &Profile,
    axis_origin: DVec3,
    axis_direction: DVec3,
    angle: f64,
    tolerance: Tolerance,
) -> Result<ExactBRep, GeomError>
Expand description

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

The axis must lie in the profile plane, exactly: z is zero in its direction and its origin. Along y (either sense) it builds in place; any other in-plane direction builds in the axis’s own frame and is placed back (#450). angle is in radians, by the right-hand rule about axis_direction.

A full turn (|angle| within tolerance of 2 pi) revolves every profile that lowers to a contour, provided it does not cross the axis and touches it only along edges or at perpendicular edge ends (#379): a sharp rectangle becomes an annular tube of two cylinders and two annular caps, a hole becomes a void shell. A partial turn (0 < |angle| < 2 pi) revolves the same profiles into a solid capped by the profile at both ends, each hole a tunnel between the caps, and may touch the axis along straight segments (see crate::revolve_partial).

Refused by name: an ellipse, a turn beyond a full turn, a profile crossing the axis, one touching it at an isolated vertex (a pinch point), an arc whose circle reaches the axis without being centred on it (spindle or horn torus), an axis out of the profile plane. A zero or non-finite angle is invalid input.