Salome HOME
Merge from V5_1_3_BR branch (07/12/09) V5_1_main_20091209 V5_1_main_20091210 V5_1_main_20091211 V5_1_main_20091214 V5_1_main_20091218 mergefrom_V5_1_3_BR_07Dec09
authorvsr <vsr@opencascade.com>
Tue, 8 Dec 2009 14:56:11 +0000 (14:56 +0000)
committervsr <vsr@opencascade.com>
Tue, 8 Dec 2009 14:56:11 +0000 (14:56 +0000)
50 files changed:
doc/salome/gui/VISU/images/isosurfaces.png
doc/salome/gui/VISU/input/3d_presentations.doc
doc/salome/gui/VISU/input/cut_lines.doc
doc/salome/gui/VISU/input/evolution.doc
doc/salome/gui/VISU/input/importing_med_objects.doc
doc/salome/gui/VISU/input/iso_surfaces.doc
doc/salome/gui/VISU/input/med_object.doc
doc/salome/gui/VISU/input/slider.doc
doc/salome/gui/VISU/input/sweeping.doc
doc/salome/gui/VISU/input/table_presentations.doc
doc/salome/gui/VISU/input/tui_evolution.doc [new file with mode: 0644]
doc/salome/gui/VISU/input/viewing_3d_presentations.doc
src/CONVERTOR/VISU_MeshValue.cxx
src/ENGINE/Makefile.am
src/GUITOOLS/Makefile.am
src/OBJECT/VISU_Actor.cxx
src/OBJECT/VISU_GaussPtsAct.cxx
src/OBJECT/VISU_GaussPtsAct.h
src/OBJECT/VISU_MeshAct.cxx
src/OBJECT/VISU_ScalarMapAct.cxx
src/PIPELINE/VISU_Extractor.cxx
src/PIPELINE/VISU_IsoSurfacesPL.cxx
src/PIPELINE/VISU_IsoSurfacesPL.hxx
src/PIPELINE/VISU_LookupTable.cxx
src/PIPELINE/VISU_LookupTable.hxx
src/PIPELINE/VISU_OpenGLPointSpriteMapper.cxx
src/VISUGUI/Makefile.am
src/VISUGUI/VISU_msg_en.ts
src/VISUGUI/VisuGUI.cxx
src/VISUGUI/VisuGUI_CutSegmentDlg.cxx
src/VISUGUI/VisuGUI_EvolutionDlg.cxx
src/VISUGUI/VisuGUI_EvolutionDlg.h
src/VISUGUI/VisuGUI_IsoSurfacesDlg.cxx
src/VISUGUI/VisuGUI_IsoSurfacesDlg.h
src/VISUGUI/VisuGUI_Tools.cxx
src/VISU_I/Makefile.am
src/VISU_I/VISU_CutLinesBase_i.cc
src/VISU_I/VISU_DumpPython.cc
src/VISU_I/VISU_Evolution.cxx
src/VISU_I/VISU_Evolution.h
src/VISU_I/VISU_Gen_i.cc
src/VISU_I/VISU_IsoSurfaces_i.cc
src/VISU_I/VISU_IsoSurfaces_i.hh
src/VISU_I/VISU_Prs3d_i.cc
src/VISU_I/VISU_ResultUtils.cc
src/VISU_I/VISU_ScalarMap_i.cc
src/VISU_I/VISU_Tools.h
src/VISU_SWIG/Makefile.am
src/VISU_SWIG/visu_evolution.py [new file with mode: 0755]
src/VISU_SWIG/visu_swig_test.py [deleted file]

index 358dc90650eec72ea181d7744713afa5dd370855..7b13173ab633e663a38221ed2ba88f41eaead780 100644 (file)
Binary files a/doc/salome/gui/VISU/images/isosurfaces.png and b/doc/salome/gui/VISU/images/isosurfaces.png differ
index e5b70335854a7bc0d18a9acade119560df1fcbf7..701400dfe3a397f213dc15690d7c4d2ce34e7056 100755 (executable)
@@ -4,7 +4,7 @@
 
 \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:
