X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FTest%2FTestCreateArcChangeType.py;h=851241a02a20a1cac14eceaade0c995cd3a1b65e;hb=d0f078983d5f74d45a6f28b3a4dfe8feadb2cdf7;hp=92a876cd1f506457144f09d649064ebd36a61a3f;hpb=c8b040770c0752bd221858ad7b4ba75ed4ef48ad;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/Test/TestCreateArcChangeType.py b/src/SketchPlugin/Test/TestCreateArcChangeType.py index 92a876cd1..851241a02 100644 --- a/src/SketchPlugin/Test/TestCreateArcChangeType.py +++ b/src/SketchPlugin/Test/TestCreateArcChangeType.py @@ -1,3 +1,23 @@ +## 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 +## + """ TestCreateArcChangeType.py @@ -68,19 +88,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) #=========================================================================