1 # Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 # This library is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU Lesser General Public
8 # License as published by the Free Software Foundation; either
9 # version 2.1 of the License.
11 # This library is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # Lesser General Public License for more details.
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with this library; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 # GEOM GEOM_SWIG : binding of C++ omplementaion with Python
23 # File : GEOM_Partition4.py
25 # import couplex2_01_GEOM
26 # reload(couplex2_01_GEOM)
27 # Dimensions de alveolus
28 # Parall
\89pip
\88de rectangle de taille alDx, alDy, alDz
35 # Dimensions de backfill
36 # Parall
\89pip
\88de rectangle de taille baDx, baDy, baDz
42 # Dimensions de geological medium
53 # -- Construction de backfill
55 backA = geompy.MakeBox(0.0, 0.0, 0.0, baDx, baDy, baDz)
56 back = geompy.MakeTranslation(backA, -baDx/2, -baDy/2, -baDz/2)
58 # -- Construction de alveolus
62 alveA = geompy.MakeBox(0.0, 0.0, 0.0, alDx, alDy, alDz)
63 alveB = geompy.MakeTranslation(alveA, -alDx/2, baDy/2, -alDz/2)
64 axis = geompy.MakeVectorDXDYDZ(1.0, 0.0, 0.0)
65 alve1 = geompy.MakeRotation(alveB, axis, math.pi)
66 alve2 = geompy.MakeTranslation(alveB, +alSepx/2, 0.0, 0.0)
67 alve3 = geompy.MakeTranslation(alveB, -alSepx/2, 0.0, 0.0)
72 alve = geompy.MakeCompound(GOlist)
74 # -- Construction de geological medium
76 geolA = geompy.MakeBox(0.0, 0.0, 0.0, gmDx, gmDy, gmDz)
77 geol = geompy.MakeTranslation(geolA, -gmDx/2, -gmDy/2, -gmDz/2)
79 geol = geompy.MakePartition([alve, geol, back])
81 subshapes = geompy.SubShapeAll(geol, geompy.ShapeType["SHAPE"])
84 GOlist.append(subshapes[0])
85 GOlist.append(subshapes[1])
86 GOlist.append(subshapes[2])
87 alve = geompy.MakeCompound(GOlist)
94 geol = geompy.MakeCompound([geol, back, alve])
96 geompy.addToStudy(geol, "couplex2 2")