]> SALOME platform Git repositories - modules/hexablock.git/blob - doc/test_doc/cut_hexa/cut_hexa.py
Salome HOME
Merge from V6_main 01/04/2013
[modules/hexablock.git] / doc / test_doc / cut_hexa / cut_hexa.py
1 # -*- coding: latin-1 -*-
2 # Copyright (C) 2009-2013  CEA/DEN, EDF R&D
3 #
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.
8 #
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.
13 #
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
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20
21 ####### Test for Cut Hexa ###############
22
23 import hexablock
24
25
26 doc = hexablock.addDocument("default")
27
28 size_x = 2
29 size_y = 1
30 size_z = 1
31
32 orig = doc.addVertex(0, 0, 0)
33 dirVr = doc.addVector(1, 1, 1)
34 grid = doc.makeCartesian1(orig, dirVr, size_x, size_y, size_z, 0, 0, 0)
35
36 #####  doc.saveVtk ("hexa.vtk")
37
38 arete = grid.getEdgeK(0, 0, 0)
39 doc.cut(arete, 1)
40
41 #####  doc.saveVtk ("cut_hexa.vtk")