From b5773bfe1a3d046c432931aea033b302406bcbc1 Mon Sep 17 00:00:00 2001 From: mpv Date: Thu, 10 Sep 2015 17:41:52 +0300 Subject: [PATCH] Fix for the issue #952: additional orientation algorithm is not needed. The orientation of face is enough. --- src/PartSet/PartSet_WidgetSketchLabel.cpp | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) 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); } -- 2.39.2