Salome HOME
Cosmetics. Move XML files to the separate folder inside a corresponding project in VS.
[modules/shaper.git] / src / SketchPlugin / Test / TestConstraintMiddlePointOnEllipticArc.py
index e9f4d35d4a70eae62d2d07df7b0a05eb7f582755..7a8bc000d800c10c035f41cefc0c7e6cccac944d 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2019  CEA/DEN, EDF R&D
+# Copyright (C) 2019-2020  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -66,12 +66,12 @@ class TestMiddlePointOnEllipticArc(unittest.TestCase):
     self.checkPointOnEllipse(thePoint, anEllipse)
     # check angles
     TOLERANCE = 1.e-5
-    startAngle = 0; startPoint = GeomAPI_Pnt(theArc.startPoint().x(), theArc.startPoint().y(), 0)
-    startAngle = anEllipse.parameter(startPoint, TOLERANCE, startAngle)
-    endAngle = 0; endPoint = GeomAPI_Pnt(theArc.endPoint().x(), theArc.endPoint().y(), 0)
-    endAngle = anEllipse.parameter(endPoint, TOLERANCE, endAngle)
-    midAngle = 0; midPoint = GeomAPI_Pnt(thePoint.x(), thePoint.y(), 0)
-    midAngle = anEllipse.parameter(midPoint, TOLERANCE, midAngle)
+    startPoint = GeomAPI_Pnt(theArc.startPoint().x(), theArc.startPoint().y(), 0)
+    isCalculated, startAngle = anEllipse.parameter(startPoint, TOLERANCE)
+    endPoint = GeomAPI_Pnt(theArc.endPoint().x(), theArc.endPoint().y(), 0)
+    isCalculated, endAngle = anEllipse.parameter(endPoint, TOLERANCE)
+    midPoint = GeomAPI_Pnt(thePoint.x(), thePoint.y(), 0)
+    isCalculated, midAngle = anEllipse.parameter(midPoint, TOLERANCE)
     diffMS = self.toPeriod(midAngle - startAngle)
     diffEM = self.toPeriod(endAngle - midAngle)
     self.assertAlmostEqual(diffMS, diffEM)