From: azv Date: Thu, 28 Jan 2016 11:07:44 +0000 (+0300) Subject: Fix test case for the Collinear constraint X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=128f981e252e91e5cb96847c8a3e43df826fe721;p=modules%2Fshaper.git Fix test case for the Collinear constraint --- 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"))