@@ -14,6 +14,6 @@ presentations can be seen only in Salome VTK Viewer (ALT+K).
 </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
+*/
index a119a75fb83b510a809ac92c1f04d65c9e2d9bf5..c5d156f53104c807a6cbd850611d62f4a3265e99 100644 (file)
@@ -77,10 +77,10 @@ the viewer:
 <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
+*/
index baeef5af20b33019b4a8cc7a168ad59fc1653804..345d82037776d3e205dd535c460350a2cd5b75eb 100644 (file)
@@ -2,49 +2,46 @@
 
 \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.
+
 */
index e6a53c315efccd391067995dcc395ecf6c2ce553..5aa758cf1431d8b9bb24a4e1301b704817a4cf9c 100644 (file)
@@ -2,8 +2,9 @@
 
 \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
@@ -87,4 +88,4 @@ path and change the name of the exported MED file:
 
 To complete file export click <b>Save</b>.
 
-*/
\ No newline at end of file
+*/
index a06f907e1f895dc4ba66eae381407b92dba28a48..2810f218ddeb711530b1b422267d4d2046986491 100644 (file)
@@ -27,13 +27,15 @@ Surfaces</b>, or click <em>"Iso surfaces"</em> icon in the
 <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>
index a6791f42a14f71829aaeeaee80e0fe9d6bd8bf09..268bb51ef22774d1fa0bed02210ef171f4812ff2 100755 (executable)
@@ -5,20 +5,20 @@
 \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".
 
@@ -33,7 +33,7 @@ containing three main folders: \ref families_anchor "Families",
 <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.
index bf2f4cc3b0bab261b1a9b51e012a01249467cc18..811cb2899a1a3f79e96353b1bce883283457e581 100755 (executable)
@@ -43,15 +43,13 @@ of the timestamps. </li>
 \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
+*/
index cd243d2241af69a60a753582fd3730c656507b64..298c5a0827ef52516262b13adfcdf5a1d4abf292 100644 (file)
@@ -20,7 +20,7 @@ displaying the \em basic field presentation will end it.
 
 <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.
@@ -54,4 +54,4 @@ viewer and selecting \b Sweep in the context menu.
 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
+*/
index 3a57a993dcfa6f06aaef8bcb6578ea385aaacab2..82dc0c9644e2597da4d8df3cbab0d9c353d3e1d2 100644 (file)
@@ -4,7 +4,7 @@
 
 <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.
 
@@ -13,6 +13,8 @@ special programming API (this problem lies out of the scope of Salome
 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 
@@ -36,4 +38,4 @@ Plot 2D viewer is described in the documentation on GUI module.
  
 
 
-*/
\ No newline at end of file
+*/
diff --git a/doc/salome/gui/VISU/input/tui_evolution.doc b/doc/salome/gui/VISU/input/tui_evolution.doc
new file mode 100644 (file)
index 0000000..ea149e3
--- /dev/null
@@ -0,0 +1,38 @@
+/*!
+
+\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
+
+*/
index 40ad0203982a3b882a9839beb3fed3cea0ae36af..e8bffd5df422d44644f182d58a86ad6aa7586a76 100644 (file)
@@ -2,10 +2,11 @@
 
 \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
@@ -19,146 +20,117 @@ options:
 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
@@ -175,17 +147,18 @@ In \b Auto mode you specify along which \b Axis and at which
 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.
 
 */
index bf1038150859eacdaaa853e97018ac1f9c29650d..95e0c6462ebeeb29e48b76c94f8a35014e1129ca 100644 (file)
@@ -342,13 +342,13 @@ namespace VISU
             }
           }
 
-          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
index 0acbfc138c303f6a063fb1f718580931dca3397c..30618c13c77a306ece0314e01db769087e66b9c8 100644 (file)
@@ -35,5 +35,5 @@ dist_libVISUEngine_la_SOURCES= VISU_Engine_i.cc
 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
index 3d844b0cf897e98cac36f2b137af4a741f0c1fdc..3182f1a8880af0009ea3c03a98ab905c8b20cadd 100644 (file)
@@ -46,5 +46,4 @@ libVISUGUITOOLS_la_CPPFLAGS=  -ftemplate-depth-32 \
 
 libVISUGUITOOLS_la_LDFLAGS= \
        $(KERNEL_LDFLAGS) -lSALOMELocalTrace \
