\image html introduction.png "Example of a 3D presentation"
-\b Post Pro module provides several types of 3D presentations,
+\b Post-Pro module provides several types of 3D presentations,
visualizing the structure of MED objects. All
presentations can be seen only in Salome VTK Viewer (ALT+K).
\n All presentation types could be divided in two main groups:
</ul>
Created presentations can be edited, animaded, recorded and viewed in
-different modes. The whole range of such operations is described in \subpage 3d_management_page "Managment of presentations" section.
+different modes. The whole range of such operations is described in \subpage a3d_management_page "Managing 3D Presentations" section.
-*/
\ No newline at end of file
+*/
<b>Tip:</b> From <b>Cut Lines</b> presentation you can create a
<b>data table</b>. This table will consist of the field scalar values
located on each cut line of the constructed presentation (see also:
-\ref creating_tables_from_cut_lines_page "Creating tables from Cut
-Lines presentations"). After that your data table can be used for
+\ref creating_tables_from_cut_lines "Creating tables from CutLines presentations").
+After that your data table can be used for
construction of a 2d plot of curves based on the scalar values from
the table (see also: \ref creating_curves_page "Creating curves" and
\ref creating_plot2d_page "Creating Plot 2D presentation").
-*/
\ No newline at end of file
+*/
\page evolution_page Evolution on Point
-This feature allows to trace temporal evolution of a variable at a given point.
-It can be activated by context menu on field:
+<b>Evolution</b> on Point operation allows tracing the temporal evolution of a variable at a given point.
+It can be activated via the context menu on a field:
\image html evolution_context_menu.png
-Presence of the <b>Evolution on Point</b> action in the context menu depends on
-the following conditions:
+The availability of this operation in the context menu depends on the following conditions:
<ul>
-<li>Active view should be VTK view (to choose a point using a preview actor).</li>
<li>The selected field should be defined on the Node entity.</li>
<li>The selected field should have multiple time stamps.</li>
</ul>
-After activation of the action the following dialog is displayed together with
-preview actor in the VTK view:
+The following dialog will be displayed (if the VTK view is active, the preview actor is also displayed):
\image html evolution_dialog.png
-Three parameters are controlled by this dialog:
<ul>
-<li><b>Field</b> - name of the field. This parameter is intended for informational
-purpose only and could not be changed by the dialog.</li>
-<li><b>Point</b> - id of the point. It could be set by selection of point on the
-preview actor displayed in the VTK view (note that there is no need to switch to
-the point selection mode manually, because it is turned on automatically during
-the life time of the dialog).</li>
-<li><b>Component</b> - name of the component (scalar mode). This control is
+<li><b>Field</b> - the name of the field given for information, it cannot be changed in the dialog.</li>
+<li><b>Point</b> - the point ID. It can be input manually or by
+selection of the point in the viewer (note that the point selection
+mode is turned on automatically by the <b>Evolution on Point</b> dialog).</li>
+<li><b>Component</b> - the name of the component (scalar mode). This control is
enabled if there are multiple components in the field data.</li>
</ul>
-Clicking on <b>OK</b> button leads to creation of Plot2d view with a graph
-of the Evolution:
+Clicking <b>OK</b> button leads to the creation of Plot2d a view
+with an Evolution graph:
\image html evolution_result.png
-X axis of the graph corresponds to values of the time stamps, Y axis - to values
-of the selected component of the field at the specified point.
+The X axis of the graph corresponds to the values of the time stamps,
+the Y axis - to the value of the selected field component at the specified point.
-\note Evolution is automatically published to the study after clicking on <b>OK</b>
-button. It could be restored by clicking on the <b>Show</b> action in the context
+\note Evolution is automatically published to the study after clicking <b>OK</b>
+button. It can be restored by selecting the <b>Show</b> action in the context
menu on the published object:
\image html evolution_restore.png
+
+Our TUI Scripts provide you with \subpage tui_evolution_page script.
+
*/
\page importing_med_objects_page Import/Export MED objects
-\n There exist two sources of \ref structure_of_med_objects_page "MED objects": MED and other Salome
-components publishing them and MED files.
+There are two sources of \ref med_object_page "MED objects":
+- MED and other SALOME components publishing them MED objects
+- MED files
<em>To load MED objects from other components:</em>
\par
To complete file export click <b>Save</b>.
-*/
\ No newline at end of file
+*/
<li><b>Iso Surface</b> tab allows to set additional parameters of the
<b>Iso Surfaces</b> presentation:</li>
<ul>
-<li><b>Number of surfaces</b>, which will be generated in the framework of this presentation.</li>
<li><b>Minimum / Maximum value</b> fields allow to enter the range of
scalar or vector values applied to the cells, on the basis of which
-this presentation will be created.</li>
+this presentation will be created (note that these fields are editable
+only if <b>Use custom range</b> button is checked, otherwise range of
+the scalar bar values is used).</li>
<li><b>Update scalar bar range with these values</b> button allows you
to update the range of the values, displayed with by the scalar bar,
with the previously defined range of values.</li>
+<li><b>Number of surfaces</b>, which will be generated in the framework of this presentation.</li>
</ul>
<li><b>Scalar Bar</b> tab allows to define the parameters of the
scalar bar displayed with this presentation (\ref scalar_map_page "see also").</li>
\b MED \b Object is a specific twofold data structure
with consists of \b Mesh \b Data and \b Physical \b Data.
-\b Mesh \b Data includes geometrical information: list of nodes, edges, faces and cells
+- \b Mesh \b Data includes geometrical information: list of nodes, edges, faces and cells
of the mesh, and information on the interpolation in accordance with resulting
-elements, i.e. the mesh should be compatible with the chosen interpolation;</em></li>
-\b Physical \b Data contains initial and boundary conditions: scalar
+elements, i.e. the mesh should be compatible with the chosen interpolation.
+- \b Physical \b Data contains initial and boundary conditions: scalar
or vector values applied to the mesh cells.
-\n It is not possible to create and edit \b MED \b Objects in the \b
+It is not possible to create and edit \b MED \b Objects in the \b
Post-Pro module. You can only \subpage importing_med_objects_page
"import a MED object" from Salome MED module or from a MED file.
-\n \b MED Objects can be visualized and explored with various types of
+\b MED Objects can be visualized and explored with various types of
\subpage a3d_presentations_page "3D presentations".
-\n \b Post-Pro visualization engine bases on VTK and OpenGL
+\b Post-Pro visualization engine bases on VTK and OpenGL
technologies, which provide useful tools for
\subpage a3d_management_page "Management of presentations".
<h2>Families</h2>
A \b Family is a user-defined submesh composed of cells of a
-definite type - Nodes, Edges, Faces or Cells</em>. The
+definite type - Nodes, Edges, Faces or Cells. The
presentation created on the basis of a particular \b family will be
composed of geometrical elements, corresponding to the type of cells
of this \b family.
\image html slider2.png
\b Properties tab allows setting memory management properties.
-<ul>
-<li> \b Minimal radio button commands the application to use a minimum
-amount of memory</li>
-<li> \b Limited radio button allows to set the upper limit for the
-amount of used memory.</li>
-<li> \b Used and \b Free fields allow to set target values for used
-and free memory.</li>
-<li> \b Speed scroll allows to set the speed of the presentation.</li>
-<ul>
+- \b Minimal radio button commands the application to use a minimum
+ amount of memory
+- \b Limited radio button allows to set the upper limit for the amount
+ of used memory
+- \b Used and \b Free fields allow to set target values for used and
+ free memory.
+- \b Speed scroll allows to set the speed of the presentation.
-*/
\ No newline at end of file
+*/
<em>To sweep a field presentation:</em>
-\ref creating_field_presentations_page "Create a field presentation".
+\ref field_presentations_page "Create a field presentation".
In the Main menu select <b>View -> Windows -> Sweep</b>. The following
dialog will appear.
Default parameters for \b Sweep can be set in the Main menu in <b>File
-> Preferences -> Post-Pro -> Sweep, Animation</b> tab
-*/
\ No newline at end of file
+*/
<b>DataTable object</b> is a way to represent a two-dimensional data array
(data arranged in rows and columns) in Salome. Each column groups values expressed in certain measurement \b units.
-All \b columns and <b>rows</b> have </b>titles</b>. Tables can be \b
+All \b columns and <b>rows</b> have <b>titles</b>. Tables can be \b
rarefied, which means that some cells may be empty, without any
values.
GUI Help), or \subpage importing_exporting_tables_page "imported"
from properly defined ACSII files.
+\anchor creating_tables_from_cut_lines
+
\note Alternatively, it is possible to create a table from
the scalar values applied to the cells forming a \ref cut_lines_page "Cut Lines"
or a \ref cut_segment_page "Cut Segment" presentation. Simply right-click on the
-*/
\ No newline at end of file
+*/
--- /dev/null
+/*!
+
+\page tui_evolution_page Example of Evolution on Point
+
+\code
+import os
+import VISU
+from visu_gui import *
+
+myViewManager = myVisu.GetViewManager();
+
+myView = myViewManager.CreateXYPlot();
+myView.SetTitle("The viewer for Evolution")
+print "myViewManager.CreateXYPlot()"
+
+medFile = "TimeStamps.med"
+medFile = os.getenv('DATA_DIR') + '/MedFiles/' + medFile
+myResult = myVisu.ImportFile(medFile)
+
+anEvolution = myVisu.CreateEvolution(myView);
+
+aSObj = myStudy.FindObjectIOR(myResult.GetID())
+aSObj = aSObj.FindSubObject(1)[1] # dom
+aSObj = aSObj.FindSubObject(3)[1] # Fields
+aSObj = aSObj.FindSubObject(2)[1] # vitesse
+print "setField : ", anEvolution.setField(aSObj)
+
+anEvolution.setComponentId(1) # x component
+
+anEvolution.setPointId(500)
+
+print "Show Evolution"
+anEvolution.showEvolution()
+
+myView.FitAll()
+\endcode
+
+*/
\page viewing_3d_presentations_page Viewing 3D presentations
-\n Each newly created presentation is displayed in the <b>VTK 3D
+Each newly created presentation is displayed in the <b>VTK 3D
Viewer</b>. <b>VTK 3D Viewer</b> is described in details in the
documentation on GUI module.
-\n To display an existing presentation, right-click on it in the
+
+To display an existing presentation, right-click on it in the
Object Browser and select \b Show.
\image html viewing3.png
visualization and NOT all properties can be set for a certain 3D
presentation.
-\anchor filter_by_scalars_anchor
+- <b>Hide all</b> - allows to hide all objects from the
+viewer.
+
+- <b>Edit</b> - allows to return to the menu, where the presentation
+has been created and change its parameters.
+
+- \anchor filter_by_scalars_anchor <b>Filter by Scalars</b> - allows
+showing only the cells with values that fit into the defined
+<b>Scalar Range</b>.
-<ul>
-<li><b>Hide all</b> - allows to hide all objects from the
-viewer.</li>
-<li><b>Edit</b> - allows to return to the menu, where the presentation
-has been created and change its parameters.</li>
-<li><b>Filter by Scalars</b> - allows showing only the cells with
-values that fit into the defined <b>Scalar Range</b>.
-<br>If the presentation is created on nodes, only the cells with all
+If the presentation is created on nodes, only the cells with all
nodes lying in the range defined by the scalar filter will be visible.
\image html viewing2.png
-In this menu, check in <b>Filter by scalar range</b> box and input
-the minimum and the maximum values for the <b>Scalar Range</b></li>
+In the dialog box, check in <b>Filter by scalar range</b> box and input
+the minimum and the maximum values for the <b>Scalar Range</b>.
\image html viewing4.png
-\anchor rename_anchor
-
-<li><b>Rename</b> - allows to rename the presentation.</li>
-<li><b>Copy</b> - allows to create a copy of the presentation in the
-same subfolder (time stamp) in the Object Browser.</li>
-
-<li><b>Hide</b> - allows to hide the selected presentation from the
-viewer.</li>
-<li>If selected in the Object Browser, <b>Hide</b> is replaced by
-<b>Show</b>, which allows to display the selected presentation in the
-viewer.</li>
+- \anchor rename_anchor <b>Rename</b> - allows to rename the presentation.
+- <b>Copy</b> - allows to create a copy of the presentation in the
+same subfolder (time stamp) in the Object Browser.
-<li><b>Values Labeling</b> allows to display values applied to the
+- <b>Values Labeling</b> allows to display values applied to the
cells or nodes of a 3D presentation.
\image html values_labeling.png
-</li>
\anchor labeling_parameters_anchor
-<li><b>Labeling Parameters</b> allows to change such labeling parameters as font and color.
+- <b>Labeling Parameters</b> allows to change such labeling parameters as font and color.
\image html labeling_parameters.png
-</li>
-
-<li><b>Show Only</b> - allows to display only the selected
-presentation, hiding all other from the viewer.</li>
-<li><b>Hide Scalar Bar</b>/<b>Show Scalar Bar</b> - allows to show/hide the scalar bar
-attached to the 3d presentation.</li>
-<li><b>Representation</b> - allows to switch among the available
-representation types.
-
-\image html viewing10.png
-
-</ul>
-
-\image html viewing5.png "Points"
-
-\image html viewing6.png "Surface"
-
-\image html viewing7.png "Wireframe"
-
-\image html viewing8.png "Insideframe - displays the wires lying within the object"
-
-\image html viewing9.png "Surfaceframe - displays wires and cells lying on the object surface"
-
-\image html viewing11.png "Feature edges - shows the contour of the object"
-
-\image html viewing12.png "Shrink"
-
-<b>Shading on</b> - colors the object in a realistic
-way, revealing its geometry, for example, by applying shadows to the inside regions; used together with \b Surface.
-
-<b>Shading off</b> - colors the object basing only on scalar values. </li>
-
-\anchor width_opacity_anchor
-<ul>
-<li><b>2D Quadratic</b> - allows to choose how the quadratic elements
-are visualized: as straight lines or as arcs of circle.</li>
+- <b>Hide</b> - allows to hide the selected presentation from the
+viewer.
+- If selected in the Object Browser, <b>Hide</b> is replaced by
+<b>Show</b>, which allows to display the selected presentation in the
+viewer.
+- <b>Show Only</b> - allows to display only the selected
+presentation, hiding all other from the viewer.
+
+- <b>Hide Scalar Bar</b>/<b>Show Scalar Bar</b> - allows to show/hide the scalar bar
+attached to the 3d presentation.
+
+- <b>Representation</b> - allows to switch among the available
+representation types.\n\n\image html viewing10.png
+ - <b>Points</b> \image html viewing5.png
+ - <b>Surface</b> \image html viewing6.png
+ - <b>Wireframe</b> \image html viewing7.png
+ - <b>Insideframe</b> - displays the wires lying within the object \image html viewing8.png
+ - <b>Surfaceframe</b> - displays wires and cells lying on the object surface \image html viewing9.png
+ - <b>Feature edges</b> - shows the contour of the object \image html viewing11.png
+ - <b>Shrink</b> \image html viewing12.png
+ - <b>Shading on</b> - colors the object in a realistic way,
+ revealing its geometry, for example, by applying shadows to the
+ inside regions; used together with \b Surface.
+ - <b>Shading off</b> - colors the object basing only on scalar values.
+
+- <b>2D Quadratic</b> - allows to choose how the quadratic elements
+are visualized: as straight lines or as arcs of circle.
\image html quadratic.png
-<li>\b Properties</li>
-
-<ul>
-<li>\b Opacity - allows to set the value of opacity of the
-presentation between 0 (transparent) and 100 (opaque).
-\note For a \ref gauss_points_presentations_page "Gauss Points"
-presentation, displayed using <b>Point Sprites</b> or <b>OpenGL Points</b>
-\ref primitive_types_page "primitives", this property only allows
-switching between transparent and opaque modes. The textures are drawn
-in the opaque mode if the opacity is equal to 100% and in
-the transparent mode if the opacity is lower that 100% (note that
-they become invisible when the opacity is equal to 0%).
-</li>
-
-\image html viewing13.png
-
-<li><b>Line Width</b> - allows to set the width of lines representing
-edges of the presentation between 1 (thin) and 100 (thick).</li>
-
-\image html line_width.png
-
-<li><b>Shrink Factor</b> - allows to set the shrink factor of the
-presentation to be used in \b Shrink mode. Possible values range
-between 20 and 100, the default value is 80.</li>
-
-\image html shrink_factor.png
-
-<li><b>Edge Color</b> - allows to set the color of lines representing
-the edges of the presentation displayed in SurfaceFrame mode</li>
-
-</ul>
-<li>\ref translate_presentation_page "Translate Presentation" - allows
-to translate the presentation along coordinate axes.</li>
-<li>\ref clipping_page "Clipping Planes" - allows to create
-cross-section views of presentations.</li>
-<li>\ref sweeping_page "Sweep" - allows to display pseudo-animation of
-the presentation.</li>
-
-<li><b>Dump view</b> - exports an object from the viewer in bmp, png,
-jpg or jpeg image format.</li>
-<li><b>Change Background</b> - allows to change the properties of the
-background.</li>
-<li><b>View Operations</b> checkbox - shows or hides the VTK viewer
+- \b Properties
+ - \b Opacity - allows to set the value of opacity of the
+ presentation between 0 (transparent) and 100 (opaque).
+ \note For a \ref gauss_points_presentations_page "Gauss Points"
+ presentation, displayed using <b>Point Sprites</b> or <b>OpenGL
+ Points</b> \ref primitive_types_page "primitives", this property
+ only allows switching between transparent and opaque modes. The
+ textures are drawn in the opaque mode if the opacity is equal to
+ 100% and in the transparent mode if the opacity is lower that 100%
+ (note that they become invisible when the opacity is equal to
+ 0%).\n\n \image html viewing13.png
+ - <b>Line Width</b> - allows to set the width of lines representing
+ edges of the presentation between 1 (thin) and 100 (thick).\n\n
+ \image html line_width.png
+ - <b>Shrink Factor</b> - allows to set the shrink factor of the
+ presentation to be used in \b Shrink mode. Possible values range
+ between 20 and 100, the default value is 80.\n\n \image html
+ shrink_factor.png
+ - <b>Edge Color</b> - allows to set the color of lines representing
+ the edges of the presentation displayed in SurfaceFrame mode.
+
+- \ref translate_presentation_page "Translate Presentation" - allows
+to translate the presentation along coordinate axes.
+- \ref clipping_page "Clipping Planes" - allows to create
+cross-section views of presentations.
+- \ref sweeping_page "Sweep" - allows to display pseudo-animation of
+the presentation.
+
+- <b>Dump view</b> - exports an object from the viewer in bmp, png,
+jpg or jpeg image format.
+- <b>Change Background</b> - allows to change the properties of the
+background.
+
+- <b>View Operations</b> checkbox - shows or hides the VTK viewer
toolbar. The information about the VTK viewer functionalities is
-available in the documentation on the GUI module.</li>
-<li><b>Recording operations</b> checkbox - shows or hides buttons used
-for \ref recording_page "Recording" </li>
+available in the documentation on the GUI module.
+- <b>Recording operations</b> checkbox - shows or hides buttons used
+for \ref recording_page "Recording".
-<li>The following menu items are added when the presentation is
-selected in the Object Browser</li>.
-<ul>
-<li> \b Delete - removes the presentation from the study.</li>
-<li> \b Refresh - updates the presentation in the VTK viewer </li>
-<li> \b Find - activates <b> Find Tool</b> described in the documentation
-on GUI module. </li>
+The following menu items are added when the presentation is
+selected in the Object Browser.
-</ul>
-</ul>
+- \b Delete - removes the presentation from the study.
+- \b Refresh - updates the presentation in the VTK viewer.
+- \b Find - activates <b> Find Tool</b> described in the documentation
+ on GUI module.
When you create several presentations of the same object, you may wish
to see them simultaneously, which might be impossible, because they
In \b Manual mode you set the coordinates for each presentation
separately.
-<br>
Displaying several presentations at the same time may cause
superposition of their scalar bars. To avoid this, check <b>Arrange
Scalar Bars</b> radio button in the <b>Preferences -> Post-Pro ->
Scalar Bar</b>. A separate scalar bar will be displayed for each
presentation.
-\n Alternatively you may wish to merge the scalar bars to have a
+
+Alternatively you may wish to merge the scalar bars to have a
common scalar bar for all presentations. To do this, select several
presentations or fields in the object browser, right-click and from
the pop-up menu select <b>Merge Scalar Range</b>.
-\n To restore separate bars and scales for each module select <b>Use
+
+To restore separate bars and scales for each module select <b>Use
Field Range</b> from the same menu.
*/
}
}
- TVTKBasicType aModule = (TVTKBasicType)sqrt(aModules[0]);
+ TVTKBasicType aModule = (TVTKBasicType)sqrt((double)aModules[0]);
aDataValues[0] = aModule; // init Min
aDataValues[1] = aModule; // init Max
aDataValues[2] = aModule; // init Average
for (vtkIdType ig = 0; ig < aNbGauss; ig++) {
- aModule = (TVTKBasicType)sqrt(aModules[ig]);
+ aModule = (TVTKBasicType)sqrt((double)aModules[ig]);
aDataValues[0] = std::min(TVTKBasicType(aModule), aDataValues[0]); // Min
aDataValues[1] = std::max(TVTKBasicType(aModule), aDataValues[1]); // Max
libVISUEngine_la_CPPFLAGS= $(KERNEL_CXXFLAGS) $(MED_CXXFLAGS) $(CORBA_CXXFLAGS) $(CORBA_INCLUDES) \
-I$(top_builddir)/idl
-libVISUEngine_la_LDFLAGS= $(KERNEL_LDFLAGS) -lSalomeIDLKernel -lSalomeNS -lSalomeContainer $(CORBA_LIBS) \
+libVISUEngine_la_LDFLAGS= $(KERNEL_LDFLAGS) -lSalomeIDLKernel -lSALOMELocalTrace -lSalomeNS -lSalomeContainer $(CORBA_LIBS) \
$(top_builddir)/idl/libSalomeIDLVISU.la
libVISUGUITOOLS_la_LDFLAGS= \
$(KERNEL_LDFLAGS) -lSALOMELocalTrace \
- $(GUI_LDFLAGS) -lCAM -lsuit -lqtx \
- $(QT_LIBS) $(QWT_LIBS)
+ $(GUI_LDFLAGS) -lCAM -lsuit -lqtx
{
if( mySelectionMode == ActorSelection )
ResetTextActor();
- else
- aShowTextActor = false;
myLastSelectionMode = mySelectionMode;
}
- myTextActor->SetVisibility( GetVisibility() && theIsHighlight && aShowTextActor );
+ myTextActor->SetVisibility( GetVisibility() && theIsHighlight && aShowTextActor &&
+ ( mySelectionMode == ActorSelection || isSubElementsHighlighted() ) );
bool anInitialHasIndex = isHighlighted();
bool aCurrentHasIndex = theIsHighlight;
return myFunction->GetFunction();
}
+//----------------------------------------------------------------------------
+vtkDataSet* VISU_GaussPtsAct::GetValLabelsInput()
+{
+ return GetInput();
+}
+
//==============================================================================
virtual vtkImplicitFunctionCollection* GetClippingPlanes();
+ //----------------------------------------------------------------------------
+ virtual
+ vtkDataSet*
+ GetValLabelsInput();
+
protected:
//----------------------------------------------------------------------------
VISU_GaussPtsAct();
int anElem0DSize = aResourceMgr->integerValue( "VISU", "elem0d_size", 5);
GetSurfaceProperty()->SetPointSize(anElem0DSize);
- GetEdgeProperty()->SetPointSize(anElem0DSize);
}
}
int anElem0DSize = aResourceMgr->integerValue( "VISU", "elem0d_size", 5);
mySurfaceActor->GetProperty()->SetPointSize(anElem0DSize);
- myEdgeActor->GetProperty()->SetPointSize(anElem0DSize);
}
}
#include <vtkInformation.h>
#include <vtkInformationVector.h>
+#define USE_SPRINTF 1
//----------------------------------------------------------------------------
vtkStandardNewMacro(VISU_Extractor);
vtkFloatingPointType CutValue (vtkFloatingPointType theValue, int theDecimals)
{
vtkFloatingPointType v = theValue;
+
+#ifdef USE_SPRINTF
+ char aFormat[16];
+ sprintf(aFormat, "%%.%dg", theDecimals);
+ char aStr [256];
+ sprintf(aStr, aFormat, theValue);
+ v = atof(aStr);
+#else
+
+#ifndef USE_OLD_ALGORITHM
+ //
+ // VSR 19/10/2009: new algorithm does not use long long type
+ //
+ long n1 = 0;
+ // calculate order of the integral part
+ while ( v > 1. ) {
+ v = v / 10.;
+ n1++;
+ }
+ // calculate length of the fractional part
+ long n2 = theDecimals - n1;
+ v = theValue;
+ if ( n2 > 0 )
+ while ( n2-- > 0 ) v = v * 10.;
+ else
+ while ( n2++ < 0 ) v = v / 10.;
+ v = floor( (double) v );
+ n2 = theDecimals - n1;
+ if ( n2 > 0 )
+ while ( n2-- > 0 ) v = v / 10.;
+ else
+ while ( n2++ < 0 ) v = v * 10.;
+#else
+ //
+ // VSR 19/10/2009: old algorithm uses long long type -
+ // causes incompatibility with some platforms (Windows?)
+ //
vtkFloatingPointType aDegree = 0.0;
if (abs((long long)v) > 1)
- aDegree = (long long)log10(abs((long long)v)) + 1;
+ aDegree = (long long)log10((double)abs((long long)v)) + 1;
aDegree = theDecimals - aDegree;
//printf("$$$ 1 v = %.20g , aDegree = %lld \n", v, (long long)aDegree);
aDegree = pow(10, aDegree);
v = ((vtkFloatingPointType)((long long)(v * aDegree))) / aDegree;
//printf("$$$ 2 v = %.20g , aDegree = %lld \n", v, (long long)aDegree);
+#endif
+
+#endif
return v;
}
//----------------------------------------------------------------------------
-template<typename TValueType>
+template<typename TValueType>
void
Module2Scalars(vtkDataArray *theInputDataArray,
TValueType* theOutputPtr,
for(vtkIdType aTupleId = 0; aTupleId < theNbOfTuples; aTupleId++){
theInputDataArray->GetTuple(aTupleId, &anArray[0]);
vtkFloatingPointType aVector[3] = {anArray[0], anArray[1], anArray[2]};
- vtkFloatingPointType aScalar = sqrt(aVector[0]*aVector[0] +
- aVector[1]*aVector[1] +
+ vtkFloatingPointType aScalar = sqrt(aVector[0]*aVector[0] +
+ aVector[1]*aVector[1] +
aVector[2]*aVector[2]);
*theOutputPtr = TValueType(aScalar);
theOutputPtr++;
#include <vtkContourFilter.h>
+#define GAP_COEFFICIENT 0.0001
//----------------------------------------------------------------------------
SetNbParts(aPipeLine->GetNbParts());
vtkFloatingPointType aRange[2] = {aPipeLine->GetMin(), aPipeLine->GetMax()};
SetRange(aRange);
+ SetRangeFixed(aPipeLine->IsRangeFixed());
}
}
//----------------------------------------------------------------------------
void
VISU_IsoSurfacesPL
-::SetRange(vtkFloatingPointType theRange[2])
+::SetRange(vtkFloatingPointType theRange[2], bool theIsForced)
{
- if(VISU::CheckIsSameRange(myRange, theRange))
+ if(VISU::CheckIsSameRange(myRange, theRange) && !theIsForced)
return;
if(theRange[0] <= theRange[1]){
myRange[0] = theRange[0];
myRange[1] = theRange[1];
vtkFloatingPointType aRange[2] = {theRange[0], theRange[1]};
+ if( IsRangeFixed() ) {
+ double aDelta = fabs( aRange[1] - aRange[0] ) * GAP_COEFFICIENT;
+ aRange[0] += aDelta;
+ aRange[1] -= aDelta;
+ }
if(GetScaling() == VTK_SCALE_LOG10)
VISU_LookupTable::ComputeLogRange(theRange, aRange);
myContourFilter->GenerateValues(GetNbParts(), aRange);
}
+//----------------------------------------------------------------------------
+void
+VISU_IsoSurfacesPL
+::SetRangeFixed(bool theIsFixed)
+{
+ myIsRangeFixed = theIsFixed;
+ SetRange( myRange, true );
+}
+
+
+//----------------------------------------------------------------------------
+bool
+VISU_IsoSurfacesPL
+::IsRangeFixed()
+{
+ return myIsRangeFixed;
+}
+
+
void
//----------------------------------------------------------------------------
VISU_IsoSurfacesPL
vtkFloatingPointType aScalarRange[2];
GetSourceRange(aScalarRange);
SetRange(aScalarRange);
+
+ SetRangeFixed(true);
}
//----------------------------------------------------------------------------
vtkFloatingPointType aRange[2] = {GetMax() - theMapScale*(GetMax()-GetMin()), GetMax()};
vtkFloatingPointType aNewRange[2] = {aRange[0], aRange[1]};
+ if( IsRangeFixed() ) {
+ double aDelta = fabs( aNewRange[1] - aNewRange[0] ) * GAP_COEFFICIENT;
+ aNewRange[0] += aDelta;
+ aNewRange[1] -= aDelta;
+ }
if(GetScaling() == VTK_SCALE_LOG10)
VISU_LookupTable::ComputeLogRange(aRange,aNewRange);
myContourFilter->GenerateValues(GetNbParts(), aNewRange);
virtual
void
- SetRange(vtkFloatingPointType theRange[2]);
+ SetRange(vtkFloatingPointType theRange[2], bool theIsForced = false);
virtual
vtkFloatingPointType
virtual
vtkFloatingPointType
GetMax();
+
+ virtual
+ void
+ SetRangeFixed(bool theIsFixed);
+
+ virtual
+ bool
+ IsRangeFixed();
public:
virtual
int myNbParts;
vtkFloatingPointType myRange[2];
+ bool myIsRangeFixed;
vtkCellDataToPointData* myCellDataToPointData;
vtkContourFilter *myContourFilter;
::VISU_LookupTable(int sze, int ext):
vtkLookupTable(sze, ext),
myScale(1.0),
- myBicolor(false)
+ myBicolor(false),
+ myHasMarkedValues(false)
{}
//----------------------------------------------------------------------------
vtkIdType anIndex = this->GetIndex( theValue );
unsigned char *aTablePtr = this->GetPointer( anIndex );
CopyColor( aTablePtr, theColor );
+ myHasMarkedValues = true;
}
}
}
+void
+VISU_LookupTable
+::ForceBuild()
+{
+ Superclass::ForceBuild();
+ myHasMarkedValues = false;
+}
+
// Apply log to value, with appropriate constraints.
inline
vtkFloatingPointType
vtkTypeMacro(VISU_LookupTable,vtkLookupTable);
static VISU_LookupTable *New();
+ virtual void ForceBuild();
+
virtual void MapScalarsThroughTable2(void *input, unsigned char *output,
int inputDataType, int numberOfValues,
int inputIncrement, int outputIncrement);
void MarkValueByColor( vtkFloatingPointType theValue,
unsigned char* theColor );
+ bool HasMarkedValues() const { return myHasMarkedValues; }
+
void FillByColor( unsigned char* theColor );
void MakeBiColor();
vtkFloatingPointType myScale;
bool myBicolor;
+ bool myHasMarkedValues;
};
#endif // VISU_LookupTable_H
//
#include "VISU_OpenGLPointSpriteMapper.hxx"
-#include "SVTK_Extension.h"
+//#include "SVTK_Extension.h"
#include <vtkCamera.h>
#include <vtkCellArray.h>
VisuGUI.h \
VisuGUI_Module.h \
VisuGUI_Selection.h \
- VisuGUI_Tools.h \
VisuGUI_ViewTools.h \
VisuGUI_NameDlg.h \
VisuGUI_FileDlg.h \
VisuGUI_Timer.h \
VisuGUI_Slider.h \
VisuGUI_InputPane.h \
- VisuGUI_CacheDlg.h \
VisuGUI_FieldFilter.h \
VisuGUI_ValuesLabelingDlg.h
VisuGUI_Slider.cxx \
VisuGUI_Sweep.cxx \
VisuGUI_InputPane.cxx \
- VisuGUI_CacheDlg.cxx \
VisuGUI_FileInfoDlg.cxx \
VisuGUI_FieldFilter.cxx \
VisuGUI_ClippingPanel.cxx \
VisuGUI_Slider_moc.cxx \
VisuGUI_Sweep_moc.cxx \
VisuGUI_InputPane_moc.cxx \
- VisuGUI_CacheDlg_moc.cxx \
VisuGUI_FileInfoDlg_moc.cxx \
VisuGUI_ClippingPanel_moc.cxx \
VisuGUI_ClippingPlaneDlg_moc.cxx \
VisuGUI_FilterScalarsDlg_moc.cxx \
VisuGUI_ValuesLabelingDlg_moc.cxx
-
nodist_libVISU_la_SOURCES=$(MOC_FILES)
# additionnal information to compil and link file
<source>SHOW_VALUES_CHK</source>
<translation>Show values (nb per surface)</translation>
</message>
+ <message>
+ <source>RANGE</source>
+ <translation>Range</translation>
+ </message>
+ <message>
+ <source>USE_SCALAR_BAR_RANGE</source>
+ <translation>Use scalar bar range</translation>
+ </message>
+ <message>
+ <source>USE_CUSTOM_RANGE</source>
+ <translation>Use custom range</translation>
+ </message>
</context>
<context>
<name>VisuGUI_IsoSurfacesDlg</name>
#include "VisuGUI_BuildProgressDlg.h"
#include "VisuGUI_TransparencyDlg.h"
#include "VisuGUI_ShrinkFactorDlg.h"
-#include "VisuGUI_CacheDlg.h"
+//#include "VisuGUI_CacheDlg.h"
#include "VisuGUI_Table3dDlg.h"
#include "VisuGUI_ClippingPanel.h"
#include "VisuGUI_FilterScalarsDlg.h"
VisuGUI
::~VisuGUI()
{
+ if( myDisplayer ) {
+ delete myDisplayer;
+ myDisplayer = 0;
+ }
+
+ if( mySlider ) {
+ delete mySlider;
+ mySlider = 0;
+ }
+
+ if( mySweep ) {
+ delete mySweep;
+ mySweep = 0;
+ }
}
void
VisuGUI
::OnPointEvolution()
{
- SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>( this );
- if( !aViewWindow )
- return;
-
_PTR(Study) aCStudy = GetCStudy( GetAppStudy( this ) );
- VisuGUI_EvolutionDlg* aDlg = new VisuGUI_EvolutionDlg( this, aViewWindow, aCStudy );
+ VisuGUI_EvolutionDlg* aDlg = new VisuGUI_EvolutionDlg( this, aCStudy );
LightApp_SelectionMgr* aSelectionMgr = GetSelectionMgr( this );
SALOME_ListIO aListIO;
VisuGUI
::OnShowEvolution()
{
- SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>( this );
- if( !aViewWindow )
- return;
-
LightApp_SelectionMgr* aSelectionMgr = GetSelectionMgr( this );
SALOME_ListIO aListIO;
aSelectionMgr->selectedObjects( aListIO );
if( aType != VISU::TEVOLUTION )
return;
- VisuGUI_EvolutionDlg* aDlg = new VisuGUI_EvolutionDlg( this, aViewWindow, aCStudy );
+ VisuGUI_EvolutionDlg* aDlg = new VisuGUI_EvolutionDlg( this, aCStudy );
aDlg->restoreFromStudy( aSObj );
aDlg->show();
}
aRule += " and $type in {'VISU::TFIELD'}";
aRule += " and medEntity='NODE_ENTITY'";
aRule += " and nbTimeStamps>1";
- aRule += " and activeView in {'VTKViewer' 'SVTK'}";
mgr->setRule( action( VISU_POINT_EVOLUTION ), aRule );
aRule = "client='ObjectBrowser' and $type in {'VISU::TENTITY' 'VISU::TFAMILY' 'VISU::TGROUP'}";
VISU::VISUType aType = VISU::Storable::RestoringMap2Type( aMap );
if (aType == VISU::TANIMATION) {
theMenu->addAction( action( VISU_SHOW_ANIMATION ) );
- } else if (aType == VISU::TEVOLUTION && GetActiveViewWindow<SVTK_ViewWindow>(this)) {
+ } else if (aType == VISU::TEVOLUTION) {
theMenu->addAction( action( VISU_SHOW_EVOLUTION ) );
} else if (isOBClient) {
if (IsSObjectTable(aSObject)) {
aPoints->InsertNextPoint( aPoint2 );
vtkCellArray* aVerts = vtkCellArray::New();
- for( int i = 0, n = aPoints->GetNumberOfPoints(); i < n; i++ )
+ for( vtkIdType i = 0, n = aPoints->GetNumberOfPoints(); i < n; i++ )
aVerts->InsertNextCell( 1, &i );
vtkPolyData* aProfile = vtkPolyData::New();
#include <QComboBox>
#include <QGroupBox>
+#include <QIntValidator>
#include <QKeyEvent>
#include <QLabel>
#include <QLayout>
#include <vtkDataSetMapper.h>
-VisuGUI_EvolutionDlg::VisuGUI_EvolutionDlg( VisuGUI* theModule,
- SVTK_ViewWindow* theViewWindow,
- _PTR(Study) theStudy ) :
+VisuGUI_EvolutionDlg::VisuGUI_EvolutionDlg( VisuGUI* theModule, _PTR(Study) theStudy ) :
QtxDialog( VISU::GetDesktop( theModule ), false, false, QtxDialog::Standard, Qt::Dialog ),
myModule( theModule ),
- myViewWindow( theViewWindow ),
+ myViewWindow( NULL ),
myPreviewActor( NULL )
{
setWindowTitle( tr( "TITLE" ) );
QLabel* aPointLabel = new QLabel( tr( "POINT" ) );
myPointLE = new QLineEdit( aParamGrp );
- myPointLE->setReadOnly( true );
+
+ myPointValidator = new QIntValidator( this );
+ myPointLE->setValidator( myPointValidator );
QLabel* aComponentLabel = new QLabel( tr( "COMPONENT" ) );
myComponentCB = new QComboBox( aParamGrp );
aMainLayout->setSpacing( 0 );
aMainLayout->addWidget( aParamGrp );
- connect( this, SIGNAL( dlgHelp() ), this, SLOT( onHelp() ) );
+ connect( myPointLE, SIGNAL( textEdited( const QString& ) ),
+ this, SLOT( onPointEdited( const QString& ) ) );
connect( myModule->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( onSelectionEvent() ) );
+ connect( this, SIGNAL( dlgHelp() ), this, SLOT( onHelp() ) );
+
myStoredSelectionMode = ActorSelection;
+
+ myViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>( myModule );
+ if( myViewWindow )
+ {
+ connect( myViewWindow, SIGNAL( destroyed() ), this, SLOT( onViewWindowClosed() ) );
+ connect( myViewWindow, SIGNAL( closing( SUIT_ViewWindow* ) ), this, SLOT( onViewWindowClosed() ) );
+ }
}
//------------------------------------------------------------------------
std::string aFieldName = myEngine->getFieldName();
myFieldLE->setText( QString( aFieldName.c_str() ) );
+ int aNbPoints = myEngine->getNbPoints();
+ myPointValidator->setRange( 0, aNbPoints-1 );
+
QStringList aComponentList;
VISU::ComponentDataList aComponentDataList = myEngine->getComponentDataList();
int aNbComp = aComponentDataList.size();
myComponentCB->setCurrentIndex( myEngine->getComponentId() );
}
+//------------------------------------------------------------------------
+void VisuGUI_EvolutionDlg::onPointEdited( const QString& theText )
+{
+ if( !myViewWindow )
+ return;
+
+ if( !myPreviewActor || !myPreviewActor->hasIO() )
+ return;
+
+ bool ok = false;
+ int aPointId = theText.toInt( &ok );
+ if( !ok )
+ return;
+
+ Handle(SALOME_InteractiveObject) anIO = myPreviewActor->getIO();
+
+ SVTK_Selector* aSelector = myViewWindow->GetSelector();
+ aSelector->ClearIObjects();
+ aSelector->AddOrRemoveIndex( anIO, aPointId, false );
+ aSelector->AddIObject( anIO );
+
+ myPreviewActor->Highlight( true );
+
+ myViewWindow->Repaint();
+}
+
//------------------------------------------------------------------------
void VisuGUI_EvolutionDlg::onSelectionEvent()
{
}
}
+//------------------------------------------------------------------------
+void VisuGUI_EvolutionDlg::onViewWindowClosed()
+{
+ if( myViewWindow )
+ {
+ if( myPreviewActor )
+ {
+ myPreviewActor->Delete();
+ myPreviewActor = 0;
+ }
+ myViewWindow = 0;
+ }
+}
+
//------------------------------------------------------------------------
void VisuGUI_EvolutionDlg::onHelp()
{
#include <SVTK_Selection.h>
class QComboBox;
+class QIntValidator;
class QKeyEvent;
class QLineEdit;
Q_OBJECT
public:
- VisuGUI_EvolutionDlg( VisuGUI* theModule,
- SVTK_ViewWindow* theViewWindow,
- _PTR(Study) theStudy );
+ VisuGUI_EvolutionDlg( VisuGUI* theModule, _PTR(Study) theStudy );
~VisuGUI_EvolutionDlg();
public:
void updateFromEngine();
private slots:
+ void onPointEdited( const QString& );
void onSelectionEvent();
+ void onViewWindowClosed();
void onHelp();
private:
QLineEdit* myPointLE;
QComboBox* myComponentCB;
+ QIntValidator* myPointValidator;
+
SVTK_ViewWindow* myViewWindow;
SALOME_Actor* myPreviewActor;
Selection_Mode myStoredSelectionMode;
#include <QTabWidget>
#include <QKeyEvent>
#include <QColorDialog>
+#include <QButtonGroup>
+#include <QRadioButton>
using namespace std;
TopGroupLayout->setSpacing( 6 );
TopGroupLayout->setMargin( 11 );
+ QGroupBox* aRangeBox = new QGroupBox( tr( "RANGE" ), this );
+ QRadioButton* aUseScalarBarRange = new QRadioButton( tr( "USE_SCALAR_BAR_RANGE" ), aRangeBox );
+ QRadioButton* aUseCustomRange = new QRadioButton( tr( "USE_CUSTOM_RANGE" ), aRangeBox );
+
+ myRangeGrp = new QButtonGroup( aRangeBox );
+ myRangeGrp->addButton( aUseScalarBarRange, ScalarBarRange );
+ myRangeGrp->addButton( aUseCustomRange, CustomRange );
+ aUseScalarBarRange->setChecked( true );
+
+ connect( myRangeGrp, SIGNAL( buttonClicked( int ) ), this, SLOT( onRangeButtonClicked( int ) ) );
+
+ QLabel* LabelMin = new QLabel( tr( "MIN_VALUE" ), aRangeBox );
+ MinIso = new QLineEdit( aRangeBox );
+ MinIso->setValidator( new QDoubleValidator( aRangeBox ) );
+ MinIso->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+ MinIso->setMinimumSize( 70, 0 );
+ LabelMin->setBuddy( MinIso );
+
+ QLabel* LabelMax = new QLabel( tr( "MAX_VALUE" ), aRangeBox );
+ MaxIso = new QLineEdit( aRangeBox );
+ MaxIso->setValidator( new QDoubleValidator( aRangeBox ) );
+ MaxIso->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+ MaxIso->setMinimumSize( 70, 0 );
+ LabelMax->setBuddy( MaxIso );
+
+ QPushButton* aUpdateBtn = new QPushButton( "Update scalar bar range with these values", aRangeBox );
+ aUpdateBtn->setEnabled( false );
+ connect( aUpdateBtn, SIGNAL( clicked() ), this, SLOT(onCBUpdate() ) );
+ connect( aUseCustomRange, SIGNAL( toggled( bool ) ), aUpdateBtn, SLOT( setEnabled( bool ) ) );
+
+ QGridLayout* aRangeLayout = new QGridLayout( aRangeBox );
+ aRangeLayout->setSpacing( 6 );
+ aRangeLayout->setMargin( 11 );
+ aRangeLayout->addWidget( aUseScalarBarRange, 0, 0 );
+ aRangeLayout->addWidget( aUseCustomRange, 0, 1 );
+ aRangeLayout->addWidget( LabelMin, 1, 0 );
+ aRangeLayout->addWidget( MinIso, 1, 1 );
+ aRangeLayout->addWidget( LabelMax, 2, 0 );
+ aRangeLayout->addWidget( MaxIso, 2, 1 );
+ aRangeLayout->addWidget( aUpdateBtn, 3, 0, 1, 2 );
+
+ TopGroupLayout->addWidget( aRangeBox, 0, 0, 1, 2 );
+
QLabel* LabelNbr = new QLabel (tr("NB_SURFACES"), TopGroup);
- TopGroupLayout->addWidget( LabelNbr, 0, 0 );
+ TopGroupLayout->addWidget( LabelNbr, 1, 0 );
NbrIso = new QSpinBox( TopGroup );
NbrIso->setMaximum( 100 );
NbrIso->setMinimum( 1 );
NbrIso->setSingleStep( 1 );
NbrIso->setValue( 1 );
- TopGroupLayout->addWidget( NbrIso, 0, 1 );
-
- QLabel* LabelMin = new QLabel (tr("MIN_VALUE"), TopGroup );
- TopGroupLayout->addWidget(LabelMin, 1, 0);
- //MinIso = new QtxDoubleSpinBox( -DBL_MAX, DBL_MAX, 0.1, TopGroup );
- MinIso = new QLineEdit( TopGroup );
- MinIso->setValidator( new QDoubleValidator(TopGroup) );
- MinIso->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- MinIso->setMinimumSize( 70, 0 );
- LabelMin->setBuddy(MinIso);
- TopGroupLayout->addWidget( MinIso, 1, 1 );
-
- QLabel* LabelMax = new QLabel (tr("MAX_VALUE"), TopGroup );
- TopGroupLayout->addWidget( LabelMax, 2, 0 );
- //MaxIso = new QtxSpinBoxDbl( -DBL_MAX, DBL_MAX, 0.1, TopGroup );
- MaxIso = new QLineEdit( TopGroup );
- MaxIso->setValidator( new QDoubleValidator(TopGroup) );
- MaxIso->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- MaxIso->setMinimumSize( 70, 0 );
- LabelMax->setBuddy(MaxIso);
- TopGroupLayout->addWidget( MaxIso, 2, 1 );
+ TopGroupLayout->addWidget( NbrIso, 1, 1 );
myUseMagnitude = new QCheckBox(tr("MAGNITUDE_COLORING_CHK"), TopGroup);
myUseMagnitude->setChecked(true);
- TopGroupLayout->addWidget( myUseMagnitude, 3, 0 );
+ TopGroupLayout->addWidget( myUseMagnitude, 2, 0 );
mySelColor = new QtxColorButton( TopGroup );
mySelColor->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- TopGroupLayout->addWidget( mySelColor, 3, 1 );
+ TopGroupLayout->addWidget( mySelColor, 2, 1 );
//connect( mySelColor, SIGNAL( clicked() ), this, SLOT( setColor() ) );
connect( myUseMagnitude, SIGNAL( toggled(bool) ), mySelColor, SLOT( setDisabled(bool) ) );
myUseLabels = new QCheckBox(tr("SHOW_VALUES_CHK"), TopGroup);
myUseLabels->setChecked(false);
- TopGroupLayout->addWidget( myUseLabels, 4, 0 );
+ TopGroupLayout->addWidget( myUseLabels, 3, 0 );
myNbLabels = new QSpinBox( TopGroup );
myNbLabels->setMinimum(1);
myNbLabels->setMaximum(100);
myNbLabels->setSingleStep(1);
myNbLabels->setEnabled(false);
- TopGroupLayout->addWidget( myNbLabels, 4, 1 );
+ TopGroupLayout->addWidget( myNbLabels, 3, 1 );
connect( myUseLabels, SIGNAL( toggled(bool) ), myNbLabels, SLOT( setEnabled(bool) ) );
- QPushButton* aUpdateBtn = new QPushButton( "Update scalar bar range with these values", TopGroup);
- TopGroupLayout->addWidget( aUpdateBtn, 5, 0, 1, 2);
- connect( aUpdateBtn, SIGNAL( clicked() ), this, SLOT(onCBUpdate() ) );
mySelColor->setEnabled( !myUseMagnitude->isChecked() );
}
NbrIso->setValue(thePrs->GetNbSurfaces());
MinIso->setText(QString::number(thePrs->GetSubMin()));
MaxIso->setText(QString::number(thePrs->GetSubMax()));
+
+ int anId = thePrs->IsSubRangeFixed() ? ScalarBarRange : CustomRange;
+ bool anIsSubRangeFixed = thePrs->IsSubRangeFixed();
+ myRangeGrp->button( anId )->setChecked( true );
+ onRangeButtonClicked( anId );
+
myUseMagnitude->setChecked(thePrs->IsColored());
SALOMEDS::Color anOldColor = thePrs->GetColor();
QColor aColor = QColor(int(255*anOldColor.R),int(255*anOldColor.G),int(255*anOldColor.B));
int VisuGUI_IsoSurfPane::storeToPrsObject (VISU::IsoSurfaces_i* thePrs)
{
thePrs->SetNbSurfaces(NbrIso->value());
- thePrs->SetSubRange(MinIso->text().toDouble(), MaxIso->text().toDouble());
+
+ if( myRangeGrp->checkedId() == ScalarBarRange )
+ {
+ thePrs->SetSubRange( myScalarPane->getMin(), myScalarPane->getMax() );
+ thePrs->SetSubRangeFixed( true );
+ }
+ else // CustomRange
+ {
+ thePrs->SetSubRange( MinIso->text().toDouble(), MaxIso->text().toDouble() );
+ thePrs->SetSubRangeFixed( false );
+ }
+
thePrs->ShowLabels(myUseLabels->isChecked(), myNbLabels->value());
thePrs->ShowColored(myUseMagnitude->isChecked());
if(!thePrs->IsColored()){
return 1;
}
+void VisuGUI_IsoSurfPane::onRangeButtonClicked( int theId )
+{
+ bool isCustomRange = theId == 1;
+ MinIso->setEnabled( isCustomRange );
+ MaxIso->setEnabled( isCustomRange );
+}
+
void VisuGUI_IsoSurfPane::onCBUpdate()
{
myScalarPane->setRange(MinIso->text().toDouble(), MaxIso->text().toDouble(), true);
class QTabWidget;
class QLineEdit;
class QSpinBox;
+class QButtonGroup;
class QtxColorButton;
namespace VISU
{
Q_OBJECT;
+public:
+ enum { ScalarBarRange = 0, CustomRange };
+
public:
VisuGUI_IsoSurfPane (QWidget* parent,
VisuGUI_ScalarBarPane* theScalarPane);
QColor color() const;
protected slots:
+ void onRangeButtonClicked( int );
void onCBUpdate();
void setColor();
private:
+ QButtonGroup* myRangeGrp;
QLineEdit* MinIso;
QLineEdit* MaxIso;
QSpinBox* NbrIso;
#include "VISU_Tools.h"
+#include "VISU_ColoredPrs3dHolder_i.hh"
#include "VISU_Gen_i.hh"
#include "VISU_Prs3d_i.hh"
#include "VISU_Result_i.hh"
VISU_Gen_i*
GetVisuGen(const CAM_Module* theModule)
{
- static VISU_Gen_i* aGen = NULL;
+ static VISU_Gen_i* aGen = 0;
if(!aGen){
SALOME_LifeCycleCORBA aLCC(SalomeApp_Application::namingService());
Engines::Component_var aComponent = aLCC.FindOrLoad_Component("FactoryServer","VISU");
VISU_Gen_var aVISU = VISU_Gen::_narrow(aComponent);
- if(!CORBA::is_nil(aVISU)){
- if((aGen = VISU_Gen_i::GetVisuGenImpl()))
- aGen->SetCurrentStudy(GetDSStudy(GetCStudy(GetAppStudy(theModule))));
- }
+ if(!CORBA::is_nil(aVISU))
+ aGen = VISU_Gen_i::GetVisuGenImpl();
}
- if(!aGen)
+
+ if(aGen)
+ aGen->SetCurrentStudy(GetDSStudy(GetCStudy(GetAppStudy(theModule))));
+ else
throw std::runtime_error(QObject::tr("ERR_CANT_FIND_VISU_COMPONENT").toLatin1().data());
return aGen;
}
// ========================================================================================
std::vector<VISU::Prs3d_i*> GetPrs3dList (const SalomeApp_Module* theModule,
const Handle(SALOME_InteractiveObject)& theIO,
- bool theGP)
+ bool theGP)
{
std::vector<VISU::Prs3d_i*> aList;
if (!theIO.IsNull() && theIO->hasEntry()) {
std::vector<VISU::Prs3d_i*> GetPrs3dList (const SalomeApp_Module* theModule,
_PTR(SObject) theObject,
- bool theGP)
+ bool theGP)
{
std::vector<VISU::Prs3d_i*> aList; int k = 0;
if (!theObject)
if (!CORBA::is_nil(aVisuObj)) {
VISU::VISUType aType = aVisuObj->GetType();
switch (aType) {
- case VISU::TGAUSSPOINTS:
- if ( !theGP ) break;
- case VISU::TSCALARMAP:
+ case VISU::TGAUSSPOINTS:
+ if ( !theGP ) break;
+ case VISU::TSCALARMAP:
case VISU::TISOSURFACES:
case VISU::TDEFORMEDSHAPE:
case VISU::TCUTPLANES:
case VISU::TVECTORS:
case VISU::TSTREAMLINES:
case VISU::TPLOT3D:
- case VISU::TSCALARMAPONDEFORMEDSHAPE:
- case VISU::TDEFORMEDSHAPEANDSCALARMAP:
- case VISU::TMESH:
+ case VISU::TSCALARMAPONDEFORMEDSHAPE:
+ case VISU::TDEFORMEDSHAPEANDSCALARMAP:
+ case VISU::TMESH:
{
PortableServer::ServantBase_var aServant = VISU::GetServant(aCORBAObject);
if (aServant.in()) {
}
}
break;
+ case VISU::TCOLOREDPRS3DHOLDER:
+ {
+ PortableServer::ServantBase_var aServant = VISU::GetServant(aCORBAObject);
+ if (aServant.in()) {
+ VISU::ColoredPrs3dHolder_i* aPrsHolderObject = dynamic_cast<VISU::ColoredPrs3dHolder_i*>(aServant.in());
+ if( aPrsHolderObject ) {
+ VISU::Prs3d_i* aPrsObject = aPrsHolderObject->GetPrs3dDevice();
+ aList.resize(k+1);
+ aList[k] = aPrsObject;
+ k++;
+ }
+ }
+ }
}
}
} else {
VISU::VISUType aType = VISU::Storable::SObject2Type(theObject);
switch (aType) {
case VISU::TFIELD: {
- _PTR(ChildIterator) anIter = aCStudy->NewChildIterator(theObject);
- _PTR(SObject) aTimeStamp;
- anIter->Next(); // First is reference on support
- for (; anIter->More(); anIter->Next()) {
- aTimeStamp = anIter->Value();
- if (!aTimeStamp) continue;
- std::vector<VISU::Prs3d_i*> aSubList = GetPrs3dList(theModule, aTimeStamp);
- if (!aSubList.empty()) {
- int n = aSubList.size();
- aList.resize(k+n);
- for (int i = 0; i < n; i++) {
- aList[k] = aSubList[i];
- k++;
- }
- }
- }
- break;
+ _PTR(ChildIterator) anIter = aCStudy->NewChildIterator(theObject);
+ _PTR(SObject) aTimeStamp;
+ anIter->Next(); // First is reference on support
+ for (; anIter->More(); anIter->Next()) {
+ aTimeStamp = anIter->Value();
+ if (!aTimeStamp) continue;
+ std::vector<VISU::Prs3d_i*> aSubList = GetPrs3dList(theModule, aTimeStamp);
+ if (!aSubList.empty()) {
+ int n = aSubList.size();
+ aList.resize(k+n);
+ for (int i = 0; i < n; i++) {
+ aList[k] = aSubList[i];
+ k++;
+ }
+ }
+ }
+ break;
}
case VISU::TTIMESTAMP: {
- _PTR(ChildIterator) anIter = aCStudy->NewChildIterator(theObject);
- _PTR(SObject) aPrs;
- for (; anIter->More(); anIter->Next()) {
- aPrs = anIter->Value();
- if (!aPrs) continue;
- std::vector<VISU::Prs3d_i*> aSubList = GetPrs3dList(theModule, aPrs);
- if (!aSubList.empty()) {
- int n = aSubList.size();
- aList.resize(k+n);
- for (int i = 0; i < n; i++) {
- aList[k] = aSubList[i];
- k++;
- }
- }
- }
- break;
+ _PTR(ChildIterator) anIter = aCStudy->NewChildIterator(theObject);
+ _PTR(SObject) aPrs;
+ for (; anIter->More(); anIter->Next()) {
+ aPrs = anIter->Value();
+ if (!aPrs) continue;
+ std::vector<VISU::Prs3d_i*> aSubList = GetPrs3dList(theModule, aPrs);
+ if (!aSubList.empty()) {
+ int n = aSubList.size();
+ aList.resize(k+n);
+ for (int i = 0; i < n; i++) {
+ aList[k] = aSubList[i];
+ k++;
+ }
+ }
+ }
+ break;
}}
}
return aList;
-I$(top_builddir)/idl
libVISUEngineImpl_la_LDFLAGS= \
- $(PYTHON_LIBS) \
- $(BOOST_LIB_SIGNALS) \
- $(BOOST_LIB_THREAD) \
- $(BOOST_LIB_SYSTEM) \
- $(QT_MT_LIBS) \
- $(QWT_LIBS) \
$(KERNEL_LDFLAGS) \
$(GUI_LDFLAGS) \
$(MED_LDFLAGS) \
../../idl/libSalomeIDLVISU.la \
+ $(PYTHON_LIBS) \
+ $(BOOST_LIB_SIGNALS) \
+ $(BOOST_LIB_THREAD) \
+ $(BOOST_LIB_SYSTEM) \
+ $(BOOST_LIB_FILESYSTEM) \
$(VTK_LIBS)
libVISUEngineImpl_la_LIBADD= \
+ ../CONVERTOR/libVisuConvertor.la \
+ ../PIPELINE/libVisuPipeLine.la \
+ ../OBJECT/libVisuObject.la \
+ ../GUITOOLS/libVISUGUITOOLS.la \
-lSalomeIDLKernel \
-lSalomeHDFPersist \
-lSalomeGenericObj \
-lSPlot2d \
-lqtx \
-lLightApp \
- -lstd \
- ../CONVERTOR/libVisuConvertor.la \
- ../PIPELINE/libVisuPipeLine.la \
- ../OBJECT/libVisuObject.la \
- ../GUITOOLS/libVISUGUITOOLS.la
+ -lstd
if MED_ENABLE_MULTIPR
libVISUEngineImpl_la_CPPFLAGS+= $(MULTIPR_CPPFLAGS)
VISU::CutLinesBase_i
::CreatePipeLine(VISU_PipeLine* thePipeLine)
{
- /*if(!thePipeLine){
- myCutLinesBasePL = VISU_CutLinesBasePL::New();
- }else*/
- myCutLinesBasePL = dynamic_cast<VISU_CutLinesBasePL*>(thePipeLine);
+ // temporarily commented (see note 0006576 of the external issue 0020468)
+ //myCutLinesBasePL = dynamic_cast<VISU_CutLinesBasePL*>(thePipeLine);
+ myCutLinesBasePL = (VISU_CutLinesBasePL*)thePipeLine;
TSuperClass::CreatePipeLine(myCutLinesBasePL);
}
}
std::string aSObjectName = GetName(theSObject);
+ if(theArgumentName.empty())
+ theArgumentName = "aSComponent";
theStr<<thePrefix<<aSObjectName<<" = aBuilder.NewObject("<<theArgumentName<<")"<<endl;
theStr<<thePrefix<<"if "<<aSObjectName<<":"<<endl;
thePrefix += PREFIX;
#include <SALOME_Event.h>
//------------------------------------------------------------------------
-template<int EDataType> bool ProcessValForTime( VISU::PValForTimeImpl aValForTime,
+template<int EDataType> bool ProcessValForTime( VISU::PValForTimeImpl theValForTime,
VISU::Elem2Comp2Value& theElem2Comp2Value )
{
theElem2Comp2Value.clear();
typedef VISU::TTMeshValue< TVTKBasicType > TMeshValue;
typedef MED::SharedPtr< TMeshValue > TMeshValuePtr;
- const TMeshValuePtr aMeshValue = aValForTime->GetMeshValue( VISU::ePOINT1 );
+ const TMeshValuePtr aMeshValue = theValForTime->GetMeshValue( VISU::ePOINT1 );
if( !aMeshValue )
return false;
return true;
}
+//------------------------------------------------------------------------
+template<int EDataType> int GetNbPoints( VISU::PValForTimeImpl theValForTime )
+{
+ typedef typename VISU::TL::TEnum2VTKBasicType< EDataType >::TResult TVTKBasicType;
+ typedef VISU::TTMeshValue< TVTKBasicType > TMeshValue;
+ typedef MED::SharedPtr< TMeshValue > TMeshValuePtr;
+
+ const TMeshValuePtr aMeshValue = theValForTime->GetMeshValue( VISU::ePOINT1 );
+ if( !aMeshValue )
+ return 0;
+
+ return aMeshValue->GetNbElem();
+}
+
//------------------------------------------------------------------------
VISU_Evolution::VISU_Evolution( _PTR(Study) theStudy,
VISU::XYPlot_ptr theXYPlot )
myComponentId = theComponentId;
}
+//------------------------------------------------------------------------
+int VISU_Evolution::getNbPoints() const
+{
+ if( !myFieldImpl )
+ return 0;
+
+ vtkIdType aDataType = myFieldImpl->GetDataType();
+ const VISU::TValField& aValField = myFieldImpl->myValField;
+ if( aValField.empty() )
+ return 0;
+
+ VISU::TValField::const_iterator aValFieldIter = aValField.begin();
+ for( ; aValFieldIter != aValField.end(); aValFieldIter++ )
+ {
+ const vtkIdType& aTimeStamp = aValFieldIter->first;
+ VISU::PValForTimeImpl aValForTime = aValFieldIter->second;
+
+ // to force method VISU::MedConvertor::FillValForTime() to be called
+ myResult->GetInput()->GetTimeStampOnMesh( myMeshName, myEntity, myFieldName, aTimeStamp );
+
+ switch( aDataType )
+ {
+ case VTK_DOUBLE : return GetNbPoints<VTK_DOUBLE>( aValForTime );
+ case VTK_FLOAT : return GetNbPoints<VTK_FLOAT>( aValForTime );
+ case VTK_INT : return GetNbPoints<VTK_INT>( aValForTime );
+ case VTK_LONG: return GetNbPoints<VTK_LONG>( aValForTime );
+ default: return 0;
+ }
+ }
+
+ return 0;
+}
+
//------------------------------------------------------------------------
bool VISU_Evolution::extractData( int thePointId,
int theComponentId,
bool setField( _PTR(SObject) theField );
bool setField( SALOMEDS::SObject_ptr theField );
+ int getNbPoints() const;
+
void setPointId( int thePointId );
int getPointId() const { return myPointId; }
void
VISU_Gen_i
::Close(SALOMEDS::SComponent_ptr theComponent)
- {}
+ {
+ if ( !CORBA::is_nil( myStudyDocument ) && !CORBA::is_nil( theComponent ) &&
+ myStudyDocument->StudyId() == theComponent->GetStudy()->StudyId())
+ myStudyDocument = SALOMEDS::Study::_nil();
+ }
//---------------------------------------------------------------
myNbLabels = VISU::Storable::FindValue(theMap,"myNbLabels").toInt();
myIsLabeled = VISU::Storable::FindValue(theMap,"myIsLabeled").toInt();
SetSubRange(aMin,aMax);
+
+ SetSubRangeFixed(VISU::Storable::FindValue(theMap,"myIsRangeFixed").toInt());
return this;
}
Storable::DataToStream( theStr, "myRange[1]", GetSubMax() );
Storable::DataToStream( theStr, "myNbLabels", myNbLabels );
Storable::DataToStream( theStr, "myIsLabeled", myIsLabeled );
+ Storable::DataToStream( theStr, "myIsRangeFixed", IsSubRangeFixed() );
}
//---------------------------------------------------------------
::SetSubRange(CORBA::Double theMin, CORBA::Double theMax)
{
VISU::TSetModified aModified(this);
-
+
+ bool isForced = false;
vtkFloatingPointType aRange[2] = {theMin, theMax};
- ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_IsoSurfacesPL, vtkFloatingPointType*>
- (GetSpecificPL(), &VISU_IsoSurfacesPL::SetRange, aRange));
+ ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_IsoSurfacesPL, vtkFloatingPointType*, bool>
+ (GetSpecificPL(), &VISU_IsoSurfacesPL::SetRange, aRange, isForced));
}
//---------------------------------------------------------------
return myIsoSurfacesPL->GetMax();
}
+//---------------------------------------------------------------
+void
+VISU::IsoSurfaces_i
+::SetSubRangeFixed(CORBA::Boolean theIsFixed)
+{
+ VISU::TSetModified aModified(this);
+
+ ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_IsoSurfacesPL, bool>
+ (GetSpecificPL(), &VISU_IsoSurfacesPL::SetRangeFixed, theIsFixed));
+}
+
+//---------------------------------------------------------------
+CORBA::Boolean
+VISU::IsoSurfaces_i
+::IsSubRangeFixed()
+{
+ return myIsoSurfacesPL->IsRangeFixed();
+}
+
//---------------------------------------------------------------
void
CORBA::Double
GetSubMax();
+ virtual
+ void
+ SetSubRangeFixed(CORBA::Boolean theIsFixed);
+
+ virtual
+ CORBA::Boolean
+ IsSubRangeFixed();
+
VISU_IsoSurfacesPL*
GetSpecificPL() const
{
{
if(MYDEBUG) MESSAGE("Prs3d_i::~Prs3d_i - this = "<<this);
ProcessVoidEvent(new TInvokeSignalEvent(myRemoveActorsFromRendererSignal));
- // VSR (27/08/09): Next line is commented, because it causes SIGSEGV
- // : Actually not needed, 'cause GenericObjPtr watches to the stored pointer and
- // : calls Destroy() in its destructor.
- //if(myResult) myResult->Destroy();
}
if(theResult) {
SetStudyDocument(theResult->GetStudyDocument());
- theResult->Register();
- }
- if(myResult) {
- myResult->Destroy();
}
VISU::TSetModified aModified(this);
const void* thePointer)
{
std::ostringstream aStream;
- aStream<<theName<<":"<<thePointer;
+ aStream<<theName<<"_"<<thePointer;
return aStream.str();
}
if(VISU_ScalarMapAct* anActor = dynamic_cast<VISU_ScalarMapAct*>(theActor)){
VISU_LookupTable * aLookupTable = GetSpecificPL()->GetBarTable();
- if ( IsScalarFilterUsed() ) {
+ bool anIsScalarFilterUsed = IsScalarFilterUsed();
+ if ( anIsScalarFilterUsed || aLookupTable->HasMarkedValues() )
aLookupTable->ForceBuild();
+
+ if ( anIsScalarFilterUsed ) {
static unsigned char MARK_COLOR[] = { 255, 255, 255 };
aLookupTable->MarkValueByColor( GetScalarFilterMin(), MARK_COLOR );
aLookupTable->MarkValueByColor( GetScalarFilterMax(), MARK_COLOR );
#define VISU_TOOLS_H
#include "VISUConfig.hh"
+#include "VISU_I.hxx"
#include <SALOMEDSClient_Study.hxx>
/*! Display/Erase/Update a curve presentation.
* Parameter \a frame may be NULL, in this case there is only update without display/erase
*/
- void UpdateCurve( VISU::Curve_i*,
- Plot2d_ViewFrame*,
- SPlot2d_Curve*,
- int theDisplaying );
+ VISU_I_EXPORT void UpdateCurve( VISU::Curve_i*,
+ Plot2d_ViewFrame*,
+ SPlot2d_Curve*,
+ int theDisplaying );
- void PlotTable( SalomeApp_Study*,
- Plot2d_ViewFrame*,
- VISU::Table_i*,
- int theDisplaying );
+ VISU_I_EXPORT void PlotTable( SalomeApp_Study*,
+ Plot2d_ViewFrame*,
+ VISU::Table_i*,
+ int theDisplaying );
- void PlotCurve( Plot2d_ViewFrame*,
- VISU::Curve_i*,
- int theDisplaying );
+ VISU_I_EXPORT void PlotCurve( Plot2d_ViewFrame*,
+ VISU::Curve_i*,
+ int theDisplaying );
- void PlotRemoveCurve(SalomeApp_Application*,
- VISU::Curve_i* );
+ VISU_I_EXPORT void PlotRemoveCurve(SalomeApp_Application*,
+ VISU::Curve_i* );
- void PlotContainer( Plot2d_ViewFrame*,
- VISU::Container_i*,
- int theDisplaying );
+ VISU_I_EXPORT void PlotContainer( Plot2d_ViewFrame*,
+ VISU::Container_i*,
+ int theDisplaying );
- void CreatePlot( VISU_Gen_i*,
- Plot2d_ViewFrame*,
- _PTR(SObject) theTableSO );
+ VISU_I_EXPORT void CreatePlot( VISU_Gen_i*,
+ Plot2d_ViewFrame*,
+ _PTR(SObject) theTableSO );
}
#endif
dist_salomescript_DATA = batchmode_visu.py batchmode_visu_table.py batchmode_visu_view3d.py \
visu_med.py visu_view3d.py visu.py visu_gui.py visu_prs_example.py \
visu_table.py visu_big_table.py visu_view.py visu_delete.py \
- visu_swig_test.py visu_split_views.py \
+ visu_split_views.py \
visu_succcessive_animation.py visu_apply_properties.py visu_apply_properties_successive.py \
- batchmode_visu_view.py visu_cache.py visu_pointmap3d.py visu_view3d_parameters.py \
+ batchmode_visu_view.py visu_cache.py visu_pointmap3d.py visu_view3d_parameters.py visu_evolution.py \
VISU_Example_01.py VISU_Example_02.py VISU_Example_03.py VISU_Example_04.py \
VISU_Example_05.py VISU_Example_06.py VISU_Example_07.py
--- /dev/null
+# -*- coding: iso-8859-1 -*-
+# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# VISU VISU_SWIG : binding of C++ implementation and Python
+# File : visu_evolution.py
+# Module : VISU
+#
+import os
+import VISU
+from visu_gui import *
+
+myViewManager = myVisu.GetViewManager();
+
+myView = myViewManager.CreateXYPlot();
+myView.SetTitle("The viewer for Evolution")
+print "myViewManager.CreateXYPlot()"
+
+medFile = "TimeStamps.med"
+medFile = os.getenv('DATA_DIR') + '/MedFiles/' + medFile
+myResult = myVisu.ImportFile(medFile)
+
+anEvolution = myVisu.CreateEvolution(myView);
+
+aSObj = myStudy.FindObjectIOR(myResult.GetID())
+aSObj = aSObj.FindSubObject(1)[1] # dom
+aSObj = aSObj.FindSubObject(3)[1] # Fields
+aSObj = aSObj.FindSubObject(2)[1] # vitesse
+print "setField : ", anEvolution.setField(aSObj)
+
+anEvolution.setComponentId(1) # x component
+
+anEvolution.setPointId(500)
+
+print "Show Evolution"
+anEvolution.showEvolution()
+
+myView.FitAll()
+++ /dev/null
-# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-from libVISU_Swig import *
-medFile = os.getenv('DATA_DIR') + '/MedFiles/fra.med'
-myCon=Convertor(medFile)
-myPrs=ScalarMap(myCon,"LE VOLUME",0,"VITESSE",1)
-myView=View3D()
-myView.Display(myPrs)