1 # -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
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
30 aStudyId = salome.myStudy._get_StudyId()
32 geompy.init_geom(salome.myStudy)
34 geompy.init_geom(salome.myStudy)
36 Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
37 geompy.addToStudy( Box_1, "Box_1" )
39 smesh.SetCurrentStudy(salome.myStudy)
41 Mesh_1 = smesh.Mesh(Box_1)
42 Regular_1D = Mesh_1.Segment()
43 Nb_Segments_1 = Regular_1D.NumberOfSegments(10)
44 Nb_Segments_1.SetDistrType( 0 )
45 Quadrangle_2D = Mesh_1.Quadrangle()
46 Hexa_3D = Mesh_1.Hexahedron()
47 isDone = Mesh_1.Compute()
51 aListOf3d_1=range(721,821)
53 aGrp3D_1=Mesh_1.GetMesh().CreateGroup( smesh.VOLUME, "Src 3D 1" )
54 aGrp3D_1.Add( aListOf3d_1 )
56 aListOf3d_2=range(821, 921)
57 aGrp3D_2=Mesh_1.GetMesh().CreateGroup( smesh.VOLUME, "Src 3D 2" )
58 aGrp3D_2.Add( aListOf3d_2 )
60 aGrp2D = Mesh_1.CreateDimGroup( [aGrp3D_1, aGrp3D_2], smesh.FACE, "Faces" )
62 aGrp1D = Mesh_1.CreateDimGroup( [aGrp3D_1, aGrp3D_2], smesh.EDGE, "Edges" )
64 aGrp0D = Mesh_1.CreateDimGroup( [aGrp3D_1, aGrp3D_2], smesh.NODE, "Nodes" )
66 salome.sg.updateObjBrowser( 1 )