-       $(GUI_LDFLAGS) -lCAM -lsuit -lqtx \
-       $(QT_LIBS) $(QWT_LIBS)  
+       $(GUI_LDFLAGS) -lCAM -lsuit -lqtx
index 959fce3d2dc9b2f7ded50b08fa145a18253d9f5a..20a5a8427e62168feacb26bde3c651d4808f1992 100644 (file)
@@ -771,12 +771,11 @@ VISU_Actor
   {
     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;
index fbf86d5e006048390d76c50914054d0af8eb5d9b..3d02199ac224f8eb10642fba221277c13a40cb2f 100644 (file)
@@ -1431,6 +1431,12 @@ vtkImplicitFunctionCollection* VISU_GaussPtsAct::GetClippingPlanes()
   return myFunction->GetFunction();
 }
 
+//----------------------------------------------------------------------------
+vtkDataSet* VISU_GaussPtsAct::GetValLabelsInput()
+{
+  return GetInput();
+}
+
 
 
 //==============================================================================
index 48155c84ee40f161433ae13fa840a64e08f24549..9db3f4f1b095d9eae3e5e8d5f9014ad22b07c53f 100644 (file)
@@ -272,6 +272,11 @@ class VISU_OBJECT_EXPORT VISU_GaussPtsAct : public VISU_Actor
 
   virtual vtkImplicitFunctionCollection* GetClippingPlanes();
 
+  //----------------------------------------------------------------------------
+  virtual
+  vtkDataSet*
+  GetValLabelsInput();
  protected:
   //----------------------------------------------------------------------------
   VISU_GaussPtsAct();
index ee575ff09f42cb48678666cabb313582e798a154..40f6c9c1aea1c56fa3865a42f8366c2188619620 100644 (file)
@@ -77,7 +77,6 @@ VISU_MeshAct
 
     int anElem0DSize = aResourceMgr->integerValue( "VISU", "elem0d_size", 5);
     GetSurfaceProperty()->SetPointSize(anElem0DSize);
-    GetEdgeProperty()->SetPointSize(anElem0DSize);
   }  
 }
 
index ce5a4e76d7e70c72809533a84e78cbb270421a57..f487f609a99a7b45ee9ca1f12a6f6896da681570 100644 (file)
@@ -257,7 +257,6 @@ VISU_ScalarMapAct
 
     int anElem0DSize = aResourceMgr->integerValue( "VISU", "elem0d_size", 5);
     mySurfaceActor->GetProperty()->SetPointSize(anElem0DSize);
-    myEdgeActor->GetProperty()->SetPointSize(anElem0DSize);
   }
 }
 
index 361f58497cf6a32a9bfd553b417eaa426adbd62a..aafb7d5595f1e268670487ed4cd961e4c624dfe1 100644 (file)
@@ -41,6 +41,7 @@
 #include <vtkInformation.h>
 #include <vtkInformationVector.h>
 
+#define USE_SPRINTF 1
 
 //----------------------------------------------------------------------------
 vtkStandardNewMacro(VISU_Extractor);
@@ -103,21 +104,61 @@ 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,
@@ -128,8 +169,8 @@ Module2Scalars(vtkDataArray *theInputDataArray,
   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++;
index 25abb517505a28ff7e1a674122215c8cb4d34300..47554dc06292d6ada3599f6c5528d7bf640417dd 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <vtkContourFilter.h>
 
+#define GAP_COEFFICIENT 0.0001
 
 
 //----------------------------------------------------------------------------
@@ -91,6 +92,7 @@ VISU_IsoSurfacesPL
     SetNbParts(aPipeLine->GetNbParts());
     vtkFloatingPointType aRange[2] = {aPipeLine->GetMin(), aPipeLine->GetMax()};
     SetRange(aRange);
+    SetRangeFixed(aPipeLine->IsRangeFixed());
   }
 }
 
