pyvista_cad.to_cadquery#
- to_cadquery(mesh)[source]#
Wrap a
pyvista.PolyDataas a facetedcadquery.Workplane.The mesh is converted to an OCCT
TopoDSshell and wrapped in acadquery.Compoundon a defaultXYworkplane.- Parameters:
- meshpyvista.PolyData
Surface mesh to convert.
- Returns:
- cadquery.Workplane
Workplane wrapping a faceted
Compound. Analytical surface information is lost.
- Raises:
- pyvista_cad.OptionalDependencyError
If
cadqueryis not installed.
- Parameters:
mesh (pv.PolyData)
- Return type:
See also
from_cadqueryInverse conversion.
Examples
>>> import pyvista as pv >>> from pyvista_cad import to_cadquery >>> wp = to_cadquery(pv.Sphere()) >>> wp.val().Volume() > 0 True