add occ Compound Function

This commit is contained in:
Christopher Lackner 2021-09-01 17:44:16 +02:00
parent 5f64c127f8
commit 80ba06d454

View File

@ -1624,6 +1624,17 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m)
return builder.Shape();
});
m.def("Compound", [](std::vector<TopoDS_Shape> 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;