]> SALOME platform Git repositories - modules/visu.git/blob - doc/salome/gui/VISU/input/tui_point_marker.doc
Salome HOME
Merge from V5_1_main 14/05/2010
[modules/visu.git] / doc / salome / gui / VISU / input / tui_point_marker.doc
1 /*!
2
3 \page tui_point_marker_page Example of using Point Markers
4
5 \code
6 import os
7 import time
8 import VISU
9 from visu_gui import *
10
11 data_dir = os.getenv("DATA_DIR")
12 sleep_delay = 2
13
14 myViewManager = myVisu.GetViewManager();
15
16 myView = myViewManager.Create3DView()
17 myView.SetTitle("The viewer for Point Marker Example")
18 print "myViewManager.Create3DView()"
19
20 medFile = "fra.med"
21 medFile = data_dir + '/MedFiles/' + medFile
22 myResult = myVisu.ImportFile(medFile)
23
24 aMeshName ="LE VOLUME"
25 anEntity = VISU.NODE
26 aFieldName = "VITESSE";
27 aTimeStampId = 1
28
29 aScalarMap = myVisu.ScalarMapOnField(myResult,aMeshName,anEntity,aFieldName,aTimeStampId)
30 myView.Display(aScalarMap);
31 myView.FitAll();
32
33 print "Set representation type to Point"
34 myView.SetPresentationType(aScalarMap, VISU.POINT)
35
36 print "Set standard marker"
37 aScalarMap.SetMarkerStd(VISU.MT_PLUS, VISU.MS_25)
38 myView.Update()
39 time.sleep(sleep_delay)
40
41 print "Set custom marker"
42 custom_texture = myVisu.LoadTexture(os.path.join(data_dir, "Textures", "texture1.dat"))
43 aScalarMap.SetMarkerTexture(custom_texture)
44 myView.Update()
45
46 \endcode
47
48 */