1 # Copyright (C) 2009-2013 CEA/DEN, EDF R&D
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
27 # differents cas possibles de remplissage possibles :
30 print "test grille cylindrique..."
31 doc = hexablock.addDocument()
33 orig1 = doc.addVertex(0, 0, 0)
34 orig2 = doc.addVertex(10, 0, 0)
35 orig3 = doc.addVertex(0, 10, 0)
36 orig4 = doc.addVertex(10, 10, 0)
37 orig5 = doc.addVertex(0, 20, 0)
38 orig6 = doc.addVertex(10, 20, 0)
40 vz = doc.addVector(0, 0, 1)
41 vx = doc.addVector(1, 0, 0)
48 c1 = doc.makeCylindrical(orig1, vx, vz, dr, 360, dl, nr, 4, nl, True)
49 c2 = doc.makeCylindrical(orig2, vx, vz, dr, 360, dl, nr, 8, nl, True)
50 c3 = doc.makeCylindrical(orig3, vx, vz, dr, 270, dl, nr, 8, nl, True)
51 c4 = doc.makeCylindrical(orig4, vx, vz, dr, 270, dl, nr, 7, nl, True)
52 c5 = doc.makeCylindrical(orig5, vx, vz, dr, 360, dl, nr, 5, nl, True)
53 c6 = doc.makeCylindrical(orig6, vx, vz, dr, 360, dl, nr, 6, nl, True)
57 c2.getHexa(base2 + i).setScalar(5)
59 file_name = os.path.join(os.environ['TMP'], 'grilles_cylindriques.vtk')
60 #### doc.saveVtk(file_name)
62 print "...test grille cylindrique OK"