Skip to main content

tapered_revolve

Function tapered_revolve 

Source
pub fn tapered_revolve(
    start: &Rings,
    end: &Rings,
    axis_origin: Point3,
    axis_direction: Vec3,
    angle: Scalar,
    tolerance: Tolerance,
) -> GeomResult<TriMesh>
Expand description

Revolve between two profiles.

Unlike a plain revolution this can never close: a full turn would have to meet the start profile with the end profile, which are different by construction. It is always capped.

A ring vertex that stays in place on the axis is meshed once (#364); one that touches the axis at a single end, or slides along it, is refused.

Every point of the surface the blended rings sweep lies within tolerance.linear() of the mesh (#231). With t in [0, 1] along the turn, a ring point moves as f(t) = R(angle t) q(t) with q affine in t (the blend), so f'' = angle^2 R'' q + 2 angle R' q', and |R'' v| and |R' v| are the distance of v from the axis direction, at most |v|. Hence |f''| <= angle^2 rho_max + 2 |angle| d_max, with rho_max the largest distance of a start or end ring vertex from the axis (a convex function of the blend, so largest at an end) and d_max the largest distance a vertex travels between the two profiles. Taylor’s remainder bounds the distance of f from its chord over a step of 1/n by |f''|_max / (8 n^2), and the chords between two stations span the bilinear patch of each wall quad, which is within loft::quad_deviation of its two triangles; the step count grows until the sum of the two fits.