X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FTEST_PY%2Frecettes%2Ftuyau.py;h=a39d88ae8b81b0c41cbd13f9314ae61c8aa6b26c;hb=refs%2Ftags%2FV9_0_0;hp=fcb56ed5f067ae4f558e0f9cb63048ad77e136a9;hpb=4151fe48edec40b5278c4382a1f99b8d0b24afdb;p=modules%2Fhexablock.git diff --git a/src/TEST_PY/recettes/tuyau.py b/src/TEST_PY/recettes/tuyau.py index fcb56ed..a39d88a 100644 --- a/src/TEST_PY/recettes/tuyau.py +++ b/src/TEST_PY/recettes/tuyau.py @@ -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,9 @@ # Francis KLOSS : 2012 : CEA-Saclay, DEN, DM2S, SFME, LGLS, F-91191 Gif-sur-Yvette, France # ======================================================================================== -import geompy import hexablock +### import geompy +geompy = hexablock.geompy # Charger la geometrie # ==================== @@ -115,7 +116,7 @@ cer_ext_dep = modele.getVertexIJK(1, 0, 1) cer_int = [] cer_ext = [] -for j in xrange(4): +for j in range(4): a = modele.getEdgeJ(0, j, 1) cer_int.append(a) @@ -133,7 +134,7 @@ ell_ext_dep = modele.getVertexIJK(1, 0, 0) ell_int = [] ell_ext = [] -for j in xrange(4): +for j in range(4): a = modele.getEdgeJ(0, j, 0) ell_int.append(a) @@ -149,7 +150,7 @@ doc.associateClosedLine(ell_ext_dep, ell_ext, [sh_tuyau], [15, 8], 1, True) def generatrice(face): n = 10 l = [] - for i in xrange(0, n+1): + for i in range(0, n+1): v = float(i) / n s = geompy.MakeVertexOnSurface(face, 0.5, v) l.append(s) @@ -215,8 +216,8 @@ groupe_exterieur = doc.addQuadGroup("Exterieur") # Constituer les groupes d'aretes # ------------------------------- -for i in xrange(2): - for j in xrange(4): +for i in range(2): + for j in range(4): arete = modele.getEdgeJ(i, j, 1) groupe_cercles.addElement(arete) @@ -229,7 +230,7 @@ for i in xrange(2): # Constituer les groupes de faces # ------------------------------- -for j in xrange(4): +for j in range(4): quad = modele.getQuadIJ(0, j, 1) groupe_couronne.addElement(quad)