Skip to content

pytha.create_text_3d

fabian-flassig edited this page May 28, 2026 · 1 revision

Creates a 3D text as a new part in PYTHA. The text is extruded to the given thickness.

Similar to the Parts -> 3D Text function in the PYTHA user interface.

pytha.create_text_3d(text, height, thickness [,origin [,options]])
Parameter Type Description
text string The text to create
height number Height of the text (cap height of the letters)
thickness number Extrusion thickness of the text in w-direction
origin {x,y,z} Optional: origin point of the text
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 text
options.v_axis {x,y,z} Local coordinate v-axis for the orientation of the text
options.w_axis {x,y,z} Local coordinate w-axis for the orientation of the text
options.font string Name of the font to use (e.g. "Arial")
options.bold boolean Whether the text is bold
options.italic boolean Whether the text is italic
options.underline boolean Whether the text is underlined
options.aspect_ratio number Width-to-height ratio of the letters. 0 keeps the font's default ratio.
options.orientation string Horizontal alignment of the text relative to the origin. One of "left", "center", "right". The vertical anchor is the baseline.

Return value

Type Description
element_handle An element handle of the newly created part

See also:

pytha, element handles, Axes and directions, create_text_engraving

Clone this wiki locally