Skip to main content

Module cylinder

Module cylinder 

Source
Expand description

A capped circular cylinder, built two different ways: revolved_cylinder (via [revolve_at], an exact circular cross-section) and extruded_cylinder (via extrude, an n-gon approximating one).

Enums§

Axis
Which axis a cylinder’s own axis runs parallel to.

Functions§

extruded_cylinder
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.
revolved_cylinder
A capped cylinder of radius and height, with its axis parallel to the z-axis through base_center (the center of its bottom cap — the solid spans z in [base_center.z, base_center.z + height]), as an exact circular cross-section swept via revolve_at.
revolved_cylinder_along_axis
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.