From: mpv Date: Thu, 10 Sep 2015 14:41:52 +0000 (+0300) Subject: Fix for the issue #952: additional orientation algorithm is not needed. The orientati... X-Git-Tag: V_1.4.0_beta4~34 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b5773bfe1a3d046c432931aea033b302406bcbc1;p=modules%2Fshaper.git Fix for the issue #952: additional orientation algorithm is not needed. The orientation of face is enough. --- diff --git a/src/PartSet/PartSet_WidgetSketchLabel.cpp b/src/PartSet/PartSet_WidgetSketchLabel.cpp index 44656f2ab..e0e33ddfe 100644 --- a/src/PartSet/PartSet_WidgetSketchLabel.cpp +++ b/src/PartSet/PartSet_WidgetSketchLabel.cpp @@ -34,7 +34,6 @@ #include #include -#include #include #include #include @@ -155,20 +154,10 @@ void PartSet_WidgetSketchLabel::updateByPlaneSelected(const ModuleBase_ViewerPrs gp_XYZ aXYZ = aDir->impl().XYZ(); double aTwist = 0.0; - // orienting projection - if(aBaseShape.get() != NULL) { - std::shared_ptr aCenterPnt = GeomAlgoAPI_ShapeTools::centreOfMass(aGShape); - gp_Pnt aPnt = aCenterPnt->impl(); - aPnt.Translate(aDir->impl().XYZ() * (10 * Precision::Confusion())); - - BRepClass3d_SolidClassifier aClassifier; - aClassifier.Load(aBaseShape->impl()); - aClassifier.Perform(aPnt, Precision::Confusion()); - - if(aClassifier.State() == TopAbs_IN) { - aXYZ.Reverse(); - } - } + // orienting projection is not needed: it is done in GeomAlgoAPI_FaceBuilder::plane + /*if (aGShape->impl().Orientation() == TopAbs_REVERSED) { + aXYZ.Reverse(); + }*/ myWorkshop->viewer()->setViewProjection(aXYZ.X(), aXYZ.Y(), aXYZ.Z(), aTwist); }