pyvista_cad.CadDataSetAccessor.exact_volume#
- CadDataSetAccessor.exact_volume()[source]#
Return the exact volume from the cached
TopoDS_Shape.- Returns:
- float
Volume in cube of the dataset’s units, as computed by OCCT
GProp_GProps.
- Raises:
- pyvista_cad.CadError
If no cached
TopoDS_Shapeis associated with the mesh.
- Return type:
Examples
>>> import pyvista_cad >>> from pyvista_cad import examples >>> cube = pyvista_cad.read_step(examples.step_cube)[0] >>> round(cube.cad.exact_volume()) 1000