X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_ResultConstruction.cpp;h=41e1a9b166a43771fac03ba55775eae2b17f9c5c;hb=5dfebcc3a72f75f043de9880419b39f073af6819;hp=d2f3104dab769b742f2e74ad018a845f4b538aea;hpb=49db0a60d0c885b546c899d184b5b0a8852af54f;p=modules%2Fshaper.git diff --git a/src/Model/Model_ResultConstruction.cpp b/src/Model/Model_ResultConstruction.cpp index d2f3104da..41e1a9b16 100644 --- a/src/Model/Model_ResultConstruction.cpp +++ b/src/Model/Model_ResultConstruction.cpp @@ -46,6 +46,7 @@ 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); } @@ -60,14 +61,16 @@ int Model_ResultConstruction::facesNum() if (!myFacesUpToDate) { std::shared_ptr aWirePtr = std::dynamic_pointer_cast(myShape); - std::list > aFaces; - GeomAlgoAPI_SketchBuilder::createFaces(aWirePtr->origin(), aWirePtr->dirX(), - aWirePtr->norm(), aWirePtr, aFaces); - std::list >::iterator aFIter = aFaces.begin(); - for(; aFIter != aFaces.end(); aFIter++) { - std::shared_ptr aFace(new GeomAPI_Face(*aFIter)); - if (aFace.get()) - myFaces.push_back(aFace); + if (aWirePtr.get()) { + std::list > aFaces; + GeomAlgoAPI_SketchBuilder::createFaces(aWirePtr->origin(), aWirePtr->dirX(), + aWirePtr->norm(), aWirePtr, aFaces); + std::list >::iterator aFIter = aFaces.begin(); + for(; aFIter != aFaces.end(); aFIter++) { + std::shared_ptr aFace(new GeomAPI_Face(*aFIter)); + if (aFace.get()) + myFaces.push_back(aFace); + } } myFacesUpToDate = true; } @@ -78,3 +81,13 @@ std::shared_ptr Model_ResultConstruction::face(const int theIndex) { return myFaces[theIndex]; } + +bool Model_ResultConstruction::isInfinite() +{ + return myIsInfinite; +} + +void Model_ResultConstruction::setInfinite(const bool theInfinite) +{ + myIsInfinite = theInfinite; +}