6 from salome.geom import geomBuilder
7 geompy = geomBuilder.New()
9 Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
10 geompy.addToStudy( Box_1, 'Box_1' )
15 from salome.smesh import smeshBuilder
16 smesh = smeshBuilder.New()
18 Mesh_1 = smesh.Mesh( Box_1 )
19 Mesh_1.Segment().NumberOfSegments(15)
21 isDone = Mesh_1.Compute()
23 raise Exception("Error when computing Mesh")
25 # define arguments for MakePolyLine
28 # between nodes 20 and 1, default plane
29 segments.append( SMESH.PolySegment( 20, 0, SMESH.PointStruct(-1, -1, -1), 1, 0, SMESH.PointStruct(-1, -1, -1), smesh.MakeDirStruct(0,0,0) ))
30 # between nodes 1 and 100, default plane
31 segments.append( SMESH.PolySegment( 1, 0, SMESH.PointStruct(-1, -1, -1), 200, 0, SMESH.PointStruct(-1, -1, -1), smesh.MakeDirStruct(0,0,0) ))
32 # between nodes 200 and edge (578, 577), plane includes vector (1,1,1)
33 segments.append( SMESH.PolySegment( 200, 0, SMESH.PointStruct(-1, -1, -1), 578, 577, SMESH.PointStruct(-1, -1, -1), smesh.MakeDirStruct(1,1,1) ))
35 Mesh_1.MakePolyLine( segments, "1D group")
38 if salome.sg.hasDesktop():
39 salome.sg.updateObjBrowser()