pyvista_cad.to_build123d

On this page

pyvista_cad.to_build123d#

to_build123d(mesh)[source]#

Wrap a pyvista.PolyData as a faceted build123d.Compound.

Parameters:
meshpyvista.PolyData

Surface mesh to convert.

Returns:
build123d.Compound

Faceted compound. Analytical surface data is lost; chained fillets / shells will not behave as on parametric geometry.

Raises:
pyvista_cad.OptionalDependencyError

If build123d is not installed.

Parameters:

mesh (PolyData)

Return type:

Any

Examples

Wrap a PyVista sphere as a build123d compound (requires the [step] extra):

>>> import pyvista as pv
>>> from pyvista_cad import to_build123d
>>> compound = to_build123d(pv.Sphere())
>>> type(compound).__name__
'Compound'