Salome HOME
Switch development flag to 1
[modules/hexablock.git] / src / TEST_PY / test_unit / troisCylindres_v5.py
index 7b13a385766dbefccf0d012d61af8d8418b70a22..eb40a38472cdbf5f650c15a6e39d86ec3b846a3f 100644 (file)
@@ -1,10 +1,10 @@
 # -*- coding: latin-1 -*-
-# Copyright (C) 2009-2013  CEA/DEN, EDF R&D
+# Copyright (C) 2009-2016  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.
+# 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
@@ -21,8 +21,8 @@
 # Francis KLOSS : 2012 : CEA-Saclay, DEN, DM2S, SFME, LGLS, F-91191 Gif-sur-Yvette, France
 # ========================================================================================
 
-import geompy
 import hexablock
+geompy = hexablock.geompy
 
 # Charger la geometrie
 # ====================
@@ -125,8 +125,8 @@ croix = doc.makeCylinders(moy_p_cylindre, petit_cylindre)
 
 croix_quads = []
 
-for i in xrange(1, -1, -1):
-    for j in xrange( [hexablock.CV_MAXI_INT, hexablock.CV_MAXI_EXT][i] ):
+for i in range(1, -1, -1):
+    for j in range( [hexablock.CV_MAXI_INT, hexablock.CV_MAXI_EXT][i] ):
         quad = croix.getQuadIJ(hexablock.CYL_BIG, i, j, hexablock.CYL_BIG_SLICES)
         croix_quads.append(quad)
 
@@ -157,8 +157,8 @@ groupe_moyen_f = doc.addQuadGroup("Moyen")
 groupe_petit_a = doc.addQuadGroup("Petit_A")
 groupe_petit_b = doc.addQuadGroup("Petit_B")
 
-for i in xrange(2):
-    for j in xrange( [hexablock.CV_MAXI_INT, hexablock.CV_MAXI_EXT][i] ):
+for i in range(2):
+    for j in range( [hexablock.CV_MAXI_INT, hexablock.CV_MAXI_EXT][i] ):
         quad = en_te.getQuadIJ(hexablock.CYL_BIG  , i, j, 0)
         groupe_grand_a.addElement(quad)
 
@@ -181,12 +181,12 @@ groupe_grand = doc.addHexaGroup("Grand")
 groupe_moyen = doc.addHexaGroup("Moyen")
 groupe_petit = doc.addHexaGroup("Petit")
 
-for i in xrange( doc.countUsedHexa() ):
+for i in range( doc.countUsedHexa() ):
     h = doc.getUsedHexa(i)
     groupe_moyen.addElement(h)
 
-for i in xrange(2):
-    for j in xrange( [hexablock.CV_MAXI_INT, hexablock.CV_MAXI_EXT][i] ):
+for i in range(2):
+    for j in range( [hexablock.CV_MAXI_INT, hexablock.CV_MAXI_EXT][i] ):
         for k in [ 0, hexablock.CYL_BIG_SLICES-1 ]:
             h = en_te.getHexaIJK(hexablock.CYL_BIG, i, j, k)
             groupe_grand.addElement(h)