+ myIsDisabled = true; // by default it is not initialized and false to be after created
+ myIsInHistory = true;
+ myFacesUpToDate = false;
+ setIsConcealed(false);
+}
+
+void Model_ResultConstruction::setIsInHistory(const bool isInHistory)
+{
+ myIsInHistory = isInHistory;
+}
+
+int Model_ResultConstruction::facesNum()
+{
+ if (!myFacesUpToDate) {
+ std::shared_ptr<GeomAPI_PlanarEdges> aWirePtr =
+ std::dynamic_pointer_cast<GeomAPI_PlanarEdges>(myShape);
+ std::list<std::shared_ptr<GeomAPI_Shape> > aFaces;
+ GeomAlgoAPI_SketchBuilder::createFaces(aWirePtr->origin(), aWirePtr->dirX(),
+ aWirePtr->norm(), aWirePtr, aFaces);
+ 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())
+ myFaces.push_back(aFace);
+ }
+ myFacesUpToDate = true;
+ }
+ return myFaces.size();
+}
+
+std::shared_ptr<GeomAPI_Face> Model_ResultConstruction::face(const int theIndex)
+{
+ return myFaces[theIndex];