From 41531d93a2a145f65237db40c501e0c0b186f2fe Mon Sep 17 00:00:00 2001 From: abuhsing Date: Tue, 9 Jul 2013 10:08:29 +0000 Subject: [PATCH] Menage --- doc/test_doc/cut_hexa/cut_hexa.py | 41 --------- doc/test_doc/cylinder_pipe/make_cylinder.py | 41 --------- doc/test_doc/cylinder_pipe/make_cylinders.py | 42 ---------- doc/test_doc/cylinder_pipe/make_pipe.py | 42 ---------- doc/test_doc/cylinder_pipe/make_pipes.py | 44 ---------- doc/test_doc/grid/cartesian_grid.py | 40 --------- doc/test_doc/grid/cylindrical_grid.py | 50 ----------- doc/test_doc/grid/irregular_cylindrical.py | 45 ---------- doc/test_doc/grid/spherical_grid.py | 35 -------- doc/test_doc/grid/spherical_grid2.py | 38 --------- .../hemispherical_rind/hemispherical_grid.py | 47 ----------- .../partial_hemispherical_grid.py | 49 ----------- .../hemispherical_rind/partial_rind_grid.py | 49 ----------- doc/test_doc/hemispherical_rind/rind_grid.py | 48 ----------- doc/test_doc/prism_quad_join/join_quads.py | 59 ------------- doc/test_doc/prism_quad_join/prism_quads.py | 49 ----------- .../prism_quad_join/prism_quads_vec.py | 52 ------------ doc/test_doc/quad_revolution/make_grid.py | 45 ---------- doc/test_doc/quad_revolution/revolution.py | 84 ------------------- 19 files changed, 900 deletions(-) delete mode 100644 doc/test_doc/cut_hexa/cut_hexa.py delete mode 100644 doc/test_doc/cylinder_pipe/make_cylinder.py delete mode 100644 doc/test_doc/cylinder_pipe/make_cylinders.py delete mode 100644 doc/test_doc/cylinder_pipe/make_pipe.py delete mode 100644 doc/test_doc/cylinder_pipe/make_pipes.py delete mode 100644 doc/test_doc/grid/cartesian_grid.py delete mode 100644 doc/test_doc/grid/cylindrical_grid.py delete mode 100644 doc/test_doc/grid/irregular_cylindrical.py delete mode 100644 doc/test_doc/grid/spherical_grid.py delete mode 100644 doc/test_doc/grid/spherical_grid2.py delete mode 100644 doc/test_doc/hemispherical_rind/hemispherical_grid.py delete mode 100644 doc/test_doc/hemispherical_rind/partial_hemispherical_grid.py delete mode 100644 doc/test_doc/hemispherical_rind/partial_rind_grid.py delete mode 100644 doc/test_doc/hemispherical_rind/rind_grid.py delete mode 100644 doc/test_doc/prism_quad_join/join_quads.py delete mode 100644 doc/test_doc/prism_quad_join/prism_quads.py delete mode 100644 doc/test_doc/prism_quad_join/prism_quads_vec.py delete mode 100644 doc/test_doc/quad_revolution/make_grid.py delete mode 100644 doc/test_doc/quad_revolution/revolution.py diff --git a/doc/test_doc/cut_hexa/cut_hexa.py b/doc/test_doc/cut_hexa/cut_hexa.py deleted file mode 100644 index 4cbd4d2..0000000 --- a/doc/test_doc/cut_hexa/cut_hexa.py +++ /dev/null @@ -1,41 +0,0 @@ -# -*- 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") diff --git a/doc/test_doc/cylinder_pipe/make_cylinder.py b/doc/test_doc/cylinder_pipe/make_cylinder.py deleted file mode 100644 index d7ee552..0000000 --- a/doc/test_doc/cylinder_pipe/make_cylinder.py +++ /dev/null @@ -1,41 +0,0 @@ -# -*- 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") diff --git a/doc/test_doc/cylinder_pipe/make_cylinders.py b/doc/test_doc/cylinder_pipe/make_cylinders.py deleted file mode 100644 index ce7d315..0000000 --- a/doc/test_doc/cylinder_pipe/make_cylinders.py +++ /dev/null @@ -1,42 +0,0 @@ -# -*- 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") diff --git a/doc/test_doc/cylinder_pipe/make_pipe.py b/doc/test_doc/cylinder_pipe/make_pipe.py deleted file mode 100644 index 4cfadbe..0000000 --- a/doc/test_doc/cylinder_pipe/make_pipe.py +++ /dev/null @@ -1,42 +0,0 @@ -# -*- 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") diff --git a/doc/test_doc/cylinder_pipe/make_pipes.py b/doc/test_doc/cylinder_pipe/make_pipes.py deleted file mode 100644 index d2eff5d..0000000 --- a/doc/test_doc/cylinder_pipe/make_pipes.py +++ /dev/null @@ -1,44 +0,0 @@ -# -*- 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") diff --git a/doc/test_doc/grid/cartesian_grid.py b/doc/test_doc/grid/cartesian_grid.py deleted file mode 100644 index a5a851a..0000000 --- a/doc/test_doc/grid/cartesian_grid.py +++ /dev/null @@ -1,40 +0,0 @@ -# -*- 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") diff --git a/doc/test_doc/grid/cylindrical_grid.py b/doc/test_doc/grid/cylindrical_grid.py deleted file mode 100644 index 76839c2..0000000 --- a/doc/test_doc/grid/cylindrical_grid.py +++ /dev/null @@ -1,50 +0,0 @@ -# -*- 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") diff --git a/doc/test_doc/grid/irregular_cylindrical.py b/doc/test_doc/grid/irregular_cylindrical.py deleted file mode 100644 index 7901e68..0000000 --- a/doc/test_doc/grid/irregular_cylindrical.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- 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") diff --git a/doc/test_doc/grid/spherical_grid.py b/doc/test_doc/grid/spherical_grid.py deleted file mode 100644 index 18a1e83..0000000 --- a/doc/test_doc/grid/spherical_grid.py +++ /dev/null @@ -1,35 +0,0 @@ -# -*- 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") diff --git a/doc/test_doc/grid/spherical_grid2.py b/doc/test_doc/grid/spherical_grid2.py deleted file mode 100644 index 0dde24a..0000000 --- a/doc/test_doc/grid/spherical_grid2.py +++ /dev/null @@ -1,38 +0,0 @@ -# -*- 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") diff --git a/doc/test_doc/hemispherical_rind/hemispherical_grid.py b/doc/test_doc/hemispherical_rind/hemispherical_grid.py deleted file mode 100644 index 5e22e3b..0000000 --- a/doc/test_doc/hemispherical_rind/hemispherical_grid.py +++ /dev/null @@ -1,47 +0,0 @@ -# -*- 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 () - diff --git a/doc/test_doc/hemispherical_rind/partial_hemispherical_grid.py b/doc/test_doc/hemispherical_rind/partial_hemispherical_grid.py deleted file mode 100644 index 775a6d5..0000000 --- a/doc/test_doc/hemispherical_rind/partial_hemispherical_grid.py +++ /dev/null @@ -1,49 +0,0 @@ -# -*- 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 () - diff --git a/doc/test_doc/hemispherical_rind/partial_rind_grid.py b/doc/test_doc/hemispherical_rind/partial_rind_grid.py deleted file mode 100644 index 1d36a2b..0000000 --- a/doc/test_doc/hemispherical_rind/partial_rind_grid.py +++ /dev/null @@ -1,49 +0,0 @@ -# -*- 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 () diff --git a/doc/test_doc/hemispherical_rind/rind_grid.py b/doc/test_doc/hemispherical_rind/rind_grid.py deleted file mode 100644 index 41beb7e..0000000 --- a/doc/test_doc/hemispherical_rind/rind_grid.py +++ /dev/null @@ -1,48 +0,0 @@ -# -*- 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 () diff --git a/doc/test_doc/prism_quad_join/join_quads.py b/doc/test_doc/prism_quad_join/join_quads.py deleted file mode 100644 index f7f2c9e..0000000 --- a/doc/test_doc/prism_quad_join/join_quads.py +++ /dev/null @@ -1,59 +0,0 @@ -# -*- 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") diff --git a/doc/test_doc/prism_quad_join/prism_quads.py b/doc/test_doc/prism_quad_join/prism_quads.py deleted file mode 100644 index 7a3d624..0000000 --- a/doc/test_doc/prism_quad_join/prism_quads.py +++ /dev/null @@ -1,49 +0,0 @@ -# -*- 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") diff --git a/doc/test_doc/prism_quad_join/prism_quads_vec.py b/doc/test_doc/prism_quad_join/prism_quads_vec.py deleted file mode 100644 index eaf5374..0000000 --- a/doc/test_doc/prism_quad_join/prism_quads_vec.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- 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") diff --git a/doc/test_doc/quad_revolution/make_grid.py b/doc/test_doc/quad_revolution/make_grid.py deleted file mode 100644 index d18b5b8..0000000 --- a/doc/test_doc/quad_revolution/make_grid.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- 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); diff --git a/doc/test_doc/quad_revolution/revolution.py b/doc/test_doc/quad_revolution/revolution.py deleted file mode 100644 index d97d60c..0000000 --- a/doc/test_doc/quad_revolution/revolution.py +++ /dev/null @@ -1,84 +0,0 @@ -# -*- 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 () - -- 2.39.2