From: vsv Date: Mon, 17 Jul 2017 07:39:20 +0000 (+0300) Subject: Select direction of symbols distribution X-Git-Tag: V_2.9.0~23^2~26 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=945cb97ca33c0a3644f0ded750cc11db05195a57;p=modules%2Fshaper.git Select direction of symbols distribution --- diff --git a/src/SketcherPrs/SketcherPrs_PositionMgr.cpp b/src/SketcherPrs/SketcherPrs_PositionMgr.cpp index 1dbe75116..51771dcfa 100644 --- a/src/SketcherPrs/SketcherPrs_PositionMgr.cpp +++ b/src/SketcherPrs/SketcherPrs_PositionMgr.cpp @@ -100,7 +100,11 @@ gp_Vec getVector(ObjectPtr theShape, GeomDirPtr theDir, gp_Pnt theP) GeomPointPtr aPnt1 = aCurve->getPoint((aMidParam + aCurve->endParam()) / 2.); GeomPointPtr aPnt2 = aCurve->getPoint((aMidParam + aCurve->startParam()) / 2.); - aVec = gp_Vec(aPnt1->impl(), aPnt2->impl()); + gp_Pnt aPn2 = aPnt2->impl(); + if (aPn2.IsEqual(theP, Precision::Confusion())) + aVec = gp_Vec(aPn2, aPnt1->impl()); + else + aVec = gp_Vec(aPnt1->impl(), aPn2); } } else { aVec = gp_Vec(theDir->impl());