From: azv Date: Wed, 15 May 2019 05:17:42 +0000 (+0300) Subject: Fix regression in Partition feature X-Git-Tag: VEDF2019Lot4~101^2~72 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d40494cbcddd82f8cb02ce72435ef7bde0986d7b;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);