pyvista_cad.to_build123d#
- to_build123d(mesh)[source]#
Wrap a
pyvista.PolyDataas a facetedbuild123d.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
build123dis not installed.
- Parameters:
mesh (PolyData)
- Return type:
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'