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_Partition3.py
25 # import callovo_01_GEOM
26 # reload(callovo_01_GEOM)
31 vecx = geompy.MakeVectorDXDYDZ(1.,0.,0.)
39 colis = geompy.MakeCylinder(
40 geompy.MakeVertex(colis_xmin,0.,0.),
43 colis_xmax-colis_xmin)
53 bo = geompy.MakeCylinder(
54 geompy.MakeVertex(bo_xmin,0.,0.),
64 alvRup_xmax = colis_xmax
67 alvRup = geompy.MakeCylinder(
68 geompy.MakeVertex(alvRup_xmin,0.,0.),
71 alvRup_xmax-alvRup_xmin)
77 bouchon_xmin = colis_xmax
79 bouchon_radius = alvRup_radius
81 bouchon = geompy.MakeCylinder(
82 geompy.MakeVertex(bouchon_xmin,0.,0.),
85 bouchon_xmax-bouchon_xmin)
87 #GOList.append(bouchon)
89 # -- endommagement alveole
95 alvEnd = geompy.MakeCylinder(
96 geompy.MakeVertex(alvEnd_xmin,0.,0.),
99 alvEnd_xmax-alvEnd_xmin)
101 GOList.append(alvEnd)
105 galerie_xmin = bouchon_xmax
107 galerie_radius = 2.17
109 galerie = geompy.MakeCylinder(
110 geompy.MakeVertex(galerie_xmin,0.,0.),
113 galerie_xmax-galerie_xmin)
115 GOList.append(galerie)
120 galRup_xmax = galerie_xmax
123 galRup = geompy.MakeCylinder(
124 geompy.MakeVertex(galRup_xmin,0.,0.),
127 galRup_xmax-galRup_xmin)
129 GOList.append(galRup)
133 galEnd_xmin = alvEnd_xmax
134 galEnd_xmax = galerie_xmax
137 galEnd = geompy.MakeCylinder(
138 geompy.MakeVertex(galEnd_xmin,0.,0.),
141 galEnd_xmax-galEnd_xmin)
143 GOList.append(galEnd)
148 box = geompy.MakeBox(0., 0., 0., galerie_xmax, box_y, box_y)
149 box = geompy.MakeTranslation(box, 0.0, -box_y/2, -box_y/2)
155 callovo = geompy.MakePartition(GOList, [], [], [bouchon])
156 geompy.addToStudy(callovo, "callovo 2")