pub struct SweptEnvelope {
pub centre: Vec3,
pub axis: Vec3,
pub radial: Vec3,
pub major: f64,
pub minor: f64,
pub turn: f64,
pub residual: f64,
}Expand description
The recognized configuration: a circular section on a circular planar path, tight enough that the envelope crosses itself.
Fields§
§centre: Vec3The path circle’s centre — the revolve’s origin.
axis: Vec3The path plane’s unit normal, oriented so the sweep runs +turn.
radial: Vec3Unit vector from centre to the section’s centre.
major: f64R, the path’s radius of curvature.
minor: f64r, the section’s radius.
turn: f64Θ, the turn the sweep makes, in (0, 2π].
residual: f64The worst relative residual either circle read on recognition.
Implementations§
Source§impl SweptEnvelope
impl SweptEnvelope
Sourcepub fn chord_half_length(&self) -> f64
pub fn chord_half_length(&self) -> f64
Half the axis chord, √(r² − R²): how far the section reaches past the
axis on each side. Zero for a section TANGENT to the axis.
Sourcepub fn tangent(&self) -> bool
pub fn tangent(&self) -> bool
True when the section only TOUCHES the axis: no lemon, no chord, and the apple is the whole disc revolved.
Sourcepub fn apple_volume(&self) -> f64
pub fn apple_volume(&self) -> f64
The APPLE’s closed-form volume: Θ·∫∫_{x≥0} x dA.
Sourcepub fn lemon_volume(&self) -> f64
pub fn lemon_volume(&self) -> f64
The LEMON’s closed-form volume: Θ·∫∫_{x<0} |x| dA. Zero for a tangent
section, and never counted twice — a FULL turn puts the lemon inside the
apple and swept_envelope_volume is the one to read there.