pytha.create_cylinder - pytha-3d-cad/pytha-lua-api GitHub Wiki

Creates a cylinder in PYTHA as new part.

Similar to the Parts -> Cylinder function in the PYTHA user interface.

pytha.create_cylinder(height, radius [,origin [,options]]) 
Parameter Type Description
height number Height of the cylinder (in z-direction)
radius number Radius of the cylinder
origin {x,y,z} Optional: origin point of the cylinder
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 cylinder
options.v_axis {x,y,z} Local coordinate v-axis for the orientation of the cylinder
options.w_axis {x,y,z} Local coordinate w-axis for the orientation of the cylinder
options.segments number Circle segments of the cylinder
options.height_segments number Height sections of the cylinder
options.top_radius number Top radius of the cylinder.

Additional information

By specifying options.top_radius, both a frustum can be created as well as a cone by setting options.top_radius = 0

Return value

Type Description
element_handle An element handle of the newly created part

See also:

pytha, element handles, Axes and directions, create_block, create_sphere