From: dbv Date: Thu, 14 Apr 2016 08:04:40 +0000 (+0300) Subject: Fix naming X-Git-Tag: V_2.3.0~222 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fc6f3b77fd3c3affe39aa3357433cfd4effb22a2;p=modules%2Fshaper.git Fix naming --- diff --git a/src/FeaturesPlugin/FeaturesPlugin_CompositeSketch.cpp b/src/FeaturesPlugin/FeaturesPlugin_CompositeSketch.cpp index 114b0a3b1..665840127 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_CompositeSketch.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_CompositeSketch.cpp @@ -279,8 +279,12 @@ void FeaturesPlugin_CompositeSketch::storeGenerationHistory(ResultBodyPtr theRes ListOfShape aV1History, aV2History; theMakeShape->generated(aV1, aV1History); theMakeShape->generated(aV2, aV2History); - theResultBody->generated(aV1, aV1History.front(), aGenName + "Edge_1", theTag++); - theResultBody->generated(aV2, aV2History.front(), aGenName + "Edge_2", theTag++); + if(!aV1History.empty()) { + theResultBody->generated(aV1, aV1History.front(), aGenName + "Edge_1", theTag++); + } + if(!aV2History.empty()) { + theResultBody->generated(aV2, aV2History.front(), aGenName + "Edge_2", theTag++); + } } case GeomAPI_Shape::FACE: case GeomAPI_Shape::SHELL: { diff --git a/src/FeaturesPlugin/FeaturesPlugin_Pipe.cpp b/src/FeaturesPlugin/FeaturesPlugin_Pipe.cpp index 3e46113b1..4f3e1675b 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Pipe.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Pipe.cpp @@ -258,8 +258,12 @@ void FeaturesPlugin_Pipe::storeResult(const std::shared_ptr theBa ListOfShape aV1History, aV2History; thePipeAlgo.generated(aV1, aV1History); thePipeAlgo.generated(aV2, aV2History); - aResultBody->generated(aV1, aV1History.front(), aGenName + "Edge_1", aGenTag++); - aResultBody->generated(aV2, aV2History.front(), aGenName + "Edge_2", aGenTag++); + if(!aV1History.empty()) { + aResultBody->generated(aV1, aV1History.front(), aGenName + "Edge_1", aGenTag++); + } + if(!aV2History.empty()) { + aResultBody->generated(aV2, aV2History.front(), aGenName + "Edge_2", aGenTag++); + } } case GeomAPI_Shape::FACE: case GeomAPI_Shape::SHELL: {