From: vsv Date: Thu, 22 Jan 2015 10:30:30 +0000 (+0300) Subject: Issue #369: Update faces list of Sketcher presentation X-Git-Tag: V_1.0.0~26^2~2^2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fb39f4e49eb448bc82d2ce79617540eee6565eae;p=modules%2Fshaper.git Issue #369: Update faces list of Sketcher presentation --- diff --git a/src/ModuleBase/ModuleBase_ResultPrs.cpp b/src/ModuleBase/ModuleBase_ResultPrs.cpp index 3e24e1e76..a298dd297 100644 --- a/src/ModuleBase/ModuleBase_ResultPrs.cpp +++ b/src/ModuleBase/ModuleBase_ResultPrs.cpp @@ -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,6 +42,13 @@ void ModuleBase_ResultPrs::Compute(const Handle(PrsMgr_PresentationManager3d)& t std::shared_ptr aShapePtr = ModelAPI_Tools::shape(myResult); 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); + } myOriginalShape = aShapePtr->impl(); if (!myOriginalShape.IsNull()) { Set(aShapePtr->impl());