X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPythonAPI%2FTest%2FTestSketcherSetAngle.py;h=7dd937902441740da3f564336464adfbd7be047e;hb=91e2f5d985dd2a38fdb1782caed59f80d8cada31;hp=cbdd5fc3ae4bc7817ed25229534fce0f5db9d7d5;hpb=dfe2d108d162e47e889c2488b2fe3676eff3d973;p=modules%2Fshaper.git diff --git a/src/PythonAPI/Test/TestSketcherSetAngle.py b/src/PythonAPI/Test/TestSketcherSetAngle.py index cbdd5fc3a..7dd937902 100644 --- a/src/PythonAPI/Test/TestSketcherSetAngle.py +++ b/src/PythonAPI/Test/TestSketcherSetAngle.py @@ -13,17 +13,17 @@ class SketcherSetAngle(SketcherTestCase): # Commit the transaction model.do() # Check the result - dot_product = (l1.endPointData().x() - l1.startPointData().x()) * \ - (l2.endPointData().x() - l2.startPointData().x()) + \ - (l1.endPointData().y() - l1.startPointData().y()) * \ - (l2.endPointData().y() - l2.startPointData().y()) + dot_product = (l1.endPoint().x() - l1.startPoint().x()) * \ + (l2.endPoint().x() - l2.startPoint().x()) + \ + (l1.endPoint().y() - l1.startPoint().y()) * \ + (l2.endPoint().y() - l2.startPoint().y()) norm_1 = math.sqrt( - math.pow((l1.endPointData().x() - l1.startPointData().x()), 2) + - math.pow((l1.endPointData().y() - l1.startPointData().y()), 2) + math.pow((l1.endPoint().x() - l1.startPoint().x()), 2) + + math.pow((l1.endPoint().y() - l1.startPoint().y()), 2) ) norm_2 = math.sqrt( - math.pow((l2.endPointData().x() - l2.startPointData().x()), 2) + - math.pow((l2.endPointData().y() - l2.startPointData().y()), 2) + math.pow((l2.endPoint().x() - l2.startPoint().x()), 2) + + math.pow((l2.endPoint().y() - l2.startPoint().y()), 2) ) angle = math.acos(dot_product / (norm_1 * norm_2)) self.assertAlmostEqual(