From: azv Date: Wed, 15 May 2019 10:21:45 +0000 (+0300) Subject: Yet another regressions in Partition. X-Git-Tag: VEDF2019Lot4~139^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FMultiLevelCompound;p=modules%2Fshaper.git Yet another regressions in Partition. --- diff --git a/src/FeaturesPlugin/FeaturesPlugin_Partition.cpp b/src/FeaturesPlugin/FeaturesPlugin_Partition.cpp index 514fbdf83..23346e919 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Partition.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Partition.cpp @@ -245,7 +245,7 @@ bool FeaturesPlugin_Partition::cutSubs( // compose a set of tools for the CUT operation: // find the list of unused subs of the first argument or use itself ListOfShape aToolsForUsed, aToolsForUnused; - GeomShapePtr aFirstArgument = theHierarchy.Parent(*anIt); + GeomShapePtr aFirstArgument = theHierarchy.Parent(*anIt, false); if (aFirstArgument && aFirstArgument->shapeType() == GeomAPI_Shape::COMPSOLID) { theHierarchy.SplitCompound(aFirstArgument, theUsed, aToolsForUsed); theNotUsed = aToolsForUsed; @@ -261,11 +261,10 @@ bool FeaturesPlugin_Partition::cutSubs( for (++anIt; anIt != theHierarchy.End() && isOk; ++anIt) { ListOfShape aUsed, aNotUsed; - GeomShapePtr aParent = theHierarchy.Parent(*anIt); - if (aParent && aParent->shapeType() <= GeomAPI_Shape::COMPSOLID) { + GeomShapePtr aParent = theHierarchy.Parent(*anIt, false); + if (aParent && aParent->shapeType() == GeomAPI_Shape::COMPSOLID) { + aParent = theHierarchy.Parent(*anIt); // get parent once again to mark its subs as processed theHierarchy.SplitCompound(aParent, aUsed, aNotUsed); - if (aParent->shapeType() == GeomAPI_Shape::COMPOUND) - aNotUsed.clear(); // do not cut unused subshapes of compound } else aUsed.push_back(*anIt);