Skip to content

pytha.create_text_engraving

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

Creates a text as a new edge part (engraving curves, without thickness) in PYTHA.

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

pytha.create_text_engraving(text, height [,origin [,options]])
Parameter Type Description
text string The text to create
height number Height of the text (cap height of the letters)
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.
options.open boolean Whether the letter contours are kept as open curves rather than closed loops

Additional information

In contrast to create_text_3d the engraving variant produces a part made of edges only (no volume), suitable e.g. for CNC engraving paths or annotations on faces.

Return value

Type Description
element_handle An element handle of the newly created part

See also:

pytha, element handles, Axes and directions, create_text_3d

Clone this wiki locally