pyvista.Text3DSource#
- class Text3DSource(
- string=None,
- depth=None,
- width=None,
- height=None,
- center=(0, 0, 0),
- normal=(0, 0, 1),
- process_empty_string=True,
3D text from a string.
Generate 3D text from a string with a specified width, height or depth.
Added in version 0.43.
- Parameters:
- string
str
, default: “” Text string of the source.
- depth
float
,optional
Depth of the text. If
None
, the depth is set to half theheight
by default. Set to0.0
for planar text.- width
float
,optional
Width of the text. If
None
, the width is scaled proportional toheight
.- height
float
,optional
Height of the text. If
None
, the height is scaled proportional towidth
.- center
Sequence
[float
], default: (0.0, 0.0, 0.0) Center of the text, defined as the middle of the axis-aligned bounding box of the text.
- normal
Sequence
[float
], default: (0.0, 0.0, 1.0) Normal direction of the text. The direction is parallel to the
depth
of the text and points away from the front surface of the text.- process_empty_stringbool, default:
True
If
True
, whenstring
is empty theoutput
is a single point located atcenter
instead of an empty mesh. Seeprocess_empty_string
for details.
- string
Methods
Update the output of the source.
Attributes
Return or set the center of the text.
Return or set the depth of the text.
Return or set the height of the text.
Return or set the normal direction of the text.
Get the output of the source.
Return or set flag to control behavior when empty strings are set.
Return or set the text string.
Return or set the width of the text.