Salome HOME
Make all result construction store shapes in the document structure
[modules/shaper.git] / src / Model / Model_ResultConstruction.cpp
index 76706aa41e2f1da6973354ec75f082fdbc23332d..94b844d2e8a6ebddfe30a353a4e3668bab63e7f0 100644 (file)
@@ -67,8 +67,7 @@ void Model_ResultConstruction::colorConfigInfo(std::string& theSection, std::str
 void Model_ResultConstruction::setShape(std::shared_ptr<GeomAPI_Shape> theShape)
 {
   if (myShape != theShape) {
-    if (!isInfinite())
-      storeShape(theShape);
+    storeShape(theShape);
     if (!theShape.get() || !theShape->isEqual(myShape)) {
       static const Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_UPDATED);
       ModelAPI_EventCreator::get()->sendUpdated(data()->owner(), anEvent);
@@ -238,7 +237,7 @@ void Model_ResultConstruction::storeShape(std::shared_ptr<GeomAPI_Shape> theShap
     std::shared_ptr<Model_Document> aMyDoc =
       std::dynamic_pointer_cast<Model_Document>(document());
     const TopoDS_Shape& aShape = theShape->impl<TopoDS_Shape>();
-    if (aShape.ShapeType() == TopAbs_VERTEX) {
+    if (isInfinite() || aShape.ShapeType() == TopAbs_VERTEX) {
       aShapeLab.ForgetAllAttributes(); // clear all previously stored
       TNaming_Builder aBuilder(aShapeLab);
       aBuilder.Generated(aShape);