1 # -*- coding: utf-8 -*-
2 # Copyright (C) 2009-2014 CEA/DEN, EDF R&D
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 ####### Test for Extrude Quad ###############
26 doc = hexablock.addDocument("Extrude Quad Test")
32 orig1 = doc.addVertex ( 0,0,0)
33 vx = doc.addVector ( 1,0,0)
34 vy = doc.addVector ( 0,1,0)
35 vz = doc.addVector ( 0,0,1)
36 dir1 = doc.addVector ( 1,1,1)
37 dir2 = doc.addVector ( 1,1,-1)
43 grid1 = doc.makeCartesianUni (orig1, vx,vy,vz, dx,dy,dz, dimx,dimy,dimz)
50 liste1.append(grid1.getQuadIJ (mx, my, dimz))
51 liste2.append(grid1.getQuadIJ (mx, my, 0))
52 for nx in range(dimx):
54 liste1.append(grid1.getQuadIJ (nx, my, dimz))
55 liste2.append(grid1.getQuadIJ (nx, my, 0))
57 for ny in range(dimy):
59 liste1.append(grid1.getQuadIJ (mx, ny, dimz))
60 liste2.append(grid1.getQuadIJ (mx, ny, 0))
72 doc.saveVtk ("prisme1.vtk")
73 prisme2 = doc.extrudeQuadsUni (liste2, dir2, dh0, nbiter)
74 doc.saveVtk ("prisme2.vtk")
76 prisme1 = doc.extrudeQuads (liste1, dir1, tlen)
78 doc.saveVtk ("prisme3.vtk")