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 #==============================================================================
24 # Bug (from script, bug) : box.py, PAL5223
25 # Modified : 25/11/2004
26 # Author : Kovaltchuk Alexey
27 # Project : PAL/SALOME
28 #==============================================================================
29 # Salome geometry and meshing for a box
39 geom = salome.lcc.FindOrLoadComponent("FactoryServer", "GEOM")
41 ###geom.GetCurrentStudy(salome.myStudy._get_StudyId())
45 box = geompy.MakeBox(0.,0.,0.,1.,1.,1.)
46 boxId = geompy.addToStudy(box,"box")
52 box_mesh=smesh.Mesh(box, "box_mesh")
54 # set Hypothesis and Algorithm
56 alg1D = box_mesh.Segment()
57 alg1D.SetName("algo1D")
58 hypL1 = alg1D.LocalLength(0.25)
59 smesh.SetName(hypL1, "LocalLength")
61 alg2D = box_mesh.Quadrangle()
62 alg2D.SetName("algo2D")
64 alg3D = box_mesh.Hexahedron()
65 alg3D.SetName("algo3D")
71 sg.updateObjBrowser(1)