From a2ee528dae794b8c00e7a1fd583f759ec86615a4 Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Tue, 5 Oct 2021 10:46:55 +0200 Subject: [PATCH] Always call UnifySameDomain on + operator not only in 2D --- libsrc/occ/python_occ_shapes.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libsrc/occ/python_occ_shapes.cpp b/libsrc/occ/python_occ_shapes.cpp index 304cf780..5ae4883f 100644 --- a/libsrc/occ/python_occ_shapes.cpp +++ b/libsrc/occ/python_occ_shapes.cpp @@ -942,13 +942,13 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m) // make one face when fusing in 2D // from https://gitlab.onelab.info/gmsh/gmsh/-/issues/627 - int cntsolid = 0; - for (TopExp_Explorer e(shape1, TopAbs_SOLID); e.More(); e.Next()) - cntsolid++; - for (TopExp_Explorer e(shape2, TopAbs_SOLID); e.More(); e.Next()) - cntsolid++; - if (cntsolid == 0) - { + // int cntsolid = 0; + // for (TopExp_Explorer e(shape1, TopAbs_SOLID); e.More(); e.Next()) + // cntsolid++; + // for (TopExp_Explorer e(shape2, TopAbs_SOLID); e.More(); e.Next()) + // cntsolid++; + // if (cntsolid == 0) + // { ShapeUpgrade_UnifySameDomain unify(fused, true, true, true); unify.Build(); @@ -966,9 +966,9 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m) // PropagateProperties (unify, fused); return unify.Shape(); - } - else - return fused; + // } + // else + // return fused; }, "fuses shapes") .def("__radd__", [] (const TopoDS_Shape & shape, int i) // for sum([shapes]) { return shape; }, "needed for Sum([shapes])")