3 \page tui_stream_lines_page Stream Lines
5 Create <b> Stream Lines</b> presentation on a field of the imported MED file:
15 # The directory containing MED files
16 datadir = os.getenv("DATA_DIR")
19 myVisu = visu_gui.myVisu
22 medFile = os.path.join(datadir,"MedFiles","fra.med")
23 myResult = myVisu.ImportFile(medFile)
25 # Create stream lines for the first timestamp of 'VITESSE' field
26 meshName = 'LE VOLUME'
27 fieldEntity = VISU.NODE
29 myStreamLines = myVisu.StreamLinesOnField(myResult, meshName, fieldEntity, fieldName, 1)
31 # Set stream lines parameters
32 integrationStep = 0.003
36 prs3D = myVisu.MeshOnEntity(myResult, meshName, VISU.NODE)
38 direction = VISU.StreamLines.FORWARD
40 myStreamLines.SetParams(integrationStep, propagationTime, stepLength, prs3D, pointsPercents, direction)
42 # Set magnitude coloring
43 myStreamLines.ShowColored(True)
45 # Update the object browser
46 salome.sg.updateObjBrowser(1)
48 # Display the newly created stream lines
49 myViewManager = myVisu.GetViewManager()
50 myView = myViewManager.Create3DView()
52 myView.DisplayOnly(myStreamLines)
56 <br>Please, see \ref VISU.StreamLines "StreamLines interface reference documentation"