Merge branch 'occ_compound' into 'master'

add occ Compound Function

See merge request jschoeberl/netgen!407
This commit is contained in:
Joachim Schöberl 2021-09-01 16:33:44 +00:00
commit 1b7aa9baf8

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;