X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_ResultPrs.cpp;h=eb022a2bf0d853202e1a3180a9dee43da9aade9b;hb=af851100774c4ff33b515c884abe0cd03c3f0528;hp=a298dd29723c13b92e42b45c7d781673d795f09c;hpb=fb39f4e49eb448bc82d2ce79617540eee6565eae;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_ResultPrs.cpp b/src/ModuleBase/ModuleBase_ResultPrs.cpp index a298dd297..eb022a2bf 100644 --- a/src/ModuleBase/ModuleBase_ResultPrs.cpp +++ b/src/ModuleBase/ModuleBase_ResultPrs.cpp @@ -7,8 +7,8 @@ #include "ModuleBase_ResultPrs.h" #include +#include #include -#include #include #include @@ -43,15 +43,19 @@ void ModuleBase_ResultPrs::Compute(const Handle(PrsMgr_PresentationManager3d)& t if (!aShapePtr) return; if (myIsSketchMode) { - std::shared_ptr aWirePtr = - std::dynamic_pointer_cast(aShapePtr); myFacesList.clear(); - GeomAlgoAPI_SketchBuilder::createFaces(aWirePtr->origin(), aWirePtr->dirX(), - aWirePtr->dirY(), aWirePtr->norm(), aWirePtr, myFacesList); + ResultConstructionPtr aConstruction = + std::dynamic_pointer_cast(myResult); + if (aConstruction.get()) { + int aFacesNum = aConstruction->facesNum(); + for(int aFaceIndex = 0; aFaceIndex < aFacesNum; aFaceIndex++) { + myFacesList.push_back(aConstruction->face(aFaceIndex)); + } + } } myOriginalShape = aShapePtr->impl(); if (!myOriginalShape.IsNull()) { - Set(aShapePtr->impl()); + Set(myOriginalShape); AIS_Shape::Compute(thePresentationManager, thePresentation, theMode); } }