@@ -134,15 +136,20 @@ VISU_IsoSurfacesPL
 //----------------------------------------------------------------------------
 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);
@@ -168,6 +175,25 @@ VISU_IsoSurfacesPL
 }
 
 
+//----------------------------------------------------------------------------
+void
+VISU_IsoSurfacesPL
+::SetRangeFixed(bool theIsFixed)
+{
+  myIsRangeFixed = theIsFixed;
+  SetRange( myRange, true );
+}
+
+
+//----------------------------------------------------------------------------
+bool
+VISU_IsoSurfacesPL
+::IsRangeFixed()
+{
+  return myIsRangeFixed;
+}
+
+
 void
 //----------------------------------------------------------------------------
 VISU_IsoSurfacesPL
@@ -180,6 +206,8 @@ VISU_IsoSurfacesPL
   vtkFloatingPointType aScalarRange[2];
   GetSourceRange(aScalarRange);
   SetRange(aScalarRange);
+
+  SetRangeFixed(true);
 }
 
 //----------------------------------------------------------------------------
@@ -233,6 +261,11 @@ VISU_IsoSurfacesPL
 
   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);
index 9c8b8a80b3cc78bfbd6c080f1bea252002bca86f..1fb1659081432830edb50437d5cf4caca46b91f9 100644 (file)
@@ -65,7 +65,7 @@ public:
 
   virtual
   void
-  SetRange(vtkFloatingPointType theRange[2]);
+  SetRange(vtkFloatingPointType theRange[2], bool theIsForced = false);
 
   virtual
   vtkFloatingPointType
@@ -74,6 +74,14 @@ public:
   virtual
   vtkFloatingPointType
   GetMax();
+
+  virtual
+  void
+  SetRangeFixed(bool theIsFixed);
+
+  virtual
+  bool
+  IsRangeFixed();
   
 public:
   virtual
@@ -110,6 +118,7 @@ protected:
 
   int myNbParts;
   vtkFloatingPointType myRange[2];
+  bool myIsRangeFixed;
   vtkCellDataToPointData* myCellDataToPointData;
   vtkContourFilter *myContourFilter;
 
index 938b82934efa015f8d62e7a20be465d173d6691b..a2a4e7f71b04a80fb58da22fa1bac00ab346ff78 100644 (file)
@@ -42,7 +42,8 @@ VISU_LookupTable
 ::VISU_LookupTable(int sze, int ext):
   vtkLookupTable(sze, ext),
   myScale(1.0),
-  myBicolor(false)
+  myBicolor(false),
+  myHasMarkedValues(false)
 {}
 
 //----------------------------------------------------------------------------
@@ -68,6 +69,7 @@ VISU_LookupTable
   vtkIdType anIndex = this->GetIndex( theValue );
   unsigned char *aTablePtr = this->GetPointer( anIndex );
   CopyColor( aTablePtr, theColor );
+  myHasMarkedValues = true;
 }
 
 
@@ -173,6 +175,14 @@ VISU_LookupTable
   }
 }
 
+void
+VISU_LookupTable
+::ForceBuild()
+{
+  Superclass::ForceBuild();
+  myHasMarkedValues = false;
+}
+
 // Apply log to value, with appropriate constraints.
 inline
 vtkFloatingPointType
index 1acbecb607acfed4d48c727e90b4fa5b04ad2930..16a8a4775dd728b3f4d07a2894d1e596ccc1f1ad 100644 (file)
@@ -38,6 +38,8 @@ class VISU_PIPELINE_EXPORT VISU_LookupTable: public vtkLookupTable
    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);
@@ -56,6 +58,8 @@ class VISU_PIPELINE_EXPORT VISU_LookupTable: public vtkLookupTable
   void MarkValueByColor( vtkFloatingPointType theValue,
                         unsigned char* theColor );
 
+  bool HasMarkedValues() const { return myHasMarkedValues; }
+
   void FillByColor( unsigned char* theColor );
 
   void MakeBiColor();
@@ -67,5 +71,6 @@ class VISU_PIPELINE_EXPORT VISU_LookupTable: public vtkLookupTable
    vtkFloatingPointType myScale;
 
    bool myBicolor;
