1 # GEOM GEOM_SWIG : binding of C++ omplementaion with Python
3 # Copyright (C) 2003 CEA/DEN, EDF R&D
7 # File : GEOM_Partition4.py
10 #%Make geometry (like CEA script (A3)) using Partition algorithm%
11 # import couplex2_01_GEOM
12 # reload(couplex2_01_GEOM)
14 # Dimensions de alveolus
15 # Parall
\89pip
\88de rectangle de taille alDx, alDy, alDz
22 # Dimensions de backfill
23 # Parall
\89pip
\88de rectangle de taille baDx, baDy, baDz
29 # Dimensions de geological medium
40 # -- Construction de backfill
42 backA = geompy.MakeBox(0.0, 0.0, 0.0, baDx, baDy, baDz)
43 back = geompy.MakeTranslation(backA, -baDx/2, -baDy/2, -baDz/2)
45 # -- Construction de alveolus
49 alveA = geompy.MakeBox(0.0, 0.0, 0.0, alDx, alDy, alDz)
50 alveB = geompy.MakeTranslation(alveA, -alDx/2, baDy/2, -alDz/2)
51 axis = geompy.MakeVectorDXDYDZ(1.0, 0.0, 0.0)
52 alve1 = geompy.MakeRotation(alveB, axis, math.pi)
53 alve2 = geompy.MakeTranslation(alveB, +alSepx/2, 0.0, 0.0)
54 alve3 = geompy.MakeTranslation(alveB, -alSepx/2, 0.0, 0.0)
59 alve = geompy.MakeCompound(GOlist)
61 # -- Construction de geological medium
63 geolA = geompy.MakeBox(0.0, 0.0, 0.0, gmDx, gmDy, gmDz)
64 geol = geompy.MakeTranslation(geolA, -gmDx/2, -gmDy/2, -gmDz/2)
66 geol = geompy.MakePartition([alve, geol, back])
68 subshapes = geompy.SubShapeAll(geol, geompy.ShapeType["SHAPE"])
71 GOlist.append(subshapes[0])
72 GOlist.append(subshapes[1])
73 GOlist.append(subshapes[2])
74 alve = geompy.MakeCompound(GOlist)
81 geol = geompy.MakeCompound([geol, back, alve])
83 geompy.addToStudy(geol, "couplex2 2")