From: dbv Date: Thu, 3 Mar 2016 07:24:08 +0000 (+0300) Subject: Issue #1351: partition is not done X-Git-Tag: V_2.2.0~20^2~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=33c5fdce3cd63dd95a738439a0399dd982abcd73;p=modules%2Fshaper.git Issue #1351: partition is not done --- diff --git a/src/FeaturesPlugin/FeaturesPlugin_Partition.cpp b/src/FeaturesPlugin/FeaturesPlugin_Partition.cpp index e7e74c68e..fd3d270a4 100755 --- a/src/FeaturesPlugin/FeaturesPlugin_Partition.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Partition.cpp @@ -102,12 +102,12 @@ void FeaturesPlugin_Partition::execute() if(isCombine) { // Create single result. - if(!aTools.empty()) { - // This is a workaround for naming. Passing compound of objects as argument instead each object separately. - std::shared_ptr aCompoud = GeomAlgoAPI_CompoundBuilder::compound(anObjects); - anObjects.clear(); - anObjects.push_back(aCompoud); - } + //if(!aTools.empty()) { + // // This is a workaround for naming. Passing compound of objects as argument instead each object separately. + // std::shared_ptr aCompoud = GeomAlgoAPI_CompoundBuilder::compound(anObjects); + // anObjects.clear(); + // anObjects.push_back(aCompoud); + //} std::shared_ptr aPartitionAlgo(new GeomAlgoAPI_Partition(anObjects, aTools)); // Checking that the algorithm worked properly. @@ -131,7 +131,10 @@ void FeaturesPlugin_Partition::execute() std::shared_ptr aResultBody = document()->createBody(data(), aResultIndex); aMakeShapeList.appendAlgo(aPartitionAlgo); GeomAPI_DataMapOfShapeShape& aMapOfShapes = *aPartitionAlgo->mapOfSubShapes().get(); - loadNamingDS(aResultBody, anObjects.front(), aToolsForNaming, aPartitionAlgo->shape(), aMakeShapeList, aMapOfShapes); + std::shared_ptr aBaseShape = anObjects.front(); + anObjects.pop_front(); + aToolsForNaming.insert(aToolsForNaming.end(), anObjects.begin(), anObjects.end()); + loadNamingDS(aResultBody, aBaseShape, aToolsForNaming, aPartitionAlgo->shape(), aMakeShapeList, aMapOfShapes); setResult(aResultBody, aResultIndex); aResultIndex++; }