Skip to main content

extruded_cylinder

Function extruded_cylinder 

Source
pub fn extruded_cylinder<S: Scalar>(
    part: &mut Part<S>,
    name: &str,
    base_center: Vector3<S>,
    radius: S,
    height: S,
    segments: usize,
) -> GeopResult<SolidId>
Expand description

A capped cylinder of radius and height, with its axis parallel to the z-axis through base_center, as a regular segments-gon prism approximating a circular cross-section, swept via extrude.

The coordinate system is left-handed (w points the opposite way u x v would for a right-handed one) — extrude needs that for a CCW boundary’s normals to face outward (see its own module doc).

Named as the operation cylinder(name), after the polygon’s corners p0.. and sides c0.. (see ExtrudeNames).