+   bool myHasMarkedValues;
 };
 #endif // VISU_LookupTable_H
index e667bc244cb19c95bcfe3bbba0a6ccf2c135157b..82d59e3508fa4e0116237ef6105ff3627d6a871c 100755 (executable)
@@ -26,7 +26,7 @@
 //
 #include "VISU_OpenGLPointSpriteMapper.hxx"
 
-#include "SVTK_Extension.h"
+//#include "SVTK_Extension.h"
 
 #include <vtkCamera.h>
 #include <vtkCellArray.h>
index 286f2961f06da4be86c46e7ef7e2de267bedd561..aff94dc941ac0f6fcbd1920c538ea474ecd18f84 100644 (file)
@@ -39,7 +39,6 @@ salomeinclude_HEADERS= \
        VisuGUI.h \
        VisuGUI_Module.h \
        VisuGUI_Selection.h \
-       VisuGUI_Tools.h \
        VisuGUI_ViewTools.h \
        VisuGUI_NameDlg.h \
        VisuGUI_FileDlg.h \
@@ -70,7 +69,6 @@ salomeinclude_HEADERS= \
        VisuGUI_Timer.h \
        VisuGUI_Slider.h \
        VisuGUI_InputPane.h \
-       VisuGUI_CacheDlg.h \
        VisuGUI_FieldFilter.h \
        VisuGUI_ValuesLabelingDlg.h
 
@@ -120,7 +118,6 @@ dist_libVISU_la_SOURCES= \
        VisuGUI_Slider.cxx \
        VisuGUI_Sweep.cxx \
        VisuGUI_InputPane.cxx \
-       VisuGUI_CacheDlg.cxx \
        VisuGUI_FileInfoDlg.cxx \
        VisuGUI_FieldFilter.cxx \
        VisuGUI_ClippingPanel.cxx \
@@ -168,14 +165,12 @@ MOC_FILES= \
        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
index 7a04f2832b613f370d37d41f94f9ffbb90855087..d7ec159510a2cc15c1f95c6073f9271d922c69f9 100644 (file)
@@ -2407,6 +2407,18 @@ Please, provide non-empty resulting presentation.</translation>
             <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>
index c54562c9d6e0975db204f0d4489fa5aa6d05d57b..ebe7f5f2cdf08069252e1fa9c0e72c22cab16ea2 100644 (file)
 #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"
@@ -199,6 +199,20 @@ VisuGUI
 VisuGUI
 ::~VisuGUI()
 {
+  if( myDisplayer ) {
+    delete myDisplayer;
+    myDisplayer = 0;
+  }
+
+  if( mySlider ) {
+    delete mySlider;
+    mySlider = 0;
+  }
+
+  if( mySweep ) {
+    delete mySweep;
+    mySweep = 0;
+  }
 }
 
 void
@@ -2118,12 +2132,8 @@ 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;
@@ -2150,10 +2160,6 @@ void
 VisuGUI
 ::OnShowEvolution()
 {
-  SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>( this );
-  if( !aViewWindow )
-    return;
-
   LightApp_SelectionMgr* aSelectionMgr = GetSelectionMgr( this );
   SALOME_ListIO aListIO;
   aSelectionMgr->selectedObjects( aListIO );
@@ -2172,7 +2178,7 @@ VisuGUI
   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();
 }
@@ -3303,7 +3309,6 @@ VisuGUI
   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'}";
@@ -3479,7 +3484,7 @@ void VisuGUI::contextMenuPopup( const QString& theClient, QMenu* theMenu, QStrin
   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)) {
index 764f8104eed382358943926fcace47b8c9f494ca..34ec4ca3984d8b00bb317c81111b823439003cad 100644 (file)
@@ -433,7 +433,7 @@ void VisuGUI_CutSegmentDlg::updatePoints( bool update )
   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();
index 07cbefac5519349238d42b1e2f7ca29c89528384..b5298f1461c83ea40131554aff1c8438267620c2 100644 (file)
@@ -49,6 +49,7 @@
 
 #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" ) );
@@ -80,7 +79,9 @@ VisuGUI_EvolutionDlg::VisuGUI_EvolutionDlg( VisuGUI* theModule,
 
   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 );
@@ -102,12 +103,22 @@ VisuGUI_EvolutionDlg::VisuGUI_EvolutionDlg( VisuGUI* theModule,
   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() ) );
