From b736c0c405b4d4a7e2c54a2772a47035dd0abc5a Mon Sep 17 00:00:00 2001 From: azv Date: Wed, 15 May 2019 13:21:45 +0300 Subject: [PATCH] Yet another regressions in Partition. --- src/FeaturesPlugin/FeaturesPlugin_Partition.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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); -- 2.30.2