]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix naming
authordbv <dbv@opencascade.com>
Thu, 14 Apr 2016 08:04:40 +0000 (11:04 +0300)
committerdbv <dbv@opencascade.com>
Thu, 14 Apr 2016 15:18:58 +0000 (18:18 +0300)
src/FeaturesPlugin/FeaturesPlugin_CompositeSketch.cpp
src/FeaturesPlugin/FeaturesPlugin_Pipe.cpp

index 114b0a3b18f94a7d5d01bd3d8cf98d89e5e28afb..665840127a26a3c281e21ebedd53e324efe4b6f7 100644 (file)
@@ -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: {
index 3e46113b1933d88f41c2f4756e86c42f9da1e089..4f3e1675be3bbc8312baafe1fcb6dfd631cf9d3b 100644 (file)
@@ -258,8 +258,12 @@ void FeaturesPlugin_Pipe::storeResult(const std::shared_ptr<GeomAPI_Shape> 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: {