6 box = MakeBoxDXDYDZ(200, 200, 200)
9 mesh.Segment().AutomaticLength(0.1)
13 # find node at (0,0,0)
15 for vId in SubShapeAllIDs( box, ShapeType["VERTEX"]):
17 nodeIds = mesh.GetSubMeshNodesId( vId, True )
19 xyz = mesh.GetNodeXYZ( node )
20 if xyz[0] == 0 and xyz[1] == 0 and xyz[2] == 0 :
27 raise "node000 not found"
29 # find node000 using the tested function
30 n = mesh.FindNodeClosestTo( -1,-1,-1 )
32 raise "FindNodeClosestTo() returns " + str( n ) + " != " + str( node000 )
34 # move node000 to a new location
36 n = mesh.MoveNode( n,x,y,z )
38 raise "MoveNode() returns " + n
40 # check the coordinates of the node000
41 xyz = mesh.GetNodeXYZ( node000 )
42 if not ( xyz[0] == x and xyz[1] == y and xyz[2] == z) :
43 raise "Wrong coordinates: " + str( xyz ) + " != " + str( [x,y,z] )