Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/visu.git] / doc / salome / gui / VISU / input / tui_iso_surf.doc
1 /*!
2
3 \page tui_iso_surf_page Iso Surfaces
4
5 Create <b>Iso Surfaces</b> presentation on a field of the imported MED file:
6
7 \code
8 import os
9
10 import salome
11
12 import VISU
13 import visu_gui
14
15 # The directory containing MED files
16 datadir = os.getenv("DATA_DIR")
17
18 # Get VISU engine
19 myVisu = visu_gui.myVisu
20
21 # Import a MED file
22 medFile = os.path.join(datadir,"MedFiles","fra.med")
23 myResult = myVisu.ImportFile(medFile)
24
25 # Create iso surfaces for the first timestamp of 'VITESSE' field
26 meshName = 'LE VOLUME'
27 fieldEntity = VISU.NODE
28 fieldName = 'VITESSE'
29 myIsoSurfaces = myVisu.IsoSurfacesOnField(myResult, meshName, fieldEntity, fieldName, 1)
30
31 # Set the number of surfaces
32 myIsoSurfaces.SetNbSurfaces(12)
33
34 # Show two value labels per surface
35 myIsoSurfaces.ShowLabels(True, 2)
36
37 # Update the object browser
38 salome.sg.updateObjBrowser(1)
39
40 # Display the newly created iso surfaces
41 myViewManager = myVisu.GetViewManager()
42 myView = myViewManager.Create3DView()
43
44 myView.DisplayOnly(myIsoSurfaces)
45 myView.FitAll()
46 \endcode
47
48 <br>Please, see \ref VISU.IsoSurfaces "IsoSurfaces interface reference documentation" 
49 for more details.
50
51 */