+++ /dev/null
-# -*- coding: latin-1 -*-
-# Copyright (C) 2009-2013 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.
-#
-# 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
-#
-
-####### Test for Cut Hexa ###############
-
-import hexablock
-
-
-doc = hexablock.addDocument("default")
-
-size_x = 2
-size_y = 1
-size_z = 1
-
-orig = doc.addVertex(0, 0, 0)
-dirVr = doc.addVector(1, 1, 1)
-grid = doc.makeCartesian1(orig, dirVr, size_x, size_y, size_z, 0, 0, 0)
-
-##### doc.saveVtk ("hexa.vtk")
-
-arete = grid.getEdgeK(0, 0, 0)
-doc.cut(arete, 1)
-
-##### doc.saveVtk ("cut_hexa.vtk")
+++ /dev/null
-# -*- coding: latin-1 -*-
-# Copyright (C) 2009-2013 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.
-#
-# 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
-#
-
-####### Make Cylinder Test ##########
-
-import hexablock
-
-
-doc = hexablock.addDocument ("default")
-
-base = doc.addVertex(0, 0, 0)
-direction = doc.addVector(0, 0, 1)
-radius = 4
-height = 5
-
-cyl = doc.addCylinder(base, direction, radius, height)
-
-vb = doc.addVector(1, 0, 0)
-nr = radius
-na = 9
-nl = height
-elts = doc.makeCylinder(cyl, vb, nr, na, nl)
-
-##### doc.saveVtk ("make_cylinder.vtk")
+++ /dev/null
-# -*- coding: latin-1 -*-
-# Copyright (C) 2009-2013 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.
-#
-# 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
-#
-
-####### Make Cylinders Test ##########
-
-import hexablock
-
-
-doc = hexablock.addDocument ("default")
-
-ori1 = doc.addVertex ( 0, 0, 0)
-ori2 = doc.addVertex (-5, 0, 5)
-vz = doc.addVector ( 0, 0, 1)
-vx = doc.addVector ( 1 ,0, 0)
-
-nr1 = 2
-nl1 = 10
-nr2 = 1
-nl2 = 10
-
-cyl1 = doc.addCylinder (ori1, vz, nr1, nl1)
-cyl2 = doc.addCylinder (ori2, vx, nr2, nl2)
-elts = doc.makeCylinders (cyl1, cyl2)
-
-##### doc.saveVtk ("make_cylinders.vtk")
+++ /dev/null
-# -*- coding: latin-1 -*-
-# Copyright (C) 2009-2013 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.
-#
-# 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
-#
-
-####### Make Pipe Test ##########
-
-import hexablock
-
-doc = hexablock.addDocument ("default")
-
-orig = doc.addVertex(50, 0, 0)
-vz = doc.addVector(0, 0, 1)
-int_radius = 3
-ext_radius = 4
-height = 5
-
-pipe = doc.addPipe(orig, vz, int_radius, ext_radius, height)
-
-vb = doc.addVector(1, 0, 0)
-nr = 4
-na = 9
-nl = 5
-
-elts = doc.makePipe(pipe, vb, nr, na, nl)
-
-##### doc.saveVtk ("make_pipe.vtk")
+++ /dev/null
-# -*- coding: latin-1 -*-
-# Copyright (C) 2009-2013 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.
-#
-# 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
-#
-
-####### Make Pipes Test ##########
-
-import hexablock
-
-
-doc = hexablock.addDocument ("default")
-
-ori1 = doc.addVertex ( 0, 0, 0)
-ori2 = doc.addVertex (-5, 0, 5)
-vz = doc.addVector ( 0, 0, 1)
-vx = doc.addVector ( 1 ,0, 0)
-
-nr1 = 2
-ni1 = 1
-nl1 = 10
-nr2 = 1
-ni2 = 0.5
-nl2 = 10
-
-pipe1 = doc.addPipe (ori1, vz, ni1, nr1, nl1)
-pipe2 = doc.addPipe (ori2, vx, ni2, nr2, nl2)
-elts = doc.makePipes (pipe1, pipe2)
-
-##### doc.saveVtk ("make_pipes.vtk")
+++ /dev/null
-# -*- coding: latin-1 -*-
-# Copyright (C) 2009-2013 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.
-#
-# 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
-#
-
-####### Test Cartesian Grid #################
-
-import hexablock
-
-
-doc = hexablock.addDocument ("default")
-
-orig = doc.addVertex(0, 0, 0)
-
-dx = doc.addVector(1, 0, 0)
-dy = doc.addVector(0, 1, 0)
-dz = doc.addVector(0, 0, 1)
-
-ni = 15
-nj = 12
-nk = 8
-
-grid = doc.makeCartesian(orig, dx, dy, dz, ni, nj, nk)
-
-##### doc.saveVtk ("cartesian_grid.vtk")
+++ /dev/null
-# -*- coding: latin-1 -*-
-# Copyright (C) 2009-2013 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.
-#
-# 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
-#
-
-####### Test Regular Cylindrical Grid #################
-
-import hexablock
-
-
-doc = hexablock.addDocument ("default")
-
-orig1 = doc.addVertex(0, 0, 0)
-orig2 = doc.addVertex(10, 0, 0)
-orig3 = doc.addVertex(0, 10, 0)
-orig4 = doc.addVertex(10, 10, 0)
-orig5 = doc.addVertex(0, 20, 0)
-orig6 = doc.addVertex(10, 20, 0)
-
-vz = doc.addVector(0, 0, 1)
-vx = doc.addVector(1, 0, 0)
-
-dr = 1
-dl = 1
-nr = 2
-nl = 3
-
-c1 = doc.makeCylindrical(orig1, vx, vz, dr, 360, dl, nr, 4, nl, True)
-c2 = doc.makeCylindrical(orig2, vx, vz, dr, 360, dl, nr, 8, nl, True)
-c3 = doc.makeCylindrical(orig3, vx, vz, dr, 270, dl, nr, 8, nl, True)
-c4 = doc.makeCylindrical(orig4, vx, vz, dr, 270, dl, nr, 7, nl, True)
-c5 = doc.makeCylindrical(orig5, vx, vz, dr, 360, dl, nr, 5, nl, True)
-c6 = doc.makeCylindrical(orig6, vx, vz, dr, 360, dl, nr, 6, nl, True)
-
-##### doc.saveVtk ("cylindrical.vtk")
+++ /dev/null
-# -*- coding: latin-1 -*-
-# Copyright (C) 2009-2013 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.
-#
-# 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
-#
-
-####### Make Irregular Cylindrical Test ##########
-
-import hexablock
-
-
-doc = hexablock.addDocument ("cyl:hexas")
-
-orig = doc.addVertex (0, 0, 0)
-vz = doc.addVector (0, 0, 1)
-vx = doc.addVector (1 ,0, 0)
-
-
-tdr = [ 1, 1, 1, 1 ]
-tda = [ 45, 45, 45, 45, 45, 45, 45, 45 ]
-tdl = [ 1, 1, 1 ]
-
-tdr = [ 1, 2, 0.5 ]
-tda = [ 30, 30, 30, 10, 10, 10, 10, 10, 10, 10, 10, 10,
- 30, 30, 30, 10, 10, 10, 10, 10, 10, 10, 10, 10 ]
-tdl = [ 1, 2, 3 ]
-
-
-c1 = doc.makeCylindricals (orig, vx,vz, tdr, tda, tdl, False)
-
-##### doc.saveVtk ("cylindricals.vtk")
+++ /dev/null
-# -*- coding: latin-1 -*-
-# Copyright (C) 2009-2013 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.
-#
-# 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
-#
-
-####### Test for spherical grid ###########
-
-import hexablock
-
-
-doc = hexablock.addDocument ("default")
-
-orig = doc.addVertex(0, 0, 0)
-radius = 5
-n = 2
-k = 1
-
-grid = doc.makeSpherical(orig, radius, n, k)
-
-##### doc.saveVtk ("spherical_grid.vtk")
+++ /dev/null
-# -*- coding: latin-1 -*-
-# Copyright (C) 2009-2013 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.
-#
-# 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
-#
-
-import hexablock
-
-doc = hexablock.addDocument ("default")
-
-orig = doc.addVertex(0, 0, 0)
-
-direction = doc.addVector(1, 1, 1)
-
-dx = doc.addVector(1, 0, 0)
-dy = doc.addVector(0, 1, 0)
-dz = doc.addVector(0, 0, 1)
-
-n = 2
-k = 0.8
-
-grid = doc.makeSpherical(orig, dx, dy, dz, n, k)
-
-##### doc.saveVtk ("spherical_grid2.vtk")
+++ /dev/null
-# -*- coding: latin-1 -*-
-# Copyright (C) 2009-2013 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.
-#
-# 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
-#
-
-####### Hemispherical Grid Test ##########
-
-import hexablock
-
-
-# ======================================================= test_sphere
-def test_sphere () :
-
- doc = hexablock.addDocument ("default")
-
- center = doc.addVertex (0,0,0)
- radius = 8
- orig = doc.addVertex (0,0,0)
- vz = doc.addVector (0,0,1)
- vx = doc.addVector (1,0,0)
- radhole = 1
- nrad = 3
- nang = 16
- nhaut = 8
-
- doc.makeSphere (center, vx, vz, radius, radhole, orig, nrad, nang, nhaut)
- doc.saveVtk ("hemispherical.vtk")
- return doc
-
-# ================================================================= Test
-doc = test_sphere ()
-
+++ /dev/null
-# -*- coding: latin-1 -*-
-# Copyright (C) 2009-2013 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.
-#
-# 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
-#
-
-####### Partial Hemispherical Grid Test ##########
-
-import hexablock
-
-
-# ======================================================= test_part_sphere
-def test_part_sphere () :
-
- doc = hexablock.addDocument ("default")
-
- center = doc.addVertex (0,0,0)
- radius = 8
- orig = doc.addVertex (0,0,-4)
- vz = doc.addVector (0,0,1)
- vx = doc.addVector (1,0,0)
- angle = 90
- radhole = 1
- nrad = 3
- nang = 4
- nhaut = 8
-
- doc.makePartSphere (center, vx, vz, radius, radhole, orig, angle,
- nrad, nang, nhaut)
- ##### doc.saveVtk ("partial_hemispherical.vtk")
- return doc
-
-# ================================================================= Test
-doc = test_part_sphere ()
-
+++ /dev/null
-# -*- coding: latin-1 -*-
-# Copyright (C) 2009-2013 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.
-#
-# 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
-#
-
-####### Partial Rind Grid Test ##########
-
-import hexablock
-
-
-# ======================================================= test_part_rind
-def test_part_rind () :
-
- doc = hexablock.addDocument ("default")
-
- center = doc.addVertex (0,0,0)
- radius = 8
- radint = 7
- orig = doc.addVertex (0,0,0)
- vz = doc.addVector (0,0,1)
- vx = doc.addVector (1,0,0)
- angle = 90
- radhole = 1
- nrad = 3
- nang = 14
- nhaut = 8
-
- doc.makePartRind (center, vx, vz, radius, radint, radhole, orig, angle,
- nrad, nang, nhaut)
- ##### doc.saveVtk ("part_rind.vtk")
- return doc
-
-# ================================================================= Begin
-doc = test_part_rind ()
+++ /dev/null
-# -*- coding: latin-1 -*-
-# Copyright (C) 2009-2013 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.
-#
-# 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
-#
-
-####### Rind Grid Test ##########
-
-import hexablock
-
-
-# ======================================================= test_rind
-def test_rind () :
-
- doc = hexablock.addDocument ("default")
-
- center = doc.addVertex (0,0,0)
- radius = 8
- radint = 7
- orig = doc.addVertex (0,0,0)
- vz = doc.addVector (0,0,1)
- vx = doc.addVector (1,0,0)
- radhole = 1
- nrad = 3
- nang = 16
- nhaut = 8
-
- doc.makeRind (center, vx, vz, radius, radint, radhole, orig,
- nrad, nang, nhaut)
- ##### doc.saveVtk ("rind.vtk")
- return doc
-
-# ================================================================= Test
-doc = test_rind ()
+++ /dev/null
-# -*- coding: latin-1 -*-
-# Copyright (C) 2009-2013 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.
-#
-# 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
-#
-
-####### Test for Join Quad ###############
-
-import hexablock
-
-doc = hexablock.addDocument("default")
-
-orig1 = doc.addVertex(0, 0, 0)
-dx = doc.addVector(1, 0, 0)
-dy = doc.addVector(0, 1, 0)
-dz = doc.addVector(0, 0, 1)
-
-dimx = 11
-dimy = 11
-dimz = 2
-grid1 = doc.makeCartesian(orig1, dx, dy, dz, dimx, dimy, dimz)
-
-orig2 = doc.addVertex(dimx/2.0, 0, 8)
-grid2 = doc.makeCylindrical(orig2, dx, dy, 1, 180, 1, dimz, dimy,
- dimx, False)
-
-mx = dimx/2
-my = dimy/2
-prems = grid1.getQuadIJ(mx, my, dimz)
-cible = grid2.getQuadJK(dimz, mx, my)
-
-v1 = prems.getVertex(0)
-v3 = prems.getVertex(1)
-v2 = cible.getVertex(1)
-v4 = cible.getVertex(2)
-
-liste = [prems]
-liste.extend([grid1.getQuadIJ(nx, my, dimz) for nx in range(dimx) if nx != mx])
-liste.extend([grid1.getQuadIJ(mx, ny, dimz) for ny in range(dimy) if ny != my])
-
-height = 5
-
-elts = doc.joinQuads(liste, cible, v1, v2, v3, v4, height)
-
-##### elts.saveVtk ("join_quads.vtk")
+++ /dev/null
-# -*- coding: latin-1 -*-
-# Copyright (C) 2009-2013 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.
-#
-# 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
-#
-
-####### Test for Prism Quad ###############
-
-import hexablock
-
-
-doc = hexablock.addDocument("default")
-
-orig = doc.addVertex(0, 0, 0)
-dx = doc.addVector(1, 0, 0)
-dy = doc.addVector(0, 1, 0)
-dz = doc.addVector(0, 0, 1)
-
-dimx = 11
-dimy = 11
-dimz = 2
-grid = doc.makeCartesian(orig, dx, dy, dz, dimx, dimy, dimz)
-
-mx = dimx/2
-my = dimy/2
-prems = grid.getQuadIJ(mx, my, dimz)
-
-liste = [prems]
-liste.extend([grid.getQuadIJ(nx, my, dimz) for nx in range(dimx) if nx != mx])
-liste.extend([grid.getQuadIJ(mx, ny, dimz) for ny in range(dimy) if ny != my])
-
-vec = doc.addVector(1, 1, 1)
-elts = doc.prismQuads(liste, vec, 5)
-
-##### elts.saveVtk ("prism_quad.vtk")
+++ /dev/null
-# -*- coding: latin-1 -*-
-# Copyright (C) 2009-2013 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.
-#
-# 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
-#
-
-####### Test prismQuadsVec ###############
-
-import hexablock
-
-doc = hexablock.addDocument("prism_vec")
-
-ori = doc.addVertex ( 0, 0, 0)
-vx = doc.addVector ( 1 ,0, 0)
-vz = doc.addVector ( 0, 0, 1)
-
-dr = 1
-da = 360
-dl = 1
-
-nr = 1
-na = 6
-nl = 1
-
-grid = doc.makeCylindrical (ori, vx,vz, dr,da,dl, nr,na,nl, False)
-
-liste = [ ]
-for nx in range (nr) :
- for ny in range (na) :
- cell = grid.getQuadIJ (nx, ny, nl)
- liste.append (cell);
-
-axis = doc.addVector (1, 1, 1);
-hauteurs = [1, 3, 7, 15]
-
-elts = doc.prismQuadsVec (liste, axis, hauteurs, 0)
-
-##### elts.saveVtk("prism_quads_vec.vtk")
+++ /dev/null
-# -*- coding: latin-1 -*-
-# Copyright (C) 2009-2013 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.
-#
-# 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
-#
-
-#### Make a grid and get its quads #####
-
-import hexablock
-
-doc = hexablock.addDocument ("default")
-
-ori = doc.addVertex ( 0, 0, 0)
-vx = doc.addVector ( 1 ,0, 0)
-vz = doc.addVector ( 0, 0, 1)
-
-dr = 1
-da = 360
-dl = 1
-
-grid = doc.makeCylindrical (ori, vx,vz, dr,da,dl, nr,na,nl, False)
-
-nr = 1
-na = 6
-nl = 1
-
-liste = [ ]
-for nx in range (nr) :
- for ny in range (na) :
- cell = grid.getQuadIJ (nx, ny, nl)
- liste.append (cell);
+++ /dev/null
-# -*- coding: latin-1 -*-
-# Copyright (C) 2009-2013 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.
-#
-# 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
-#
-
-#### Quad Revolution Test #####
-
-import hexablock
-import os
-
-
-# ================================================================= save_schema
-class FileVtk :
- def __init__ (self, doc, radical):
- self.document = doc
- self.count = 0
- self.radical = radical
-
- def save (self) :
- """
- Save the model in a vtk file
- """
- self.count += 1
- file_name = os.path.join(self.radical + str(self.count) + '.vtk')
- ##### self.document.saveVtk(file_name)
-
-# ======================================================= make_grid
-def make_grid (doc, nr, na, nl) :
-
- ori = doc.addVertex ( 0, 0, 0)
- vx = doc.addVector ( 1 ,0, 0)
- vz = doc.addVector ( 0, 0, 1)
-
- dr = 1
- da = 360
- dl = 1
-
- grid = doc.makeCylindrical (ori, vx,vz, dr,da,dl, nr,na,nl, False)
- return grid
-
-
-# ========================================================== test_revolution
-def test_revolution () :
- doc = hexablock.addDocument ("default")
- vtk = FileVtk (doc, "Revolution");
- nr = 1
- na = 6
- nl = 1
- grid = make_grid (doc, nr, na, nl)
- vtk.save ()
-
- liste = [ ]
- for nx in range (nr) :
- for ny in range (na) :
- cell = grid.getQuadIJ (nx, ny, nl)
- liste.append (cell);
-
- center = doc.addVertex (0, -10, 0);
- axis = doc.addVector (1, 0, 0);
- angles = [5, 10, 15, 20, 30, 20, 15, 10, 5 ]
-
- vtk.save ()
- bloc = doc.revolutionQuads (liste, center, axis, angles);
- vtk.save ()
- return doc
-
-# ================================================================= Test
-doc = test_revolution ()
-