From f6d18fb265ce86edbc58cc55b3e13b54e6101028 Mon Sep 17 00:00:00 2001 From: azv Date: Thu, 28 Jan 2016 14:07:44 +0300 Subject: [PATCH] Fix test case for the Collinear constraint --- src/SketchPlugin/Test/TestConstraintCollinear.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SketchPlugin/Test/TestConstraintCollinear.py b/src/SketchPlugin/Test/TestConstraintCollinear.py index 46bd27340..dda5b8de1 100644 --- a/src/SketchPlugin/Test/TestConstraintCollinear.py +++ b/src/SketchPlugin/Test/TestConstraintCollinear.py @@ -19,11 +19,11 @@ __updated__ = "2016-01-28" def checkCollinearVec(theX1, theY1, theX2, theY2): - TOL = 1.e-6 + TOL = 2.e-6 aLen1 = math.hypot(theX1, theY1) aLen2 = math.hypot(theX2, theY2) aDot = theX1 * theX2 + theY1 * theY2 - assert math.fabs(math.fabs(aDot) - aLen1 * aLen2) < TOL**2, "aDot = {0}, aLen1 = {1}, aLen2 = {2}, aDiff = {3}".format(aDot, aLen1, aLen2, math.fabs(aDot) - aLen1 * aLen2) + assert (math.fabs(math.fabs(aDot) - aLen1 * aLen2) < TOL**2) def checkCollinear(theLine1, theLine2): aStartPoint1 = geomDataAPI_Point2D(theLine1.attribute("StartPoint")) -- 2.39.2