+  }
 }
 
 //------------------------------------------------------------------------
@@ -137,6 +148,9 @@ void VisuGUI_EvolutionDlg::updateFromEngine()
   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();
@@ -311,6 +325,32 @@ void VisuGUI_EvolutionDlg::restoreFromStudy( _PTR(SObject) theEvolution )
   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()
 {
@@ -345,6 +385,20 @@ void VisuGUI_EvolutionDlg::onSelectionEvent()
   }
 }
 
+//------------------------------------------------------------------------
+void VisuGUI_EvolutionDlg::onViewWindowClosed()
+{
+  if( myViewWindow )
+  {
+    if( myPreviewActor )
+    {
+      myPreviewActor->Delete();
+      myPreviewActor = 0;
+    }
+    myViewWindow = 0;
+  }    
+}
+
 //------------------------------------------------------------------------
 void VisuGUI_EvolutionDlg::onHelp()
 {
index 0cc5663de757ad51d3fe8e41bb969d12c60a9910..bf86a0bbf678de2493de2e3db012ec3893ec991d 100644 (file)
@@ -33,6 +33,7 @@
 #include <SVTK_Selection.h>
 
 class QComboBox;
+class QIntValidator;
 class QKeyEvent;
 class QLineEdit;
 
@@ -47,9 +48,7 @@ class VisuGUI_EvolutionDlg: public QtxDialog
   Q_OBJECT
 
 public:
-  VisuGUI_EvolutionDlg( VisuGUI* theModule,
-                        SVTK_ViewWindow* theViewWindow,
-                        _PTR(Study) theStudy );
+  VisuGUI_EvolutionDlg( VisuGUI* theModule, _PTR(Study) theStudy );
   ~VisuGUI_EvolutionDlg();
 
 public:
@@ -68,7 +67,9 @@ private:
   void                      updateFromEngine();
 
 private slots:
+  void                      onPointEdited( const QString& );
   void                      onSelectionEvent();
+  void                      onViewWindowClosed();
   void                      onHelp();
 
 private:
@@ -79,6 +80,8 @@ private:
   QLineEdit*                myPointLE;
   QComboBox*                myComponentCB;
 
+  QIntValidator*            myPointValidator;
+
   SVTK_ViewWindow*          myViewWindow;
   SALOME_Actor*             myPreviewActor;
   Selection_Mode            myStoredSelectionMode;
index 76e48c213eba76b8b28668404861c228e948f7fb..fcf2963c9a093ed0fc740e6837855a202b2b1ba7 100644 (file)
@@ -54,6 +54,8 @@
 #include <QTabWidget>
 #include <QKeyEvent>
 #include <QColorDialog>
+#include <QButtonGroup>
+#include <QRadioButton>
 
 using namespace std;
 
@@ -74,59 +76,79 @@ VisuGUI_IsoSurfPane::VisuGUI_IsoSurfPane (QWidget* parent,
   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() );
 }
 
@@ -135,6 +157,12 @@ void VisuGUI_IsoSurfPane::initFromPrsObject (VISU::IsoSurfaces_i* thePrs)
   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));
@@ -148,7 +176,18 @@ void VisuGUI_IsoSurfPane::initFromPrsObject (VISU::IsoSurfaces_i* thePrs)
 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()){
@@ -162,6 +201,13 @@ int VisuGUI_IsoSurfPane::storeToPrsObject (VISU::IsoSurfaces_i* thePrs)
   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);
index fd7b234b90d5c2532d5c993b39dc1aa84058cd1f..a57ccbcd07e38c4c1d28ba8a872391aa71df4dd7 100644 (file)
@@ -33,6 +33,7 @@
 class QTabWidget;
 class QLineEdit;
 class QSpinBox;
+class QButtonGroup;
 class QtxColorButton;
 
 namespace VISU 
