From: azv Date: Wed, 15 May 2019 05:17:42 +0000 (+0300) Subject: Fix regression in Partition feature X-Git-Tag: VEDF2019Lot4~139^2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3e51a4175c0c8ed05073688c6ae3c08f14e77ffe;p=modules%2Fshaper.git Fix regression in Partition feature --- diff --git a/src/FeaturesPlugin/FeaturesPlugin_Partition.cpp b/src/FeaturesPlugin/FeaturesPlugin_Partition.cpp index 83a87047e..514fbdf83 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Partition.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Partition.cpp @@ -258,12 +258,15 @@ bool FeaturesPlugin_Partition::cutSubs( // cut subs bool isOk = true; - for (; anIt != theHierarchy.End() && isOk; ++anIt) { + for (++anIt; anIt != theHierarchy.End() && isOk; ++anIt) { ListOfShape aUsed, aNotUsed; GeomShapePtr aParent = theHierarchy.Parent(*anIt); - if (aParent && aParent->shapeType() == GeomAPI_Shape::COMPSOLID) + if (aParent && aParent->shapeType() <= GeomAPI_Shape::COMPSOLID) { 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);