# -*- 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
import hexablock
import os
-import geompy
#---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
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