@@ -47,6 +48,9 @@ class VisuGUI_IsoSurfPane : public QWidget
 {
   Q_OBJECT;
 
+public:
+  enum { ScalarBarRange = 0, CustomRange };
+
 public:
   VisuGUI_IsoSurfPane (QWidget* parent,
                       VisuGUI_ScalarBarPane* theScalarPane);
@@ -61,10 +65,12 @@ public:
   QColor color() const;
 
 protected slots:
+  void onRangeButtonClicked( int );
   void onCBUpdate();
   void setColor();
 
 private:
+  QButtonGroup*   myRangeGrp;
   QLineEdit*      MinIso;
   QLineEdit*      MaxIso;
   QSpinBox*       NbrIso;
index fcc2f174311215428b9f70f99fb9e1c2d560206d..4f1dbe03749531f285de12e4cb1e83988617f6be 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "VISU_Tools.h"
 
+#include "VISU_ColoredPrs3dHolder_i.hh"
 #include "VISU_Gen_i.hh"
 #include "VISU_Prs3d_i.hh"
 #include "VISU_Result_i.hh"
@@ -217,17 +218,18 @@ namespace VISU
   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;
   }
@@ -1149,7 +1151,7 @@ namespace VISU
   // ========================================================================================
   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()) {
@@ -1162,7 +1164,7 @@ namespace VISU
 
   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)
@@ -1176,9 +1178,9 @@ namespace VISU
       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:
@@ -1187,9 +1189,9 @@ namespace VISU
         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()) {
@@ -1220,47 +1222,60 @@ namespace VISU
             }
           }
           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;
index f959903e48806da6dfc708f6bfd342188644e16e..9d6c9de56584cf778d8725c3781568cb18426622 100644 (file)
@@ -135,19 +135,22 @@ libVISUEngineImpl_la_CPPFLAGS= \
        -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 \
@@ -166,11 +169,7 @@ libVISUEngineImpl_la_LIBADD= \
        -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)
index 7a43b3fec86b7ccdd37f45538cd7949a02e7de07..2a256794ef0cdba6b47dc86b33d17b88c32be356 100644 (file)
@@ -262,10 +262,9 @@ void
 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);
 }
index cc010783b11bb6552e69dad44bce6ba9dbe94bc4..f0567bfb25c02d2e465c87bb20f1d0c9617d2422 100644 (file)
@@ -892,6 +892,8 @@ namespace VISU
     }
 
     std::string aSObjectName = GetName(theSObject);
+    if(theArgumentName.empty())
+      theArgumentName = "aSComponent";
     theStr<<thePrefix<<aSObjectName<<" = aBuilder.NewObject("<<theArgumentName<<")"<<endl;
     theStr<<thePrefix<<"if "<<aSObjectName<<":"<<endl;
     thePrefix += PREFIX;
index c9301429563f180060f3fb168ea5b12b3955e410..75e971cd4a72634b0991657d75ad59b58309aa19 100644 (file)
@@ -43,7 +43,7 @@
 #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();
@@ -52,7 +52,7 @@ template<int EDataType> bool ProcessValForTime( VISU::PValForTimeImpl aValForTim
   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;
 
@@ -91,6 +91,20 @@ template<int EDataType> bool ProcessValForTime( VISU::PValForTimeImpl aValForTim
   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 )
@@ -222,6 +236,39 @@ void VISU_Evolution::setComponentId( int theComponentId )
   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,
index 273013451182de47eb99e6977be71a0ec7fd84ab..b40e9aec0a331984470172859b89a83df5759a37 100644 (file)
@@ -83,6 +83,8 @@ public:
   bool                      setField( _PTR(SObject) theField );
   bool                      setField( SALOMEDS::SObject_ptr theField );
 
+  int                       getNbPoints() const;
+
   void                      setPointId( int thePointId );
   int                       getPointId() const { return myPointId; }
 
index 8b23c10b7f6727974a4e9332de67c95e462bb0bb..3c2304e0011a8e114c541bf65283c383072ba0c0 100644 (file)
@@ -1305,7 +1305,11 @@ namespace VISU
   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();
+  }
 
 
   //---------------------------------------------------------------
