From 74aae1685a7542d7acb91398bd362a78b04c762f Mon Sep 17 00:00:00 2001 From: azv Date: Fri, 22 Apr 2016 12:58:51 +0300 Subject: [PATCH] Angle adjusting --- .../SolveSpaceSolver/SolveSpaceSolver_Builder.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Builder.cpp b/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Builder.cpp index 22d431dc2..bc86af89d 100644 --- a/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Builder.cpp +++ b/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Builder.cpp @@ -713,17 +713,10 @@ void adjustAngle(ConstraintWrapperPtr theConstraint) double aDist[2][2]; for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { - aDist[i][j] = aCenter->distance(aPoints[i][j]); + aDist[i][j] = aDir[i]->xy()->dot(aPoints[i][j]->xy()->decreased(aCenter->xy())); if (fabs(aDist[i][j]) <= tolerance) aDist[i][j] = 0.0; } - if (aDist[i][0] > tolerance && aDist[i][1] > tolerance && - aDist[i][0] + aDist[i][1] < aPoints[i][0]->distance(aPoints[i][1]) + 2.0 * tolerance) { - // the intersection point is an inner point of the line, - // we change the sign of distance till start point to calculate correct coordinates - // after rotation - aDist[i][0] *= -1.0; - } } // Recalculate positions of lines to avoid conflicting constraints -- 2.39.2