From 7cc30c56abbcb3cb519810754c0696d5639da92d Mon Sep 17 00:00:00 2001 From: vsv Date: Mon, 9 Oct 2017 12:33:55 +0300 Subject: [PATCH] Issue #2268: Compute place for a tangent symbol --- src/SketcherPrs/SketcherPrs_Perpendicular.cpp | 4 ---- src/SketcherPrs/SketcherPrs_PositionMgr.cpp | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/SketcherPrs/SketcherPrs_Perpendicular.cpp b/src/SketcherPrs/SketcherPrs_Perpendicular.cpp index c1e980f34..237301ee4 100644 --- a/src/SketcherPrs/SketcherPrs_Perpendicular.cpp +++ b/src/SketcherPrs/SketcherPrs_Perpendicular.cpp @@ -85,12 +85,8 @@ bool SketcherPrs_Perpendicular::updateIfReadyToDisplay(double theStep, bool with GeomAPI_Curve aCurve2(aShp2); bool isInside1 = (aParam1 >= (aCurve1.startParam() - Precision::Confusion())) && (aParam1 <= (aCurve1.endParam() + Precision::Confusion())); - //((aParam1 - aCurve1.startParam()) >= -Precision::Confusion()) && - // ((aCurve1.endParam() - aParam1) >= Precision::Confusion()); bool isInside2 = (aParam2 >= (aCurve2.startParam() - Precision::Confusion())) && (aParam2 <= (aCurve2.endParam() + Precision::Confusion())); - //(fabs(aParam2 - aCurve2.startParam()) >= -Precision::Confusion()) && - // ((aCurve2.endParam() - aParam2) >= Precision::Confusion()); if (!(isInside1 && isInside2)) aPnt = std::shared_ptr(); diff --git a/src/SketcherPrs/SketcherPrs_PositionMgr.cpp b/src/SketcherPrs/SketcherPrs_PositionMgr.cpp index 43e84107f..88b47ebc8 100644 --- a/src/SketcherPrs/SketcherPrs_PositionMgr.cpp +++ b/src/SketcherPrs/SketcherPrs_PositionMgr.cpp @@ -418,7 +418,7 @@ gp_Pnt SketcherPrs_PositionMgr::getPointPosition( double aAngPos; gp_Vec aVecPos; bool aHasPlace = false; - int aIntId = 0; // a position inside a one sector + //int aIntId = 0; // a position inside a one sector while (aPosCount < aPos[1]) { for (aItAng = aAngles.cbegin(), aItVec = aVectors.cbegin(); aItAng != aAngles.cend(); ++aItAng, ++aItVec) { @@ -430,7 +430,7 @@ gp_Pnt SketcherPrs_PositionMgr::getPointPosition( aHasPlace = true; aAngPos = (*aItAng); aVecPos = (*aItVec); - aIntId = aPos[0] - (aPosCount - Nb); + //aIntId = aPos[0] - (aPosCount - Nb); } } if (aPosCount < aPos[1]) { @@ -443,7 +443,7 @@ gp_Pnt SketcherPrs_PositionMgr::getPointPosition( gp_Ax1 aRotAx(aP, aNormDir); if (aHasPlace) { // rotate base vector on a necessary angle - gp_Vec aShift = aVecPos.Rotated(aRotAx, aAngleStep + aAngleStep * aIntId); + gp_Vec aShift = aVecPos.Rotated(aRotAx, aAngleStep + aAngleStep * aPos[0]); aShift.Normalize(); aShift.Multiply(theStep * 1.5); return aP.Translated(aShift); -- 2.39.2