<b>Time stamp frequency</b> spin box: this option is available if
<b>Save animation to AVI file</b> mode is turned on. It provides a
possibility to capture only timestamps with indices divisible by the
-specified frequency, that allows to generate less voluminous films.
+specified frequency, which allows to generate less voluminous films.
<br><br>
<b>Clean memory at each frame</b> - this option allows to optimize the
performance of the operation.
<b>Publish to Study</b> - saves your animation in the study and
presents it in the Object Browser.
-<br><b>See Also</b> a sample TUI Script of an
-\ref tui_animation_page "Animation" creation.
+<br><b>See Also</b> a sample script of using
+\ref tui_animation_page "Animation" via TUI.
*/
<li>\b V2 (vertical right) - the values of this column will correspond to
Y-coordinates of the curve to be attached to the right vertical axis of
the Plot2d viewer.</li>
-\note If there are several curves attached both to left and right
+\note If there are several curves attached both to the left and the right
vertical axes, they will be indicated by the following icons in the
legend:
\image html axis_bottom_left.png
</li>
</ol>
-<br><b>See Also</b> a sample TUI Script of a
-\ref tui_table_curves_page "Curves creation and displaying" operation.
+<br><b>See Also</b> a sample TUI Script of
+\ref tui_table_curves_page "Curves creation and displaying".
*/
</li>
</ol>
-<b>See Also</b> a sample TUI Script of a
-\ref tui_table_curves_page "Curves creation and displaying" operation.
+<b>See Also</b> a sample script of
+\ref tui_table_curves_page "Curves creation and displaying" via TUI.
*/
the table (see also: \ref creating_curves_page "Creating curves" and
\ref creating_plot2d_page "Creating Plot 2D presentation").
-<br><b>See Also</b> a sample TUI Script of a
-\ref tui_cut_lines_page "Cut Lines creation" operation.
+<br><b>See Also</b> a sample TUI Script of
+\ref tui_cut_lines_page "Cut Lines" presentation operation.
*/
OK. Your presentation with scalar bar will be immediately displayed in
the viewer.
-<br><b>See Also</b> a sample TUI Script of a
-\ref tui_cut_planes_page "Cut Planes creation" operation.
+<br><b>See Also</b> a sample TUI Script of
+\ref tui_cut_planes_page "Cut Planes" presentation creation.
*/
\ref creating_curves_page "Creating curves" and
\ref creating_plot2d_page "Creating Plot 2D presentation").
-<br><b>See Also</b> a sample TUI Script of a
-\ref tui_cut_segment_page "Cut Segment creation" operation.
+<br><b>See Also</b> a sample TUI Script of
+\ref tui_cut_segment_page "Cut Segment" presentation creation.
*/
presentation with scalar bar will be immediately displayed in the
viewer.
-<br><b>See Also</b> a sample TUI Script of a
-\ref tui_def_shape_page "Deformed Shape creation" operation.
+<br><b>See Also</b> a sample TUI Script of
+\ref tui_def_shape_page "Deformed Shape" presentation creation.
-*/
\ No newline at end of file
+*/
\image html evolution_restore.png
-<b>See Also</b> a sample TUI Script of an
-\ref tui_evolution_page "Evolution on Point" operation.
+<b>See Also</b> a sample script of using
+\ref tui_evolution_page "Evolution on Point" operation via TUI.
*/
To exit the dialog and apply choices press \b OK button, or press \b
CANCEL button to quit.
-<br><b>See Also</b> a sample TUI Script of a
-\ref tui_gauss_points_page "Gauss Points creation" operation.
+<br><b>See Also</b> a sample TUI Script of
+\ref tui_gauss_points_page "Gauss Points presentations" creation.
-*/
\ No newline at end of file
+*/
</li>
</ul>
-<b>See Also</b> a sample TUI Script of an
-\ref tui_table_import_page "Import/Export table" operation.
+<b>See Also</b> a sample script of
+\ref tui_table_import_page "Import/Export" of tables via TUI.
*/
To complete file export click <b>Save</b>.
-<br><b>See Also</b> a sample TUI Script of an
-\ref tui_import_export_page "Import/Export" operation.
+<br><b>See Also</b> a sample script of
+\ref tui_import_export_page "Import/Export" of MED objects via TUI.
*/
presentation with scalar bar will be immediately displayed in the
viewer.
-<br><b>See Also</b> a sample TUI Script of a
-\ref tui_iso_surf_page "Iso Surfaces creation" operation.
+<br><b>See Also</b> a sample TUI Script of
+\ref tui_iso_surf_page "Iso Surfaces presentation" creation.
-*/
\ No newline at end of file
+*/
After you have finished with setting these parameters, click \b
OK. Your presentation will be immediately displayed in the viewer.
-<br><b>See Also</b> a sample TUI Script of a
-\ref tui_plot_3d_page "Plot 3D creation" operation.
+<br><b>See Also</b> a sample TUI Script of
+\ref tui_plot_3d_page "Plot 3D presentation" creation.
-*/
\ No newline at end of file
+*/
\image html custom_point_marker.png "Presentation with custom point markers"
-<b>See Also</b> a sample TUI Script of a
-\ref tui_point_marker_page "Point Marker" functionality using.
+<b>See Also</b> a sample script of using
+\ref tui_point_marker_page "Point Marker" functionality via TUI.
*/
<br><br>
This presentation will be displayed in the viewer.
-<br><b>See Also</b> a sample TUI Script of a
-\ref tui_submesh_page "Submesh presentation creation" operation.
+<br><b>See Also</b> a sample TUI Script of
+\ref tui_submesh_page "Submesh presentation" creation.
-*/
\ No newline at end of file
+*/
\image html scalar_map_on_cells.png "Scalar map on Cell Mesh"
-<b>See Also</b> a sample TUI Script of a
-\ref tui_scalar_map_page "Scalar Map creation" operation.
+<b>See Also</b> a sample TUI Script of
+\ref tui_scalar_map_page "Scalar Map presentation" creation.
*/
\image html scalar_map_on_cells.png "Example of Scalar Map presentation"
-<b>See Also</b> a sample TUI Script of a
-\ref tui_def_shape_and_scalar_map_page "Deformed Shape and Scalar Map creation" operation.
+<b>See Also</b> a sample TUI Script of
+\ref tui_def_shape_and_scalar_map_page "Deformed Shape and Scalar Map
+presentation" creation.
-*/
\ No newline at end of file
+*/
OK. Your presentation with scalar bar will be immediately displayed in
the viewer.
-<br><b>See Also</b> a sample TUI Script of a
-\ref tui_stream_lines_page "Stream Lines creation" operation.
+<br><b>See Also</b> a sample TUI Script of
+\ref tui_stream_lines_page "Stream Lines presentation" creation.
-*/
\ No newline at end of file
+*/
It is also possible to choose \b Wireframe or \b Shading \b Representation type, change
such properties as \b Opacity and <b> Line Width </b> and <b> Translate </b> the presentation using the context menu.
-<br><b>See Also</b> a sample TUI Script of a
-\ref tui_table_3d_page "Table 3D presentation creation" operation.
+<br><b>See Also</b> a sample TUI Script of
+\ref tui_table_3d_page "Table 3D presentation creation".
*/
\page tui_animation_page Animation
-Successive Animation example:
+Example of <b>Successive Animation</b>:
\code
import os
import VISU
from visu_gui import *
-# Directory containing MED files
+# The directory containing MED files
datadir = os.getenv("DATA_DIR")
-# Import MED file
+# Import a MED file
medFile = datadir + "/TimeStamps.med"
myResult = myVisu.ImportFile(medFile)
-# Create 3D view
+# Create a 3D view
myViewManager = myVisu.GetViewManager()
myView = myViewManager.Create3DView()
myView.SetTitle("Animation view")
-# Create animation instance
+# Create an animation instance
fieldName = "vitesse"
myAnimation = myVisu.CreateAnimation(myView);
-# Set successive animation mode
+# Set the successive animation mode
myAnimation.setAnimationMode(VISU.Animation.SUCCESSIVE)
-# Set animation properties:
+# Set the animation properties:
-# Add one field on which timestamps the animation will be performed
+# Add a field with timestamps, on which the animation will be performed
fieldName = "vitesse, m/s"
fieldSO = salome.myStudy.FindObject(fieldName)
myAnimation.addField(fieldSO)
-# Set presentation type for the first and sole field
+# Set the presentation type for the first field
myAnimation.setPresentationType(0, VISU.TDEFORMEDSHAPEANDSCALARMAP)
# Generate presentations
myAnimation.generatePresentations(0)
-# Create the pattern of Deformed Shape and Scalar Map presentation
+# Create the pattern of a Deformed Shape and Scalar Map presentation
meshName = "dom"
fieldName = "vitesse"
fieldEntity = VISU.NODE
# Generate frames
myAnimation.generateFrames()
-# Publisj animation object in study
+# Publish the animation object in the study
myAnimation.publishInStudy()
-# Set speed
+# Set the speed
myAnimation.setSpeed(80)
-# Save animation after changing the speed
+# Save the animation after changing the speed
myAnimation.saveAnimation()
# Fit All
myView.FitAll()
-# Start animation
+# Start the animation
myAnimation.startAnimation()
# Rewind to the first frame
sleep(10)
myAnimation.firstFrame()
-# Update object browser
+# Update the object browser
salome.sg.updateObjBrowser(1)
\endcode
-<br>Parallel Animation example:
+<br>Example of <b>Parallel Animation</b>:
\code
import os
import VISU
from visu_gui import *
-# Directory containing MED files
+# The directory containing MED files
datadir = os.getenv("DATA_DIR")
-# Import MED file
+# Import a MED file
medFile = datadir + "/TimeStamps.med"
myResult = myVisu.ImportFile(medFile)
-# Create 3D view
+# Create a 3D view
myViewManager = myVisu.GetViewManager()
myView = myViewManager.Create3DView()
myView.SetTitle("Animation view")
-# Create animation instance
+# Create an animation instance
fieldName = "vitesse"
myAnimation = myVisu.CreateAnimation(myView);
-# Set successive animation mode
+# Set the successive animation mode
myAnimation.setAnimationMode(VISU.Animation.PARALLEL)
# Set animation properties:
-# Add two fields on which timestamps the animation will be performed
+# Add two fields with timestamps, on which the animation will be performed
fieldName1 = "vitesse, m/s"
fieldSO1 = salome.myStudy.FindObject(fieldName1)
fieldName2 = "temperature, K"
myAnimation.addField(fieldSO1)
myAnimation.addField(fieldSO2)
-# Set presentation type for the first field
+# Set the presentation type for the first field
myAnimation.setPresentationType(0, VISU.TVECTORS)
-# Set presentation type for the second field
+# Set the presentation type for the second field
myAnimation.setPresentationType(1, VISU.TSCALARMAP)
# Generate presentations for all fields
# Generate frames
myAnimation.generateFrames()
-# Publisj animation object in study
+# Publish the animation object in the study
myAnimation.publishInStudy()
-# Set speed
+# Set the speed
myAnimation.setSpeed(95)
# Fit All
myView.FitAll()
-# Start animation
+# Start the animation
myAnimation.startAnimation()
-# Update object browser
+# Update the object browser
salome.sg.updateObjBrowser(1)
\endcode
\page tui_cut_lines_page Cut Lines
-Create Cut Lines on the field of the imported MED file:
+Create <b>Cut Lines</b> presentation on a field of the imported MED file:
\code
import os
import VISU
import visu_gui
-# Directory containing MED files
+# The directory containing MED files
datadir = os.getenv("DATA_DIR")
# Get VISU engine
myVisu = visu_gui.myVisu
-# Import MED file
+# Import a MED file
medFile = datadir + "/fra.med"
myResult = myVisu.ImportFile(medFile)
fieldName = 'VITESSE'
myCutLines = myVisu.CutLinesOnField(myResult, meshName, fieldEntity, fieldName, 1)
-# Set orientation of the base plane (parallel to ZX)
+# Set the orientation of the base plane (parallel to ZX)
myCutLines.SetOrientation(VISU.CutPlanes.ZX, 0, 0)
-# Set orientation of the cutting planes (parallel to ZX)
+# Set the orientation of the cutting planes (parallel to ZX)
myCutLines.SetOrientation2(VISU.CutPlanes.XY, 0, 0)
-# Set number of lines
+# Set the number of lines
myCutLines.SetNbLines(12)
-# Set displacement of the base plane
+# Set the displacement of the base plane
myCutLines.SetDisplacement(0)
-# Set custom position for the first line
+# Set a custom position for the first line
newPos = (myCutLines.GetLinePosition(1) - myCutLines.GetLinePosition(0))/2
myCutLines.SetLinePosition(0, newPos)
-# Update object browser
+# Update the object browser
salome.sg.updateObjBrowser(1)
-# Display just created cut lines
+# Display the newly created cut lines
myViewManager = myVisu.GetViewManager()
myView = myViewManager.Create3DView()
<br>Please, see \ref VISU.CutLines "CutLines interface reference documentation"
for more details.
-*/
\ No newline at end of file
+*/
\page tui_cut_planes_page Cut Planes
-Create Cut Planes on the field of the imported MED file:
+Create <b>Cut Planes</b> presentation on a field of the imported MED file:
\code
import os
import VISU
import visu_gui
-# Directory containing MED files
+# The directory containing MED files
datadir = os.getenv("DATA_DIR")
# Get VISU engine
myVisu = visu_gui.myVisu
-# Import MED file
+# Import a MED file
medFile = datadir + "/fra.med"
myResult = myVisu.ImportFile(medFile)
fieldName = 'VITESSE'
myCutPlanes = myVisu.CutPlanesOnField(myResult, meshName, fieldEntity, fieldName, 1)
-# Set number of planes
+# Set the number of planes
myCutPlanes.SetNbPlanes(15)
-# Set orientation of the planes (parallel to XY), set rotation around Y to 0.5 radian
+# Set the planes orientation (parallel to XY), set rotation around Y to 0.5 radian
myCutPlanes.SetOrientation(VISU.CutPlanes.XY, 0, 0.5)
-# Set scale
+# Set the scale
myCutPlanes.UseDeformation(True)
myCutPlanes.SetVectorialField(fieldEntity, fieldName)
myCutPlanes.SetScale(0.05)
-# Set displacement
+# Set the displacement
myCutPlanes.SetDisplacement(0.1)
-# Update object browser
+# Update the object browser
salome.sg.updateObjBrowser(1)
-# Display just created cut planes
+# Display the newly created cut planes
myViewManager = myVisu.GetViewManager()
myView = myViewManager.Create3DView()
<br>Please, see \ref VISU.CutPlanes "CutPlanes interface reference documentation"
for more details.
-*/
\ No newline at end of file
+*/
\page tui_cut_segment_page Cut Segment
-Create Cut Segment on the field of the imported MED file:
+Create <b>Cut Segment</b> presentation on a field of the imported MED file:
\code
import os
import VISU
import visu_gui
-# Directory containing MED files
+# The directory containing MED files
datadir = os.getenv("DATA_DIR")
# Get VISU engine
myVisu = visu_gui.myVisu
-# Import MED file
+# Import a MED file
medFile = datadir + "/fra.med"
myResult = myVisu.ImportFile(medFile)
-# Create cut segment for the first timestamp of 'VITESSE' field
+# Create a cut segment for the first timestamp of 'VITESSE' field
meshName = 'LE VOLUME'
fieldEntity = VISU.NODE
fieldName = 'VITESSE'
# Invert the resulting curve
myCutSegment.SetAllCurvesInverted(True)
-# Update object browser
+# Update the object browser
salome.sg.updateObjBrowser(1)
-# Display just created cut segment
+# Display the newly created cut segment
myViewManager = myVisu.GetViewManager()
myView = myViewManager.Create3DView()
<br>Please, see \ref VISU.CutSegment "CutSegment interface reference documentation"
for more details.
-*/
\ No newline at end of file
+*/
\page tui_def_shape_page Deformed Shape
-Create Deformed Shape on the field of the imported MED file:
+Create <b>Deformed Shape</b> presentation on a field of the imported MED file:
\code
import os
import VISU
import visu_gui
-# Directory containing MED files
+# The directory containing MED files
datadir = os.getenv("DATA_DIR")
# Get VISU engine
myVisu = visu_gui.myVisu
-# Import MED file
+# Import a MED file
medFile = datadir + "/fra.med"
myResult = myVisu.ImportFile(medFile)
-# Create deformed shape for the first timestamp of 'VITESSE' field
+# Create a deformed shape for the first timestamp of 'VITESSE' field
meshName = 'LE VOLUME'
fieldEntity = VISU.NODE
fieldName = 'VITESSE'
myDefShape = myVisu.DeformedShapeOnField(myResult, meshName, fieldEntity, fieldName, 1)
-# Set scale factor
+# Set the scale factor
myDefShape.SetScale(0.25)
# Set magnitude coloring
myDefShape.ShowColored(True)
-# Update object browser
+# Update the object browser
salome.sg.updateObjBrowser(1)
-# Display just created deformed shape
+# Display the newly created deformed shape
myViewManager = myVisu.GetViewManager()
myView = myViewManager.Create3DView()
<br>Please, see \ref VISU.DeformedShape "DeformedShape interface reference documentation"
for more details.
-*/
\ No newline at end of file
+*/
\page tui_def_shape_and_scalar_map_page Deformed Shape and Scalar Map
-Create Deformed Shape and Scalar Map presentation on the field of the imported MED file:
+Create <b>Deformed Shape and Scalar Map</b> presentation on the field of the imported MED file:
\code
import os
import VISU
import visu_gui
-# Directory containing MED files
+# The directory containing MED files
datadir = os.getenv("DATA_DIR")
# Get VISU engine
myVisu = visu_gui.myVisu
-# Import MED file
+# Import a MED file
medFile = datadir + "/fra.med"
myResult = myVisu.ImportFile(medFile)
-# Create deformed shape and scalar map for the first timestamp of 'VITESSE' field
+# Create a deformed shape and a scalar map for the first timestamp of 'VITESSE' field
meshName = 'LE VOLUME'
fieldEntity = VISU.NODE
fieldName = 'VITESSE'
myDefShapeScalarMap = myVisu.DeformedShapeAndScalarMapOnField(myResult, meshName, fieldEntity, fieldName, 1)
-# Set scale
+# Set the scale
myDefShapeScalarMap.SetScale(0.25)
-# Set 'TAUX_DE_VIDE' as scalar field, use first timestamp
+# Set 'TAUX_DE_VIDE' as a scalar field, use the first timestamp
fieldName = 'TAUX_DE_VIDE'
myDefShapeScalarMap.SetScalarField(VISU.NODE, fieldName, 1)
-# Update object browser
+# Update the object browser
salome.sg.updateObjBrowser(1)
-# Display just created presentation
+# Display the newly created presentation
myViewManager = myVisu.GetViewManager()
myView = myViewManager.Create3DView()
"DeformedShapeAndScalarMap interface reference documentation"
for more details.
-*/
\ No newline at end of file
+*/
\page tui_evolution_page Evolution on Point
-Example of Evolution on Point:
+Example of <b>Evolution on Point</b> presentation:
\code
import os
import VISU
from visu_gui import *
-# Directory containing MED files
+# The directory containing MED files
datadir = os.getenv("DATA_DIR")
-# Import MED file
+# Import a MED file
medFile = datadir + "/TimeStamps.med"
myResult = myVisu.ImportFile(medFile)
-# Create 2D viewer for the evolution graph:
+# Create a 2D viewer for the evolution graph:
myViewManager = myVisu.GetViewManager();
myView = myViewManager.CreateXYPlot();
myView.SetTitle("The viewer for Evolution")
-# Create evolution instance, use just created view
+# Create an evolution instance, using the newly created view
myEvolution = myVisu.CreateEvolution(myView);
-# Get 'vitesse' field sobject
+# Get 'vitesse' field object
aSObj = myStudy.FindObjectIOR(myResult.GetID())
aSObj = aSObj.FindSubObject(1)[1] # 'dom' mesh
aSObj = aSObj.FindSubObject(3)[1] # Fields
# Set "x" as a component
myEvolution.setComponentId(1)
-# Set point via identifier
+# Set a point via identifier
myEvolution.setPointId(500)
-# Show Evolution
+# Show the Evolution
myEvolution.showEvolution()
myView.FitAll()
-# Update object browser
+# Update the object browser
salome.sg.updateObjBrowser(1)
\endcode
\page tui_gauss_points_page Gauss Points
-Create Gauss Points presentation on the field of the imported MED file:
+Create <b>Gauss Points</b> presentations on a field of the imported MED file:
\code
import os
import VISU
import visu_gui
-# Directory containing MED files
+# The directory containing MED files
datadir = os.getenv("DATA_DIR")
# Get VISU engine
myVisu = visu_gui.myVisu
-# Import MED file
+# Import the file
medFile = datadir + "/pointe.med"
myResult = myVisu.ImportFile(medFile)
fieldEntity = VISU.CELL
fieldName = 'fieldcelldoublevector'
-# Create Gauss Points presentation of the first type:
-# Results at Gauss Points
+# Create a Gauss Points presentation of the first type: <b>Results at Gauss Points</b>
myGaussPoints1 = myVisu.GaussPointsOnField(myResult, meshName, fieldEntity, fieldName, 1)
# Set range values (5-50%):
# Set OpenGL Points as a primitive type
myGaussPoints1.SetPrimitiveType(VISU.GaussPoints.POINT)
-# Set points maximum size
+# Set the maximum size of points
myGaussPoints1.SetClamp(32)
-# Create Gauss Points presentation of the second type:
-# Gauss Points on Geometry
+# Create a Gauss Points presentation of the second type: <b>Gauss Points on Geometry</b>
myGaussPoints2 = myVisu.GaussPointsOnField(myResult, meshName, fieldEntity, fieldName, 1)
myGaussPoints2.SetIsColored(False)
# Set magnification ratio
myGaussPoints2.SetMagnificationIncrement(4)
-# Set size of points
+# Set the size of points
myGaussPoints2.SetGeomSize(0.25)
-# Set color of points
+# Set the color of points
myGaussPoints2.SetColor(SALOMEDS.Color(255, 90, 255))
-# Create Gauss Points presentation of the third type:
-# Gauss Points on Deformed Shape
+# Create a Gauss Points presentation of the third type: <b>Gauss Points on Deformed Shape</b>
myGaussPoints3 = myVisu.GaussPointsOnField(myResult, meshName, fieldEntity, fieldName, 1)
-# Apply deformation
+# Apply the deformation
myGaussPoints3.SetIsDeformed(True)
myGaussPoints3.SetScaleFactor(0.4)
-# Set geometrical sphere as a primitive type
+# Set a geometrical sphere as the primitive type
myGaussPoints3.SetPrimitiveType(VISU.GaussPoints.SPHERE)
# Set sphere resolution
# Update object browser
salome.sg.updateObjBrowser(1)
-# Display just created presentations one by one
+# Display the newly created presentations one by one
myViewManager = myVisu.GetViewManager()
myView = myViewManager.Create3DView()
<br>Please, see \ref VISU.GaussPoints "GaussPoints interface reference documentation"
for more details.
-*/
\ No newline at end of file
+*/
\page tui_import_export_page Import/Export MED
-Import MED file:
+Import data from a MED file:
\code
import os
import visu_gui
-# Directory containing MED files
+# The directory containing MED files
datadir = os.getenv("DATA_DIR")
# Get VISU engine
myVisu = visu_gui.myVisu
-# MED file path
+# The path to the file
medFile = datadir + "/fra.med"
-# Import MED file
+# Import the file
myResult = myVisu.ImportFile(medFile)
-# Update object browser
+# Update the object browser
salome.sg.updateObjBrowser(1)
\endcode
-<br>Export to MED file:
+<br>Export data to a MED file:
\code
import os
import visu_gui
-# Directory containing MED files
+# The directory containing MED files
datadir = os.getenv("DATA_DIR")
# Get VISU engine
myVisu = visu_gui.myVisu
-# MED file path
+# The path to the file
medFile = datadir + "/fra.med"
-# Import MED file
+# Import the file
myResult = myVisu.ImportFile(medFile)
-# Export MED file
+# Export the file
newFileName = datadir + "/fra_copy.med"
myResult.ExportMED(newFileName)
-# Update object browser
+# Update the object browser
salome.sg.updateObjBrowser(1)
\endcode
-*/
\ No newline at end of file
+*/
\page tui_iso_surf_page Iso Surfaces
-Create Iso Surfaces on the field of the imported MED file:
+Create <b>Iso Surfaces</b> presentation on a field of the imported MED file:
\code
import os
import VISU
import visu_gui
-# Directory containing MED files
+# The directory containing MED files
datadir = os.getenv("DATA_DIR")
# Get VISU engine
myVisu = visu_gui.myVisu
-# Import MED file
+# Import a MED file
medFile = datadir + "/fra.med"
myResult = myVisu.ImportFile(medFile)
fieldName = 'VITESSE'
myIsoSurfaces = myVisu.IsoSurfacesOnField(myResult, meshName, fieldEntity, fieldName, 1)
-# Set number of surfaces
+# Set the number of surfaces
myIsoSurfaces.SetNbSurfaces(12)
# Show two value labels per surface
myIsoSurfaces.ShowLabels(True, 2)
-# Update object browser
+# Update the object browser
salome.sg.updateObjBrowser(1)
-# Display just created iso surfaces
+# Display the newly created iso surfaces
myViewManager = myVisu.GetViewManager()
myView = myViewManager.Create3DView()
<br>Please, see \ref VISU.IsoSurfaces "IsoSurfaces interface reference documentation"
for more details.
-*/
\ No newline at end of file
+*/
\page tui_plot_3d_page Plot 3D
-Create Plot 3D presentation on the field of the imported MED file:
+Create <b>Plot 3D</b> presentation on a field of the imported MED file:
\code
import os
import VISU
import visu_gui
-# Directory containing MED files
+# The directory containing MED files
datadir = os.getenv("DATA_DIR")
# Get VISU engine
myVisu = visu_gui.myVisu
-# Import MED file
+# Import a MED file
medFile = datadir + "/fra.med"
myResult = myVisu.ImportFile(medFile)
-# Create plot 3d for the first timestamp of 'VITESSE' field
+# Create a 3d plot for the first timestamp of 'VITESSE' field
meshName = 'LE VOLUME'
fieldEntity = VISU.NODE
fieldName = 'VITESSE'
myPlot3D = myVisu.Plot3DOnField(myResult, meshName, fieldEntity, fieldName, 1)
-# Set cut plane orientation
+# Set the cut plane orientation
myPlot3D.SetOrientation(VISU.Plot3D.ZX, 0, 0)
-# Set relative position of the plane
+# Set the relative position of the plane
myPlot3D.SetPlanePosition(0.8, True)
-# Set scale factor
+# Set the scale factor
myPlot3D.SetScaleFactor(0.25)
-# Set contour as a presentation type
+# Set the contour presentation type
myPlot3D.SetContourPrs(True)
-# Set number of contours
+# Set the number of contours
myPlot3D.SetNbOfContours(100)
-# Update object browser
+# Update the object browser
salome.sg.updateObjBrowser(1)
-# Display just created plot 3d presentation
+# Display the newly created plot 3d presentation
myViewManager = myVisu.GetViewManager()
myView = myViewManager.Create3DView()
<br>Please, see \ref VISU.Plot3D "Plot3D interface reference documentation"
for more details.
-*/
\ No newline at end of file
+*/
\page tui_point_marker_page Point Marker
-Example of using Point Markers:
+Example of using <b>Point Markers</b>:
\code
import os
-from time import sleep
-
-import salome
-
+import time
import VISU
from visu_gui import *
-# Directory containing MED files
-datadir = os.getenv("DATA_DIR")
+data_dir = os.getenv("DATA_DIR")
+sleep_delay = 2
-# Import MED file
-medFile = datadir + "/fra.med"
-myResult = myVisu.ImportFile(medFile)
+myViewManager = myVisu.GetViewManager();
-# Create scalar map for the first timestamp of 'VITESSE' field
-meshName = "LE VOLUME"
-fieldEntity = VISU.NODE
-fieldName = "VITESSE"
-timeStampId = 1
+myView = myViewManager.Create3DView()
+myView.SetTitle("The viewer for Point Marker Example")
+print "myViewManager.Create3DView()"
-myScalarMap = myVisu.ScalarMapOnField(myResult, meshName, fieldEntity, fieldName, timeStampId)
+medFile = "fra.med"
+medFile = data_dir + '/MedFiles/' + medFile
+myResult = myVisu.ImportFile(medFile)
-# Create 3D view
-myViewManager = myVisu.GetViewManager();
-myView = myViewManager.Create3DView()
-myView.SetTitle("The viewer for Point Marker example")
+aMeshName ="LE VOLUME"
+anEntity = VISU.NODE
+aFieldName = "VITESSE";
+aTimeStampId = 1
-# Display just created scalar map
-myView.DisplayOnly(myScalarMap);
+aScalarMap = myVisu.ScalarMapOnField(myResult,aMeshName,anEntity,aFieldName,aTimeStampId)
+myView.Display(aScalarMap);
myView.FitAll();
-# Set the scalar map representation type to point
-myView.SetPresentationType(myScalarMap, VISU.POINT)
+print "Set the representation type to Point"
+myView.SetPresentationType(aScalarMap, VISU.POINT)
-# Set standard marker
-myScalarMap.SetMarkerStd(VISU.MT_O_PLUS, VISU.MS_25)
+print "Set a standard marker"
+aScalarMap.SetMarkerStd(VISU.MT_PLUS, VISU.MS_25)
myView.Update()
-sleep(5)
+time.sleep(sleep_delay)
-# Set custom marker
-textureFile = os.path.join(datadir, "Textures", "texture1.dat")
-custom_texture = myVisu.LoadTexture(textureFile)
-myScalarMap.SetMarkerTexture(custom_texture)
+print "Set a custom marker"
+custom_texture = myVisu.LoadTexture(os.path.join(data_dir, "Textures", "texture1.dat"))
+aScalarMap.SetMarkerTexture(custom_texture)
myView.Update()
-# Update object browser
-salome.sg.updateObjBrowser(1)
\endcode
<br>Please, see \ref VISU.Prs3d "Prs3d interface reference documentation"
for more details.
-
*/
\page tui_scalar_map_page Scalar Map
-Create Scalar Map on the field of the imported MED file:
+Create <b>Scalar Map</b> presentation on a field of the imported MED file:
\code
import os
import VISU
import visu_gui
-# Directory containing MED files
+# The directory containing MED files
datadir = os.getenv("DATA_DIR")
# Get VISU engine
myVisu = visu_gui.myVisu
-# Import MED file
+# Import a MED file
medFile = datadir + "/pointe.med"
myResult = myVisu.ImportFile(medFile)
-# Create scalar map for the first timestamp of 'fieldcelldoublevector' field
+# Create a scalar map for the first timestamp of 'fieldcelldoublevector' field
meshName = 'maa1'
fieldEntity = VISU.CELL
fieldName = 'fieldcelldoublevector'
myScalarMap = myVisu.ScalarMapOnField(myResult, meshName, fieldEntity, fieldName, 1)
-# Set logarithmic scaling
+# Set the logarithmic scaling
myScalarMap.SetScaling(VISU.LOGARITHMIC)
# Set scalar range to [2, 5]
myScalarMap.SetRange(2, 5)
-# Update object browser
+# Update the object browser
salome.sg.updateObjBrowser(1)
-# Display just created scalar map
+# Display the newly created scalar map
myViewManager = myVisu.GetViewManager()
myView = myViewManager.Create3DView()
<br>Please, see \ref VISU.ScalarMap "ScalarMap interface reference documentation"
for more details.
-*/
\ No newline at end of file
+*/
\page tui_stream_lines_page Stream Lines
-Create Stream Lines on the field of the imported MED file:
+Create <b> Stream Lines</b> presentation on a field of the imported MED file:
\code
import os
import VISU
import visu_gui
-# Directory containing MED files
+# The directory containing MED files
datadir = os.getenv("DATA_DIR")
# Get VISU engine
myVisu = visu_gui.myVisu
-# Import MED file
+# Import a MED file
medFile = datadir + "/fra.med"
myResult = myVisu.ImportFile(medFile)
# Set magnitude coloring
myStreamLines.ShowColored(True)
-# Update object browser
+# Update the object browser
salome.sg.updateObjBrowser(1)
-# Display just created stream lines
+# Display the newly created stream lines
myViewManager = myVisu.GetViewManager()
myView = myViewManager.Create3DView()
<br>Please, see \ref VISU.StreamLines "StreamLines interface reference documentation"
for more details.
-*/
\ No newline at end of file
+*/
\page tui_submesh_page Submesh presentation
-Display different submeshes of the imported MED file:
+Display various submeshes of the imported MED file:
\code
import os
import VISU
import visu_gui
-# Directory containing MED files
+# The directory containing MED files
datadir = os.getenv("DATA_DIR")
# Get VISU engine
myVisu = visu_gui.myVisu
-# Import MED file
+# Import a MED file
medFile = datadir + "/pointe.med"
myResult = myVisu.ImportFile(medFile)
mySubMeshes = []
-# Submesh on nodes
+# Create submesh on nodes
myOnNodes = myVisu.MeshOnEntity(myResult, meshName, nodeEntity)
mySubMeshes.append(myOnNodes)
-# Submesh on family (one cell)
+# Create submesh on a family (one cell)
familyName = 'FAMILLE_ELEMENT_1'
myOnFamily = myVisu.FamilyMeshOnEntity(myResult, meshName, cellEntity, familyName)
mySubMeshes.append(myOnFamily)
-# Submesh on group (several cells)
+# Create submesh on a group (several cells)
groupName = 'groupe1'
myOnGroup = myVisu.GroupMesh(myResult, meshName, groupName)
mySubMeshes.append(myOnGroup)
-# Update object browser
+# Update the object browser
salome.sg.updateObjBrowser(1)
-# Display just created presentations one by one
+# Display newly created presentations one by one
myViewManager = myVisu.GetViewManager()
myView = myViewManager.Create3DView()
<br>Please, see \ref VISU.Mesh "Mesh interface reference documentation"
for more details.
-*/
\ No newline at end of file
+*/
\page tui_table_3d_page Table 3D presentation
-Create and display Table 3D presentation:
+Create and display a Table 3D presentation:
\code
import os
import visu_gui
-# Directory containing data table files
+# The directory containing data table files
datadir = os.getenv("DATA_DIR")
# Get VISU engine
tableFile = datadir + '/table_test.xls'
myTablesSO = myVisu.ImportTables(tableFile, False)
-# Create table presentation
+# Create a table presentation
table = None
anIsFound, aTableSO = myTablesSO.FindSubObject(1)
if anIsFound:
# Set scale factor
table.SetScaleFactor(0.2)
-# Show table presentation
+# Show the table presentation
if (table is not None):
# Display just created tabel presentation
myViewManager = myVisu.GetViewManager()
myView.DisplayOnly(table)
myView.FitAll()
-# Update object browser
+# Update the object browser
salome.sg.updateObjBrowser(1)
\endcode
<br>Please, see \ref VISU.Table "Table interface reference documentation"
for more details.
-*/
\ No newline at end of file
+*/
import VISU
import visu_gui
-# Directory containing data table files
+# The directory containing data table files
datadir = os.getenv("DATA_DIR")
# Get VISU engine
tableFile = datadir + '/table_test.xls'
myTablesSO = myVisu.ImportTables(tableFile, False)
-# Get table
+# Get the table
anIsFound, myTableSO = myTablesSO.FindSubObject(1)
anID = myTableSO.GetID()
myTable = myVisu.CreateTable(anID)
-# Create table view
+# Create a table view
myViewManager = myVisu.GetViewManager()
myTableView = myViewManager.CreateTableView(myTable)
myTableView.SetTitle('My Curves')
-# Create container for a set of curves
+# Create a container for a set of curves
myContainer = myVisu.CreateContainer()
# Create curves
aCurve = myVisu.CreateCurve( myTable, 1, i )
myContainer.AddCurve(aCurve)
-# Update object browser
+# Update the object browser
salome.sg.updateObjBrowser(1)
-# Create Plot 2D view
+# Create a Plot 2D view
myView = myViewManager.CreateXYPlot();
myView.SetTitle("The viewer for My Curves")
myView.Display(myContainer)
sleep(5)
-# Set curves displaying mode
+# Set the curves displaying mode
myView.SetCurveType(VISU.XYPlot.SPLINE)
-# Set marker size
+# Set the marker size
myView.SetMarkerSize(15)
-# Change display parameters of the last created curve
-# Marker type
+# Change the display parameters of the last created curve
+# Set the marker type
aCurve.SetMarker(VISU.Curve.CIRCLE)
-# Line type and width
+# Set the line type and width
aCurve.SetLine(VISU.Curve.SOLIDLINE, 4)
# Display only the last created curve
<br>Please, see \ref VISU.Curve "Curve interface reference documentation" and
\ref VISU.XYPlot "XYPlot interface reference documentation" for more details.
-*/
\ No newline at end of file
+*/
import visu_gui
-# Directory containing data table files
+# The directory containing data table files
datadir = os.getenv("DATA_DIR")
# Get VISU engine
print "\n", aTable.GetTitle()
iter.Next()
-# Update object browser
+# Update the object browser
salome.sg.updateObjBrowser(1)
\endcode
import visu_gui
-# Directory containing data table files
+# The directory containing data table files
datadir = os.getenv("DATA_DIR")
# Get VISU engine
tableFile = datadir + '/tables_test.xls'
myTablesSO = myVisu.ImportTables(tableFile, False)
-# Export first of the imported tables to the new file
+# Export the first imported table to a new file
expTableFile = datadir + '/sinus_table.txt'
sinusTableSO = salome.myStudy.FindObject("sinus")
myVisu.ExportTableToFile(sinusTableSO, expTableFile)
-# Update object browser
+# Update the object browser
salome.sg.updateObjBrowser(1)
\endcode
-*/
\ No newline at end of file
+*/
import VISU
from visu_gui import *
-# Delay
+# Set the delay
delay = 4
-# Directory containing MED files
+# Set the directory containing MED files
datadir = os.getenv("DATA_DIR")
-# Create temporary 3D view
-print "Create temporary 3D view..."
+# Create a temporary 3D view
+print "Create a temporary 3D view..."
myViewManager = myVisu.GetViewManager()
myTempView = myViewManager.Create3DView()
myTempView.SetTitle("The window will be soon destroyed!")
myViewManager.Destroy(myTempView)
sleep(delay)
-# Import MED file
+# Import a MED file
medFile = datadir + "/fra.med"
myResult = myVisu.ImportFile(medFile)
-# Create scalar map
+# Create a scalar map
meshName = 'LE VOLUME'
fieldEntity = VISU.NODE
fieldName = 'VITESSE'
timestampId = 1
myScalarMap = myVisu.ScalarMapOnField(myResult, meshName, fieldEntity, fieldName, timestampId)
-# Create new 3D view
-print "Create new 3D view..."
+# Create a new 3D view
+print "Create a new 3D view..."
myView = myViewManager.Create3DView()
-# Set background
-print "Set blue background..."
+# Set the background
+print "Set a blue background..."
bgColor = SALOMEDS.Color(0.0, 0.3, 1.0)
myView.SetBackground(bgColor)
myView.Update()
sleep(delay)
-# Display just created scalar map
-print "Display scalar map..."
+# Display the newly created scalar map
+print "Display the scalar map..."
myView.Display(myScalarMap)
sleep(delay)
myView.FitAll()
sleep(delay)
-# Change scalar map range
-print "Change scalar map range..."
+# Change the scalar map range
+print "Change the scalar map range..."
myScalarMap.SetRange(0.2, 0.9)
sleep(delay)
myView.Update()
sleep(delay)
-# Scale view
-print "Scale view..."
+# Scale the view
+print "Scale the view..."
myView.ScaleView(VISU.View3D.YAxis,10.0)
myView.ScaleView(VISU.View3D.XAxis,3.0)
myView.Update()
sleep(delay)
-# Set the position of the camera in 3D space
-print "Set the position of the camera in 3D space..."
+# Set the camera position in 3D space
+print "Set the the camera position in 3D space..."
myView.SetPointOfView([0.01, 0.05, 0.03])
myView.Update()
sleep(delay)
stateName = "State1"
myView.SaveViewParams(stateName)
-# Remove scaling
+# Remove scale
print "Remove scale..."
myView.RemoveScale()
sleep(delay)
-# Change background
-print "Set dark background..."
+# Change the background
+print "Set a dark background..."
bgColor = SALOMEDS.Color(0.0, 0.1, 0.2)
myView.SetBackground(bgColor)
sleep(delay)
-# Update view
-print "Update view..."
+# Update the view
+print "Update the view..."
myView.Update()
sleep(delay)
-# Set top view
-print "Set top view..."
+# Set the top view
+print "Set the top view..."
myView.SetView(VISU.View3D.TOP)
sleep(delay)
-# Zoomig out
-print "Zoomig out..."
+# Zooming out
+print "Zooming out..."
aScale = myView.GetParallelScale()
for i in range(0,50) :
aScale = aScale + 0.05
myView.SetShrinked(myScalarMap, True)
sleep(delay)
-# Set presentation type
-print "Set presentation type to SURFACEFRAME..."
+# Set the presentation type
+print "Set the presentation type to SURFACEFRAME..."
myView.SetPresentationType(myScalarMap, VISU.SURFACEFRAME)
sleep(delay)
-print "Set presentation type to FEATURE_EDGES..."
+print "Set the presentation type to FEATURE_EDGES..."
myView.SetPresentationType(myScalarMap, VISU.FEATURE_EDGES)
sleep(delay)
-# Update object browser
+# Update the object browser
salome.sg.updateObjBrowser(1)
\endcode
OK. Your presentation with scalar bar will be immediately displayed in
the viewer.
-<br><b>See Also</b> a sample TUI Script of a
+<br><b>See Also</b> a sample TUI Script of
\ref tui_vectors_page "Vectors creation" operation.
*/
To restore separate bars and scales for each module select <b>Use
Field Range</b> from the same menu.
-<br><b>See Also</b> a sample TUI Script of a
-\ref tui_view_3d_page "Viewing 3D presentations".
+<br><b>See Also</b> sample scripts of
+\ref tui_view_3d_page "Viewing 3D presentations" via TUI.
*/