Skip to content

pytha.create_cone

fabian-flassig edited this page Jun 8, 2026 · 1 revision

Creates a cone in PYTHA as new part.

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

pytha.create_cone(height, radius [,origin [,options]])
Parameter Type Description
height number Height of the cone (in w/z-direction)
radius number Radius of the base circle
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 cone
options.v_axis {x,y,z} Local coordinate v-axis for the orientation of the cone
options.w_axis {x,y,z} Local coordinate w-axis for the orientation of the cone
options.segments number Circle segments of the base
options.height_segments number Height sections of the cone
options.top_radius number Top radius. Defaults to 0 (a pointed cone); a value > 0 produces a truncated cone (frustum).

Additional information

By default the cone tapers to a single point (apex). Specify options.top_radius > 0 to create a truncated cone (frustum) with a flat top of that radius.

Return value

Type Description
element_handle An element handle of the newly created part

Version Support:

Minimum PYTHA Version: V27

See also:

pytha, element handles, Axes and Directions, create_cylinder, create_pyramid

Clone this wiki locally