mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-12 22:20:35 +05:00
Add Fuse operation for occ shapes
This commit is contained in:
parent
43182c80cc
commit
733824bffc
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user