-
Notifications
You must be signed in to change notification settings - Fork 18
pytha.create_tube
fabian-flassig edited this page Jun 8, 2026
·
1 revision
Creates a tube (hollow cylinder) in PYTHA as new part.
Similar to the Parts -> Tube function in the PYTHA user interface.
pytha.create_tube(height, outer_radius, inner_radius [,origin [,options]])| Parameter | Type | Description |
|---|---|---|
height |
number |
Height of the tube (in w/z-direction) |
outer_radius |
number |
Outer radius |
inner_radius |
number |
Inner radius (bore). Must be smaller than outer_radius; if the two are equal a thin wall is used automatically. |
origin |
{x,y,z} |
Optional: center point of the base |
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 tube |
options.v_axis |
{x,y,z} |
Local coordinate v-axis for the orientation of the tube |
options.w_axis |
{x,y,z} |
Local coordinate w-axis for the orientation of the tube |
options.segments |
number |
Circle segments of the tube |
options.height_segments |
number |
Height sections of the tube |
options.top_outer_radius |
number |
Outer radius at the top. Defaults to outer_radius (a straight tube); a different value produces a tapered (conical) tube. |
options.top_inner_radius |
number |
Inner radius at the top. Defaults to inner_radius. |
By default the tube is straight (top radii equal the bottom radii). Specify options.top_outer_radius and/or options.top_inner_radius to taper the tube — the radii are interpolated linearly from bottom to top over the height sections.
| Type | Description |
|---|---|
element_handle |
An element handle of the newly created part |
Minimum PYTHA Version: V27
pytha, element handles, Axes and Directions, create_cylinder, create_ring