X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOM_SWIG%2FGEOM_Partition5.py;h=5ee6cfa9c0931f930654fb4cd57f47a40047ea1a;hb=22d3109060d9acc372bcc3bcfc4b52849b46fb07;hp=69c621a5f50b9e2369ddc9bc1114c5c9c02ee491;hpb=392885c1a8d50369708bbe5e6b44033ed8b8ba51;p=modules%2Fgeom.git diff --git a/src/GEOM_SWIG/GEOM_Partition5.py b/src/GEOM_SWIG/GEOM_Partition5.py old mode 100755 new mode 100644 index 69c621a5f..5ee6cfa9c --- a/src/GEOM_SWIG/GEOM_Partition5.py +++ b/src/GEOM_SWIG/GEOM_Partition5.py @@ -1,41 +1,46 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. # -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. # -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -# GEOM GEOM_SWIG : binding of C++ omplementaion with Python + +# GEOM GEOM_SWIG : binding of C++ implementation with Python # File : GEOM_Partition5.py # Module : GEOM # import gallery_01_GEOM # reload(gallery_01_GEOM) # -- Import geompy pour piloter GEOM par script # -import geompy -geom = geompy.geom +import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New() -# -- Dimensions de la boite entiˆre +# -- Dimensions de la boite enti�re LX, LY, LZ = 300.0, 150.0, 150.0 p0 = geompy.MakeVertex(0.,0.,0.) vy = geompy.MakeVectorDXDYDZ(0.,1.,0.) -# -- D‰finition du plan de sym‰trie (O,Ox,Oz) +# -- D�finition du plan de sym�trie (O,Ox,Oz) symPlane = geompy.MakePlane(p0, vy, 10.0) @@ -55,7 +60,7 @@ gal = geompy.MakeTranslation(gal, gal_x, -gal_lony/2, 0.0) # -- Galerie perpendiculaire # -- Dimensions de la galerie perpendiculaire -# -- La longueur est compt‰e € partir du centre +# -- La longueur est compt�e � partir du centre # -- de la galerie principale gpe_long, gpe_diam = 200.0, 60.0 @@ -67,14 +72,14 @@ gpe = geompy.MakeCylinder( gpe = geompy.MakeTranslation(gpe, gpe_x, 0, 0) # -- Dimensions d'une alveole -# -- Construction d'une alv‰ole +# -- Construction d'une alv�ole alv_long, alv_diam = 60.0, 18.0 alv01 = geompy.MakeCylinder(p0, vy, alv_diam/2, alv_long) alv02 = geompy.MakeMirrorByPlane(alv01, symPlane) alv0 = geompy.MakeCompound([alv01, alv02]) -# -- Construction des alv‰oles +# -- Construction des alv�oles alv_del, alv_sep = 40.0, 35.0 alv1 = geompy.MakeTranslation(alv0, gal_x-gal_diam/2-alv_sep, 0.0, 0.0)