X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelAPI%2FTest%2FTestDocument.py;h=f872757830d78189046b63c3b8059740e0c05458;hb=30e30f8e0387a716727a054ef5c586038ed86049;hp=997de3b52397c88f2f0e783db787614a02a0606d;hpb=84f912d8ca079ae8f0a43826983e77acdfb68bf5;p=modules%2Fshaper.git diff --git a/src/ModelAPI/Test/TestDocument.py b/src/ModelAPI/Test/TestDocument.py index 997de3b52..f87275783 100644 --- a/src/ModelAPI/Test/TestDocument.py +++ b/src/ModelAPI/Test/TestDocument.py @@ -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 -## +# 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 +# """ TestDocument.py @@ -27,8 +26,7 @@ # Initialization of the test #========================================================================= from ModelAPI import * -# from GeomDataAPI import * -# from GeomAlgoAPI import * +from GeomDataAPI import * __updated__ = "2014-12-26" @@ -36,7 +34,6 @@ __updated__ = "2014-12-26" # Creation and activation of documents #========================================================================= aSession = ModelAPI_Session.get() -# TODO: enable this assertion: assert(aSession.moduleDocument()) assert(aSession.moduleDocument().id() == 0) assert(aSession.moduleDocument().kind() == "PartSet") @@ -74,9 +71,7 @@ aSession.startOperation() aFeature = aPart.addFeature("Point") aFeatureData = aFeature.data() assert(aFeatureData is not None) -aFeatureData.real("x").setValue(15.) -aFeatureData.real("y").setValue(10.) -aFeatureData.real("z").setValue(20.) +geomDataAPI_Point(aFeatureData.attribute("point3d")).setValue(15., 10., 20.) aSession.finishOperation() assert(aPart.size("Features") == 1) # Duplicate the document