Salome HOME
updated copyright message
[modules/shaper.git] / src / ModelHighAPI / Test / TestDeflectionDump.py
index 49b0c87baa5ef611735c5e3f75faeb3556e4707b..7c7301131b72e63ae421234749fb53ddca285213 100644 (file)
@@ -1,4 +1,23 @@
-import model
+# Copyright (C) 2014-2023  CEA, EDF
+#
+# 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
+#
+
+from salome.shaper import model
 
 model.begin()
 partSet = model.moduleDocument()
@@ -7,9 +26,9 @@ Part_1_doc = Part_1.document()
 Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
 SketchCircle_1 = Sketch_1.addCircle(-325.90051457976, -18.010291595197, 258.003584159371)
 model.do()
-Sketch_1.result()[0].setDeflection(5e-006)
-Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2f")], model.selection(), 10, 0)
-Extrusion_1.result()[0].setDeflection(0.5)
+Sketch_1.result().setDeflection(5e-006)
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2r")], model.selection(), 10, 0)
+Extrusion_1.result().setDeflection(0.5)
 model.end()
 
 assert(model.checkPythonDump())