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.geom.MakeAxisStruct(0.0,0.0,0.0,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)
56 IORlist.append(alve1._get_Name())
57 IORlist.append(alve2._get_Name())
58 IORlist.append(alve3._get_Name())
59 alve = geompy.MakeCompound(IORlist)
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.Partition(
67 [alve._get_Name(), geol._get_Name(), back._get_Name()])
69 subshapes = geompy.SubShapeAll( geol, geompy.ShapeType["SHAPE"] )
72 IORlist.append(subshapes[0]._get_Name())
73 IORlist.append(subshapes[1]._get_Name())
74 IORlist.append(subshapes[2]._get_Name())
75 alve = geompy.MakeCompound(IORlist)
82 geol = geompy.MakeCompound(
83 [geol._get_Name(), back._get_Name(), alve._get_Name()])
85 geompy.addToStudy(geol,"couplex2 2")