Skip to main content

swept_disk_within

Function swept_disk_within 

Source
pub fn swept_disk_within(
    sample: impl FnMut(Scalar) -> GeomResult<SampledPath>,
    radius: Scalar,
    inner_radius: Option<Scalar>,
    fillet_radius: Option<Scalar>,
    chord: Scalar,
) -> GeomResult<TriMesh>
Expand description

swept_disk whose surface stays within chord of the exact tube round a smooth directrix (#231).

Half the budget chords the disk: a ring of n points inscribed in a circle of radius r is within r (1 - cos(pi/n)) of it, and every station places it rigidly, so every point of the exact tube is within that of the surface the rings sweep. The other half bounds that surface against its triangles, as fixed_reference_sweep_within does, with the disk’s radius as the reach: along a circular arc of radius R the rotation-minimising frames turn with the arc, so the stations are rotations of one ring about the arc’s axis and the outer side of the tube, R + r from it, sets the step. sample(b) samples the directrix to chord budget b; see SampledPath.