Salome HOME
Merge branch 'Dev_2.1.0' of salome:modules/shaper into Dev_2.1.0
[modules/shaper.git] / src / ConstructionPlugin / ConstructionPlugin_Axis.cpp
index 8741df7dc16e0a359a3b5f8b545ae85d27f1b6f5..8a6c2a5d0c23fb8ea0dad5ad7b35404771e1c90c 100644 (file)
@@ -56,6 +56,7 @@ void ConstructionPlugin_Axis::createAxisByTwoPoints()
         std::shared_ptr<GeomAPI_Edge> anEdge = GeomAlgoAPI_EdgeBuilder::line(aStart, anEnd);
 
         ResultConstructionPtr aConstr = document()->createConstruction(data());
+        aConstr->setInfinite(true);
         aConstr->setShape(anEdge);
         setResult(aConstr);
       }
@@ -71,6 +72,7 @@ void ConstructionPlugin_Axis::createAxisByCylindricalFace()
       std::shared_ptr<GeomAPI_Edge> anEdge = GeomAlgoAPI_EdgeBuilder::cylinderAxis(aSelection);
 
       ResultConstructionPtr aConstr = document()->createConstruction(data());
+      aConstr->setInfinite(true);
       aConstr->setShape(anEdge);
       setResult(aConstr);
     }
@@ -96,7 +98,5 @@ bool ConstructionPlugin_Axis::customisePresentation(ResultPtr theResult, AISObje
   isCustomized = thePrs->setLineStyle(3) || isCustomized;
   isCustomized = thePrs->setWidth(2) || isCustomized;
 
-  thePrs->setInfiniteState(true);
-
   return isCustomized;
 }