pyvista_cad.write_brep

On this page

pyvista_cad.write_brep#

write_brep(mesh, path, /, **_)[source]#

Write a pyvista.PolyData as a faceted BREP file.

The mesh is converted to a TopoDS_Compound of triangular faces and serialized with BRepTools.Write_s.

Parameters:
meshpyvista.PolyData

Source mesh.

pathstr or os.PathLike

Destination .brep / .brp path.

**_Any

Forward-compat keyword arguments are accepted and ignored.

Raises:
pyvista_cad.CadWriteError

If mesh is not a pyvista.PolyData, or if OCCT’s BRepTools.Write_s reports a failed write (for example an unwritable destination path): the failure is never silent.

pyvista_cad.OptionalDependencyError

If OCP is not installed.

Parameters:
Return type:

None