UnifySameDomain is good for 2D, needs some more exploration

This commit is contained in:
Joachim Schoeberl 2021-08-11 11:00:05 +02:00
parent 0de8254ea2
commit 73f387a7ed

View File

@ -371,12 +371,12 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m)
.def("__add__", [] (const TopoDS_Shape & shape1, const TopoDS_Shape & shape2) { .def("__add__", [] (const TopoDS_Shape & shape1, const TopoDS_Shape & shape2) {
auto fused = BRepAlgoAPI_Fuse(shape1, shape2).Shape(); auto fused = BRepAlgoAPI_Fuse(shape1, shape2).Shape();
return fused;
// make one face when fusing in 2D // make one face when fusing in 2D
// from https://gitlab.onelab.info/gmsh/gmsh/-/issues/627 // from https://gitlab.onelab.info/gmsh/gmsh/-/issues/627
ShapeUpgrade_UnifySameDomain unify(fused, true, true, true); // ShapeUpgrade_UnifySameDomain unify(fused, true, true, true);
unify.Build(); // unify.Build();
return unify.Shape(); // return unify.Shape();
}) })
.def("__mul__", [] (const TopoDS_Shape & shape1, const TopoDS_Shape & shape2) { .def("__mul__", [] (const TopoDS_Shape & shape1, const TopoDS_Shape & shape2) {