Salome HOME
Fix for the issue #1130
[modules/shaper.git] / src / Model / Model_ResultConstruction.cpp
index 2a8893a7ea0de836b78b73d151bd5fb529094ae5..443c9ce9f24316fbef0b2f1d9c924866f5061d82 100644 (file)
@@ -44,10 +44,9 @@ std::shared_ptr<GeomAPI_Shape> Model_ResultConstruction::shape()
 
 Model_ResultConstruction::Model_ResultConstruction()
 {
-  myIsDisabled = true; // by default it is not initialized and false to be after created
   myIsInHistory = true;
+  myIsInfinite = false;
   myFacesUpToDate = false;
-  setIsConcealed(false);
 }
 
 void Model_ResultConstruction::setIsInHistory(const bool isInHistory)
@@ -67,7 +66,7 @@ int Model_ResultConstruction::facesNum()
       std::list<std::shared_ptr<GeomAPI_Shape> >::iterator aFIter = aFaces.begin();
       for(; aFIter != aFaces.end(); aFIter++) {
         std::shared_ptr<GeomAPI_Face> aFace(new GeomAPI_Face(*aFIter));
-        if (aFace.get())
+        if (aFace.get() && !aFace->isNull())
           myFaces.push_back(aFace);
       }
     }
@@ -80,3 +79,18 @@ std::shared_ptr<GeomAPI_Face> Model_ResultConstruction::face(const int theIndex)
 {
   return myFaces[theIndex];
 }
+
+bool Model_ResultConstruction::isInfinite()
+{
+  return myIsInfinite;
+}
+
+void Model_ResultConstruction::setInfinite(const bool theInfinite)
+{
+  myIsInfinite = theInfinite;
+}
+
+void Model_ResultConstruction::setIsConcealed(const bool theValue)
+{
+  // do nothing: the construction element is never consealed
+}