From 80ba06d454d5bb018b94a90fbf38c1cb52bc7290 Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Wed, 1 Sep 2021 17:44:16 +0200 Subject: [PATCH] add occ Compound Function --- libsrc/occ/python_occ_shapes.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libsrc/occ/python_occ_shapes.cpp b/libsrc/occ/python_occ_shapes.cpp index 10f79b7d..fcddfdbc 100644 --- a/libsrc/occ/python_occ_shapes.cpp +++ b/libsrc/occ/python_occ_shapes.cpp @@ -1624,6 +1624,17 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m) return builder.Shape(); }); + m.def("Compound", [](std::vector shapes) + -> TopoDS_Shape + { + BRep_Builder builder; + TopoDS_Compound comp; + builder.MakeCompound(comp); + for(auto& s : shapes) + builder.Add(comp, s); + return comp; + }); + m.def("Glue", [] (TopoDS_Shape shape) -> TopoDS_Shape { BOPAlgo_Builder builder;