index 1e60235ec8889b5a43e2665f8caf6632c3c04bb1..906aef86d74b9fea8fb56422a2d7ef7fdc3ccb5e 100644 (file)
@@ -138,6 +138,8 @@ VISU::IsoSurfaces_i
   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;
 }
@@ -155,6 +157,7 @@ VISU::IsoSurfaces_i
   Storable::DataToStream( theStr, "myRange[1]", GetSubMax() );
   Storable::DataToStream( theStr, "myNbLabels", myNbLabels );
   Storable::DataToStream( theStr, "myIsLabeled", myIsLabeled );
+  Storable::DataToStream( theStr, "myIsRangeFixed", IsSubRangeFixed() );
 }
 
 //---------------------------------------------------------------
@@ -204,10 +207,11 @@ VISU::IsoSurfaces_i
 ::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));
 }
 
 //---------------------------------------------------------------
@@ -226,6 +230,25 @@ VISU::IsoSurfaces_i
   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 
index 86833c534a7f2ac6a7d24613fa67d0df42f088a3..b8e245c5317ce6def90d479a0ca7f5e7a95a1155 100644 (file)
@@ -82,6 +82,14 @@ namespace VISU
     CORBA::Double 
     GetSubMax();
 
+    virtual
+    void
+    SetSubRangeFixed(CORBA::Boolean theIsFixed);
+
+    virtual
+    CORBA::Boolean
+    IsSubRangeFixed();
+
     VISU_IsoSurfacesPL* 
     GetSpecificPL() const
     { 
index 4f61facd92130fff0c353c5021ce9051f0a2d863..84d72d90cdedbf1c6c6ccf3dc476038c9db42123 100644 (file)
@@ -101,10 +101,6 @@ VISU::Prs3d_i::~Prs3d_i()
 {
   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(); 
 }
 
 
@@ -165,10 +161,6 @@ VISU::Prs3d_i
 
   if(theResult) {
     SetStudyDocument(theResult->GetStudyDocument());
-    theResult->Register();
-  }
-  if(myResult) {
-    myResult->Destroy();
   }
   
   VISU::TSetModified aModified(this);
index b117cc9c91f661efa52f4a0c35dae98d6a43bb75..640dd24edfa9b91ec6ef0caf8a72510e8ea3932e 100644 (file)
@@ -176,7 +176,7 @@ namespace VISU
               const void* thePointer)
   {
     std::ostringstream aStream;    
-    aStream<<theName<<":"<<thePointer;
+    aStream<<theName<<"_"<<thePointer;
     return aStream.str();
   }
   
index 974cc64158d0d1c2308337bb269f73300b4408b9..8b0326d6c5e00f79fd41f8afb1f63286496cf4f6 100644 (file)
@@ -536,8 +536,11 @@ VISU::ScalarMap_i
   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 );
index 128d755b2499086023d84f5d150d9b7bdfbf97f2..50713227e520b354b346f92fc3cafcf689d4f41b 100644 (file)
@@ -27,6 +27,7 @@
 #define VISU_TOOLS_H
 
 #include "VISUConfig.hh"
+#include "VISU_I.hxx"
 
 #include <SALOMEDSClient_Study.hxx>
 
@@ -45,30 +46,30 @@ namespace VISU
   /*! 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
index a95527bb99d3650caafe92d25be02ee7c0a57300..3b4a7ca498bb149ec8361763619069dffb6a3c18 100644 (file)
@@ -59,9 +59,9 @@ _libVISU_Swig_la_LIBADD  = $(PYTHON_LIBS) ../CONVERTOR/libVisuConvertor.la ../PI
 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
 
diff --git a/src/VISU_SWIG/visu_evolution.py b/src/VISU_SWIG/visu_evolution.py
new file mode 100755 (executable)
index 0000000..cf17eee
--- /dev/null
@@ -0,0 +1,56 @@
+#  -*- 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()
diff --git a/src/VISU_SWIG/visu_swig_test.py b/src/VISU_SWIG/visu_swig_test.py
deleted file mode 100644 (file)
index ade7a94..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#  -*- 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)