1 # GEOM GEOM_SWIG : binding of C++ omplementaion with Python
3 # Copyright (C) 2003 CEA/DEN, EDF R&D
7 # File : GEOM_Partition2.py
10 #%Make geometry (like CEA script (A2)) using Partition algorithm%
11 # import callovo_01_GEOM
12 # reload(callovo_01_GEOM)
15 # --------------------------------------------
16 # Geometrie avec une galerie perpendiculaire
17 # --------------------------------------------
22 vecx = geompy.MakeVectorDXDYDZ(1.,0.,0.)
23 vecy = geompy.MakeVectorDXDYDZ(0.,1.,0.)
31 colis = geompy.MakeCylinder(
32 geompy.MakeVertex(colis_xmin,0.,0.),
35 colis_xmax-colis_xmin)
43 bo = geompy.MakeCylinder(
44 geompy.MakeVertex(bo_xmin,0.,0.),
53 alvRup_xmax = colis_xmax
56 alvRup = geompy.MakeCylinder(
57 geompy.MakeVertex(alvRup_xmin,0.,0.),
60 alvRup_xmax-alvRup_xmin)
65 bouchon_xmin = colis_xmax
67 bouchon_radius = alvRup_radius
69 bouchon = geompy.MakeCylinder(
70 geompy.MakeVertex(bouchon_xmin,0.,0.),
73 bouchon_xmax-bouchon_xmin)
81 pnt_galerie_xmax = geompy.MakeVertex(galerie_xmax,0.,0.)
83 galerie = geompy.MakeCylinder(
88 galerie = geompy.MakeTranslation(galerie, 0, -box_y/2, 0)
92 box = geompy.MakeBox(0., 0., 0., galerie_xmax, box_y, box_y)
93 box = geompy.MakeTranslation(box, 0.0, -box_y/2, -box_y/2)
98 galRup_xmax = galerie_xmax
101 galRup = geompy.MakeCylinder(
106 galRup = geompy.MakeTranslation(galRup, 0, -box_y/2, 0)
108 # -- endommagement galerie
110 galEnd_xmax = galerie_xmax
113 galEnd = geompy.MakeCylinder(pnt_galerie_xmax, vecy, galEnd_radius, box_y)
114 galEnd = geompy.MakeTranslation(galEnd, 0, -box_y/2, 0)
116 # -- endommagement alveole
119 alvEnd_xmax = galerie_xmax
122 alvEnd = geompy.MakeCylinder(
123 geompy.MakeVertex(alvEnd_xmin,0.,0.),
126 alvEnd_xmax-alvEnd_xmin)
128 # remove internal parts of galEnd intersecting alvEnd
130 galEnd_alvEnd = geompy.MakePartition([alvEnd], [], [], [galEnd])
135 #GOList += [galerie ]
137 GOList += [galEnd_alvEnd]
141 # remove section parts outside bo and inside bouchon
143 callovo = geompy.MakePartition(GOList, [], [box], [galerie, bouchon])
145 geompy.addToStudy(callovo, "callovo perp. 2")