From 5292a09c9401d4a383ae8cc482e7e1f0341b17a5 Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Wed, 22 Jan 2025 12:24:30 +0100 Subject: [PATCH] add TopoDS_Shape.WriteBrep --- libsrc/occ/python_occ_shapes.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libsrc/occ/python_occ_shapes.cpp b/libsrc/occ/python_occ_shapes.cpp index 27a582fe..9c645a37 100644 --- a/libsrc/occ/python_occ_shapes.cpp +++ b/libsrc/occ/python_occ_shapes.cpp @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -806,7 +807,10 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m) .def("WriteStep", [](const TopoDS_Shape & shape, string & filename) { step_utils::WriteSTEP(shape, filename); } , py::arg("filename"), "export shape in STEP - format") - + .def("WriteBrep", [](const TopoDS_Shape & shape, const string& filename) + { + BRepTools::Write(shape, filename.c_str()); + }, py::arg("filename"), "export shape in BREP - format") .def("bc", [](const TopoDS_Shape & shape, const string & name) { for (TopExp_Explorer e(shape, TopAbs_FACE); e.More(); e.Next())