Salome HOME
Cosmetics. Move XML files to the separate folder inside a corresponding project in VS.
[modules/shaper.git] / src / SketchPlugin / Test / TestCreateArcChangeType.py
index 88ad0c60ed677acca958c6631e3f3f9dd2cb62a3..61162ab4481c3a74e833cca5b5298376903c8679 100644 (file)
@@ -1,22 +1,21 @@
-## Copyright (C) 2014-2017  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
-## License as published by the Free Software Foundation; either
-## version 2.1 of the License, or (at your option) any later version.
-##
-## This library is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## Lesser General Public License for more details.
-##
-## You should have received a copy of the GNU Lesser General Public
-## License along with this library; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##
-## See http:##www.salome-platform.org/ or
-## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
-##
+# Copyright (C) 2014-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
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
 
 """
     TestCreateArcChangeType.py
@@ -88,19 +87,7 @@ def verifyLastArc(theSketch, theCenter, theStart, theEnd):
     subroutine to verify position of last arc in the sketch
     """
     aLastArc = model.lastSubFeature(theSketch, "SketchArc")
-    aCenterPnt = geomDataAPI_Point2D(aLastArc.attribute("center_point"))
-    aStartPnt = geomDataAPI_Point2D(aLastArc.attribute("start_point"))
-    aEndPnt = geomDataAPI_Point2D(aLastArc.attribute("end_point"))
-    if len(theCenter):
-        verifyPointCoordinates(aCenterPnt, theCenter[0], theCenter[1])
-    if len(theStart):
-        verifyPointCoordinates(aStartPnt, theStart[0], theStart[1])
-    if len(theEnd):
-        verifyPointCoordinates(aEndPnt, theEnd[0], theEnd[1])
-    model.assertSketchArc(aLastArc)
-
-def verifyPointCoordinates(thePoint, theX, theY):
-    assert thePoint.x() == theX and thePoint.y() == theY, "Wrong '{0}' point ({1}, {2}), expected ({3}, {4})".format(thePoint.id(), thePoint.x(), thePoint.y(), theX, theY)
+    model.assertArc(aLastArc, theCenter, theStart, theEnd)
 
 
 #=========================================================================