Salome HOME
Switch development flag to 1
[modules/hexablock.git] / src / TEST_PY / test_unit / test_disco.py
index 0d53e732c8ca00eebd4d2e304a32eaed2a70f0a6..8cdd0ceddfa6f1760c6e9a970a0a5cc1f3cc2bb2 100644 (file)
@@ -1,10 +1,10 @@
 # -*- coding: latin-1 -*-
-# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+# Copyright (C) 2009-2016  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,7 +22,6 @@
 
 import hexablock
 import os
-import geompy
 
 #---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
 
@@ -38,18 +37,19 @@ def test_disco_edges () :
     vy  = doc.addVector ( 0, 1, 1)
     vx  = doc.addVector ( 1 ,0, 0)
 
-    size_x = 2
+    size_x = 1
     size_y = 2
-    size_z = 5
+    size_z = 2
 
     grid = doc.makeCartesian (ori, vx, vy, vz, size_x, size_y, size_z)
 
     t_hexas = []
     t_edges = []
+    doc.setLevel (1)
     
     for nk in range (size_z) :
-        t_hexas.append (grid.getHexaIJK (1,1,nk))
-        t_edges.append (grid.getEdgeK   (1,2,nk))
+        t_hexas.append (grid.getHexaIJK (0,0,nk))
+        t_edges.append (grid.getEdgeK   (0,1,nk))
 
     disco_edges =  doc.disconnectEdges (t_hexas, t_edges)
     return doc