X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_ResultPrs.cpp;h=eb022a2bf0d853202e1a3180a9dee43da9aade9b;hb=af851100774c4ff33b515c884abe0cd03c3f0528;hp=3e24e1e767126bee62b7a0435315f64795c76024;hpb=6268ce56824c1df106da799af34f4575f247061a;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_ResultPrs.cpp b/src/ModuleBase/ModuleBase_ResultPrs.cpp index 3e24e1e76..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 @@ -28,18 +28,10 @@ ModuleBase_ResultPrs::ModuleBase_ResultPrs(ResultPtr theResult) if (aWirePtr->hasPlane() ) { // If this is a wire with plane defined thin it is a sketch-like object // It must have invisible faces - GeomAlgoAPI_SketchBuilder::createFaces(aWirePtr->origin(), aWirePtr->dirX(), - aWirePtr->dirY(), aWirePtr->norm(), aWirePtr, myFacesList); - - myOriginalShape = aWirePtr->impl(); - Set(myOriginalShape); myIsSketchMode = true; - } else { - Set(aWirePtr->impl()); } - } else { - Set(aShapePtr->impl()); } + Set(aShapePtr->impl()); } @@ -50,9 +42,20 @@ void ModuleBase_ResultPrs::Compute(const Handle(PrsMgr_PresentationManager3d)& t std::shared_ptr aShapePtr = ModelAPI_Tools::shape(myResult); if (!aShapePtr) return; + if (myIsSketchMode) { + myFacesList.clear(); + 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); } }