pub fn revolved_cylinder_along_axis<S: Scalar>(
part: &mut Part<S>,
name: &str,
base_center: Vector3<S>,
radius: S,
height: S,
axis: Axis,
) -> GeopResult<SolidId>Expand description
Like revolved_cylinder, but with its axis parallel to axis instead
of always z — base_center is still the center of the bottom cap
(the cap nearer the origin along axis’s own positive direction), so
the solid spans [0, height] along axis from there.
Built as the same 3-segment revolve profile revolved_cylinder always
used, just swept via revolve_at_oriented around a CoordinateSystem
oriented to axis instead of the always-z-axis revolve_at. Each
orientation’s u/v/w basis is chosen as a cyclic permutation of the
standard one ((x, y, z) -> (y, z, x) -> (z, x, y)), so u x v = w
always holds — the same right-handed relationship revolve_at’s own
Axis::Z case has — and every axis produces a solid with outward-facing
normals, never one revolved “inside out”.
Named as the operation cylinder(name), after that profile (see
revolve_at_oriented): p0/p3 are the centers of the top/bottom
caps, c0 the top cap’s radius, c1 the side and c2 the bottom cap’s
radius.