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 disconnect elements..."
31 doc = hexablock.addDocument()
37 orig1 = doc.addVertex(0, 0, 0);
38 orig2 = doc.addVertex(4, 0, 0);
39 orig3 = doc.addVertex(8, 0, 0);
42 dirVr = doc.addVector(1, 1, 1);
44 grid1 = doc.makeCartesian1(orig1, dirVr, size_x, size_y, size_z, 0, 0,
46 grid2 = doc.makeCartesian1(orig2, dirVr, size_x, size_y, size_z, 0, 0,
48 grid3 = doc.makeCartesian1(orig3, dirVr, size_x, size_y, size_z, 0, 0,
56 # ecart = doc.addVector(0.5, 0.5, 0)
58 hexa1 = grid1.getHexaIJK(1, 1, 0)
59 hexa2 = grid2.getHexaIJK(1, 1, 0)
60 hexa3 = grid3.getHexaIJK(1, 1, 0)
62 quad = grid1.getQuadJK(1, 1, 0)
63 edge = grid2.getEdgeK(1, 2, 0)
64 vertex = grid3.getVertexIJK(1, 1, 1)
70 file_name = os.path.join(os.environ['TMP'], 'disconnect1.vtk')
71 #### doc.saveVtk(file_name)
73 doc.disconnectQuad(hexa1, quad)
75 file_name = os.path.join(os.environ['TMP'], 'disconnect2.vtk')
76 #### doc.saveVtk(file_name)
79 print "...test disconnect elements OK"