]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/FeaturesPlugin/Test/Test2738.py
Salome HOME
updated copyright message
[modules/shaper.git] / src / FeaturesPlugin / Test / Test2738.py
index d8f8da21cc8d1aa72b7c425829a5c78d1c4d207a..79d654c9f158e8ffbb89e68ed1884285e1bc753d 100644 (file)
@@ -1,24 +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>
-##
-
-# -*- coding: utf-8 -*-
+# Copyright (C) 2014-2023  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
+#
 
 from salome.shaper import model
 from GeomAlgoAPI import *
@@ -40,7 +37,7 @@ Partition_1 = model.addPartition(Part_1_doc, [model.selection("COMPOUND", "all-i
 Group_1 = model.addGroup(Part_1_doc, [model.selection("SOLID", (-34.12026714434272, 28.71281409244911, 1.5))])
 Group_1.setName("Group_dechets")
 Group_1.result().setName("Group_dechets")
-Group_2 = model.addGroup(Part_1_doc, [model.selection("SOLID", (-34.12026714434272, 28.71281409244911, 2.35984679315518))])
+Group_2 = model.addGroup(Part_1_doc, [model.selection("SOLID", (-34.12026714434272, 28.71281409244911, 2.554668601838412))])
 Group_2.setName("Group_colis")
 Group_2.result().setName("Group_colis")
 LinearCopy_1 = model.addMultiTranslation(Part_1_doc, [model.selection("COMPSOLID", (-34.12026714434272, 28.71281409244911, 2.5))], model.selection("EDGE", "PartSet/OX"), "d", "nb", model.selection("EDGE", "PartSet/OY"), "d", "nb")
@@ -59,7 +56,7 @@ assert(selectionList.size() == 9)
 assert(aFactory.validate(Group_1.feature()))
 # checkthat solids in the first group are small, like the origin
 for i in range(9):
-  delta = GeomAlgoAPI_ShapeTools_volume(selectionList.value(i).value()) - 8.236773528312948
+  delta = GeomAlgoAPI_ShapeTools.volume(selectionList.value(i).value()) - 8.236773528312948
   assert(fabs(delta) < 1.e-5)
 
 # same-plane faces should be merged
@@ -69,7 +66,7 @@ assert(aFactory.validate(Group_2.feature()))
 
 # checkthat solids in the secong group are big, like the origin
 for i in range(9):
-  delta = GeomAlgoAPI_ShapeTools_volume(selectionList.value(i).value()) - 150.66735294710597
+  delta = GeomAlgoAPI_ShapeTools.volume(selectionList.value(i).value()) - 150.66735294710597
   assert(fabs(delta) < 1.e-5)
 
 assert(model.checkPythonDump())