1 # Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License.
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 # GEOM GEOM_SWIG : binding of C++ omplementaion with Python
22 # File : GEOM_Partition3.py
25 #%Make geometry (like CEA script (A2)) using Partition algorithm%
26 # import callovo_01_GEOM
27 # reload(callovo_01_GEOM)
33 vecx = geompy.MakeVectorDXDYDZ(1.,0.,0.)
41 colis = geompy.MakeCylinder(
42 geompy.MakeVertex(colis_xmin,0.,0.),
45 colis_xmax-colis_xmin)
55 bo = geompy.MakeCylinder(
56 geompy.MakeVertex(bo_xmin,0.,0.),
66 alvRup_xmax = colis_xmax
69 alvRup = geompy.MakeCylinder(
70 geompy.MakeVertex(alvRup_xmin,0.,0.),
73 alvRup_xmax-alvRup_xmin)
79 bouchon_xmin = colis_xmax
81 bouchon_radius = alvRup_radius
83 bouchon = geompy.MakeCylinder(
84 geompy.MakeVertex(bouchon_xmin,0.,0.),
87 bouchon_xmax-bouchon_xmin)
89 #GOList.append(bouchon)
91 # -- endommagement alveole
97 alvEnd = geompy.MakeCylinder(
98 geompy.MakeVertex(alvEnd_xmin,0.,0.),
101 alvEnd_xmax-alvEnd_xmin)
103 GOList.append(alvEnd)
107 galerie_xmin = bouchon_xmax
109 galerie_radius = 2.17
111 galerie = geompy.MakeCylinder(
112 geompy.MakeVertex(galerie_xmin,0.,0.),
115 galerie_xmax-galerie_xmin)
117 GOList.append(galerie)
122 galRup_xmax = galerie_xmax
125 galRup = geompy.MakeCylinder(
126 geompy.MakeVertex(galRup_xmin,0.,0.),
129 galRup_xmax-galRup_xmin)
131 GOList.append(galRup)
135 galEnd_xmin = alvEnd_xmax
136 galEnd_xmax = galerie_xmax
139 galEnd = geompy.MakeCylinder(
140 geompy.MakeVertex(galEnd_xmin,0.,0.),
143 galEnd_xmax-galEnd_xmin)
145 GOList.append(galEnd)
150 box = geompy.MakeBox(0., 0., 0., galerie_xmax, box_y, box_y)
151 box = geompy.MakeTranslation(box, 0.0, -box_y/2, -box_y/2)
157 callovo = geompy.MakePartition(GOList, [], [], [bouchon])
158 geompy.addToStudy(callovo, "callovo 2")