pyvista.Text3D#
- Text3D(
- string: str,
- depth: float | None = None,
- width: float | None = None,
- height: float | None = None,
- center: VectorLike[float] = (0.0, 0.0, 0.0),
- normal: VectorLike[float] = (0.0, 0.0, 1.0),
文字列から3 Dテキストを作成します.
テキストは,指定された幅,高さ,または深さを持つように構成することができます.
- パラメータ:
- string
str
String to generate 3D text from. If
None
or an empty string, the output mesh will have a single point atcenter
.- depth
float
,optional
Depth of the text. If
None
, the depth is set to half theheight
by default. Set to0.0
for planar text.バージョン 0.43 で変更: デフォルトの深さは,高さの半分として動的に計算されるようになりました.以前は,デフォルトの深さは
0.5
という固定値でした.- width
float
,optional
Width of the text. If
None
, the width is scaled proportional toheight
.Added in version 0.43.
- height
float
,optional
Height of the text. If
None
, the height is scaled proportional towidth
.Added in version 0.43.
- center
Sequence
[float
], default: (0.0, 0.0, 0.0) テキストの中心.テキストの軸合わせされたバウンディングボックスの中央として定義されます.
Added in version 0.43.
- 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.Added in version 0.43.
- string
- 戻り値:
pyvista.PolyData
3Dテキストメッシュ.
例
>>> import pyvista as pv >>> text_mesh = pv.Text3D('PyVista') >>> text_mesh.plot(cpos='xy')