-
Notifications
You must be signed in to change notification settings - Fork 18
pytha.create_ring
fabian-flassig edited this page Jun 8, 2026
·
1 revision
Creates a ring (torus) in PYTHA as new part.
Similar to the Parts -> Ring function in the PYTHA user interface.
pytha.create_ring(major_radius, minor_radius [,origin [,options]])| Parameter | Type | Description |
|---|---|---|
major_radius |
number |
Distance from the center of the ring to the center of the tube (the radius of the ring itself) |
minor_radius |
number |
Radius of the tube cross-section. Is clamped to major_radius if larger. |
origin |
{x,y,z} |
Optional: center point of the ring |
options |
{...} |
Optional: a table that may contain the following options: |
options.u_axis |
{x,y,z} |
Local coordinate u-axis for the orientation of the ring |
options.v_axis |
{x,y,z} |
Local coordinate v-axis for the orientation of the ring |
options.w_axis |
{x,y,z} |
Local coordinate w-axis for the orientation of the ring |
options.segments |
number |
Segments around the ring (the major circle) |
options.latitude_segments |
number |
Segments of the tube cross-section (the minor circle) |
options.bulges |
number |
Number of bulges around the ring (default 0 = a smooth ring) |
options.bulge_radius |
number |
Minor radius at the bulge peaks. Only relevant when bulges > 0; the cross-section radius is modulated between minor_radius and bulge_radius. Defaults to minor_radius (no visible bulging). |
With options.bulges > 0 the ring is deformed into a wavy/gear-like shape: the tube radius oscillates bulges times between minor_radius and bulge_radius as you travel around the ring. Set bulge_radius larger than minor_radius for outward bumps or smaller for inward dents.
| Type | Description |
|---|---|
element_handle |
An element handle of the newly created part |
Minimum PYTHA Version: V27
pytha, element handles, Axes and Directions, create_tube, create_sphere