Add Fuse operation for occ shapes

This commit is contained in:
Christopher Lackner 2021-10-13 16:54:23 +02:00
parent 43182c80cc
commit 733824bffc

View File

@ -1909,6 +1909,18 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m)
return builder.Shape();
}, py::arg("shape"), "glue together shapes from shape, typically a compound");
m.def("Fuse", [](const vector<TopoDS_Shape>& shapes) -> TopoDS_Shape
{
auto s = shapes[0];
for(auto i : Range(size_t(1), shapes.size()))
{
BRepAlgoAPI_Fuse builder(s, shapes[i]);
PropagateProperties(builder, s);
PropagateProperties(builder, shapes[i]);
s = builder.Shape();
}
return s;
});
// py::class_<Handle(Geom_TrimmedCurve)> (m, "Geom_TrimmedCurve")