From 7c2070ab0da96f4bff180e8f51acbd69ce9c448e Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Mon, 29 Aug 2022 14:43:01 +0200 Subject: [PATCH] fix closesurface identification IsSame instead of operator == --- libsrc/occ/occ_utils.hpp | 5 +++++ libsrc/occ/occgeom.hpp | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libsrc/occ/occ_utils.hpp b/libsrc/occ/occ_utils.hpp index b6d2208e..15375c2e 100644 --- a/libsrc/occ/occ_utils.hpp +++ b/libsrc/occ/occ_utils.hpp @@ -282,7 +282,12 @@ namespace netgen GProp_GProps props; switch (shape.ShapeType()) { + case TopAbs_SOLID: + case TopAbs_COMPOUND: + case TopAbs_COMPSOLID: + BRepGProp::VolumeProperties (shape, props); break; case TopAbs_FACE: + case TopAbs_SHELL: BRepGProp::SurfaceProperties (shape, props); break; default: BRepGProp::LinearProperties(shape, props); diff --git a/libsrc/occ/occgeom.hpp b/libsrc/occ/occgeom.hpp index eb598f1f..0e503a86 100644 --- a/libsrc/occ/occgeom.hpp +++ b/libsrc/occ/occgeom.hpp @@ -408,7 +408,7 @@ namespace netgen for (TopExp_Explorer e(shape, typ); e.More(); e.Next()) { auto s = e.Current(); - for (auto mods : builder.Modified(e.Current())) + for (auto mods : builder.Modified(s)) mod_map[s].insert(mods); } @@ -456,7 +456,7 @@ namespace netgen id_new.to = to_mapped; id_new.from = from_mapped; id_new.trafo = trafo_mapped; - auto id_owner = from == s ? from_mapped : to_mapped; + auto id_owner = from.IsSame(s) ? from_mapped : to_mapped; OCCGeometry::identifications[id_owner].push_back(id_new); } }