From 945cb97ca33c0a3644f0ded750cc11db05195a57 Mon Sep 17 00:00:00 2001 From: vsv Date: Mon, 17 Jul 2017 10:39:20 +0300 Subject: [PATCH] Select direction of symbols distribution --- src/SketcherPrs/SketcherPrs_PositionMgr.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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()); -- 2.39.2