]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
First stable version after merging with V3_2_2
authorabd <abd@opencascade.com>
Thu, 19 Oct 2006 06:53:29 +0000 (06:53 +0000)
committerabd <abd@opencascade.com>
Thu, 19 Oct 2006 06:53:29 +0000 (06:53 +0000)
112 files changed:
Makefile.in
adm_local/unix/make_commence.in
configure.in.base
doc/salome/gui/VISU/files/creating_curves.htm
doc/salome/gui/VISU/files/setting_properties_of_xy_plots.htm
doc/salome/gui/VISU/pics/createcurves.png [new file with mode: 0755]
doc/salome/gui/VISU/visu.log
doc/salome/gui/VISU/whcsh_home.htm
doc/salome/gui/VISU/whdata/whfts.htm
doc/salome/gui/VISU/whdata/whtdata0.htm
doc/salome/gui/VISU/whfform.htm
doc/salome/gui/VISU/whiform.htm
doc/salome/gui/VISU/whnjs.htm
doc/salome/gui/VISU/whres.xml
doc/salome/gui/VISU/whskin_info.htm
doc/salome/gui/VISU/whskin_pickup.htm
doc/salome/gui/VISU/whstart.js
doc/salome/gui/VISU/whtdhtml.htm
doc/salome/gui/VISU/whtopic.js
doc/salome/gui/VISU/whxdata/whtdata0.xml
doc/salome/tui/Makefile.in
idl/VISU_Gen.idl
resources/SalomeApp.xml
src/CONVERTOR/VISU_Convertor_impl.cxx
src/CONVERTOR/VISU_Convertor_impl.hxx
src/CONVERTOR/VISU_MedConvertor.cxx
src/ENGINE/VISU_Engine_i.cc
src/ENGINE/VISU_Engine_i.hh
src/GUITOOLS/VisuGUI_TableDlg.cxx
src/GUITOOLS/VisuGUI_TableDlg.h
src/PIPELINE/Makefile.in
src/PIPELINE/VISUPipeLine.cxx
src/PIPELINE/VISU_CutLinesPL.cxx
src/PIPELINE/VISU_OpenGLPointSpriteMapper.cxx
src/PIPELINE/VISU_ScalarMapOnDeformedShapePL.cxx
src/VISUGUI/VISU_msg_en.po
src/VISUGUI/VisuGUI.cxx
src/VISUGUI/VisuGUI_BuildProgressDlg.cxx
src/VISUGUI/VisuGUI_BuildProgressDlg.h
src/VISUGUI/VisuGUI_ClippingDlg.cxx
src/VISUGUI/VisuGUI_ClippingDlg.h
src/VISUGUI/VisuGUI_CursorDlg.cxx
src/VISUGUI/VisuGUI_CursorDlg.h
src/VISUGUI/VisuGUI_CutLinesDlg.cxx
src/VISUGUI/VisuGUI_CutLinesDlg.h
src/VISUGUI/VisuGUI_CutPlanesDlg.cxx
src/VISUGUI/VisuGUI_CutPlanesDlg.h
src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx
src/VISUGUI/VisuGUI_DeformedShapeDlg.h
src/VISUGUI/VisuGUI_EditContainerDlg.cxx
src/VISUGUI/VisuGUI_EditContainerDlg.h
src/VISUGUI/VisuGUI_GaussPointsDlg.cxx
src/VISUGUI/VisuGUI_GaussPointsDlg.h
src/VISUGUI/VisuGUI_IsoSurfacesDlg.cxx
src/VISUGUI/VisuGUI_IsoSurfacesDlg.h
src/VISUGUI/VisuGUI_NameDlg.cxx
src/VISUGUI/VisuGUI_NameDlg.h
src/VISUGUI/VisuGUI_OffsetDlg.cxx
src/VISUGUI/VisuGUI_OffsetDlg.h
src/VISUGUI/VisuGUI_Plot3DDlg.cxx
src/VISUGUI/VisuGUI_Plot3DDlg.h
src/VISUGUI/VisuGUI_Prs3dTools.h
src/VISUGUI/VisuGUI_ScalarBarDlg.cxx
src/VISUGUI/VisuGUI_ScalarBarDlg.h
src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.cxx
src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.h
src/VISUGUI/VisuGUI_Selection.cxx
src/VISUGUI/VisuGUI_Selection.h
src/VISUGUI/VisuGUI_SetupPlot2dDlg.cxx
src/VISUGUI/VisuGUI_SetupPlot2dDlg.h
src/VISUGUI/VisuGUI_StreamLinesDlg.cxx
src/VISUGUI/VisuGUI_StreamLinesDlg.h
src/VISUGUI/VisuGUI_TimeAnimation.cxx
src/VISUGUI/VisuGUI_TimeAnimation.h
src/VISUGUI/VisuGUI_Tools.cxx
src/VISUGUI/VisuGUI_TransparencyDlg.cxx
src/VISUGUI/VisuGUI_TransparencyDlg.h
src/VISUGUI/VisuGUI_VectorsDlg.cxx
src/VISUGUI/VisuGUI_VectorsDlg.h
src/VISU_I/VISU_DeformedShape_i.cc
src/VISU_I/VISU_DeformedShape_i.hh
src/VISU_I/VISU_DumpPython.cc
src/VISU_I/VISU_GaussPoints_i.cc
src/VISU_I/VISU_Gen_i.cc
src/VISU_I/VISU_Gen_i.hh
src/VISU_I/VISU_Mesh_i.cc
src/VISU_I/VISU_Prs3d_i.cc
src/VISU_I/VISU_Result_i.cc
src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc
src/VISU_I/VISU_ScalarMap_i.cc
src/VISU_I/VISU_ScalarMap_i.hh
src/VISU_I/VISU_StreamLines_i.cc
src/VISU_I/VISU_Table_i.cc
src/VISU_I/VISU_Table_i.hh
src/VISU_I/VISU_TimeAnimation.cxx
src/VISU_I/VISU_Vectors_i.cc
src/VISU_I/VISU_ViewManager_i.cc
src/VISU_I/VISU_View_i.cc
src/VISU_I/VISU_View_i.hh
src/VISU_SWIG/Makefile.in
src/VISU_SWIG/libVISU_Swig.i
src/VISU_SWIG/visu.py
src/VVTK/VVTK_MainWindow.cxx
src/VVTK/VVTK_PickingDlg.cxx
src/VVTK/VVTK_PickingDlg.h
src/VVTK/VVTK_PrimitiveBox.cxx
src/VVTK/VVTK_RecorderDlg.cxx
src/VVTK/VVTK_RecorderDlg.h
src/VVTK/VVTK_SegmentationCursorDlg.cxx
src/VVTK/VVTK_SegmentationCursorDlg.h
src/VVTK/VVTK_ViewWindow.cxx
src/VVTK/VVTK_ViewWindow.h

index 4331fa8bf1f9fb3f8f5b3fb2321c262157e0b367..ac80cb954a64383f08780181d92f9c7904f0de3c 100644 (file)
@@ -81,9 +81,9 @@ depend: depend_idl
 depend_idl:
        (cd idl ; $(MAKE) $@) || exit 1
 
-resources: share/salome/resources/VISUCatalog.xml
+resources: share/salome/resources/visu/VISUCatalog.xml
 
-share/salome/resources/VISUCatalog.xml: VISUCatalog.xml
+share/salome/resources/visu/VISUCatalog.xml: VISUCatalog.xml
        cp $< $@
 
 # doc is already build : if you want to had documents, go manually to doc and run 'make doc'
@@ -128,6 +128,6 @@ install: install-bin install-include install-end
 
 install-resources: install-catalog
 
-install-catalog: share/salome/resources/VISUCatalog.xml
-       $(INSTALL) -d $(datadir)/resources
-       $(INSTALL_DATA) $< $(datadir)/resources/.
+install-catalog: share/salome/resources/visu/VISUCatalog.xml
+       $(INSTALL) -d $(datadir)/resources/visu
+       $(INSTALL_DATA) $< $(datadir)/resources/visu/.
index ed0e9c451f62afb99956129ae6ec29dbab0c88f1..bba7766f82c95313fa0fa7067530b3fbd0dac6cb 100644 (file)
@@ -1,6 +1,8 @@
 # common directories to put headerfiles
 inc_builddir=$(top_builddir)/include/salome
 
+MODULE_NAME=@MODULE_NAME@
+
 @SET_MAKE@
 SHELL=/bin/sh
 
index a07175245a0637e0b2b0ebec41366509edb20d20..b96d47bbc50c814301c62c6fd6b1e1cf51f43fb3 100644 (file)
@@ -22,11 +22,15 @@ AC_CANONICAL_HOST
 PACKAGE=salome
 AC_SUBST(PACKAGE)
 
-VERSION=3.2.0
-XVERSION=0x030200
+VERSION=3.2.2
+XVERSION=0x030202
 AC_SUBST(VERSION)
 AC_SUBST(XVERSION)
 
+# set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
+MODULE_NAME=visu
+AC_SUBST(MODULE_NAME)
+
 dnl
 dnl Initialize source and build root directories
 dnl
@@ -343,7 +347,7 @@ else
 fi
 
 # make other build directories
-for rep in salome_adm adm_local doc bin/salome include/salome lib${LIB_LOCATION_SUFFIX}/salome share/salome/resources idl
+for rep in salome_adm adm_local doc bin/salome include/salome lib${LIB_LOCATION_SUFFIX}/salome share/salome/resources/${MODULE_NAME} idl
 do
 #   if test ! -d $rep ; then
 #      eval mkdir $rep
index f77c33b1761bfa39f7834dce432d63d41970befa..b75af456210e2e00e0de69752e4751ec49d85633 100755 (executable)
@@ -19,26 +19,27 @@ p.whs2 { font-family:'Times New Roman' , serif; }
 img_whs3 { border:none; width:30px; height:30px; float:none; border-style:none; }
 p.whs4 { font-family:'Times New Roman' , serif; margin-left:40px; color:#000000; font-style:normal; }
 p.whs5 { font-family:'Times New Roman' , serif; font-style:italic; color:#ff0000; margin-left:40px; }
-img_whs6 { border:none; width:585px; height:241px; float:none; border-style:none; }
-p.whs7 { font-family:'Times New Roman' , serif; margin-left:40px; }
+img_whs6 { border:none; width:705px; height:209px; float:none; }
+p.whs7 { margin-left:36px; }
 ul.whs8 { list-style:disc; }
-p.whs9 { font-family:'Times New Roman' , serif; margin-left:0px; font-weight:normal; }
+p.whs9 { font-family:'Times New Roman' , serif; margin-left:40px; }
 p.whs10 { font-weight:bold; margin-left:40px; }
 p.whs11 { font-weight:bold; margin-left:38px; }
 p.whs12 { font-family:'Times New Roman'  , serif; margin-left:0px; background-image:url('../texture_horiz_ltbluebubbles.jpg'); }
 img_whs13 { border:none; float:none; width:36px; height:38px; border-style:none; }
-p.whs14 { margin-left:80px; }
-p.whs15 { font-family:'Times New Roman' , serif; margin-left:40px; font-weight:bold; }
-p.whs16 { font-family:'Times New Roman' , serif; margin-left:0px; }
+p.whs14 { font-family:'Times New Roman' , serif; margin-left:0px; font-weight:normal; }
+p.whs15 { margin-left:80px; }
+p.whs16 { font-family:'Times New Roman' , serif; margin-left:40px; font-weight:bold; }
+p.whs17 { font-family:'Times New Roman' , serif; margin-left:0px; }
 -->
 </style><script type="text/javascript" language="JavaScript">
 <!--
 if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))
 {
   var strNSS = "<style type='text/css'>";
-  strNSS += "p.whs9 {margin-left:1pt; }";
   strNSS += "p.whs12 {margin-left:1pt; }";
-  strNSS += "p.whs16 {margin-left:1pt; }";
+  strNSS += "p.whs14 {margin-left:1pt; }";
+  strNSS += "p.whs17 {margin-left:1pt; }";
   strNSS +="</style>";
   document.write(strNSS);
 }
@@ -135,42 +136,45 @@ if (window.writeIntopicBar)
 
 <p class="whs4">&nbsp;</p>
 
-<p class="whs4"><img src="../pics/setupplot2d.png" x-maintain-ratio="TRUE" width="585px" height="241px" border="0" class="img_whs6"></p>
+<p class="whs4"><img src="../pics/createcurves.png" x-maintain-ratio="TRUE" width="705px" height="209px" border="0" class="img_whs6"></p>
 
 <p class="whs4">&nbsp;</p>
 
-<p class="whs7">This 
- dialog box has the form of a table; each row of this table represents 
one column of values of the imported data table. </p>
+<p class="whs7">This dialog box has the form of a table; 
+ each row of this table represents one column of values of the imported 
+ data table. </p>
 
-<p class="whs7">To 
- construct curve lines, you should choose at least two columns of the data 
- table by checking them in the <span style="font-weight: bold;"><B>Axis</B></span> 
+<p class="whs7">To construct curve lines, you should choose 
+ at least two columns of the data table by checking them in the <span style="font-weight: bold;"><B>Axis</B></span> 
  part of the &nbsp;dialog 
  box:</p>
 
 <ul type="disc" class="whs8">
        
-       <li class=kadov-p><p class="whs7"><span 
- style="font-weight: bold;"><B>H</B></span> - the values of this column will correspond 
- to X-coordinates of the curve.</p></li>
+       <li class=kadov-p><p class="whs9"><span 
+ style="font-weight: bold;"><B>H</B></span> (horisontal) - the values of this 
column will correspond to X-coordinates of the curve.</p></li>
        
-       <li class=kadov-p><p class="whs7"><span 
- style="font-weight: bold;"><B>V</B></span> - the values of this column will correspond 
- to Y-coordinates of the curve.</p></li>
+       <li class=kadov-p><p class="whs9"><span 
+ style="font-weight: bold;"><B>V</B></span> (vertical) - the values of this column 
will correspond to Y-coordinates of the curve.</p></li>
 </ul>
 
-<p class="whs9">&nbsp;</p>
-
-<p class="whs7">To 
- define the &nbsp;<span style="font-weight: bold;"><B>Attributes 
- </B></span>of your curve<span> remove the checkmark from </span><span style="font-weight: bold;"><B>Auto 
- assign </B></span><span>&nbsp;(if 
- it is checked, default attributes are taken) and select</span><span style="font-family: 'Times New Roman', serif; margin-left: 40px;">:</span></p>
+<p class="whs7"><br>
+The column <span style="font-weight: bold;"><B>Assigned</B></span> allows to represent 
+ the values assigned to the points of the curve (possible for V-rows only). 
+ Any row, even coinciding with the current or empty (no values assigned), 
+ can be represented. All values are indicated with tool tips over the corresponding 
+ curve points in the Plot2d viewer <br>
+<br>
+To define the &nbsp;<span style="font-weight: bold;"><B>Attributes 
+ </B></span>of your curve remove the checkmark from <span style="font-weight: bold;"><B>Auto 
+ assign </B></span>&nbsp;(if 
+ it is checked, default attributes are taken) and select<span style="margin-left: 40px;">:</span></p>
 
 <ul type="disc" class="whs8">
        
-       <li class=kadov-p><p class="whs7"><span 
+       <li class=kadov-p><p class="whs9"><span 
  style="font-weight: bold;"><B>Line type </B></span>(None, Solid, Dash, Dot, Dash 
  - Dot, Dash - Dot - Dot),</p></li>
        
@@ -193,29 +197,29 @@ if (window.writeIntopicBar)
  columns of your data table with the same units. <span style="font-weight: bold;"><B>Post-Pro</B></span> 
  allows to display at once up to 200 curves. </p>
 
-<p class="whs9">&nbsp;</p>
+<p class="whs14">&nbsp;</p>
 
-<p class="whs7">4. 
+<p class="whs9">4. 
  &nbsp;Click <span 
  style="font-weight: bold;"><B>OK </B></span>to create your curves with the given 
  parameters. <span style="font-weight: bold;"><B>Post-Pro</B></span> will automatically 
  create your curve or curves in the structure of the study under two SALOME 
  objects:</p>
 
-<p class="whs14">- &nbsp;SALOME 
+<p class="whs15">- &nbsp;SALOME 
  table object,</p>
 
-<p class="whs14">- &nbsp;<span 
+<p class="whs15">- &nbsp;<span 
  style="font-weight: bold;"><B>Plot2DView </B></span>object: 
  SALOME container of curve lines which will be created automatically. </p>
 
-<p class="whs7">&nbsp;</p>
+<p class="whs9">&nbsp;</p>
 
-<p class="whs15">&nbsp;</p>
+<p class="whs16">&nbsp;</p>
 
-<p class="whs7">&nbsp;</p>
+<p class="whs9">&nbsp;</p>
 
-<p class="whs16">&nbsp;</p>
+<p class="whs17">&nbsp;</p>
 
 <script type="text/javascript" language="javascript1.2">
 <!--
index cea0b478fd82d71951247d89a15e24fd4893f73a..567b6fc0f27bf8a1a4963c0a67ffbb229b8bef96 100755 (executable)
@@ -15,8 +15,8 @@ if (navigator.appName !="Netscape")
 <style type="text/css">
 <!--
 p.whs1 { margin-left:40px; }
-img_whs2 { border:none; width:170px; height:219px; }
-img_whs3 { border:none; width:195px; height:101px; }
+img_whs2 { border:none; width:170px; height:219px; border-style:none; }
+img_whs3 { border:none; width:195px; height:101px; border-style:none; }
 img_whs4 { border:none; width:395px; height:189px; float:none; border-style:none; }
 img_whs5 { border:none; width:109px; height:75px; border-style:none; }
 p.whs6 { margin-left:0px; }
@@ -109,7 +109,8 @@ if (window.writeIntopicBar)
  - hides all previously displayed curves from the viewer. </p>
 
 <p class="whs1"><span style="font-weight: bold;"><B>Rename</B></span> 
- - allows to rename the XY plot. </p>
+ - allows to rename the object currently selected in the Object Browser 
+ (table, curve or XY plot). </p>
 
 <p class="whs1">&nbsp;</p>
 
diff --git a/doc/salome/gui/VISU/pics/createcurves.png b/doc/salome/gui/VISU/pics/createcurves.png
new file mode 100755 (executable)
index 0000000..82b50a0
Binary files /dev/null and b/doc/salome/gui/VISU/pics/createcurves.png differ
index e01c54f278c9aad5a52429d00ed345da27794947..a655daa9db083625e7e250a6fad4c2a778b3768a 100755 (executable)
@@ -211,7 +211,6 @@ image43.gif
 image10.gif
 pics\image88.gif
 pics\warning.png
-pics\setupplot2d.png
 pics\importtablefromfile.png
 pics\surface.jpg
 image11.gif
@@ -326,6 +325,7 @@ pics\viewtable.png
 pics\vecticon.jpg
 pics\shrink.jpg
 i_blue.jpg
+pics\createcurves.png
 pics\image50.gif
 pics\image83.gif
 pics\image109.gif
index ad8f8d4c02390617c920bfae6dadddd64339d984..bc99598c0fddb92b64ef712c044ba6afadc9d5ae 100755 (executable)
@@ -597,4 +597,4 @@ function window_OnLoad()
 }
 //-->
 </script>
-</html>
\ No newline at end of file
+</html>
index 78cf6e3e90b22a33beee14c41468740cb2d988f0..15fe687bef5929cf58aefd887579e8a00045f561 100755 (executable)
@@ -15,4 +15,4 @@ iTM(0,40,"whftdata0.htm");
 //-->
 </script>
 </body>
-</html>
\ No newline at end of file
+</html>
index 827fe63c9674286ba82a962fd4a3710c3e9a9745..03b69286a798e077fe6e097e4d31e3ba03631fb4 100755 (executable)
@@ -54,8 +54,7 @@
      aTE(2,0,"Creating XY plots","files/creating_xy_plot.htm");
      aTE(2,0,"Plot2D Viewer","plot2d_viewer.htm");
      aTE(2,0,"Setting properties of XY plots","files/setting_properties_of_xy_plots.htm");
-   aTE(2,0,"Access to Post-Pro module functionality from Python (using VISU_Gen.idl)","visugenidl_doc/VISU__Gen_8idl.html");
-
+aTE(2,0,"Access to Post-Pro module functionality from Python (using VISU_Gen.idl)","visugenidl_doc/VISU__Gen_8idl.html");
 //-->
 </script>
 </body>
index e01bedde668f4d56f0d4f66ee82cba60a2f1aa27..0f8f90ab6c9ca2fd3f403b5115b73d98a33e1593 100755 (executable)
@@ -133,4 +133,4 @@ else
 //-->
 </script>
 </body>
-</html>
\ No newline at end of file
+</html>
index ad8862182ecdbbc4fb8da13bd70e5546ad612c65..d412744b016710553c6d53f58264869efea3643e 100755 (executable)
@@ -88,4 +88,4 @@ else
 //-->
 </script>
 </body>
-</html>
\ No newline at end of file
+</html>
index bb3ef3efabfd8ab38f13e1b729f0140d6eb9834f..41c48172cb26cf65331870cc2759c6a840ebe397 100755 (executable)
@@ -22,4 +22,4 @@ window.onload=window_Onload;
 </head>
 
 <frameset id="whPfset" cols="260,*"><noframes><p>Your browser does not support frames. We recommend that you update your browser to a version that supports frames.</p><p>To view the Help system without frames click on this<a href="whgdata/whnvp30.htm">hyperlink.</a></p></noframes><frame src="whgdata/whnvp30.htm" title="navigation pane" name="navigation pane" scrolling="no"><frame src="files/introduction.htm" title="topic pane" name="bsscright" scrolling="yes"></frameset>
-</html>
\ No newline at end of file
+</html>
index b79fae0147f3f4568eb85b357d585dc79a3bebfb..1d279bbc323288249739142b9dca47807b4658e1 100755 (executable)
                        <indent attr="9pt" />
                </glossary>
        </paneskin>
-</resource>
\ No newline at end of file
+</resource>
index 11f124b8aefa59e1e8924403a583dc4be6b0956b..ac47c25250b1e52262626074a8bb58ee6eb047a5 100755 (executable)
@@ -17,4 +17,4 @@
 <tr><td> Authoring Tool Name </td><td>RoboHelp X5</td></tr>
 <table>
 </body>
-</html>
\ No newline at end of file
+</html>
index d06481fca10bc9c5e6b2fffee449a57d94225c4d..c3469d79fe159d096c3c894a95721260e7994951 100755 (executable)
@@ -226,4 +226,4 @@ writeStyle();
 
 </body>
 
-</html>
\ No newline at end of file
+</html>
index 6fa36cda30ae8512b5b6d9b889cc007ca4fd0c92..08b4b82b7c4a6f7c10dd4e04a7ab43771326e984 100755 (executable)
@@ -429,4 +429,4 @@ function isAPane(sPaneName)
                return true;
        else
                return false;
-}
\ No newline at end of file
+}
index 5c1b6d723a311019edd0e18f45f8c5a1bc6a93bf..e94f97f2567879f6ddab108b1e581fb1ab57d59d 100755 (executable)
@@ -46,4 +46,4 @@ TocInitPage();
 //-->
 </script>
 </body>
-</html>
\ No newline at end of file
+</html>
index e9d9cd19a9b006aa996f3632e48c43eedf17743d..52198a574fffc44772acb2e9c997750050824a67 100755 (executable)
@@ -722,4 +722,4 @@ setButtonFont("hide","","","","","","");
        gbWhTopic=true;
 }
 else
-       document.location.reload();
\ No newline at end of file
+       document.location.reload();
index 5af3461535f651a91a8a76ca62ece2ac14a3ec53..4e9b495ddf337019cb2b13b4cc2ad2f751e34dde 100755 (executable)
@@ -52,7 +52,8 @@
     <item name="Plot2D Viewer" url="plot2d_viewer.htm" />
     <item name="Setting properties of XY plots" url="files/setting_properties_of_xy_plots.htm" />
   </book>
-  <item name="Access to Post-Pro module functionality from Python (using VISU_Gen.idl)" url="visugenidl_doc/VISU__Gen_8idl.html" />
+<item name="Access to Post-Pro module functionality from Python (using VISU_Gen.idl)" url="visugenidl_doc/VISU__Gen_8idl.html" />
+
 </book>
 
 </tocdata>
index 286f83a6e0d96fc355f337a675ae424ce2223d0a..712af448879bf43c549b5a560775ffa7d4f51487 100644 (file)
@@ -31,7 +31,7 @@ doxygen=@DOXYGEN@
 
 @COMMENCE@
 
-usr_docs:
+dev_docs:
        cp -fr $(srcdir)/VISU ./INPUT; \
        cp -fr ./VISU/doxyfile ./INPUT; \
        cp -fr ./VISU/sources/static/tree.js ./INPUT/sources/static; \
index 4bb0aecede315cfb8d19c690a328926e02de68c0..2f1d27f9c008597788b7deadc7c690724a4c0ff7 100644 (file)
@@ -1594,6 +1594,16 @@ module VISU {
      * \param VRow  Index of the row in the table:  ordinate of the point.
      */
     Curve CreateCurve(in Table theTable, in long theHRow, in long theVRow);
+    
+    /*!
+     * Creates a curve on the basis of points, whose values are taken from the table.
+     * Each point has also assigned value, that will be shown as tooltip in Plot2d 
+     * \param theTable  Table containing the data for construction of curves.
+     * \param HRow  Index of the row in the table:  abscissa of the point.
+     * \param VRow  Index of the row in the table:  ordinate of the point.
+     * \param ZRow  Index of the row in the table:  assigned value (so-called as Z).
+     */    
+    Curve CreateCurveWithZ( in Table theTable, in long theHRow, in long theVRow, in long theZRow );
 
     /*!
      * Creates a presentation form containing an array of references to the curves.
index adf42a07c10ccec5eab179c0a2417723d647336b..ca9b14e8866326f79e9998155361beb3ef5c9eb5 100644 (file)
@@ -59,8 +59,8 @@
     <parameter name="point_sprite_results"   value="true"/>
     <parameter name="point_sprite_primitive_type"  value="0"  />
     <parameter name="point_sprite_clamp"           value="256"/>
-    <parameter name="point_sprite_main_texture"    value="${VISU_ROOT_DIR}/share/salome/resources/sprite_texture.bmp" />
-    <parameter name="point_sprite_alpha_texture"   value="${VISU_ROOT_DIR}/share/salome/resources/sprite_alpha.bmp" />
+    <parameter name="point_sprite_main_texture"    value="${VISU_ROOT_DIR}/share/salome/resources/visu/sprite_texture.bmp" />
+    <parameter name="point_sprite_alpha_texture"   value="${VISU_ROOT_DIR}/share/salome/resources/visu/sprite_alpha.bmp" />
     <parameter name="point_sprite_alpha_threshold" value="0.5"/>
     <parameter name="point_sprite_min_size"      value="10" />
     <parameter name="point_sprite_max_size"      value="33" />
@@ -72,8 +72,8 @@
     <parameter name="geom_sphere_face_limit"     value="50000"/>
     <parameter name="inside_point_sprite_primitive_type"   value="0"  />
     <parameter name="inside_point_sprite_clamp"            value="256"/>
-    <parameter name="inside_point_sprite_main_texture"     value="${VISU_ROOT_DIR}/share/salome/resources/sprite_texture.bmp" />
-    <parameter name="inside_point_sprite_alpha_texture"    value="${VISU_ROOT_DIR}/share/salome/resources/sprite_alpha.bmp" />
+    <parameter name="inside_point_sprite_main_texture"     value="${VISU_ROOT_DIR}/share/salome/resources/visu/sprite_texture.bmp" />
+    <parameter name="inside_point_sprite_alpha_texture"    value="${VISU_ROOT_DIR}/share/salome/resources/visu/sprite_alpha.bmp" />
     <parameter name="inside_point_sprite_alpha_threshold"  value="0.5"/>
     <parameter name="inside_point_sprite_min_size"         value="10" />
     <parameter name="inside_point_sprite_max_size"         value="33" />
@@ -83,8 +83,8 @@
     <parameter name="inside_geom_sphere_face_limit"        value="50000"/>
     <parameter name="outside_point_sprite_primitive_type"  value="0"  />
     <parameter name="outside_point_sprite_clamp"           value="256"/>
-    <parameter name="outside_point_sprite_main_texture"    value="${VISU_ROOT_DIR}/share/salome/resources/sprite_texture.bmp" />
-    <parameter name="outside_point_sprite_alpha_texture"   value="${VISU_ROOT_DIR}/share/salome/resources/sprite_alpha.bmp" />
+    <parameter name="outside_point_sprite_main_texture"    value="${VISU_ROOT_DIR}/share/salome/resources/visu/sprite_texture.bmp" />
+    <parameter name="outside_point_sprite_alpha_texture"   value="${VISU_ROOT_DIR}/share/salome/resources/visu/sprite_alpha.bmp" />
     <parameter name="outside_point_sprite_alpha_threshold" value="0.5"/>
     <parameter name="outside_point_sprite_size"      value="25"  />
     <parameter name="outside_point_sprite_uniform"   value="true"/>
   </section>
   <section name="resources">
     <!-- Module resources -->
-    <parameter name="VISU" value="${VISU_ROOT_DIR}/share/salome/resources"/>
+    <parameter name="VISU" value="${VISU_ROOT_DIR}/share/salome/resources/visu"/>
   </section>
 </document>
index da1bdf3acdab897ccdad623d4e69a2a66a36db76..88d0bd9f1aa034e662662ab091a0a23ddb86b6a5 100644 (file)
@@ -399,7 +399,7 @@ namespace VISU
   ::GetVTKOutput()
   {
     if(!myFilter.GetPointer()){
-      const TVTKAppendFilter& anAppendFilter = myIDMapper.GetFilter();
+      const TVTKAppendFilter& anAppendFilter = myIDMapper->GetFilter();
       TVTKOutput* aGeometry = anAppendFilter->GetOutput();
       
       const TVTKSource& aSource = mySource.GetSource();
@@ -419,42 +419,42 @@ namespace VISU
   TIDMapperFilter
   ::GetNodeObjID(vtkIdType theID) const
   {
-    return myIDMapper.GetNodeObjID(theID);
+    return myIDMapper->GetNodeObjID(theID);
   }
   
   vtkIdType
   TIDMapperFilter
   ::GetNodeVTKID(vtkIdType theID) const
   {
-    return myIDMapper.GetNodeVTKID(theID);
+    return myIDMapper->GetNodeVTKID(theID);
   }
 
   vtkFloatingPointType*  
   TIDMapperFilter
   ::GetNodeCoord(vtkIdType theObjID)
   {
-    return myIDMapper.GetNodeCoord(theObjID);
+    return myIDMapper->GetNodeCoord(theObjID);
   }
 
   vtkIdType
   TIDMapperFilter
   ::GetElemObjID(vtkIdType theID) const
   {
-    return myIDMapper.GetElemObjID(theID);
+    return myIDMapper->GetElemObjID(theID);
   }
 
   vtkIdType
   TIDMapperFilter
   ::GetElemVTKID(vtkIdType theID) const
   {
-    return myIDMapper.GetElemVTKID(theID);
+    return myIDMapper->GetElemVTKID(theID);
   }
 
   vtkCell* 
   TIDMapperFilter
   ::GetElemCell(vtkIdType theObjID)
   {
-    return myIDMapper.GetElemCell(theObjID);
+    return myIDMapper->GetElemCell(theObjID);
   }
   
 
@@ -1108,7 +1108,9 @@ namespace
        int aMeshDimension = theMesh->myDim;
        bool anIsDimPresent[3] = {false, false, false};
        for(int iDim = 0; iDim < aMeshDimension; iDim++){
-         const std::string& aName = aCoords.GetName(iDim);
+         std::string aName = aCoords.GetName(iDim);
+          if ( aName.size() > 1 ) // PAL13021 (PAL12148), aName has size 8 or 16
+            aName = aName.substr(0,1);
          if(aName == "x" || aName == "X")
            anIsDimPresent[eX] = true;
          else if(aName == "y" || aName == "Y")
@@ -1276,9 +1278,9 @@ namespace
        vtkIdType anID = *aSubMeshIDIter;
        PrintCells(i,aConnectivity,anArray[anID]);
        aCellTypesArray->SetValue(j++,(unsigned char)aVGeom);
-
-       anElemObj2VTKID[anID] = i;
-       aMeshID[i] = anID;
+       vtkIdType anObjID = aSubMesh.GetElemObjID(anID);
+       anElemObj2VTKID[anObjID] = i;
+       aMeshID[i] = anObjID;
       }
     }
     vtkIdType *pts = 0, npts = 0;
@@ -2024,7 +2026,7 @@ VISU_Convertor_impl
       TFamilyArr& aFamilyArr = aGroup->myFamilyArr;
       aFamilyArr.resize(aFamilySet.size());
 
-      for(vtkIdType anID = 0; anIter != aFamilySet.end(); anIter++){
+      for(vtkIdType anID = 0; anIter != aFamilySet.end(); anIter++, anID++){
        PFamilyImpl aFamily = *anIter;
        const std::string& aFamilyName = aFamily->myName;
        const VISU::TEntity& anEntity = aFamily->myEntity;
@@ -2033,9 +2035,10 @@ VISU_Convertor_impl
        VISU::TVTKOutput* anOutput = anIDMapper->GetVTKOutput();
        anAppendFilter->AddInput(anOutput);
 
+       vtkIdType aStartID = anElemObj2VTKID.size();
        vtkIdType aNbCells = anOutput->GetNumberOfCells();
        for(vtkIdType aCellID = 0; aCellID < aNbCells; aCellID++){
-         anElemObj2VTKID[aFamily->GetElemObjID(aCellID)] = aCellID;
+         anElemObj2VTKID[aFamily->GetElemObjID(aCellID)] = aStartID + aCellID;
        }
        aFamilyArr[anID] = aFamily;
       }
index ee1027139b21219703c46e9b21f2a899c7e82f79..578f4a3643645ff3debac28b9aecc941a6703466 100644 (file)
@@ -165,6 +165,7 @@ namespace VISU
     TVTKOutput* 
     GetVTKOutput();
   };
+  typedef SharedPtr<TAppendFilter> PAppendFilter;
 
 
   //---------------------------------------------------------------
@@ -387,7 +388,7 @@ namespace VISU
   //! Specialize TIDMapper to provide VTK mapping for MED TIMESTAMP mesh
   struct VISU_CONVERTOR_EXPORT TIDMapperFilter: virtual TMergeFilter
   {
-    TAppendFilter myIDMapper; //!< Responsible for numbering
+    PAppendFilter myIDMapper; //!< Responsible for numbering
     TSource mySource; //!< Keeps assigned data
 
     //! Reimplement the TIDMapper::GetNodeObjID
index f8321d71665991fff105b6bcf40f8da618ea073e..d1658e3202c49f02b8a6400e67480afb98b0659c 100644 (file)
@@ -17,7 +17,7 @@
 //  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
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //
 //  File   : VISU_MedConvertor.cxx
 #include "MED_GaussUtils.hxx"
 #include "MED_Utilities.hxx"
 
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#define NO_CAS_CATCH
+#endif
+
+#include <Standard_Failure.hxx>
+
+#ifdef NO_CAS_CATCH
+#include <Standard_ErrorHandler.hxx>
+#else
 #include "CASCatch.hxx"
+#endif
 
 #include <vtkCellType.h>
 
@@ -61,8 +71,8 @@ static int MY_GROUP_DEBUG = 0;
 #define _LOAD_FAMILIES_
 #define _EDF_NODE_IDS_
 
-namespace VISU
-{
+//namespace
+//{
   //---------------------------------------------------------------
   vtkIdType
   MEDGeom2NbNodes(MED::EGeometrieElement theMEDGeomType)
@@ -410,6 +420,8 @@ namespace VISU
                 "; aNbCells = "<<aGaussSubMesh->myNbCells<<
                 "; aCellsSize = "<<aGaussSubMesh->myCellsSize<<
                 endl);
+
+       //break;
       }
     }
 
@@ -645,7 +657,7 @@ namespace VISU
       aMeshOnEntity->myEntity = aVEntity;
       aMeshOnEntity->myMeshName = aMeshName;
       aMeshOnEntity->myGeom2Size = aGeom2Size;
-//       TFamilyID2CellsSize& aFamilyID2CellsSize = aMeshOnEntity->myFamilyID2CellsSize;
+      TFamilyID2CellsSize& aFamilyID2CellsSize = aMeshOnEntity->myFamilyID2CellsSize;
 
       INITMSG(MYDEBUG,
              "- aMEntity = "<<aMEntity<<
@@ -656,12 +668,12 @@ namespace VISU
        aMeshOnEntity->myNbCells = theGrilleInfo->GetNbNodes();
        aMeshOnEntity->myCellsSize = 2*theGrilleInfo->GetNbNodes();
 
-       // must be implemented (shadow point for GRILLE STANDARD,CARTESIAN,...)
-//     for(TInt iElem = 0; iElem < theMesh->myNbPoints; iElem++){
-//       TInt aFamId = theNodeInfo->GetFamNum(iElem);
-//       if(aFamId != 0)
-//         aFamilyID2CellsSize[aFamId] += 2;
-//     }
+       if((theGrilleInfo->myFamNumNode).size() > 0)
+       for(TInt iElem = 0; iElem < theGrilleInfo->GetNbNodes(); iElem++){
+         TInt aFamId = theGrilleInfo->GetFamNumNode(iElem);
+         if(aFamId != 0)
+           aFamilyID2CellsSize[aFamId] += 2;
+       }
        
        INITMSG(MYDEBUG,
                "- myNbCells = "<<aMeshOnEntity->myNbCells<<
@@ -687,11 +699,12 @@ namespace VISU
                  "; myCellsSize = "<<aMeshOnEntity->myCellsSize<<
                  endl);
          
-//       for(TInt iElem = 0; iElem < aNbElem; iElem++){
-//         TInt aFamId = aCellInfo->GetFamNum(iElem);
-//         if(aFamId != 0)
-//           aFamilyID2CellsSize[aFamId] += aVNbNodes + 1;
-//       }
+         if((theGrilleInfo->myFamNum).size() > 0)
+         for(TInt iElem = 0; iElem < aNbElem; iElem++){
+           TInt aFamId = theGrilleInfo->GetFamNum(iElem);
+           if(aFamId != 0)
+             aFamilyID2CellsSize[aFamId] += aVNbNodes + 1;
+         }
        }
        
       }
@@ -856,6 +869,74 @@ namespace VISU
     }
   }
 
+  
+  /*!
+   * Build grille family map
+   */
+  void
+  BuildGrilleFamilyMap(PMEDMesh theMesh,
+                      const MED::TEntityInfo& theEntityInfo,
+                      const MED::TFamilyInfoSet& theFamilyInfoSet,
+                      MED::PWrapper theMEDWrapper)
+  {
+    TTimerLog aTimerLog(MYDEBUG,"BuildGrilleFamilyMap");
+    INITMSG(MYDEBUG,"BuildGrilleFamilyMap\n");
+    
+    TMeshOnEntityMap& aMeshOnEntityMap = theMesh->myMeshOnEntityMap;
+
+    MED::TEntityInfo::const_iterator aEntityIter = theEntityInfo.begin();
+
+    const MED::PMeshInfo& aMeshInfo = theMesh->myMeshInfo;
+    MED::PGrilleInfo aGrilleInfo = theMEDWrapper->GetPGrilleInfo(aMeshInfo);
+
+    const MED::TFamilyID2NbCells& aFam2NbCells = MED::GetFamilyID2NbCells(aGrilleInfo);
+
+    MED::TFamilyInfoSet::const_iterator aFamInter = theFamilyInfoSet.begin();
+    for(;aFamInter != theFamilyInfoSet.end();aFamInter++){
+      TInt anId = (*aFamInter)->GetId();
+
+      if(anId == 0)
+       continue;
+
+      std::string aFamilyName = (*aFamInter)->GetName();
+      const MED::EEntiteMaillage& aMEntity = MED::GetEntityByFamilyId(aGrilleInfo,
+                                                                     anId);
+      TEntity aVEntity = MEDEntityToVTK(aMEntity);
+
+      PMEDMeshOnEntity aMeshOnEntity;
+      TMeshOnEntityMap::iterator aMeshOnEntityIter = aMeshOnEntityMap.find(aVEntity);
+      if(aMeshOnEntityIter != aMeshOnEntityMap.end())
+       aMeshOnEntity = aMeshOnEntityIter->second;
+
+      TFamilyMap& aFamilyMap = aMeshOnEntity->myFamilyMap;
+
+      PMEDFamily aFamily = aFamilyMap[aFamilyName](new TMEDFamily());
+      aFamily->myId = anId;
+      aFamily->myEntity = aVEntity;
+      aFamily->myName = aFamilyName;
+      aFamily->myNbCells = 0;
+      aFamily->myCellsSize = 0;
+
+      TFamilyID2CellsSize::iterator aFamilyid2CellsSizeIter = (aMeshOnEntity->myFamilyID2CellsSize).find(anId);
+      if(aFamilyid2CellsSizeIter != (aMeshOnEntity->myFamilyID2CellsSize).end())
+       aFamily->myCellsSize = aFamilyid2CellsSizeIter->second;
+      MED::TFamilyID2NbCells::const_iterator aFam2NbCellsIter = aFam2NbCells.find(anId);
+      if(aFam2NbCellsIter != aFam2NbCells.end())
+       aFamily->myNbCells = aFam2NbCellsIter->second;
+
+      INITMSG(MY_FAMILY_DEBUG,
+             "- aFamilyName =|"<<aFamily->myName<<"|"
+             << "; myId = "<<aFamily->myId
+             << "; aNbAttr = "<<(*aFamInter)->GetNbAttr()
+             << "; aNbGroup = "<<(*aFamInter)->GetNbGroup()
+             << "; aVEntity = "<<aVEntity
+             << "; myNbCells = "<<aFamily->myNbCells
+             << "; myCellsSize = "<<aFamily->myCellsSize
+             <<endl);
+
+
+    }
+  }
 
   //---------------------------------------------------------------
   void
@@ -1051,7 +1132,7 @@ namespace VISU
     }
 
   };
-}
+//}
 
 
 //---------------------------------------------------------------
@@ -1328,8 +1409,13 @@ VISU_MedConvertor
            INITMSG(MYDEBUG,"- iTimeStamp = "<<iTimeStamp<<endl);
            
 #ifndef _DEXCEPT_
-           CASCatch_TRY{ 
-             try{
+#ifdef NO_CAS_CATCH
+            try{
+              OCC_CATCH_SIGNALS;
+#else
+            CASCatch_TRY{
+              try{
+#endif
 #endif
                MED::PTimeStampInfo aTimeStampInfo = aMed->GetPTimeStampInfo(aFieldInfo,
                                                                             aMEntity,
@@ -1399,15 +1485,26 @@ VISU_MedConvertor
                  }
                }
 #ifndef _DEXCEPT_
+#ifdef NO_CAS_CATCH
+              }catch(Standard_Failure){
+               Handle(Standard_Failure) aFail = Standard_Failure::Caught();          
+               MSG(MYDEBUG,"Follow signal was occured in:\n"<<aFail->GetMessageString());
              }catch(std::exception& exc){
                MSG(MYDEBUG,"Follow exception was occured in:\n"<<exc.what());
              }catch(...){
                MSG(MYDEBUG,"Unknown exception !!!");
              }
-           }CASCatch_CATCH(Standard_Failure){
-             Handle(Standard_Failure) aFail = Standard_Failure::Caught();          
-             MSG(MYDEBUG,"Follow signal was occured in:\n"<<aFail->GetMessageString());
-           }
+#else
+             }catch(std::exception& exc){
+               MSG(MYDEBUG,"Follow exception was occured in:\n"<<exc.what());
+             }catch(...){
+               MSG(MYDEBUG,"Unknown exception !!!");
+             }
+            }CASCatch_CATCH(Standard_Failure){
+              Handle(Standard_Failure) aFail = Standard_Failure::Caught();          
+              MSG(MYDEBUG,"Follow signal was occured in:\n"<<aFail->GetMessageString());
+            }
+#endif
 #endif
          }
          for(TInt iComp = 0; iComp <= aNbComp; iComp++){
@@ -1469,6 +1566,8 @@ VISU_MedConvertor
 
       INITMSG(MYDEBUG,"aMeshName = '"<<aMeshName<<"'\n");
 
+      MED::EMaillage aType = aMeshInfo->GetType();
+      
       MED::TEntityInfo anEntityInfo = aMed->GetEntityInfo(aMeshInfo);
       
       MED::TEntity2TGeom2ElemInfo anEntity2TGeom2ElemInfo = 
@@ -1479,11 +1578,17 @@ VISU_MedConvertor
 #endif
        MED::TFamilyInfoSet aFamilyInfoSet = MED::GetFamilyInfoSet(aMed,aMeshInfo);
        
-       BuildFamilyMap(aMesh,
-                      anEntityInfo,
-                      anEntity2TGeom2ElemInfo,
-                      aFamilyInfoSet,
-                      aMed);
+       if(aType == MED::eNON_STRUCTURE)
+         BuildFamilyMap(aMesh,
+                        anEntityInfo,
+                        anEntity2TGeom2ElemInfo,
+                        aFamilyInfoSet,
+                        aMed);
+       else
+         BuildGrilleFamilyMap(aMesh,
+                              anEntityInfo,
+                              aFamilyInfoSet,
+                              aMed);
        
        BuildGroupMap(aMesh,
                      aFamilyInfoSet);
@@ -1491,7 +1596,7 @@ VISU_MedConvertor
       }catch(std::exception& exc){
        MSG(MYDEBUG,"Follow exception was occured in:\n"<<exc.what());
       }catch(...){
-       MSG(MYDEBUG,"Unknown exception !!!");
+         MSG(MYDEBUG,"Unknown exception !!!");
       }
 #endif
 
@@ -1717,6 +1822,7 @@ VISU_MedConvertor
       aCell2Connect.resize(aNbElem);
       for (int iElem = 0; iElem < aNbElem; iElem++)
        aCell2Connect[iElem] = VISU::TConnect(1,iElem);
+      
     }
     
     theMesh->myIsDone = true;
@@ -1745,16 +1851,33 @@ VISU_MedConvertor
     if(theFamily->myIsDone) 
       return 0;
 
+    const MED::PMeshInfo& aMeshInfo = theMesh->myMeshInfo;
+    MED::EMaillage aType = aMeshInfo->GetType();
+
     //Main part of code
-    MED::PNodeInfo aNodeInfo = theMed->GetPNodeInfo(theMesh->myMeshInfo);
-    TInt aNbElem = aNodeInfo->GetNbElem();
-
-    if(aNbElem > 0){
-      TInt anId = theFamily->myId;
-      TSubMeshID& aSubMeshID = theFamily->myGeom2SubMeshID[VISU::ePOINT1];
-      for(TInt iElem = 0; iElem < aNbElem; iElem++) 
-       if(aNodeInfo->GetFamNum(iElem) == anId)
-         aSubMeshID.push_back(iElem);
+    if(aType==MED::eNON_STRUCTURE){
+      MED::PNodeInfo aNodeInfo = theMed->GetPNodeInfo(theMesh->myMeshInfo);
+      TInt aNbElem = aNodeInfo->GetNbElem();
+      
+      if(aNbElem > 0){
+       TInt anId = theFamily->myId;
+       TSubMeshID& aSubMeshID = theFamily->myGeom2SubMeshID[VISU::ePOINT1];
+       for(TInt iElem = 0; iElem < aNbElem; iElem++) 
+         if(aNodeInfo->GetFamNum(iElem) == anId)
+           aSubMeshID.push_back(iElem);
+      }
+    }
+    else {
+      MED::PGrilleInfo aGrilleInfo = theMed->GetPGrilleInfo(aMeshInfo);
+      TInt aNbElem = aGrilleInfo->GetNbNodes();
+      
+      if(aNbElem > 0){
+       TInt anId = theFamily->myId;
+       TSubMeshID& aSubMeshID = theFamily->myGeom2SubMeshID[VISU::ePOINT1];
+       for(TInt iElem = 0; iElem < aNbElem; iElem++) 
+         if(aGrilleInfo->GetFamNumNode(iElem) == anId)
+           aSubMeshID.push_back(iElem);
+      }
     }
 
     theFamily->myIsDone = true;
@@ -2146,35 +2269,54 @@ VISU_MedConvertor
 
     const MED::PMeshInfo& aMeshInfo = theMesh->myMeshInfo;
     TGeom2SubMeshID& aGeom2SubMeshID = theFamily->myGeom2SubMeshID;
+    MED::EMaillage aType = aMeshInfo->GetType();
 
     const MED::TGeom2Size& aGeom2Size = theMeshOnEntity->myGeom2Size;
     MED::TGeom2Size::const_iterator aGeom2SizeIter = aGeom2Size.begin();
     for(; aGeom2SizeIter != aGeom2Size.end(); aGeom2SizeIter++){
       const MED::EGeometrieElement& aMGeom = aGeom2SizeIter->first;
-      MED::PElemInfo anElemInfo;
-      switch(aMGeom){
-      case MED::ePOLYGONE: {
-       anElemInfo = theMed->GetPPolygoneInfo(aMeshInfo,aMEntity,aMGeom);
-       break;
-      }
-      case MED::ePOLYEDRE: {
-       anElemInfo = theMed->GetPPolyedreInfo(aMeshInfo,aMEntity,aMGeom);
-       break;
-      }
-      default: {
-       anElemInfo = theMed->GetPCellInfo(aMeshInfo,aMEntity,aMGeom);
-       break;
-      }}
-      if(anElemInfo){
-       if(TInt aNbElem = anElemInfo->GetNbElem()){
-         TSubMeshID aSubMeshID;
-         for(TInt iElem = 0; iElem < aNbElem; iElem++) 
-           if(anElemInfo->GetFamNum(iElem) == anId)
-             aSubMeshID.push_back(iElem);
-         if(!aSubMeshID.empty()){
-           VISU::EGeometry aEGeom = MEDGeom2VISU(aMGeom);
-           INITMSG(MYDEBUG,"aMGeom = "<<aMGeom<<"\n");
-           aGeom2SubMeshID.insert(TGeom2SubMeshID::value_type(aEGeom,aSubMeshID));
+      if(aType == MED::eNON_STRUCTURE){
+       MED::PElemInfo anElemInfo;
+       switch(aMGeom){
+       case MED::ePOLYGONE: {
+         anElemInfo = theMed->GetPPolygoneInfo(aMeshInfo,aMEntity,aMGeom);
+         break;
+       }
+       case MED::ePOLYEDRE: {
+         anElemInfo = theMed->GetPPolyedreInfo(aMeshInfo,aMEntity,aMGeom);
+         break;
+       }
+       default: {
+         anElemInfo = theMed->GetPCellInfo(aMeshInfo,aMEntity,aMGeom);
+         break;
+       }}
+       if(anElemInfo){
+         if(TInt aNbElem = anElemInfo->GetNbElem()){
+           TSubMeshID aSubMeshID;
+           for(TInt iElem = 0; iElem < aNbElem; iElem++) 
+             if(anElemInfo->GetFamNum(iElem) == anId)
+               aSubMeshID.push_back(iElem);
+           if(!aSubMeshID.empty()){
+             VISU::EGeometry aEGeom = MEDGeom2VISU(aMGeom);
+             INITMSG(MYDEBUG,"aMGeom = "<<aMGeom<<"\n");
+             aGeom2SubMeshID.insert(TGeom2SubMeshID::value_type(aEGeom,aSubMeshID));
+           }
+         }
+       }
+      } else {
+       MED::PGrilleInfo anElemInfo = theMed->GetPGrilleInfo(aMeshInfo);
+       if(anElemInfo){
+         TInt aNbElem = anElemInfo->GetNbCells();
+         if(aNbElem>0 && (aMGeom == anElemInfo->GetGeom()) ){
+           TSubMeshID aSubMeshID;
+           for(TInt iElem = 0; iElem < aNbElem; iElem++) 
+             if(anElemInfo->GetFamNum(iElem) == anId)
+               aSubMeshID.push_back(iElem);
+           if(!aSubMeshID.empty()){
+             VISU::EGeometry aEGeom = MEDGeom2VISU(aMGeom);
+             INITMSG(MYDEBUG,"aMGeom = "<<aMGeom<<"\n");
+             aGeom2SubMeshID.insert(TGeom2SubMeshID::value_type(aEGeom,aSubMeshID));
+           }
          }
        }
       }
index 91d3db15a9a6c8eec9df42eaac742f440e1283d8..5eee3627acb5c090e8f3c2a67350c436338fa307 100644 (file)
@@ -346,6 +346,14 @@ namespace VISU{
     return myVisuGen->CreateCurve(theTable,theHRow,theVRow);
   }
 
+  Curve_ptr VISU_Gen_i::CreateCurveWithZ(Table_ptr theTable, 
+                                   CORBA::Long theHRow,
+                                   CORBA::Long theVRow,
+                                   CORBA::Long theZRow)
+  {
+    return myVisuGen->CreateCurveWithZ(theTable,theHRow,theVRow,theZRow);
+  }
+
 
   Container_ptr VISU_Gen_i::CreateContainer(){
     return myVisuGen->CreateContainer();
index 223a5996ac180307b1384f5a3a58bf9beeb5c644..3f605b435e65e61e1ca1a7eaa3f048b7d0419a4f 100644 (file)
@@ -108,6 +108,7 @@ namespace VISU{
     //Create Digital Presentation
     virtual Table_ptr CreateTable(const char* theTableEntry);
     virtual Curve_ptr CreateCurve(Table_ptr theTable, CORBA::Long theHRow, CORBA::Long theVRow);
+    virtual Curve_ptr CreateCurveWithZ(Table_ptr theTable, CORBA::Long theHRow, CORBA::Long theVRow, CORBA::Long theZRow);
     virtual Container_ptr CreateContainer();
     virtual Animation_ptr CreateAnimation(View3D_ptr theView3d);
     
index b43f8d69104236292728840593e1629cbf1df2e2..5dc1a5470d11c53191e9a596b8c8584824b3def0 100644 (file)
@@ -455,6 +455,22 @@ void VisuGUI_TableDlg::initDlg()
   }
 }
 
+/*!
+  Provides help on F1 button click
+*/
+void VisuGUI_TableDlg::keyPressEvent( QKeyEvent* e )
+{
+  QDialog::keyPressEvent( e );
+  if ( e->isAccepted() )
+    return;
+
+  if ( e->key() == Key_F1 )
+    {
+      e->accept();
+      onHelp();
+    }
+}
+
 /*!
   Constructor
 */
index ea076771dc4f8dd7b04f1ec3769223dd75277732..44621d27c92462cb940ecd286cd3ba569c854ae2 100644 (file)
@@ -51,6 +51,9 @@ public:
                    bool showColumnTitles = true );
   ~VisuGUI_TableDlg();
 
+private:
+  void keyPressEvent( QKeyEvent* e );
+
 public slots:
   void onOK();
   void onHelp(); 
index 1ea484f8895df3e675eb6643bfea24d64175069e..0d0f95a02ab3c42fef147c32e52c46d5eafe52f1 100644 (file)
@@ -103,7 +103,7 @@ CPPFLAGS+= \
        $(HDF5_INCLUDES) $(BOOST_CPPFLAGS)
 
 LDFLAGS+= \
-       $(VTK_LIBS) -lVTKViewer -lSVTK -lVisuConvertor \
+       $(VTK_LIBS) -lVTKViewer -lVisuConvertor \
        $(KERNEL_LDFLAGS) -lSALOMELocalTrace \
        $(GUI_LDFLAGS) \
        $(MED_LDFLAGS)
index ecfda1eb69adaed6bda3222f45118014f8ee32d2..6bf730094209bae038311ab6cbf9c13ee622000a 100644 (file)
@@ -104,71 +104,67 @@ int main(int argc, char** argv)
       }
       //Import fields
       aMeshOnEntityMapIter = aMeshOnEntityMap.begin();
-      for(; aMeshOnEntityMapIter != aMeshOnEntityMap.end(); aMeshOnEntityMapIter++)
-      {
-           const VISU::TEntity& anEntity = aMeshOnEntityMapIter->first;
-           const VISU::PMeshOnEntity aMeshOnEntity = aMeshOnEntityMapIter->second;
-           const VISU::TFieldMap& aFieldMap = aMeshOnEntity->myFieldMap;
-           VISU::TFieldMap::const_iterator aFieldMapIter = aFieldMap.begin();
-
-        for(; aFieldMapIter != aFieldMap.end(); aFieldMapIter++)
-        {
-               const VISU::PField aField = aFieldMapIter->second;
-               //if(aField->myNbComp == 1) 
-               //  continue;
-               const string& aFieldName = aFieldMapIter->first;
-               const VISU::TValField& aValField = aField->myValField;
-               VISU::TValField::const_iterator aValFieldIter = aValField.begin();
-               if(aValFieldIter == aValField.end()) return 0;
-               int aTimeStamp = aValFieldIter->first;
-
-               TPresent* aPresent = TPresent::New();
-               VISU::PIDMapper anIDMapper;
-               if(anEntity != VISU::NODE_ENTITY)
-          {
-                 VISU::PGaussPtsIDMapper aGaussPtsIDMapper = aConvertor->GetTimeStampOnGaussPts(aMeshName,anEntity,aFieldName,aTimeStamp);
-                 aPresent->SetGaussPtsIDMapper(aGaussPtsIDMapper);
-               }
-          else
-          {
-                 continue;
-                 VISU::PIDMapper anIDMapper = aConvertor->GetTimeStampOnMesh(aMeshName,anEntity,aFieldName,aTimeStamp);
-                 aPresent->SetIDMapper(anIDMapper);
-               }
-
-               aPresent->Build();
-               aPresent->Init();
-
-          char aMainTexture[80];
-               strcpy( aMainTexture, getenv( "VISU_ROOT_DIR" ) );
-               strcat( aMainTexture, "/share/salome/resources/sprite_texture.vti" );
-               //cout << aMainTexture << endl;
-
-               char anAlphaTexture[80];
-               strcpy( anAlphaTexture, getenv( "VISU_ROOT_DIR" ) );
-               strcat( anAlphaTexture, "/share/salome/resources/sprite_alpha.vti" );
-               //cout << anAlphaTexture << endl;
-
-               vtkSmartPointer<vtkImageData> aTextureValue = VISU_GaussPointsPL::MakeTexture( aMainTexture, anAlphaTexture );
-               aPresent->SetImageData( aTextureValue.GetPointer() );
-
-          aPresent->Update();
-
-               vtkActor* anActor = vtkActor::New();
-               anActor->SetMapper(aPresent->GetMapper());
-
-               VISU_ScalarBarActor * aScalarBar = VISU_ScalarBarActor::New();
-               aScalarBar->SetLookupTable(aPresent->GetBarTable());
-
-               ren->AddActor(anActor);
-               ren->AddActor2D(aScalarBar);
-
-               renWin->Render();
-               ren->ResetCamera();
-
-               iren->Start();
-               return 0;
-             }
+      for(; aMeshOnEntityMapIter != aMeshOnEntityMap.end(); aMeshOnEntityMapIter++) {
+       const VISU::TEntity& anEntity = aMeshOnEntityMapIter->first;
+       const VISU::PMeshOnEntity aMeshOnEntity = aMeshOnEntityMapIter->second;
+       const VISU::TFieldMap& aFieldMap = aMeshOnEntity->myFieldMap;
+       VISU::TFieldMap::const_iterator aFieldMapIter = aFieldMap.begin();
+       for(; aFieldMapIter != aFieldMap.end(); aFieldMapIter++){
+         const VISU::PField aField = aFieldMapIter->second;
+         /*
+         if(aField->myNbComp == 1) 
+           continue;
+         */
+         const string& aFieldName = aFieldMapIter->first;
+         const VISU::TValField& aValField = aField->myValField;
+         VISU::TValField::const_iterator aValFieldIter = aValField.begin();
+         if(aValFieldIter == aValField.end()) return 0;
+         int aTimeStamp = aValFieldIter->first;
+
+         TPresent* aPresent = TPresent::New();
+         VISU::PIDMapper anIDMapper;
+         if(anEntity != VISU::NODE_ENTITY){
+           VISU::PGaussPtsIDMapper aGaussPtsIDMapper = aConvertor->GetTimeStampOnGaussPts(aMeshName,anEntity,aFieldName,aTimeStamp);
+           aPresent->SetGaussPtsIDMapper(aGaussPtsIDMapper);
+         }else{
+           continue;
+           VISU::PIDMapper anIDMapper = aConvertor->GetTimeStampOnMesh(aMeshName,anEntity,aFieldName,aTimeStamp);
+           aPresent->SetIDMapper(anIDMapper);
+         }
+
+         aPresent->Build();
+         aPresent->Init();
+
+         char aMainTexture[80];
+         strcpy( aMainTexture, getenv( "VISU_ROOT_DIR" ) );
+         strcat( aMainTexture, "/share/salome/resources/visu/sprite_texture.vti" );
+         //cout << aMainTexture << endl;
+
+         char anAlphaTexture[80];
+         strcpy( anAlphaTexture, getenv( "VISU_ROOT_DIR" ) );
+         strcat( anAlphaTexture, "/share/salome/resources/visu/sprite_alpha.vti" );
+         //cout << anAlphaTexture << endl;
+
+         vtkSmartPointer<vtkImageData> aTextureValue = VISU_GaussPointsPL::MakeTexture( aMainTexture, anAlphaTexture );
+         aPresent->SetImageData( aTextureValue.GetPointer() );
+
+         aPresent->Update();
+
+         vtkActor* anActor = vtkActor::New();
+         anActor->SetMapper(aPresent->GetMapper());
+
+         VISU_ScalarBarActor * aScalarBar = VISU_ScalarBarActor::New();
+         aScalarBar->SetLookupTable(aPresent->GetBarTable());
+
+         ren->AddActor(anActor);
+         ren->AddActor2D(aScalarBar);
+
+         renWin->Render();
+         ren->ResetCamera();
+
+         iren->Start();
+         return 0;
+       }
       }
     }
   }
index 322e69ee6fc126c6741c48fb5eb4a1a5b140d96d..8749ff8045855dc2e4ba04db3e8b63231f1b25bd 100644 (file)
@@ -49,8 +49,10 @@ VISU_CutLinesPL
     SetOrientation(aPipeLine->GetPlaneOrientation(1),
                   aPipeLine->GetRotateX(1),aPipeLine->GetRotateY(1),1);
     SetDisplacement(aPipeLine->GetDisplacement(1),1);
-    SetDefault();
-    if (!aPipeLine->IsDefault()) SetPosition(aPipeLine->GetPosition());
+    if (aPipeLine->IsDefault())
+      SetDefault();
+    else
+      SetPosition(aPipeLine->GetPosition());
   }
   VISU_CutPlanesPL::ShallowCopy(thePipeLine);
 }
index 4bdf8611a0bbe353c5e9b0fa98685783a69e9eed..6f0edac826102bf4b4369d54fbd6ce026cb967ab 100755 (executable)
 #include <vtkTimerLog.h>
 #include <vtkTriangle.h>
 
-#ifndef WIN32
-#include <dlfcn.h>
-#endif
-
 #include <stdio.h>
 #include <cmath>
 #include <string>
 
+#ifndef WNT
+# ifndef GLX_GLXEXT_LEGACY
+#  define GLX_GLXEXT_LEGACY
+# endif
+# include <GL/glx.h>
+# include <dlfcn.h>
+#else
+# include <wingdi.h>
+#endif
+
 #ifndef VTK_IMPLEMENT_MESA_CXX
 vtkCxxRevisionMacro(VISU_OpenGLPointSpriteMapper, "Revision$");
 vtkStandardNewMacro(VISU_OpenGLPointSpriteMapper);
@@ -138,26 +144,78 @@ static PFNGLBINDBUFFERARBPROC               vglBindBufferARB              = NULL
 static PFNGLBUFFERDATAARBPROC               vglBufferDataARB              = NULL;
 static PFNGLDELETEBUFFERSARBPROC            vglDeleteBuffersARB           = NULL;
 
-void InitializeARB()
+#ifndef WNT
+#define GL_GetProcAddress( x )   glXGetProcAddressARB( (const GLubyte*)x )
+#else
+#define GL_GetProcAddress( x )   wglGetProcAddress( (const LPCSTR)x )
+#endif
+
+bool InitializeARB()
 {
-  vglShaderSourceARB = (PFNGLSHADERSOURCEARBPROC)SVTK::getOpenGLExtension( "glShaderSourceARB" );
-  vglCreateShaderObjectARB = (PFNGLCREATESHADEROBJECTARBPROC)SVTK::getOpenGLExtension( "glCreateShaderObjectARB" );
-  vglCompileShaderARB = (PFNGLCOMPILESHADERARBPROC)SVTK::getOpenGLExtension( "glCompileShaderARB" );
-  vglCreateProgramObjectARB = (PFNGLCREATEPROGRAMOBJECTARBPROC)SVTK::getOpenGLExtension( "glCreateProgramObjectARB" );
-  vglAttachObjectARB = (PFNGLATTACHOBJECTARBPROC)SVTK::getOpenGLExtension( "glAttachObjectARB" );
-  vglLinkProgramARB = (PFNGLLINKPROGRAMARBPROC)SVTK::getOpenGLExtension( "glLinkProgramARB" );
-  vglUseProgramObjectARB = (PFNGLUSEPROGRAMOBJECTARBPROC)SVTK::getOpenGLExtension( "glUseProgramObjectARB" );
-  vglGetObjectParameterivARB = (PFNGLGETOBJECTPARAMETERIVARBPROC)SVTK::getOpenGLExtension( "glGetObjectParameterivARB" );
-  vglGetInfoLogARB = (PFNGLGETINFOLOGARBPROC)SVTK::getOpenGLExtension( "glGetInfoLogARB" );
-  vglGetAttribLocationARB = (PFNGLGETATTRIBLOCATIONARBPROC)SVTK::getOpenGLExtension( "glGetAttribLocationARB" );
-  vglVertexAttrib1fARB = (PFNGLVERTEXATTRIB1FARBPROC)SVTK::getOpenGLExtension( "glVertexAttrib1fARB" );
-
-  vglGenBuffersARB = (PFNGLGENBUFFERSARBPROC)SVTK::getOpenGLExtension( "glGenBuffersARB" );
-  vglBindBufferARB = (PFNGLBINDBUFFERARBPROC)SVTK::getOpenGLExtension( "glBindBufferARB" );
-  vglBufferDataARB = (PFNGLBUFFERDATAARBPROC)SVTK::getOpenGLExtension( "glBufferDataARB" );
-  vglDeleteBuffersARB = (PFNGLDELETEBUFFERSARBPROC)SVTK::getOpenGLExtension( "glDeleteBuffersARB" );
+  vglShaderSourceARB = (PFNGLSHADERSOURCEARBPROC)GL_GetProcAddress( "glShaderSourceARB" );
+  if( !vglShaderSourceARB )
+    return false;
+
+  vglCreateShaderObjectARB = (PFNGLCREATESHADEROBJECTARBPROC)GL_GetProcAddress( "glCreateShaderObjectARB" );
+  if( !vglCreateShaderObjectARB )
+    return false;
+
+  vglCompileShaderARB = (PFNGLCOMPILESHADERARBPROC)GL_GetProcAddress( "glCompileShaderARB" );
+  if( !vglCompileShaderARB )
+    return false;
+
+  vglCreateProgramObjectARB = (PFNGLCREATEPROGRAMOBJECTARBPROC)GL_GetProcAddress( "glCreateProgramObjectARB" );
+  if( !vglCreateProgramObjectARB )
+    return false;
+
+  vglAttachObjectARB = (PFNGLATTACHOBJECTARBPROC)GL_GetProcAddress( "glAttachObjectARB" );
+  if( !vglAttachObjectARB )
+    return false;
+
+  vglLinkProgramARB = (PFNGLLINKPROGRAMARBPROC)GL_GetProcAddress( "glLinkProgramARB" );
+  if( !vglLinkProgramARB )
+    return false;
+
+  vglUseProgramObjectARB = (PFNGLUSEPROGRAMOBJECTARBPROC)GL_GetProcAddress( "glUseProgramObjectARB" );
+  if( !vglUseProgramObjectARB )
+    return false;
+
+  vglGetObjectParameterivARB = (PFNGLGETOBJECTPARAMETERIVARBPROC)GL_GetProcAddress( "glGetObjectParameterivARB" );
+  if( !vglGetObjectParameterivARB )
+    return false;
+
+  vglGetInfoLogARB = (PFNGLGETINFOLOGARBPROC)GL_GetProcAddress( "glGetInfoLogARB" );
+  if( !vglGetInfoLogARB )
+    return false;
+
+  vglGetAttribLocationARB = (PFNGLGETATTRIBLOCATIONARBPROC)GL_GetProcAddress( "glGetAttribLocationARB" );
+  if( !vglGetAttribLocationARB )
+    return false;
+
+  vglVertexAttrib1fARB = (PFNGLVERTEXATTRIB1FARBPROC)GL_GetProcAddress( "glVertexAttrib1fARB" );
+  if( !vglVertexAttrib1fARB )
+    return false;
+
+  vglGenBuffersARB = (PFNGLGENBUFFERSARBPROC)GL_GetProcAddress( "glGenBuffersARB" );
+  if( !vglGenBuffersARB )
+    return false;
+
+  vglBindBufferARB = (PFNGLBINDBUFFERARBPROC)GL_GetProcAddress( "glBindBufferARB" );
+  if( !vglBindBufferARB )
+    return false;
+
+  vglBufferDataARB = (PFNGLBUFFERDATAARBPROC)GL_GetProcAddress( "glBufferDataARB" );
+  if( !vglBufferDataARB )
+    return false;
+
+  vglDeleteBuffersARB = (PFNGLDELETEBUFFERSARBPROC)GL_GetProcAddress( "glDeleteBuffersARB" );
+  if( !vglDeleteBuffersARB )
+    return false;
+
+  return true;
 };
 
+static bool IsARBInitialized = InitializeARB();
 static float Tolerance = 1.0 / VTK_LARGE_FLOAT;
 
 //-----------------------------------------------------------------------------
@@ -196,7 +254,8 @@ VISU_OpenGLPointSpriteMapper::VISU_OpenGLPointSpriteMapper()
 //-----------------------------------------------------------------------------
 VISU_OpenGLPointSpriteMapper::~VISU_OpenGLPointSpriteMapper()
 {
-  glDeleteTextures( 1, &PointSpriteTexture );
+  if( PointSpriteTexture>0 )
+    glDeleteTextures( 1, &PointSpriteTexture );
 
   if( this->LastWindow )
     this->ReleaseGraphicsResources(this->LastWindow);
@@ -277,7 +336,7 @@ void VISU_OpenGLPointSpriteMapper::InitShader()
   //cout << "Initializing vertex program" << endl;
 
   std::string fileName = std::string( getenv( "VISU_ROOT_DIR") ) +
-                         "/share/salome/resources/Vertex_Program_ARB.txt";
+                         "/share/salome/resources/visu/Vertex_Program_ARB.txt";
 
   char* shader = readFromFile( fileName );
 
@@ -389,7 +448,8 @@ bool VISU_OpenGLPointSpriteMapper::InitExtensions()
   char* ext = (char*)glGetString( GL_EXTENSIONS );
   //cout << "OpenGL extensions : " << ext << endl;
 
-  if( strstr( ext, "GL_ARB_point_sprite" ) == NULL ||
+  if( !IsARBInitialized ||
+      strstr( ext, "GL_ARB_point_sprite" ) == NULL ||
       strstr( ext, "GL_ARB_shader_objects" ) == NULL ||
       strstr( ext, "GL_ARB_vertex_buffer_object" ) == NULL )
   {
@@ -419,7 +479,10 @@ float ViewToDisplay( vtkRenderer* theRenderer )
   theRenderer->ViewToDisplay();
   theRenderer->GetDisplayPoint( p2 );
 
-  vtkFloatingPointType coefficient = sqrt( (double)pow( p2[0] - p1[0], 2 ) + pow( p2[1] - p1[1], 2 ) ) / sqrt( (double)2 );
+  vtkFloatingPointType coefficient = sqrt( pow( p2[0] - p1[0], 2 ) + pow( p2[1] - p1[1], 2 ) ) / sqrt( 2. );
+  //cout << p1[0] << " " << p1[1] << " " << p1[2] << endl;
+  //cout << p2[0] << " " << p2[1] << " " << p2[2] << endl;
+  //cout << "ZOOM  : " << coefficient << endl;
 
   return coefficient;
 }
index 14412af80da28366683e390e0d53cb47f92bf96f..16759ec68e6c385467bbb2310d33cc38461d4213 100644 (file)
@@ -120,6 +120,7 @@ VISU_ScalarMapOnDeformedShapePL
   
   // Sets geometry for merge filter
   myMergeFilter->SetGeometry(myDeformVectors->GetOutput());
+  myMergeFilter->SetScalars(myExtractorScalars->GetOutput());
   // Sets data to mapper
   myMapper->SetInput(myMergeFilter->GetOutput());
 }
@@ -158,11 +159,7 @@ void
 VISU_ScalarMapOnDeformedShapePL
 ::UpdateScalars()
 {
-  if(myScalars->GetCellData()->GetVectors() != NULL ||
-     myScalars->GetPointData()->GetVectors() != NULL)
-    myMergeFilter->SetScalars(myExtractorScalars->GetOutput());
-  else
-    myMergeFilter->SetScalars(GetScalars());
+  myExtractorScalars->Update();
 }
 
 /*!
@@ -194,7 +191,22 @@ VISU_ScalarMapOnDeformedShapePL
 {
   myScalars = theScalars;
   vtkUnstructuredGrid* aScalars = GetScalars();
-  myExtractorScalars->SetInput(aScalars);
+  vtkCellData *aInCellData = GetInput()->GetCellData();
+
+  if(aScalars->GetPointData()->GetScalars())
+    myExtractorScalars->SetInput(aScalars);
+  else if(aScalars->GetCellData()->GetScalars() &&
+         !aInCellData->GetAttribute(vtkDataSetAttributes::VECTORS)){
+    //Approximate cell data values to point data by vtkCellDataToPointData filter.
+    vtkCellDataToPointData* aCellDataToPointData = vtkCellDataToPointData::New();
+    aCellDataToPointData->SetInput(aScalars);
+    aCellDataToPointData->Update();
+    myExtractorScalars->SetInput(aCellDataToPointData->GetUnstructuredGridOutput());
+    aCellDataToPointData->Delete();
+  } else {
+    myExtractorScalars->SetInput(aScalars);
+  }
+  Update();
   Modified();
 }
 
index c5683bd15ca902d8a2879fffa02485ae692b59b4..eebc49c8fbd7aea26381c270127bbed0542a0668 100644 (file)
@@ -1194,6 +1194,9 @@ msgstr "Attributes"
 msgid "AXIS_LBL"
 msgstr "Axis"
 
+msgid "ASSIGNED"
+msgstr "Assigned"
+
 #: VisuGUI_SetupPlot2dDlg.cxx:69
 msgid "DATA_LBL"
 msgstr "Data"
index 9ef0a4ab1e9324ca9c23d3b6daddb4bcc852591e..fe81ee2cdb2d1db2a9ee8b2afec126b4f3107565 100644 (file)
@@ -1220,8 +1220,8 @@ OnPlotData()
                 // if study is not locked - create new container, create curves and insert them
                 // into container, then plot container if current viewer is of VIEW_PLOT2D type
                 int horIndex;
-                QValueList<int> verIndices;
-                dlg->getCurvesSource( horIndex, verIndices );
+                QValueList<int> verIndices, zIndices;
+                dlg->getCurvesSource( horIndex, verIndices, zIndices );
                 if ( horIndex >= 0 && verIndices.count() > 0 ) {
                   CORBA::Object_var aContainer = GetVisuGen(this)->CreateContainer();
                   if( !CORBA::is_nil( aContainer ) ) {
@@ -1230,7 +1230,7 @@ OnPlotData()
                     if ( pContainer ) {
                       for ( int i = 0; i < verIndices.count(); i++ ) {
                         CORBA::Object_var aNewCurve =
-                          GetVisuGen(this)->CreateCurve( table->_this(), horIndex+1, verIndices[i]+1 );
+                          GetVisuGen(this)->CreateCurveWithZ( table->_this(), horIndex+1, verIndices[i]+1, zIndices[i]+1 );
                         if( !CORBA::is_nil( aNewCurve ) ) {
                           VISU::Curve_i* pCrv =
                             dynamic_cast<VISU::Curve_i*>(VISU::GetServant(aNewCurve).in());
@@ -1290,8 +1290,8 @@ OnPlotData()
           // if study is not locked - create new table and container objects, create curves
           // and insert them into container, then plot container if current viewer is of VIEW_PLOT2D type
           int horIndex;
-          QValueList<int> verIndices;
-          dlg->getCurvesSource( horIndex, verIndices );
+          QValueList<int> verIndices, zIndices;
+          dlg->getCurvesSource( horIndex, verIndices, zIndices );
           if ( horIndex >= 0 && verIndices.count() > 0 ) {
             CORBA::Object_var aTable = GetVisuGen(this)->CreateTable( SO->GetID().c_str() );
             CORBA::Object_var aContainer = GetVisuGen(this)->CreateContainer();
@@ -1301,8 +1301,8 @@ OnPlotData()
 
               if ( pContainer && pTable ) {
                 for ( int i = 0; i < verIndices.count(); i++ ) {
-                  CORBA::Object_var aNewCurve = GetVisuGen(this)->CreateCurve
-                    ( pTable->_this(), horIndex+1, verIndices[i]+1 );
+                  CORBA::Object_var aNewCurve = GetVisuGen(this)->CreateCurveWithZ
+                    ( pTable->_this(), horIndex+1, verIndices[i]+1, zIndices[i]+1 );
                   if( !CORBA::is_nil( aNewCurve ) ) {
                     VISU::Curve_i* pCrv = dynamic_cast<VISU::Curve_i*>(VISU::GetServant(aNewCurve).in());
                     if ( pCrv ) {
@@ -1612,7 +1612,7 @@ OnSweep()
   int aTemp = int(1.E6 * aTempoDbl);
 
   int aCycles = aResourceMgr->integerValue("VISU", "sweeping_number_cycles", 1);
-  int aSteps  = aResourceMgr->integerValue("VISU", "sweeping_time_step", 40);
+  int aSteps  = aResourceMgr->integerValue("VISU", "sweeping_number_steps", 40);
 
   // Sweep
   QApplication::setOverrideCursor(Qt::waitCursor);
index ad40b34c38dbd336219d0f576811ddda8ab097f5..e1dace81abd4b1f2f8a1956f3fe1d8097a0dee97 100644 (file)
@@ -428,3 +428,16 @@ void VisuGUI_BuildProgressDlg::setFileName( const QString& theFileName )
       myFileNameLineEdit->setText( myFileName.section( '/', -1 ) );
     }
 }
+
+void VisuGUI_BuildProgressDlg::keyPressEvent( QKeyEvent* e )
+{
+  QDialog::keyPressEvent( e );
+  if ( e->isAccepted() )
+    return;
+
+  if ( e->key() == Key_F1 )
+    {
+      e->accept();
+      onHelp();
+    }
+}
index 0d56a0dc5e81f3d046eb7e80e1b6c20f5706a4d9..8284c52df99f15c9f709c2bc9d5f075b566ac573 100644 (file)
@@ -56,6 +56,9 @@ public:
   QString          fileName() const { return myFileName; }
   void             setFileName( const QString& theFileName );
 
+private:
+  void             keyPressEvent( QKeyEvent* e );
+
 protected slots:
   void             done( int );
 
index 0be9f3ef5af0866c701e574df77a94aa3eaf8cf4..87195d3193366917fb153598090a4f82d9b36d89 100644 (file)
@@ -599,8 +599,11 @@ void VisuGUI_ClippingDlg::onSelectionChanged()
   if (SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>(myVisuGUI)) {
     Handle(SALOME_InteractiveObject) anIO;
     CORBA::Object_var anObject = VISU::GetSelectedObj(myVisuGUI, &anIO);
-    myIO = anIO;
     if (CORBA::is_nil(anObject)) return;
+    
+    if (!anIO.IsNull()) 
+      myIO = anIO;
+    
     PortableServer::ServantBase_var aServant = VISU::GetServant(anObject);
     if (!aServant.in()) return;
 
@@ -1131,3 +1134,21 @@ void VisuGUI_ClippingDlg::OnPreviewToggle (bool theIsToggled)
   if (SVTK_ViewWindow* vw = VISU::GetActiveViewWindow<SVTK_ViewWindow>(myVisuGUI))
     VISU::RenderViewWindow(vw);
 }
+
+
+//=================================================================================
+// function : keyPressEvent()
+// purpose  :
+//=================================================================================
+void VisuGUI_ClippingDlg::keyPressEvent( QKeyEvent* e )
+{
+  QDialog::keyPressEvent( e );
+  if ( e->isAccepted() )
+    return;
+
+  if ( e->key() == Key_F1 )
+    {
+      e->accept();
+      ClickOnHelp();
+    }
+}
index dcc56423e1ba715a8b15d80e50f8870e45bce3d6..be9dcb20f035f104cb94922bb322f5b363f4deac 100644 (file)
@@ -134,6 +134,9 @@ public:
 
     ~VisuGUI_ClippingDlg();
 
+private:
+    void keyPressEvent( QKeyEvent* e );
+
 private:
 
     LightApp_SelectionMgr* mySelectionMgr;
index f193d0cc13607b88862d561864704eedfa2b6f00..45de30f6c8232b95f1d08812274b609c267fe781 100644 (file)
@@ -148,3 +148,20 @@ void VisuGUI_CursorDlg::onHelp()
                           QObject::tr("BUT_OK"));
   }
 }
+
+/*!
+  function : keyPressEvent()
+  purpose  :
+*/
+void VisuGUI_CursorDlg::keyPressEvent( QKeyEvent* e )
+{
+  QDialog::keyPressEvent( e );
+  if ( e->isAccepted() )
+    return;
+
+  if ( e->key() == Key_F1 )
+    {
+      e->accept();
+      onHelp();
+    }
+}
index 82a910d867dabe195b562f5c867d3fa4169f5d14..cebb7b6ed518ef078fbd4e1bd1a6a336ded8a11c 100644 (file)
@@ -52,6 +52,9 @@ public:
     QPushButton* buttonCancel;
     QPushButton* buttonHelp;
 
+private:
+    void keyPressEvent( QKeyEvent* e );
+
 private slots:
     void onHelp();
 
index 3b7284da24f3df2250cca95a48a469bd7de8ccec..4b68c79953249a6569ef64bb2cf27a79dbeb614a 100644 (file)
@@ -944,3 +944,16 @@ void VisuGUI_CutLinesDlg::onHelp()
 //jfa tmp:  if (theWnd != myStudyWnd)
 //jfa tmp:    reject();
 //jfa tmp:}
+
+void VisuGUI_CutLinesDlg::keyPressEvent( QKeyEvent* e )
+{
+  QDialog::keyPressEvent( e );
+  if ( e->isAccepted() )
+    return;
+
+  if ( e->key() == Key_F1 )
+    {
+      e->accept();
+      onHelp();
+    }
+}
index 596798bd7ea83ffd45c9a51f1b5d9db0d613464e..8b0e1da4b3cab9fac9aa897d4984c24223de7606 100644 (file)
@@ -50,6 +50,9 @@ public:
     bool isGenerateTable() { return myCreateTable->isChecked(); }
     bool isGenerateCurves() { return myCreateTable->isChecked() && myCurvesCheck->isChecked(); }
 
+private:
+    void keyPressEvent( QKeyEvent* e );
+
 protected slots:
   void accept();
   void reject();
index 212f569f606d1da77efeaa2032d88cd43dd30098..dab4e24b33aa31a86bf25e5724acea4ea724eb23 100644 (file)
@@ -421,7 +421,9 @@ void VisuGUI_CutPlanesPane::deletePlanes()
 {
   if (myPreviewActor == 0) return;
   vtkRenderer* aRend       = myPreviewActor->GetRenderer();
-  if(aRend)
+  vtkRenderWindow* aWnd = aRend->GetRenderWindow();
+
+  if(aRend && aWnd)
     myPreviewActor->RemoveFromRender(aRend);
 //  Bug IPAL11962: preview is still in the viewer, if viewer not active.
 //   if (SVTK_ViewWindow* vf = VISU::GetActiveViewWindow<SVTK_ViewWindow>())
@@ -591,3 +593,16 @@ QWidget* VisuGUI_NumEditItem::createEditor() const
   editline->setValidator(dvalidator);
   return editline;
 }
+
+void VisuGUI_CutPlanesDlg::keyPressEvent( QKeyEvent* e )
+{
+  QDialog::keyPressEvent( e );
+  if ( e->isAccepted() )
+    return;
+
+  if ( e->key() == Key_F1 )
+    {
+      e->accept();
+      onHelp();
+    }
+}
index e1726ecce9be3d07ff47585385d8a18e5ae93a13..b7f9e4cf129b1b668c801de2437bc84220ce418a 100644 (file)
@@ -111,6 +111,9 @@ public:
     void initFromPrsObject (VISU::CutPlanes_i* thePrs);
     int  storeToPrsObject  (VISU::CutPlanes_i* thePrs);
 
+private:
+    void keyPressEvent( QKeyEvent* e );
+  
 protected slots:
     void accept();
     void reject();
index fc28efe25f56bac49d9975612a12dfd1300d0f9b..5bbe4c8914a3f7723561830b3fa0660cf5d59f93 100644 (file)
@@ -181,3 +181,16 @@ void VisuGUI_DeformedShapeDlg::onHelp()
                           QObject::tr("BUT_OK"));
   }
 }
+
+void VisuGUI_DeformedShapeDlg::keyPressEvent( QKeyEvent* e )
+{
+  QDialog::keyPressEvent( e );
+  if ( e->isAccepted() )
+    return;
+
+  if ( e->key() == Key_F1 )
+    {
+      e->accept();
+      onHelp();
+    }
+}
index a5e870b1866b713136228da6cae899a2e8bffefc..32c10f4cc79ccc77ad7c30439f09dda8b4f8588d 100644 (file)
@@ -64,6 +64,9 @@ public:
     void initFromPrsObject(VISU::DeformedShape_i* thePrs);
     int storeToPrsObject(VISU::DeformedShape_i* thePrs);
 
+private:
+    void keyPressEvent( QKeyEvent* e );
+
 protected slots:
   void accept();
   void reject();
index 5e203796c64ca906056a4af17fbce2eddc39300b..9850d1f4f2f654d67a90f734a046725eb63e3531 100644 (file)
@@ -468,3 +468,16 @@ void VisuGUI_EditContainerDlg::onHelp()
                           QObject::tr("BUT_OK"));
   }
 }
+
+void VisuGUI_EditContainerDlg::keyPressEvent( QKeyEvent* e )
+{
+  QDialog::keyPressEvent( e );
+  if ( e->isAccepted() )
+    return;
+
+  if ( e->key() == Key_F1 )
+    {
+      e->accept();
+      onHelp();
+    }
+}
index ced26561e936b87bfcc5cd398fb0b089c43b47a2..0ff26c94db55c7ceae04329e78f62957af11f246 100644 (file)
@@ -55,6 +55,9 @@ class VisuGUI_EditContainerDlg: public QDialog
 
   void initFromPrsObject (VISU::Container_i* theContainer);
   void storeToPrsObject  (VISU::Container_i* theContainer);
+  
+ private:
+  void keyPressEvent( QKeyEvent* e );
 
  private slots:
   void onLeftClicked();
index b7a7571ce991201a4a1b34dea912bc8bfea55a78..8531c225e5f74a55477e4787bd503e09d1c19da9 100644 (file)
@@ -756,3 +756,16 @@ void VisuGUI_GaussPointsDlg::onHelp()
                           QObject::tr("BUT_OK"));
   }
 }
+
+void VisuGUI_GaussPointsDlg::keyPressEvent( QKeyEvent* e )
+{
+  QDialog::keyPressEvent( e );
+  if ( e->isAccepted() )
+    return;
+
+  if ( e->key() == Key_F1 )
+    {
+      e->accept();
+      onHelp();
+    }
+}
index 9617d64041866bef8cfd8e3091d38c97c0223c14..1ce86e4303529931c281471990d6fd3d34669db8 100644 (file)
@@ -139,6 +139,9 @@ public:
   //! Update Gauss Points presentation using parameters from the dialog.
   int     storeToPrsObject(VISU::GaussPoints_i* thePrs);
 
+private:
+  void keyPressEvent( QKeyEvent* e );
+
 protected slots:
   void    onToggleDefShape( bool );
   void    onHelp();
index f57ac26ae5c5627814549aa931c084d0e682a55b..7c4d3e8dbead96f7cb3f47ade34427007f3f5417 100644 (file)
@@ -251,3 +251,16 @@ void VisuGUI_IsoSurfacesDlg::onHelp()
                           QObject::tr("BUT_OK"));
   }
 }
+
+void VisuGUI_IsoSurfacesDlg::keyPressEvent( QKeyEvent* e )
+{
+  QDialog::keyPressEvent( e );
+  if ( e->isAccepted() )
+    return;
+
+  if ( e->key() == Key_F1 )
+    {
+      e->accept();
+      onHelp();
+    }
+}
index 5e3b1c51ad91e6d1a436282cada39f30ea06a6e1..385fa64668810116542701e2ace9cf0d09f97229 100644 (file)
@@ -83,6 +83,9 @@ class VisuGUI_IsoSurfacesDlg : public QDialog
   int storeToPrsObject(VISU::IsoSurfaces_i* thePrs)
     {return myScalarPane->storeToPrsObject(thePrs) && myIsoPane->storeToPrsObject(thePrs);}
 
+ private:
+  void keyPressEvent( QKeyEvent* e );
+
  protected slots:
   void accept();
   void reject();
index 6b3ce0136750b875333092da4b8c68b82f29fab5..60b252af81abfb7b302ed1930e2f739b1b961ea4 100644 (file)
@@ -178,3 +178,16 @@ QString VisuGUI_NameDlg::getName( QWidget* parent, const QString& oldName )
   delete dlg;
   return n;
 }
+
+void VisuGUI_NameDlg::keyPressEvent( QKeyEvent* e )
+{
+  QDialog::keyPressEvent( e );
+  if ( e->isAccepted() )
+    return;
+
+  if ( e->key() == Key_F1 )
+    {
+      e->accept();
+      onHelp();
+    }
+}
index c95057992151c42c8f5592e33db2dd7a3033635f..5198a631e52e0e5486b811a4eb875a9533e6581e 100644 (file)
@@ -45,6 +45,9 @@ public:
   QString         name();
     
   static QString  getName( QWidget* parent = 0, const QString& oldName = QString::null );
+
+private:
+  void keyPressEvent( QKeyEvent* e );
     
 protected slots:
   void accept();
index 94d6fe2653eab93370b090660bc853799cfb5694..33ba4ba26774295fdc49d4679b36ae4b60cadd4e 100644 (file)
@@ -257,3 +257,16 @@ void VisuGUI_OffsetDlg::onHelp()
                           QObject::tr("BUT_OK"));
   }
 }
+
+void VisuGUI_OffsetDlg::keyPressEvent( QKeyEvent* e )
+{
+  QDialog::keyPressEvent( e );
+  if ( e->isAccepted() )
+    return;
+
+  if ( e->key() == Key_F1 )
+    {
+      e->accept();
+      onHelp();
+    }
+}
index 80a3f114060a75459c6c03d30f1e89b640e22f20..a1d67a511616a9d8a01aa9f15141434c4fabdc3a 100644 (file)
@@ -65,6 +65,9 @@ class VisuGUI_OffsetDlg: public QDialog
   void getOffset (vtkFloatingPointType* theOffset) const;
   bool isToSave() const;
 
+ private:
+  void keyPressEvent( QKeyEvent* e );
+
  public slots:
   void onReset();
 
index 1ea50f4c9f4defcbffc219673e6515e3ae49b8b7..abbdd3f625c454c41593f20bb89412e9bb1a730e 100644 (file)
@@ -362,7 +362,12 @@ void VisuGUI_Plot3DPane::onPrsType(int id)
 //=======================================================================
 void VisuGUI_Plot3DPane::updatePreview()
 {
-  if (myInitFromPrs || !myPrs || !myViewWindow)
+  if(myPreviewActor){
+    vtkRenderer* aRend       = myPreviewActor->GetRenderer();
+    vtkRenderWindow* aWnd = aRend->GetRenderWindow();
+    if (!aWnd) return;
+  }
+ if (myInitFromPrs || !myPrs || !myViewWindow)
     return;
   bool fitall = false;
   if (PreviewChkB->isChecked()) // place preview plane
@@ -489,14 +494,18 @@ int VisuGUI_Plot3DPane::storeToPrsObject(VISU::Plot3D_i* thePrs)
 //=======================================================================
 bool VisuGUI_Plot3DPane::check()
 {
-  if (myPreviewActor && myViewWindow) // erase preview
-  {
+  if(!myPreviewActor) return true;
+  
+  SVTK_ViewWindow* aView;
+  vtkRenderer* aRend    = myPreviewActor->GetRenderer();
+  vtkRenderWindow* aWnd = aRend->GetRenderWindow();
+  if(aRend && aWnd){
     myPreviewActor->SetVisibility(false);
     myViewWindow->RemoveActor(myPreviewActor);
     myPreviewActor->Delete();
     myPreviewActor = 0;
   }
-
+    
   return true;
 }
 
@@ -643,3 +652,20 @@ void VisuGUI_Plot3DDlg::setPlane(int theOrientation, double theXRotation, double
 {
   myIsoPane->setPlane(theOrientation, theXRotation, theYRotation, thePlanePos);
 }
+
+//=================================================================================
+// function : keyPressEvent()
+// purpose  :
+//=================================================================================
+void VisuGUI_Plot3DDlg::keyPressEvent( QKeyEvent* e )
+{
+  QDialog::keyPressEvent( e );
+  if ( e->isAccepted() )
+    return;
+
+  if ( e->key() == Key_F1 )
+    {
+      e->accept();
+      onHelp();
+    }
+}
index e6e227519944595a134a090497e677fee17e9334..230df0004e3b1bc1bf8887ed651441ee83e5e0f3 100644 (file)
@@ -111,6 +111,9 @@ class VisuGUI_Plot3DDlg : public QDialog
 
   void setPlane(int theOrientation, double theXRotation, double theYRotation, double thePlanePos);
 
+ private:
+  void keyPressEvent( QKeyEvent* e );
+
  protected slots:
   void accept();
   void reject();
index 9050d5fdec95d8b4f42c47b41b125c283dbcbdba..62b46d5156dfd0095de629a048dcca274e0d6ead 100644 (file)
@@ -194,12 +194,13 @@ namespace VISU
              delete aDlg;
            } else {
              DeletePrs3d(theModule,aPrs3d,theIO);
+             QApplication::restoreOverrideCursor();
              delete aDlg;
              return false;
            }
        }
       }
-
+      aViewWindow = GetViewWindow<TViewer>(theModule);
       // Display created presentation.
       if (aViewWindow) {
        PublishInView(theModule, aPrs3d, aViewWindow, /*highlight = */true);
index 768a0c4919a405d67c53ae71fb172e20fbf02617..cc032130487b1d9a58ed211f7248406c9e2b1c61 100644 (file)
@@ -746,7 +746,8 @@ void VisuGUI_ScalarBarPane::deleteScalarBar()
   
   if (myPreviewActor == 0) return;
   vtkRenderer* aRend       = myPreviewActor->GetRenderer();
-  if(aRend)
+  vtkRenderWindow* aWnd = aRend->GetRenderWindow();
+  if(aRend && aWnd)
     myPreviewActor->RemoveFromRender(aRend);
   myPreviewActor->GetScalarBar()->VisibilityOff();
   myPreviewActor->Delete();
@@ -1155,6 +1156,21 @@ void VisuGUI_ScalarBarDlg::onHelp()
   }
 }
 
+/*!
+  Provides help on F1 button click
+*/
+void VisuGUI_ScalarBarDlg::keyPressEvent( QKeyEvent* e )
+{
+  QDialog::keyPressEvent( e );
+  if ( e->isAccepted() )
+    return;
+
+  if ( e->key() == Key_F1 )
+    {
+      e->accept();
+      onHelp();
+    }
+}
 
 //#######################################################################################
 VisuGUI_TextPrefDlg::VisuGUI_TextPrefDlg (QWidget* parent)
@@ -1271,3 +1287,19 @@ void VisuGUI_TextPrefDlg::accept()
 
   QDialog::accept();
 }
+
+/*!
+  Provides help on F1 button click
+*/
+void VisuGUI_TextPrefDlg::keyPressEvent( QKeyEvent* e )
+{
+  QDialog::keyPressEvent( e );
+  if ( e->isAccepted() )
+    return;
+
+  if ( e->key() == Key_F1 )
+    {
+      e->accept();
+      onHelp();
+    }
+}
index 5ef53b8d8b91f3a011badc51d5a8301e531ad831..d9d0f6f2e909adce0adecc8c64e1424d89b1c5bd 100644 (file)
@@ -79,6 +79,9 @@ class VisuGUI_TextPrefDlg: public QDialog
 
   void storeBeginValues();
 
+ private:
+  void keyPressEvent( QKeyEvent* e );
+
  public:
   SVTK_FontWidget* myTitleFont;
   SVTK_FontWidget* myLabelFont;
@@ -203,6 +206,9 @@ class VisuGUI_ScalarBarDlg : public QDialog
   void initFromPrsObject(VISU::ScalarMap_i* thePrs) {myScalarPane->initFromPrsObject(thePrs);}
   int storeToPrsObject(VISU::ScalarMap_i* thePrs) {return myScalarPane->storeToPrsObject(thePrs);}
 
+ private:
+  void keyPressEvent( QKeyEvent* e );
+
  protected slots:
   void accept();
   void reject();
index 721448f01bca7667881fe8a4eca0b1e25aacc81c..f0d9f960fd891c3344df449eeed132f1aacf849a 100644 (file)
@@ -293,7 +293,7 @@ void VisuGUI_ScalarMapOnDeformedShapeDlg::initFromPrsObject
   myFieldsCombo->setCurrentText(aFieldName);
   AddAllTimes(myFieldsCombo->currentText());
   myTimeStampsCombo->setCurrentText(aIteration);
-  SetScalarField();
+  SetScalarField( false );
 
   myScalarPane->initFromPrsObject(myPrs);
 }
@@ -314,7 +314,7 @@ int VisuGUI_ScalarMapOnDeformedShapeDlg::storeToPrsObject
                           myTimeStampsCombo->currentItem() + 1,
                           myPrs->GetScalarEntity());
 
-  if (theUpdateScalars) SetScalarField();
+  if (theUpdateScalars) SetScalarField( false );
 
   thePrs->ShowColored(true);
 
@@ -349,11 +349,11 @@ VISU::TEntity VisuGUI_ScalarMapOnDeformedShapeDlg::getCurrentScalarEntity(){
   return anEntity;
 }
 
-void VisuGUI_ScalarMapOnDeformedShapeDlg::SetScalarField(){
-  SetScalarField(myTimeStampsCombo->currentItem()+1);
+void VisuGUI_ScalarMapOnDeformedShapeDlg::SetScalarField( const bool save_scalar_pane ){
+  SetScalarField( myTimeStampsCombo->currentItem()+1, "", save_scalar_pane );
 }
 
-void VisuGUI_ScalarMapOnDeformedShapeDlg::SetScalarField(int theIter,QString theFieldName){
+void VisuGUI_ScalarMapOnDeformedShapeDlg::SetScalarField(int theIter,QString theFieldName, const bool save_scalar_pane ){
 
   QString aFieldName;
 
@@ -369,9 +369,11 @@ void VisuGUI_ScalarMapOnDeformedShapeDlg::SetScalarField(int theIter,QString the
                        theIter,
                        anEntity);
 
-  myScalarPane->storeToPrsObject(myPrs);
-  
-  UpdateScalarField();
+  if( save_scalar_pane )
+  {
+    myScalarPane->storeToPrsObject(myPrs);
+    UpdateScalarField();
+  }
 }
 
 void VisuGUI_ScalarMapOnDeformedShapeDlg::accept()
@@ -486,3 +488,16 @@ float VisuGUI_ScalarMapOnDeformedShapeDlg::GetFloatValueOfTimeStamp(const char*
   }
   return ret;
 }
+
+void VisuGUI_ScalarMapOnDeformedShapeDlg::keyPressEvent( QKeyEvent* e )
+{
+  QDialog::keyPressEvent( e );
+  if ( e->isAccepted() )
+    return;
+
+  if ( e->key() == Key_F1 )
+    {
+      e->accept();
+      onHelp();
+    }
+}
index 7fb24fac15cf1f5289edd97a1e0c906217b5d4f1..3151bd934c0a93859c38bb09e140c8ef9788f9a7 100644 (file)
@@ -69,7 +69,10 @@ public:
     QString getCurrentScalarFieldName();
     int getCurrentScalarNbIterations();
     VISU::TEntity getCurrentScalarEntity();
-    void SetScalarField(int theIter,QString theFieldName=QString(""));
+    void SetScalarField(int theIter,QString theFieldName=QString(""), const bool = true );
+
+private:
+    void keyPressEvent( QKeyEvent* e );
 
 protected slots:
   void accept();
@@ -102,7 +105,7 @@ private:
  
 protected:
  void UpdateScalarField();
- void SetScalarField();
+ void SetScalarField( const bool = true );
  void AddAllFieldNames();
  void AddAllTimes(const QString& theFieldName);
  float GetFloatValueOfTimeStamp(const char* theMeshName,
index 86329bed49217a9d9d38944ff44b79482d09ba33..10a7c45d6bdf8a204f15e204e78cabfd4f61f694 100644 (file)
@@ -466,13 +466,12 @@ void VisuGUI_SelectionDlg::onSelectionEvent() {
                 myCellScalarValLbl->setText(getValue(aCellData, aVTKID));
                 myCellVectorValLbl->setText(getVector(aCellData, aVTKID));
 
-                vtkFloatingPointType* aCoord;
                 vtkIdList *aPointList = aCell->GetPointIds();
-
                 for (int i = 0; i < aNbOfPoints; i++) {
-                  int idCurrent = aPointList->GetId(i);
-                  aCoord = aDataSet->GetPoint(idCurrent);
-                  aPointsMap.insert(PointsMap::value_type(idCurrent,aCoord));
+                  int aNodeVTKId = aPointList->GetId(i);
+                  vtkFloatingPointType* aCoord = aDataSet->GetPoint(aNodeVTKId);
+                 vtkIdType aNodeObjId = anVISUActor->GetNodeObjId(aNodeVTKId);
+                  aPointsMap.insert(PointsMap::value_type(aNodeObjId,aCoord));
                 }
               }
             }
@@ -642,3 +641,16 @@ void VisuGUI_SelectionDlg::onHelp()
                           QObject::tr("BUT_OK"));
   }
 }
+
+void VisuGUI_SelectionDlg::keyPressEvent( QKeyEvent* e )
+{
+  QDialog::keyPressEvent( e );
+  if ( e->isAccepted() )
+    return;
+
+  if ( e->key() == Key_F1 )
+    {
+      e->accept();
+      onHelp();
+    }
+}
index 40da2d6cb053c37c60f245d4e53f36490c7a0f8c..a6517bc1425e024f2f702746e9e9dd5ca7cee8eb 100644 (file)
@@ -47,6 +47,9 @@ public:
   VisuGUI_SelectionDlg (const SalomeApp_Module* theModule);
   virtual ~VisuGUI_SelectionDlg ();
 
+private:
+  void keyPressEvent( QKeyEvent* e );
+
 protected:
   void closeEvent (QCloseEvent* theEvent);
 
index a5eda1cabcd31fcdc30f09005f5b550ddce8bb7a..5c46ede447368f42d31c411f5a6cce2d6f218451 100644 (file)
@@ -88,15 +88,18 @@ VisuGUI_SetupPlot2dDlg::VisuGUI_SetupPlot2dDlg( _PTR(SObject) object, QWidget* p
   QFrame* lin;
 
   QLabel* labAxis = new QLabel( tr( "AXIS_LBL" ),       frame );
+  QLabel* labAssigned = new QLabel( tr( "ASSIGNED" ),   frame );
   QLabel* labData = new QLabel( tr( "DATA_LBL" ),       frame );
   QLabel* labUnit = new QLabel( tr( "UNITS_LBL" ),      frame );
   QLabel* labAttr = new QLabel( tr( "ATTRIBUTES_LBL" ), frame );
   labAxis->setAlignment( AlignCenter );
+  labAssigned->setAlignment( AlignCenter );
   labData->setAlignment( AlignCenter );
   labUnit->setAlignment( AlignCenter );
   labAttr->setAlignment( AlignCenter );
   QFont font = labAxis->font(); font.setBold( true );
   labAxis->setFont( font );
+  labAssigned->setFont( font );
   labData->setFont( font );
   labUnit->setFont( font );
   labAttr->setFont( font );
@@ -104,16 +107,21 @@ VisuGUI_SetupPlot2dDlg::VisuGUI_SetupPlot2dDlg( _PTR(SObject) object, QWidget* p
   frameLayout->addMultiCellWidget( labAxis, 0,  0, 0, 1 );
       lin = new QFrame( frame ); lin->setFrameStyle( QFrame::VLine | QFrame::Sunken );
       frameLayout->addWidget( lin,          0,     2 );
-  frameLayout->addWidget( labData,          0,     3 );
+
+  frameLayout->addWidget( labAssigned,      0,     3 );
       lin = new QFrame( frame ); lin->setFrameStyle( QFrame::VLine | QFrame::Sunken );
       frameLayout->addWidget( lin,          0,     4 );
-  frameLayout->addWidget( labUnit,          0,     5 );
+
+  frameLayout->addWidget( labData,          0,     5 );
       lin = new QFrame( frame ); lin->setFrameStyle( QFrame::VLine | QFrame::Sunken );
       frameLayout->addWidget( lin,          0,     6 );
-  frameLayout->addMultiCellWidget( labAttr, 0,  0, 7, 11 );
-  frameLayout->setColStretch(               12, 5 );
+  frameLayout->addWidget( labUnit,          0,     7 );
+      lin = new QFrame( frame ); lin->setFrameStyle( QFrame::VLine | QFrame::Sunken );
+      frameLayout->addWidget( lin,          0,     8 );
+  frameLayout->addMultiCellWidget( labAttr, 0,  0, 9, 13 );
+  frameLayout->setColStretch(               14, 5 );
   lin = new QFrame( frame ); lin->setFrameStyle( QFrame::HLine | QFrame::Sunken );
-  frameLayout->addMultiCellWidget( lin, 1, 1, 0, 12 );
+  frameLayout->addMultiCellWidget( lin, 1, 1, 0, 14 );
 
   int row = 2;
   _PTR(GenericAttribute)        anAttr;
@@ -128,22 +136,28 @@ VisuGUI_SetupPlot2dDlg::VisuGUI_SetupPlot2dDlg( _PTR(SObject) object, QWidget* p
        int nbRows = tblIntAttr->GetNbRows() ; 
        vector<string> rowTitles = tblIntAttr->GetRowTitles();
        vector<string> rowUnits  = tblIntAttr->GetRowUnits();
+       QStringList rows;
+       for ( int i = 0; i < nbRows; i++ )
+         rows.append( rowTitles[i] );
+
        for ( int i = 0; i < nbRows; i++ ) {
          VisuGUI_ItemContainer* item = new VisuGUI_ItemContainer( this );
-         item->createWidgets( frame );
+         item->createWidgets( frame, rows );
          frameLayout->addWidget( item->myHBtn,        row, 0 );
          frameLayout->addWidget( item->myVBtn,        row, 1 );
-         frameLayout->addWidget( item->myTitleLab,    row, 3 );
+         frameLayout->addWidget( item->myAssigned,    row, 3 );
+
+         frameLayout->addWidget( item->myTitleLab,    row, 5 );
          if ( rowTitles.size() > 0 )
            item->myTitleLab->setText( QString( rowTitles[ i ].c_str() ) );
-         frameLayout->addWidget( item->myUnitLab,     row, 5 );
+         frameLayout->addWidget( item->myUnitLab,     row, 7 );
          if ( rowUnits.size() > 0 )
            item->myUnitLab->setText( QString( rowUnits[ i ].c_str() ) );
-         frameLayout->addWidget( item->myAutoCheck,   row, 7 );
-         frameLayout->addWidget( item->myLineCombo,   row, 8 );
-         frameLayout->addWidget( item->myLineSpin,    row, 9 );
-         frameLayout->addWidget( item->myMarkerCombo, row, 10 );
-         frameLayout->addWidget( item->myColorBtn,    row, 11 );
+         frameLayout->addWidget( item->myAutoCheck,   row, 9 );
+         frameLayout->addWidget( item->myLineCombo,   row, 10 );
+         frameLayout->addWidget( item->myLineSpin,    row, 11 );
+         frameLayout->addWidget( item->myMarkerCombo, row, 12 );
+         frameLayout->addWidget( item->myColorBtn,    row, 13 );
          connect( item, SIGNAL( horToggled( bool ) ), this, SLOT( onHBtnToggled( bool ) ) );
          connect( item, SIGNAL( verToggled( bool ) ), this, SLOT( onVBtnToggled( bool ) ) );
          myItems.append( item );
@@ -163,22 +177,28 @@ VisuGUI_SetupPlot2dDlg::VisuGUI_SetupPlot2dDlg( _PTR(SObject) object, QWidget* p
        int nbRows = tblRealAttr->GetNbRows() ; 
        vector<string> rowTitles = tblRealAttr->GetRowTitles();
        vector<string> rowUnits  = tblRealAttr->GetRowUnits();
+       QStringList rows;
+       for ( int i = 0; i < nbRows; i++ )
+         rows.append( rowTitles[i] );
+
        for ( int i = 0; i < nbRows; i++ ) {
          VisuGUI_ItemContainer* item = new VisuGUI_ItemContainer( this );
-         item->createWidgets( frame );
+         item->createWidgets( frame, rows );
          frameLayout->addWidget( item->myHBtn,        row, 0 );
          frameLayout->addWidget( item->myVBtn,        row, 1 );
-         frameLayout->addWidget( item->myTitleLab,    row, 3 );
+         frameLayout->addWidget( item->myAssigned,    row, 3 );
+
+         frameLayout->addWidget( item->myTitleLab,    row, 5 );
          if ( rowTitles.size() > 0 )
            item->myTitleLab->setText( QString( rowTitles[ i ].c_str() ) );
-         frameLayout->addWidget( item->myUnitLab,     row, 5 );
+         frameLayout->addWidget( item->myUnitLab,     row, 7 );
          if ( rowUnits.size() > 0 )
            item->myUnitLab->setText( QString( rowUnits[ i ].c_str() ) );
-         frameLayout->addWidget( item->myAutoCheck,   row, 7 );
-         frameLayout->addWidget( item->myLineCombo,   row, 8 );
-         frameLayout->addWidget( item->myLineSpin,    row, 9 );
-         frameLayout->addWidget( item->myMarkerCombo, row, 10 );
-         frameLayout->addWidget( item->myColorBtn,    row, 11 );
+         frameLayout->addWidget( item->myAutoCheck,   row, 9 );
+         frameLayout->addWidget( item->myLineCombo,   row, 10 );
+         frameLayout->addWidget( item->myLineSpin,    row, 11 );
+         frameLayout->addWidget( item->myMarkerCombo, row, 12 );
+         frameLayout->addWidget( item->myColorBtn,    row, 13 );
          connect( item, SIGNAL( horToggled( bool ) ), this, SLOT( onHBtnToggled( bool ) ) );
          connect( item, SIGNAL( verToggled( bool ) ), this, SLOT( onVBtnToggled( bool ) ) );
          myItems.append( item );
@@ -237,7 +257,8 @@ VisuGUI_SetupPlot2dDlg::~VisuGUI_SetupPlot2dDlg()
 /*!
   Gets curves info ( indexes of row data in the table for horizontal and verical axes )
 */
-void VisuGUI_SetupPlot2dDlg::getCurvesSource( int& horIndex, QValueList<int>& verIndexes )
+void VisuGUI_SetupPlot2dDlg::getCurvesSource( int& horIndex, QValueList<int>& verIndexes,
+                                             QValueList<int>& zIndices )
 {
   /* collecting horizontal and vertical axis items */
   horIndex = -1;
@@ -248,7 +269,9 @@ void VisuGUI_SetupPlot2dDlg::getCurvesSource( int& horIndex, QValueList<int>& ve
     }
     else if ( myItems.at( i )->isVerticalOn() ) {
       verIndexes.append( i );
+      zIndices.append( myItems.at( i )->assigned() );
     }
+    
   }
 }
 /*!
@@ -286,8 +309,8 @@ void VisuGUI_SetupPlot2dDlg::getCurves( QPtrList<Plot2d_Curve>& container )
   /* collecting horizontal and vertical axis items */
   int horIndex;
   int i, j;
-  QValueList<int> verIndex;
-  getCurvesSource( horIndex, verIndex );
+  QValueList<int> verIndex, zIndices;
+  getCurvesSource( horIndex, verIndex, zIndices );
   if ( horIndex < 0 || verIndex.isEmpty() ) /* no curves can be created */
     return;
     
@@ -321,13 +344,15 @@ void VisuGUI_SetupPlot2dDlg::getCurves( QPtrList<Plot2d_Curve>& container )
          if ( nbPoints > 0 ) {
            double* xList = new double[ nbPoints ];
            double* yList = new double[ nbPoints ];
+           QStringList zList;
            for ( j = 1; j <= nbCols; j++ ) {
              if ( tblIntAttr->HasValue( horIndex+1, j ) && tblIntAttr->HasValue( verIndex[i]+1, j ) ) {
                xList[j-1] = tblIntAttr->GetValue( horIndex   +1, j );
                yList[j-1] = tblIntAttr->GetValue( verIndex[i]+1, j );
+               zList.append( QString( "%1" ).arg( tblIntAttr->GetValue( zIndices[i]+1, j ) ) );
              }
            }
-           curve->setData( xList, yList, nbPoints );
+           curve->setData( xList, yList, nbPoints, zList );
          }
          // curve attributes
          curve->setLine( (Plot2d_Curve::LineType)myItems.at( verIndex[i] )->getLine(), myItems.at( verIndex[i] )->getLineWidth() );
@@ -373,13 +398,15 @@ void VisuGUI_SetupPlot2dDlg::getCurves( QPtrList<Plot2d_Curve>& container )
          if ( nbPoints > 0 ) {
            double* xList = new double[ nbPoints ];
            double* yList = new double[ nbPoints ];
+           QStringList zList;
            for ( j = 1; j <= nbCols; j++ ) {
              if ( tblRealAttr->HasValue( horIndex+1, j ) && tblRealAttr->HasValue( verIndex[i]+1, j ) ) {
                xList[j-1] = tblRealAttr->GetValue( horIndex   +1, j );
                yList[j-1] = tblRealAttr->GetValue( verIndex[i]+1, j );
+               zList.append( QString( "%1" ).arg( tblIntAttr->GetValue( zIndices[i]+1, j ) ) );
              }
            }
-           curve->setData( xList, yList, nbPoints );
+           curve->setData( xList, yList, nbPoints, zList );
          }
          // curve attributes
          curve->setLine( (Plot2d_Curve::LineType)myItems.at( verIndex[i] )->getLine(), myItems.at( verIndex[i] )->getLineWidth() );
@@ -418,6 +445,7 @@ void VisuGUI_SetupPlot2dDlg::onVBtnToggled( bool on )
   VisuGUI_ItemContainer* item = ( VisuGUI_ItemContainer* )sender();
   QPtrList<VisuGUI_ItemContainer> itemList;
   itemList.setAutoDelete( false );
+  item->myAssigned->setEnabled( on );
   int i;
   if ( on ) {
     int totalOn = 0;
@@ -499,6 +527,22 @@ void VisuGUI_SetupPlot2dDlg::enableControls()
   myOkBtn->setEnabled( bHSet && bVSet );
 }
 
+/*!
+  Provides help on F1 button click
+*/
+void VisuGUI_SetupPlot2dDlg::keyPressEvent( QKeyEvent* e )
+{
+  QDialog::keyPressEvent( e );
+  if ( e->isAccepted() )
+    return;
+
+  if ( e->key() == Key_F1 )
+    {
+      e->accept();
+      onHelp();
+    }
+}
+
 // ====================================================================================
 /*!
   Constructor
@@ -511,7 +555,7 @@ VisuGUI_ItemContainer::VisuGUI_ItemContainer( QObject* parent, const char* name
 /*!
   Creates widgets
 */
-void VisuGUI_ItemContainer::createWidgets( QWidget* parentWidget )
+void VisuGUI_ItemContainer::createWidgets( QWidget* parentWidget, const QStringList& lst )
 {
   myHBtn = new QToolButton( parentWidget );
   myHBtn->setText( tr( "H" ) );
@@ -557,6 +601,13 @@ void VisuGUI_ItemContainer::createWidgets( QWidget* parentWidget )
 
   myColorBtn = new QToolButton( parentWidget );
   myColorBtn->setMinimumWidth( 20 );
+
+  myAssigned = new QComboBox( false, parentWidget );
+  myAssigned->insertItem( "" );
+  QStringList::const_iterator anIt = lst.begin(), aLast = lst.end();
+  for( ; anIt!=aLast; anIt++ )
+    myAssigned->insertItem( *anIt );
+  myAssigned->setEnabled( false );
  
   connect( myAutoCheck, SIGNAL( clicked() ),       this, SLOT( onAutoChanged() ) );
   connect( myColorBtn,  SIGNAL( clicked() ),       this, SLOT( onColorChanged() ) );
@@ -729,7 +780,13 @@ void VisuGUI_ItemContainer::onHVToggled( bool on )
   }
 }
 
-
-
-
-
+/*!
+  \return index of assigned row (0, if there is no assigned row)
+*/
+int VisuGUI_ItemContainer::assigned() const
+{
+  if( isVerticalOn() )
+    return myAssigned->currentItem()-1;
+  else
+    return -1;
+}
index 4332f048750b1ed835ce784e6da94fb9e0093870..234a28704cdf406af6e00aa7dfa69e76c0244e4d 100644 (file)
@@ -54,9 +54,12 @@ public:
   ~VisuGUI_SetupPlot2dDlg();
 
   void getCurves( QPtrList<Plot2d_Curve>& container );
-  void getCurvesSource( int& horIndex, QValueList<int>& verIndexes );
+  void getCurvesSource( int& horIndex, QValueList<int>& verIndexes, QValueList<int>& zIndexes );
   bool getCurveAttributes( const int vIndex, bool& isAuto, int& marker, int& line, int& lineWidth, QColor& color);
 
+private:
+  void keyPressEvent( QKeyEvent* e );
+
 private slots:
   void onHBtnToggled( bool );
   void onVBtnToggled( bool );
@@ -80,7 +83,7 @@ class VisuGUI_ItemContainer : public QObject
 public:
   VisuGUI_ItemContainer( QObject* parent = 0, const char* name = 0 );
   
-  void   createWidgets( QWidget* parentWidget );
+  void   createWidgets( QWidget* parentWidget, const QStringList& );
   void   enableWidgets( bool enable );
 
   void   setHorizontalOn( bool on );
@@ -96,6 +99,7 @@ public:
   int    getMarker() const;
   void   setColor( const QColor& color );
   QColor getColor() const;
+  int    assigned() const;
 
 protected:
   void   updateState();
@@ -119,7 +123,7 @@ public:
   QCheckBox*            myAutoCheck;
   QComboBox*            myLineCombo;
   QSpinBox*             myLineSpin;
-  QComboBox*            myMarkerCombo;
+  QComboBox*            myMarkerCombo, *myAssigned;
   QToolButton*          myColorBtn;
 };
 
index e3668af8ff89e8a0313f7a1d34c86ba858874fbe..e4c82e8e7cc69def9705600d6d9e8cd7d99cfae0 100644 (file)
@@ -634,3 +634,16 @@ void VisuGUI_StreamLinesDlg::onHelp()
                           QObject::tr("BUT_OK"));
   }
 }
+
+void VisuGUI_StreamLinesDlg::keyPressEvent( QKeyEvent* e )
+{
+  QDialog::keyPressEvent( e );
+  if ( e->isAccepted() )
+    return;
+
+  if ( e->key() == Key_F1 )
+    {
+      e->accept();
+      onHelp();
+    }
+}
index b1e33ac3071a27bdf40a870a61d202cf84bce62e..263ef4be4923dd22c7bdbe8795e138c10647d72c 100644 (file)
@@ -50,6 +50,9 @@ public:
     void setColor( QColor color );
     void enableMagnColor( bool enable );
 
+private:
+    void keyPressEvent( QKeyEvent* e );
+
 protected slots:
   void accept();
   void reject();
index fe7c72ff845077e7953cd0e254d809f4f95f38dd..5b7a2ccb6c9c076f5cb91923a8d8fff2751bf99f 100644 (file)
@@ -834,8 +834,8 @@ void SetupDlg::onArrangeDlg()
 //------------------------------------------------------------------------
 void SetupDlg::onRangeCheck (bool theCheck)
 {
-  for (int i = 0; i < myAnimator->getNbFields(); i++)
-    myAnimator->clearData(myAnimator->getFieldData(i));
+//   for (int i = 0; i < myAnimator->getNbFields(); i++)
+//     myAnimator->clearData(myAnimator->getFieldData(i));
 
   myMinVal->setEnabled(theCheck);
   myMaxVal->setEnabled(theCheck);
@@ -1354,18 +1354,9 @@ void VisuGUI_TimeAnimationDlg::reject()
 //------------------------------------------------------------------------
 void VisuGUI_TimeAnimationDlg::closeEvent (QCloseEvent* theEvent)
 {
- if (isClosing) {
-   if(theEvent->type() == QEvent::Close){
-           for (int i = 0; i < myAnimator->getNbFields(); i++)
-             myAnimator->clearData(myAnimator->getFieldData(i));
-           myAnimator->clearFieldData();
-    }
-    QDialog::closeEvent(theEvent);
-    return;
- }
- if(myAnimator != NULL){
+  if(myAnimator != NULL){
     myAnimator->stopAnimation();
-    myAnimator->wait();
+    myAnimator->wait(500);
     if (myAnimator->running() && (! myAnimator->finished())) {
       isClosing = true;
       myEvent = theEvent;
@@ -1373,12 +1364,12 @@ void VisuGUI_TimeAnimationDlg::closeEvent (QCloseEvent* theEvent)
       //        * It needed for correcting destroing of myAnimator, which 
       //        * depend from SVTK_RenderWindowInteractor() e.t.c.
       if(theEvent->type() == QEvent::Close){
-             for (int i = 0; i < myAnimator->getNbFields(); i++)
-               myAnimator->clearData(myAnimator->getFieldData(i));
-             myAnimator->clearFieldData();
+       for (int i = 0; i < myAnimator->getNbFields(); i++)
+         myAnimator->clearData(myAnimator->getFieldData(i));
+       myAnimator->clearFieldData();
       }
     } else {
-     QDialog::closeEvent(theEvent);
+      QDialog::closeEvent(theEvent);
     }
   } else {
     QDialog::closeEvent(theEvent);
@@ -1550,3 +1541,18 @@ void VisuGUI_TimeAnimationDlg::onPathChanged()
 {
   myAnimator->dumpTo(myPathEdit->text());
 }
+
+//------------------------------------------------------------------------
+void VisuGUI_TimeAnimationDlg::keyPressEvent( QKeyEvent* e )
+{
+  QDialog::keyPressEvent( e );
+  if ( e->isAccepted() )
+    return;
+
+  if ( e->key() == Key_F1 )
+    {
+      e->accept();
+      onHelp();
+    }
+}
+
index 3d59282694c7d20cdc1be56bfab3e66fc27d7a48..604cd24bc4e01c096528a04d86dadc0eafbc2862 100644 (file)
@@ -154,6 +154,7 @@ class VisuGUI_TimeAnimationDlg: public QDialog
  protected:
     virtual void closeEvent(QCloseEvent* theEvent);
     virtual void showEvent(QShowEvent* theEvent);
+    virtual void keyPressEvent(QKeyEvent* theEvent);
     virtual void reject();
     void stopAnimation();
 
index ffefafb9ad3827408b9e3652a9882e56da6f1b33..1bc379bb764df701374a47d36a6cdb76bfe7b3a4 100644 (file)
@@ -825,9 +825,10 @@ namespace VISU
         plotCurve->setVerUnits( theCurve->GetVerUnits().c_str() );
         double* xList = 0;
         double* yList = 0;
-        int     nbPoints = theCurve->GetData( xList, yList );
+       QStringList zList;
+        int     nbPoints = theCurve->GetData( xList, yList, zList );
         if ( nbPoints > 0 && xList && yList ) {
-          plotCurve->setData( xList, yList, nbPoints );
+          plotCurve->setData( xList, yList, nbPoints, zList );
         }
         if ( !theCurve->IsAuto() ) {
           plotCurve->setLine( (Plot2d_Curve::LineType)theCurve->GetLine(), theCurve->GetLineWidth() );
index 70109fdbb7e6921004d87d6b502b885915382366..2904e209712802f3921eee265697cb1d5cf5119d 100644 (file)
@@ -279,3 +279,20 @@ void VisuGUI_TransparencyDlg::onSelectionChanged()
   }
   ValueHasChanged();
 }
+
+//=================================================================================
+// function : keyPressEvent()
+// purpose  :
+//=================================================================================
+void VisuGUI_TransparencyDlg::keyPressEvent( QKeyEvent* e )
+{
+  QDialog::keyPressEvent( e );
+  if ( e->isAccepted() )
+    return;
+
+  if ( e->key() == Key_F1 )
+    {
+      e->accept();
+      ClickOnHelp();
+    }
+}
index 9a67b25b85990ed3623a2cb8c9b5946949c0c422..2809a46055777f66492fa586cc4192e79a4aabf5 100644 (file)
@@ -56,6 +56,9 @@ public:
 
   ~VisuGUI_TransparencyDlg();
 
+private:
+  void                    keyPressEvent( QKeyEvent* e );
+
 private :
   LightApp_SelectionMgr*  mySelectionMgr;
   SVTK_ViewWindow*        myViewWindow;
index 04f3cdefacb533cdfc1b19fd5fb0c430ef94ed6c..53961573f16798036a9b9410d0ecaff4d47fa476 100644 (file)
@@ -450,3 +450,16 @@ void VisuGUI_VectorsDlg::onHelp()
                           QObject::tr("BUT_OK"));
   }
 }
+
+void VisuGUI_VectorsDlg::keyPressEvent( QKeyEvent* e )
+{
+  QDialog::keyPressEvent( e );
+  if ( e->isAccepted() )
+    return;
+
+  if ( e->key() == Key_F1 )
+    {
+      e->accept();
+      onHelp();
+    }
+}
index 857887ce8bf31ae4c050d1d3103eac9d7d1320e9..091fec4d36e49c4b5a12946324087fd85089e658 100644 (file)
@@ -79,6 +79,10 @@ public:
     void initFromPrsObject(VISU::Vectors_i* thePrs);
     int storeToPrsObject(VISU::Vectors_i* thePrs);
 
+private:
+    void keyPressEvent( QKeyEvent* e );
+  
+
 protected slots:
   void accept();
   void reject();
index 7f9b4b7fc5f4826286da927fa5f5ff2b57b3f5ad..8c2920dccd005ea1c7522027ecdfe7e0e527fbb9 100644 (file)
@@ -169,19 +169,25 @@ void VISU::DeformedShape_i::SetMapScale(double theMapScale){
 
 VISU_Actor* 
 VISU::DeformedShape_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO) 
+::CreateActor(const Handle(SALOME_InteractiveObject)& theIO, bool toSupressShrinking
 {
-  VISU_Actor* anActor = VISU::ScalarMap_i::CreateActor(theIO);
+  VISU_Actor* anActor = VISU::ScalarMap_i::CreateActor(theIO, true);
   anActor->SetVTKMapping(false);
   SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
   int  aDispMode = aResourceMgr->integerValue("VISU", "deformed_shape_represent", 1);
   bool toShrink  = aResourceMgr->booleanValue("VISU", "deformed_shape_shrink", false);
   anActor->SetRepresentation(aDispMode);
-  if (toShrink) anActor->SetShrink();
+  if (toShrink && !toSupressShrinking) anActor->SetShrink();
   anActor->GetProperty()->SetColor(myColor.R,myColor.G,myColor.B);
   return anActor;
 }
 
+VISU_Actor* 
+VISU::DeformedShape_i
+::CreateActor(const Handle(SALOME_InteractiveObject)& theIO) 
+{
+  return CreateActor(theIO, false);
+}
 
 void VISU::DeformedShape_i::UpdateActor(VISU_Actor* theActor) {
   if(VISU_ScalarMapAct* anActor = dynamic_cast<VISU_ScalarMapAct*>(theActor)){
index c2e6777f0c03e6fef52592464049cbde4546e7b5..a19e9c857b78cfa0970deb17011c6a68722a5f59 100644 (file)
@@ -91,6 +91,10 @@ namespace VISU{
     VISU_Actor* 
     CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
 
+    virtual 
+    VISU_Actor* 
+    CreateActor(const Handle(SALOME_InteractiveObject)& theIO, bool toSupressShrinking);
+
     virtual void UpdateActor(VISU_Actor* theActor) ;
   };
 }
index dec25f6a5443f24d2a723bde514fc3d77ce9e726..a5378c0a65bc63a610ca22d7b8eb7494ac9adac3 100644 (file)
@@ -967,11 +967,19 @@ namespace VISU
         case VISU::TCURVE:
           if(Curve_i* aServant = dynamic_cast<Curve_i*>(GetServant(anObj).in()))
           {
-           theStr << thePrefix << "aName2ObjectMap['" << aName << "'] = visu.CreateCurve(" <<
+           bool withZ = aServant->GetZRow()>0;
+             
+           theStr << thePrefix << "aName2ObjectMap['" << aName << "'] = visu.CreateCurve";
+           if( withZ )
+             theStr << "WithZ";
+           theStr << "(" <<
               theArgumentName<< // table
                 ","<<aServant->GetHRow()<< // H row
-                  ","<<aServant->GetVRow()<< // V row
-                    ",'"<<aServant->GetTitle()<<"'"; // title
+                  ","<<aServant->GetVRow(); // V row
+           if( withZ )
+             theStr << "," << aServant->GetZRow(); // Z row
+
+           theStr << ",'"<<aServant->GetTitle()<<"'"; // title
            SALOMEDS::Color aColor = aServant->GetColor();
            theStr << ",SALOMEDS.Color("<<
              aColor.R<<","<<aColor.G<<","<<aColor.B<<")"; // color
@@ -1285,6 +1293,8 @@ namespace VISU
             CORBA::Boolean theIsPublished,
             CORBA::Boolean& theIsValidScript)
   {
+    theIsValidScript = false;
+
     SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow(theStudy);
     if(CORBA::is_nil(aStudy))
       return new Engines::TMPFile(0);
@@ -1299,7 +1309,7 @@ namespace VISU
 #endif
 
     std::string aPrefix(PREFIX);
-    aStr<<"### This file is generated by SALOME automatically by dump python funcitonality"
+    aStr<<"### This file is generated by SALOME automatically by dump python functionality"
       " of VISU component"<<endl<<endl;
     aStr<<"def RebuildData(theStudy):"<<endl;
     aStr<<aPrefix<<"from batchmode_salome import orb, naming_service, lcc, myStudyManager"<<endl;
@@ -1329,6 +1339,10 @@ namespace VISU
     }
 
     aStr<<aPrefix<<"pass"<<endl;
+    // theIsValidScript currently is not used by internal dump methods (DumpChildrenToPython(), etc.)
+    // If the situation changes, then the following line should be removed, and theIsValidScript
+    // should be set properly by those internal methods
+    theIsValidScript = true;
 
 #ifndef COUT
     std::string aResult = aStr.str();
index f8fb14a02f870eb09393028a1b272e2d4ce41d74..2fde203e88d8f84600bbc39a0b1706cd9fb0896d 100644 (file)
@@ -196,10 +196,10 @@ VISU::GaussPoints_i
   int aFaceLimit = aResourceMgr->integerValue( "VISU", "geom_sphere_face_limit", GetFaceLimit() );
   SetFaceLimit( aFaceLimit );
 
-  QString aMainTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/sprite_texture.bmp";
+  QString aMainTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/visu/sprite_texture.bmp";
   aMainTexture = aResourceMgr->stringValue( "VISU", "point_sprite_main_texture", aMainTexture );
 
-  QString anAlphaTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/sprite_alpha.bmp";
+  QString anAlphaTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/visu/sprite_alpha.bmp";
   anAlphaTexture = aResourceMgr->stringValue( "VISU", "point_sprite_alpha_texture", anAlphaTexture );
 
   SetTextures( aMainTexture, anAlphaTexture );
index 172cb49b67bfee7023a4d350b9cef886ad6ccfbf..a278a3a154e5547daaa870c107dbcab0d23d0f81 100644 (file)
@@ -17,7 +17,7 @@
 //  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
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //
 //  File   : VISU_Gen_i.cc
@@ -70,9 +70,9 @@
 #include CORBA_SERVER_HEADER(SALOME_ModuleCatalog)
 
 // QT Includes
-#include <qstring.h>
+#include <qdir.h>
 #include <qfileinfo.h>
-#include <qprocess.h>
+#include <qregexp.h>
 
 // VTK Includes
 #include <vtkRenderer.h>
 #include "Utils_ExceptHandlers.hxx"
 #include "CASCatch.hxx"
 
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#define NO_CAS_CATCH
+#endif
+
+#include <Standard_Failure.hxx>
+
+#ifdef NO_CAS_CATCH
+#include <Standard_ErrorHandler.hxx>
+#else
+#include "CASCatch.hxx"
+#endif
+
 using namespace std;
 
 static QFileInfo aFileInfo;
@@ -244,25 +256,85 @@ namespace VISU
 #ifndef _DEXCEPT_
       try{
 #endif
-       if(theColoredPrs3d->Create(theMeshName,theEntity,theFieldName,int(theIteration)))
-         return true;
+           if(theColoredPrs3d->Create(theMeshName,theEntity,theFieldName,int(theIteration)))
+             return true;
 #ifndef _DEXCEPT_
-      }catch(std::exception& exc){
-       INFOS("Follow exception was occured :\n"<<exc.what());
-      }catch(...){
-       INFOS("Unknown exception was occured!");
-      }
+         }catch(std::exception& exc){
+           INFOS("Follow exception was occured :\n"<<exc.what());
+         }catch(...){
+           INFOS("Unknown exception was occured!");
+         }
 #endif
-    }CASCatch_CATCH(Standard_Failure) {
-      Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-      INFOS("Follow signal was occured :\n"<<aFail->GetMessageString());
-    }
+      }CASCatch_CATCH(Standard_Failure){
+       Handle(Standard_Failure) aFail = Standard_Failure::Caught();          
+       INFOS("Follow signal was occured :\n"<<aFail->GetMessageString());
+      }
     return false;
-  }
+  }  
 
   VISU_Gen_i::~VISU_Gen_i(){
     if(MYDEBUG) MESSAGE("VISU_Gen_i::~VISU_Gen_i");
   }
+
+  void CorrectSObjectType(SALOMEDS::SObject_ptr theSObject)
+  {
+    SALOMEDS::GenericAttribute_var anAttr;
+    if ( theSObject->FindAttribute(anAttr, "AttributeComment") ) {
+      SALOMEDS::AttributeComment_var aAttComment = SALOMEDS::AttributeComment::_narrow(anAttr);
+      if ( aAttComment ) {
+       string aValue = aAttComment->Value();
+       if ( aValue.compare("") ) {
+         const QString aStr = QString( aValue.c_str() );
+         VISU::Storable::TRestoringMap aMap;
+         Storable::StrToMap( aStr, aMap );
+         
+         bool isFind = false;
+         QString aType = Storable::FindValue( aMap, "myType", &isFind );
+         if ( isFind ) {
+           VISU::VISUType aVISUType = (VISU::VISUType)( aType.toInt() );
+           QString aComment = Storable::FindValue( aMap, "myComment", &isFind );
+           if ( isFind ) {
+             if ( !aComment.compare(QString("NONE")) ) aVISUType = VISU::TNONE;
+             else if ( !aComment.compare(QString("CURVE")) ) aVISUType = VISU::TCURVE;
+             else if ( !aComment.compare(QString("TABLE")) ) aVISUType = VISU::TTABLE;
+             else if ( !aComment.compare(QString("CONTAINER")) ) aVISUType = VISU::TCONTAINER;
+             else if ( !aComment.compare(QString("MESH")) ) aVISUType = VISU::TMESH;
+             else if ( !aComment.compare(QString("SCALARMAP")) ) aVISUType = VISU::TSCALARMAP;
+             else if ( !aComment.compare(QString("ISOSURFACE")) ) aVISUType = VISU::TISOSURFACE;
+             else if ( !aComment.compare(QString("DEFORMEDSHAPE")) ) aVISUType = VISU::TDEFORMEDSHAPE;
+             else if ( !aComment.compare(QString("SCALARMAPONDEFORMEDSHAPE")) ) aVISUType = VISU::TSCALARMAPONDEFORMEDSHAPE;
+             else if ( !aComment.compare(QString("GAUSSPOINTS")) ) aVISUType = VISU::TGAUSSPOINTS;
+             else if ( !aComment.compare(QString("PLOT3D")) ) aVISUType = VISU::TPLOT3D;
+             else if ( !aComment.compare(QString("CUTPLANES")) ) aVISUType = VISU::TCUTPLANES;
+             else if ( !aComment.compare(QString("CUTLINES")) ) aVISUType = VISU::TCUTLINES;
+             else if ( !aComment.compare(QString("VECTORS")) ) aVISUType = VISU::TVECTORS;
+             else if ( !aComment.compare(QString("STREAMLINES")) ) aVISUType = VISU::TSTREAMLINES;
+             else if ( !aComment.compare(QString("VISUGEN")) ) aVISUType = VISU::TVISUGEN;
+             else if ( !aComment.compare(QString("VIEWMANAGER")) ) aVISUType = VISU::TVIEWMANAGER;
+             else if ( !aComment.compare(QString("RESULT")) ) aVISUType = VISU::TRESULT;
+             else if ( !aComment.compare(QString("XYPLOT")) ) aVISUType = VISU::TXYPLOT;
+             else if ( !aComment.compare(QString("TABLEVIEW,")) ) aVISUType = VISU::TTABLEVIEW;
+             else if ( !aComment.compare(QString("VIEW3D")) ) aVISUType = VISU::TVIEW3D;
+             else if ( !aComment.compare(QString("GAUSSVIEW")) ) aVISUType = VISU::TGAUSSVIEW;
+             else if ( !aComment.compare(QString("ENTITY")) ) aVISUType = VISU::TENTITY;
+             else if ( !aComment.compare(QString("FAMILY")) ) aVISUType = VISU::TFAMILY;
+             else if ( !aComment.compare(QString("GROUP")) ) aVISUType = VISU::TGROUP;
+             else if ( !aComment.compare(QString("FIELD")) ) aVISUType = VISU::TFIELD;
+             else if ( !aComment.compare(QString("TIMESTAMP")) ) aVISUType = VISU::TTIMESTAMP;
+             else if ( !aComment.compare(QString("ANIMATION")) ) aVISUType = VISU::TANIMATION;
+             else if ( !aComment.compare(QString("ALL")) ) aVISUType = VISU::TALL;
+             else
+               if (MYDEBUG) MESSAGE("Error : Unknown type of VISU object!");
+           }
+           QString aNewStr = aStr;
+           aAttComment->SetValue( aNewStr.replace( QRegExp( QString("myType=") + aType ) ,
+                                                   QString("myType=") + QString::number(aVISUType) ).latin1() );             
+         }
+       }
+      }
+    }
+  }
+
   //===========================================================================
   CORBA::Boolean VISU_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent,
                                  const SALOMEDS::TMPFile & theStream,
@@ -271,6 +343,13 @@ namespace VISU
   {
     Mutex mt(myMutex);
     SALOMEDS::Study_var aStudy = theComponent->GetStudy();
+
+    SALOMEDS::ChildIterator_var anIter = aStudy->NewChildIterator(theComponent);
+    for (anIter->InitEx(true); anIter->More(); anIter->Next()) {
+      SALOMEDS::SObject_var aSObject = anIter->Value();
+      CorrectSObjectType(aSObject);      
+    }
+
     SALOMEDS::StudyBuilder_var  aStudyBuilder = aStudy->NewBuilder();
     string aDir = isMultiFile ? theURL : SALOMEDS_Tool::GetTmpDir();
     TCollection_AsciiString aTmpDir (const_cast<char*>(aDir.c_str()));
@@ -303,6 +382,7 @@ namespace VISU
     }
     return aString._retn();
   }
+
   //===========================================================================
   SALOMEDS::TMPFile* VISU_Gen_i::Save(SALOMEDS::SComponent_ptr theComponent,
                                      const char* theURL,
@@ -332,13 +412,11 @@ namespace VISU
          std::string aFile = aFileInfo.filePath().latin1();
          if(theIsMultiFile){
            aFileName = SALOMEDS_Tool::GetNameFromPath(aStudy->URL()) + aFileName;
-      //std::ostringstream aStream;
-      QString aCommand;
-      aCommand.sprintf( " %s %s%s", aFile.c_str(), aTmpDir.c_str(), aFileName.c_str() ); 
-      aCommand = QDir::convertSeparators( aCommand );
-      aCommand.prepend( COPY_COMMAND );
-             
-                       if(system(aCommand.latin1())){
+
+           std::ostringstream aStream;
+           aStream<<"cp "<<aFile<<" "<<aTmpDir<<aFileName;
+           std::string aCommand = aStream.str();
+           if(system(aCommand.c_str()) != 0){
              INFOS("VISU_Gen_i::Save - Cann't execute the command :"<<aCommand);
              continue;
            }
@@ -851,13 +929,21 @@ namespace VISU
   Curve_ptr VISU_Gen_i::CreateCurve(Table_ptr theTable,
                                    CORBA::Long theHRow,
                                    CORBA::Long theVRow)
+  {
+    return CreateCurveWithZ( theTable, theHRow, theVRow, 0 );
+  }
+
+  Curve_ptr VISU_Gen_i::CreateCurveWithZ(Table_ptr theTable,
+                                   CORBA::Long theHRow,
+                                   CORBA::Long theVRow,
+                                   CORBA::Long theZRow)
   {
     if(myStudyDocument->GetProperties()->IsLocked())
       return Curve::_nil();
     Mutex mt(myMutex);
     PortableServer::POA_ptr aPOA = GetPOA();
     Table_i* pTable = dynamic_cast<Table_i*>(aPOA->reference_to_servant(theTable));
-    Curve_i* pPresent = new Curve_i(myStudyDocument,pTable,theHRow,theVRow);
+    Curve_i* pPresent = new Curve_i(myStudyDocument,pTable,theHRow,theVRow,theZRow);
     if(pPresent->Create() != NULL)
       return pPresent->_this();
     else{
index 04870fc561122ea5a5fe920754936ce374470720..e2da330a6c2642e77988caadf72683f79b0af95d 100644 (file)
@@ -284,6 +284,12 @@ namespace VISU
     CreateCurve(Table_ptr theTable, 
                CORBA::Long theHRow, 
                CORBA::Long theVRow);
+    virtual
+    Curve_ptr
+    CreateCurveWithZ(Table_ptr theTable, 
+               CORBA::Long theHRow, 
+               CORBA::Long theVRow,
+               CORBA::Long theZRow);
 
     virtual
     Container_ptr 
index cdd8dc00fa725248bae5612f76a02a4dc3395973..ababd5074ccc8c94689164a913db0acd42ab994b 100644 (file)
@@ -247,24 +247,32 @@ VISU::Storable* VISU::Mesh_i::Build (int theRestoring)
       myType = VISU::TGROUP;
 
     if(MYDEBUG) MESSAGE("Mesh_i::Build - myType = "<<myType);
-    QString aComment;
+    QString aComment,aTmp;
 
     VISU::PIDMapper anIDMapper;
     switch(myType){
     case VISU::TENTITY :
       anIDMapper = myResult->GetInput()->GetMeshOnEntity(myMeshName,(VISU::TEntity)myEntity);//jfa IPAL9284
-      aComment.sprintf("myComment=ENTITY;myType=%d;myMeshName=%s;myId=%d",
-                      VISU::TENTITY,myMeshName.c_str(),myEntity);
+      aComment = "";
+      aComment.append(aTmp.sprintf("myComment=ENTITY;myType=%d;",VISU::TENTITY));
+      aComment.append("myMeshName=");aComment.append(myMeshName);aComment.append(";");
+      aComment.append(aTmp.sprintf("myId=%d",myEntity));
       break;
     case VISU::TFAMILY :
       anIDMapper = myResult->GetInput()->GetFamilyOnEntity(myMeshName,(VISU::TEntity)myEntity,mySubMeshName);
-      aComment.sprintf("myComment=FAMILY;myType=%d;myMeshName=%s;myEntityId=%d;myName=%s",
-                      VISU::TFAMILY,myMeshName.c_str(),myEntity,mySubMeshName.c_str());
+      aComment = "";
+      aComment.append(aTmp.sprintf("myComment=FAMILY;myType=%d;",VISU::TFAMILY));
+      aComment.append("myMeshName=");aComment.append(myMeshName);aComment.append(";");
+      aComment.append(aTmp.sprintf("myEntityId=%d;",myEntity));
+      aComment.append("myName=");aComment.append(mySubMeshName);
       break;
     case VISU::TGROUP :
       anIDMapper = myResult->GetInput()->GetMeshOnGroup(myMeshName,mySubMeshName);
-      aComment.sprintf("myComment=GROUP;myType=%d;myMeshName=%s;myName=%s",
-                      VISU::TGROUP,myMeshName.c_str(),mySubMeshName.c_str());
+      aComment = "";
+      aComment.append(aTmp.sprintf("myComment=GROUP;myType=%d;",VISU::TGROUP));
+      aComment.append("myMeshName=");aComment.append(myMeshName);aComment.append(";");
+      aComment.append("myName=");aComment.append(mySubMeshName);
+      
       break;
     }
     if(!anIDMapper) 
index 70d0e429985a68baf146ddc17c79fc7a5a38ab0e..461b04f47800ea55dbaa95942c81b3d0584199aa 100644 (file)
@@ -91,18 +91,36 @@ VISU::Prs3d_i
   }
 }
 
+struct TRemoveActorsFromRendererEvent: public SALOME_Event
+{
+  typedef boost::signal0<void> TRemoveActorsFromRendererSignalType;
+  const TRemoveActorsFromRendererSignalType& myRemoveActorsFromRendererSignalVar;
+
+  TRemoveActorsFromRendererEvent
+  (const TRemoveActorsFromRendererSignalType& theRemoveActorsFromRendererSignalVar):
+    myRemoveActorsFromRendererSignalVar(theRemoveActorsFromRendererSignalVar)
+  {}
+
+  virtual
+  void
+  Execute()
+  {
+    myRemoveActorsFromRendererSignalVar();
+  }
+};
+
 VISU::Prs3d_i
-::~Prs3d_i() 
+::~Prs3d_i()
 {
   if(MYDEBUG) MESSAGE("Prs3d_i::~Prs3d_i - this = "<<this);
-  myRemoveActorsFromRendererSignal();
+  ProcessVoidEvent(new TRemoveActorsFromRendererEvent(myRemoveActorsFromRendererSignal));
   myPipeLine->Delete();
   myResult->Destroy();
 }
 
 
 //----------------------------------------------------------------------------
-VISU::Storable* 
+VISU::Storable*
 VISU::Prs3d_i
 ::Restore(const Storable::TRestoringMap& theMap)
 {
@@ -125,7 +143,7 @@ VISU::Prs3d_i
 
 
 //----------------------------------------------------------------------------
-SALOMEDS::SObject_var 
+SALOMEDS::SObject_var
 VISU::Prs3d_i
 ::GetSObject()
 {
@@ -137,25 +155,25 @@ VISU::Prs3d_i
   return mySObject;
 }
 
-Result_i* 
+Result_i*
 VISU::Prs3d_i
-::GetResult() const 
-{ 
+::GetResult() const
+{
   return myResult;
 }
 
-const std::string& 
+const std::string&
 VISU::Prs3d_i
-::GetMeshName() const 
-{ 
-  return myMeshName; 
+::GetMeshName() const
+{
+  return myMeshName;
 }
 
 
 //----------------------------------------------------------------------------
 void
 VISU::Prs3d_i
-::Update() 
+::Update()
 {
   if(MYDEBUG) MESSAGE("Prs3d_i::Update - this = "<<this);
   try{
@@ -169,7 +187,7 @@ VISU::Prs3d_i
 //----------------------------------------------------------------------------
 void
 VISU::Prs3d_i
-::CheckDataSet() 
+::CheckDataSet()
 {
   vtkMapper *aMapper = myPipeLine->GetMapper();
   vtkDataSet *aDataSet = aMapper->GetInput();
@@ -185,7 +203,7 @@ VISU::Prs3d_i
 
 void
 VISU::Prs3d_i
-::RemoveFromStudy() 
+::RemoveFromStudy()
 {
   struct TRemoveFromStudy: public SALOME_Event
   {
@@ -198,7 +216,7 @@ VISU::Prs3d_i
       myRemovable(theRemovable),
       myRemoveFromStudySignal(theRemoveFromStudySignal)
     {}
-    
+
     virtual
     void
     Execute()
@@ -213,21 +231,21 @@ VISU::Prs3d_i
 
 
 //----------------------------------------------------------------------------
-VISU_PipeLine* 
+VISU_PipeLine*
 VISU::Prs3d_i
 ::GetPipeLine()
 {
   return GetPL();
 }
 
-VISU_PipeLine* 
+VISU_PipeLine*
 VISU::Prs3d_i
 ::GetPL()
 {
   return myPipeLine;
 }
 
-vtkUnstructuredGrid* 
+vtkUnstructuredGrid*
 VISU::Prs3d_i::
 GetInput()
 {
@@ -274,7 +292,7 @@ VISU::Prs3d_i
 
 void
 VISU::Prs3d_i
-::RemoveActor(VISU_Actor* theActor) 
+::RemoveActor(VISU_Actor* theActor)
 {
   if(MYDEBUG) MESSAGE("Prs3d_i::RemoveActor - this = "<<this<<"; theActor = "<<theActor);
   myActorCollection->RemoveItem(theActor);
@@ -285,13 +303,13 @@ VISU::Prs3d_i
 ::RemoveActors()
 {
   if(MYDEBUG) MESSAGE("Prs3d_i::RemoveActors - this = "<<this);
-  myRemoveActorsFromRendererSignal();
+  ProcessVoidEvent(new TRemoveActorsFromRendererEvent(myRemoveActorsFromRendererSignal));
   myActorCollection->RemoveAllItems();
 }
 
 void
 VISU::Prs3d_i
-::UpdateActor(VISU_Actor* theActor) 
+::UpdateActor(VISU_Actor* theActor)
 {
   if(MYDEBUG) MESSAGE("Prs3d_i::UpdateActor - this = "<<this<<"; theActor = "<<theActor);
   theActor->ShallowCopyPL(myPipeLine);
@@ -303,10 +321,27 @@ void
 VISU::Prs3d_i
 ::UpdateActors()
 {
+  struct TUpdateActorsEvent: public SALOME_Event
+  {
+    typedef boost::signal0<void> TUpdateActorsSignalType;
+    const TUpdateActorsSignalType& myUpdateActorsSignalVar;
+
+    TUpdateActorsEvent(const TUpdateActorsSignalType& theUpdateActorsSignalVar):
+      myUpdateActorsSignalVar(theUpdateActorsSignalVar)
+    {}
+
+    virtual
+    void
+    Execute()
+    {
+      myUpdateActorsSignalVar();
+    }
+  };
+
   if(MYDEBUG) MESSAGE("Prs3d_i::UpdateActors - this = "<<this);
   Update();
   CheckDataSet();
-  myUpdateActorsSignal();
+  ProcessVoidEvent(new TUpdateActorsEvent(myUpdateActorsSignal));
 }
 
 
@@ -333,7 +368,7 @@ VISU::Prs3d_i
   return myPipeLine->GetNumberOfClippingPlanes();
 }
 
-vtkPlane* 
+vtkPlane*
 VISU::Prs3d_i::
 GetClippingPlane(vtkIdType theID) const
 {
@@ -342,9 +377,9 @@ GetClippingPlane(vtkIdType theID) const
 
 void
 VISU::Prs3d_i
-::SetPlaneParam (vtkFloatingPointType theDir[3], 
-                vtkFloatingPointType theDist, 
-                vtkPlane* thePlane) 
+::SetPlaneParam (vtkFloatingPointType theDir[3],
+                vtkFloatingPointType theDist,
+                vtkPlane* thePlane)
 {
   myPipeLine->SetPlaneParam(theDir, theDist, thePlane);
 }
@@ -358,7 +393,7 @@ VISU::Prs3d_i
   myPipeLine->GetMapper()->GetBounds(aBounds);
 }
 
-void 
+void
 VISU::Prs3d_i
 ::SetOffset(const CORBA::Float* theOffsets)
 {
@@ -369,8 +404,8 @@ VISU::Prs3d_i
 
 void
 VISU::Prs3d_i
-::SetOffset(CORBA::Float theDx, 
-           CORBA::Float theDy, 
+::SetOffset(CORBA::Float theDx,
+           CORBA::Float theDy,
            CORBA::Float theDz)
 {
   myOffset[0] = theDx;
@@ -387,10 +422,10 @@ VISU::Prs3d_i
   theOffsets[2] = myOffset[2];
 }
 
-void 
+void
 VISU::Prs3d_i
-::GetOffset(CORBA::Float& theDx, 
-           CORBA::Float& theDy, 
+::GetOffset(CORBA::Float& theDx,
+           CORBA::Float& theDy,
            CORBA::Float& theDz)
 {
   theDx = myOffset[0];
@@ -400,7 +435,7 @@ VISU::Prs3d_i
 
 
 //----------------------------------------------------------------------------
-VISU::Result_i* 
+VISU::Result_i*
 VISU::GetResult(SALOMEDS::SObject_ptr theSObject)
 {
   VISU::Result_var aResult = FindResult(theSObject);
index 295af7babfe9affec60b3a551384f6333e933a53..c1ec256e634d0619504da65d324f66ab4d11a1ae 100644 (file)
@@ -402,7 +402,7 @@ namespace VISU
       theInput->BuildEntities();
     }
 
-    QString aComment;
+    QString aComment,aTmp;
     const TMeshMap& aMeshMap = theInput->GetMeshMap();
     TMeshMap::const_iterator aMeshMapIter = aMeshMap.begin();
     for(; aMeshMapIter != aMeshMap.end(); aMeshMapIter++){
@@ -411,10 +411,10 @@ namespace VISU
       const TMeshOnEntityMap& aMeshOnEntityMap = aMesh->myMeshOnEntityMap;
       if(aMeshOnEntityMap.empty()) 
        continue;
-    
-      aComment.sprintf("myComment=MESH;myName=%s;myDim=%d",
-                      aMeshName.c_str(),
-                      aMesh->myDim);
+      aComment = "";
+      aComment.append("myComment=MESH;");
+      aComment.append("myName=");aComment.append(aMeshName);aComment.append(";");
+      aComment.append(aTmp.sprintf("myDim=%d",aMesh->myDim));
       aMesh->myEntry = 
        CreateAttributes(theStudy,
                         theResultEntry,
@@ -423,8 +423,9 @@ namespace VISU
                         aComment.latin1(),
                         true);
     
-      aComment.sprintf("myComment=FAMILIES;myMeshName=%s",
-                      aMeshName.c_str());
+      aComment = "";
+      aComment.append("myComment=FAMILIES;");
+      aComment.append("myMeshName=");aComment.append(aMeshName);
       string aSubMeshesEntry = 
        CreateAttributes(theStudy,
                         aMesh->myEntry,
@@ -477,10 +478,11 @@ namespace VISU
        continue;
        }
        
-       aComment.sprintf("myComment=ENTITY;myType=%d;myMeshName=%s;myId=%d",
-                        VISU::TENTITY,
-                        aMeshName.c_str(),
-                        anEntity);
+       aComment = "";
+       aComment.append(aTmp.sprintf("myComment=ENTITY;myType=%d;",VISU::TENTITY));
+       aComment.append("myMeshName=");aComment.append(aMeshName);aComment.append(";");
+       aComment.append(aTmp.sprintf("myId=%d",anEntity));
+       
        
        aMeshOnEntity->myEntry = 
          CreateAttributes(theStudy, 
@@ -516,7 +518,7 @@ namespace VISU
       theInput->BuildGroups();
     }
 
-    QString aComment;
+    QString aComment,aTmp;
     const TMeshMap& aMeshMap = theInput->GetMeshMap();
     TMeshMap::const_iterator aMeshMapIter = aMeshMap.begin();
     for(; aMeshMapIter != aMeshMap.end(); aMeshMapIter++){
@@ -537,11 +539,12 @@ namespace VISU
        for(; aFamilyMapIter != aFamilyMap.end(); aFamilyMapIter++){
          const string& aFamilyName = aFamilyMapIter->first;
          const PFamily& aFamily = aFamilyMapIter->second;
-         aComment.sprintf("myComment=FAMILY;myType=%d;myMeshName=%s;myEntityId=%d;myName=%s",
-                          TFAMILY,
-                          aMeshName.c_str(),
-                          anEntity,
-                          aFamilyName.c_str());
+         aComment = "";
+         aComment.append(aTmp.sprintf("myComment=FAMILY;myType=%d;",TFAMILY));
+         aComment.append("myMeshName=");aComment.append(aMeshName);aComment.append(";");
+         aComment.append(aTmp.sprintf("myEntityId=%d;",anEntity));
+         aComment.append("myName=");aComment.append(aFamilyName);
+         
          aFamily->myEntry =
            CreateAttributes(theStudy,
                             aMeshOnEntity->myEntry,
@@ -554,8 +557,9 @@ namespace VISU
       //Importing groups
       const TGroupMap& aGroupMap = aMesh->myGroupMap;
       if(!aGroupMap.empty()){
-       aComment.sprintf("myComment=GROUPS;myMeshName=%s",
-                        aMeshName.c_str());
+       aComment = "";
+       aComment.append("myComment=GROUPS;");
+       aComment.append("myMeshName=");aComment.append(aMeshName);
 
        UpdateAttributes(theStudy,
                         aMesh->myGroupsEntry,
@@ -567,8 +571,11 @@ namespace VISU
        for(; aGroupMapIter != aGroupMap.end(); aGroupMapIter++){
          const string& aGroupName = aGroupMapIter->first;
          const PGroup& aGroup = aGroupMapIter->second;
-         aComment.sprintf("myComment=GROUP;myType=%d;myMeshName=%s;myName=%s",
-                          TGROUP,aMeshName.c_str(),aGroupName.c_str());
+         aComment = "";
+         aComment.sprintf("myComment=GROUP;myType=%d;",
+                          TGROUP);
+         aComment.append("myMeshName=");aComment.append(aMeshName);aComment.append(";");
+         aComment.append("myName=");aComment.append(aGroupName);
          aGroup->myEntry = 
            CreateAttributes(theStudy,
                             aMesh->myGroupsEntry,
@@ -615,7 +622,7 @@ namespace VISU
       theInput->BuildFields();
     }
 
-    QString aComment;
+    QString aComment,aTmp;
     const TMeshMap& aMeshMap = theInput->GetMeshMap();
     TMeshMap::const_iterator aMeshMapIter = aMeshMap.begin();
     for(; aMeshMapIter != aMeshMap.end(); aMeshMapIter++){
@@ -636,9 +643,10 @@ namespace VISU
        TFieldMap::const_iterator aFieldMapIter = aFieldMap.begin();
        for(; aFieldMapIter != aFieldMap.end(); aFieldMapIter++){
          if(!anIsFieldsEntryUpdated){
-           aComment.sprintf("myComment=FIELDS;myMeshName=%s",
-                            aMeshName.c_str());
-
+           aComment = "";
+           aComment.append("myComment=FIELDS;");
+           aComment.append("myMeshName=");aComment.append(aMeshName);
+           
            UpdateAttributes(theStudy,
                             aMesh->myFieldsEntry,
                             "",
@@ -651,13 +659,13 @@ namespace VISU
          const PField& aField = aFieldMapIter->second;
          const TValField& aValField = aField->myValField;
          QString aFieldNameWithUnit = GenerateFieldName(aFieldName,aField->myUnitNames[0]);
-         aComment.sprintf("myComment=FIELD;myType=%d;myMeshName=%s;myEntityId=%d;myName=%s;myNbTimeStamps=%d;myNumComponent=%d",
-                          TFIELD,
-                          aMeshName.c_str(),
-                          anEntity,
-                          aFieldName.c_str(),
-                          aValField.size(),
-                          aField->myNbComp);
+         aComment = "";
+         aComment.sprintf("myComment=FIELD;myType=%d;",TFIELD);
+         aComment.append("myMeshName=");aComment.append(aMeshName);aComment.append(";");
+         aComment.append(aTmp.sprintf("myEntityId=%d;",anEntity));
+         aComment.append("myName=");aComment.append(aFieldName);aComment.append(";");
+         aComment.append(aTmp.sprintf("myNbTimeStamps=%d;",aValField.size()));
+         aComment.append(aTmp.sprintf("myNumComponent=%d",aField->myNbComp));
          aField->myEntry = 
            CreateAttributes(theStudy,
                             aMesh->myFieldsEntry,
@@ -672,13 +680,13 @@ namespace VISU
          for(; aValFieldIter != aValField.end(); aValFieldIter++){
            int aTimeStamp = aValFieldIter->first;
            const PValForTime& aValForTime = aValFieldIter->second;
-           aComment.sprintf("myComment=TIMESTAMP;myType=%d;myMeshName=%s;myEntityId=%d;myFieldName=%s;myTimeStampId=%d;myNumComponent=%d",
-                            TTIMESTAMP,
-                            aMeshName.c_str(),
-                            anEntity,
-                            aFieldName.c_str(),
-                            aTimeStamp,
-                            aField->myNbComp);
+           aComment = "";
+           aComment.sprintf("myComment=TIMESTAMP;myType=%d;",TTIMESTAMP);
+           aComment.append("myMeshName=");aComment.append(aMeshName);aComment.append(";");
+           aComment.append(aTmp.sprintf("myEntityId=%d;",anEntity));
+           aComment.append("myFieldName=");aComment.append(aFieldName);aComment.append(";");
+           aComment.append(aTmp.sprintf("myTimeStampId=%d;myNumComponent=%d",aTimeStamp,aField->myNbComp));
+           
            string aTimeStampId = VISU_Convertor::GenerateName(aValForTime->myTime);
            aValForTime->myEntry = 
              CreateAttributes(theStudy,
@@ -1480,9 +1488,9 @@ VISU::Result_i
   if(aCreationId == eImportMed || aCreationId == eImportMedField)
     aSourceId = eRestoredComponent;
 
-  CORBA::Boolean anIsBuildFields = Storable::FindValue(theMap,"myIsBuildFields","0").toInt();
-  CORBA::Boolean anIsBuildMinMax = Storable::FindValue(theMap,"myIsBuildMinMax","0").toInt();
-  CORBA::Boolean anIsBuildGroups = Storable::FindValue(theMap,"myIsBuildGroups","0").toInt();
+  CORBA::Boolean anIsBuildFields = Storable::FindValue(theMap,"myIsBuildFields","1").toInt();
+  CORBA::Boolean anIsBuildMinMax = Storable::FindValue(theMap,"myIsBuildMinMax","1").toInt();
+  CORBA::Boolean anIsBuildGroups = Storable::FindValue(theMap,"myIsBuildGroups","1").toInt();
 
   VISU::Result_i* aResult = new VISU::Result_i(aStudy,
                                               aSourceId,
@@ -1541,7 +1549,7 @@ VISU::Result_i
   return FindEntryWithComment(myStudyDocument,GetEntry().c_str(),theComment.c_str());
 }
 
-
+#include <stdio.h>
 //---------------------------------------------------------------
 VISU::Result_i
 ::~Result_i()
@@ -1554,14 +1562,17 @@ VISU::Result_i
 #else
     aCommand.sprintf("del /F %s",myFileInfo.filePath().latin1());
 #endif
-    MESSAGE("Result_i::~Result_i - system("<<aCommand<<") = "<<system(aCommand));
+    int res = system(aCommand);
+    MESSAGE("Result_i::~Result_i - system("<<aCommand<<") = "<<res);
 
 #ifndef WNT
     aCommand.sprintf("rmdir --ignore-fail-on-non-empty %s",myFileInfo.dirPath().latin1());
 #else
     aCommand.sprintf("del /F %s",myFileInfo.dirPath().latin1());
 #endif
-    MESSAGE("Result_i::~Result_i - system("<<aCommand<<") = "<<system(aCommand));
+
+    res = system(aCommand);
+    MESSAGE("Result_i::~Result_i - system("<<aCommand<<") = "<<res);
   }
   if(myInput) delete myInput;
 }
index 71fe93cb66710aa562b41751fce78e75e029bfd6..d2c7a7d366ce123d32a4d7eab4a43b62bdfd6154 100644 (file)
@@ -228,7 +228,7 @@ void VISU::ScalarMapOnDeformedShape_i::DoHook()
 VISU_Actor* VISU::ScalarMapOnDeformedShape_i::CreateActor(const Handle(SALOME_InteractiveObject)& theIO) 
 {
   if(MYDEBUG) cout << "VISU::ScalarMapOnDeformedShape_i::CreateActor:"<<__LINE__<<endl;
-  VISU_Actor* anActor = TSuperClass::CreateActor(theIO);
+  VISU_Actor* anActor = TSuperClass::CreateActor(theIO, true);
   SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
   int  aDispMode = aResourceMgr->integerValue("VISU", "scalar_def_represent", 2);
   bool toShrink  = aResourceMgr->booleanValue("VISU", "scalar_def_shrink", false);
index 2a26f380d115a3da46362fa0ed8912ba4edf58c8..e56862cfe1df96bf0b5d93a146c46ac2bacc0c3d 100644 (file)
@@ -304,7 +304,7 @@ VISU::ScalarMap_i
 //----------------------------------------------------------------------------
 VISU_Actor* 
 VISU::ScalarMap_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
+::CreateActor(const Handle(SALOME_InteractiveObject)& theIO, bool toSupressShrinking)
 {
   VISU_ScalarMapAct* anActor = VISU_ScalarMapAct::New();
   try{
@@ -315,7 +315,7 @@ VISU::ScalarMap_i
     bool toShrink  = aResourceMgr->booleanValue("VISU", "scalar_map_shrink", false);
     bool toUseShading = aResourceMgr->booleanValue("VISU", "represent_shading", false);
     anActor->SetRepresentation(aDispMode);
-    if (toShrink) anActor->SetShrink();
+    if (toShrink && !toSupressShrinking) anActor->SetShrink();
     anActor->SetShading(toUseShading);
     UpdateActor(anActor);
   }catch(...){
@@ -325,6 +325,13 @@ VISU::ScalarMap_i
   return anActor;
 }
 
+VISU_Actor* 
+VISU::ScalarMap_i
+::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
+{
+  return CreateActor(theIO, false);
+}
+
 void
 VISU::ScalarMap_i
 ::UpdateActor(VISU_Actor* theActor) 
index c3999cca0d5fd6568f9b95b5cd84903f93bf0cd5..a6652fa5415505aa91d0fe09da3a41a0f72884b5 100644 (file)
@@ -150,6 +150,10 @@ namespace VISU
     virtual 
     VISU_Actor* 
     CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
+    
+    virtual 
+    VISU_Actor* 
+    CreateActor(const Handle(SALOME_InteractiveObject)& theIO, bool toSupressShrinking);
 
     virtual
     void
index 8bf6fa27e50159256beaa76fdfd3bb443bde040b..7aa8273bef16fc7f98260f04be310c3356a084a1 100644 (file)
@@ -271,7 +271,7 @@ VISU_Actor*
 VISU::StreamLines_i
 ::CreateActor(const Handle(SALOME_InteractiveObject)& theIO) 
 {
-  if(VISU_Actor* anActor = VISU::DeformedShape_i::CreateActor(theIO)){
+  if(VISU_Actor* anActor = VISU::DeformedShape_i::CreateActor(theIO, true)){
     anActor->SetVTKMapping(true);
     SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
     int  aDispMode = aResourceMgr->integerValue("VISU", "stream_lines_represent", 1);
index 4713feda4ef26700f8578bd94ce48c4731c4aa79..cb64212609ee4b554372f319d359d7218639816f 100644 (file)
@@ -329,8 +329,11 @@ const char* VISU::Curve_i::GetComment() const
   Constructor
   NB : theHRow, theVRow are the indexes of rows in the Table object and numbered from the 1 to GetNbRows()
 */
-VISU::Curve_i::Curve_i(SALOMEDS::Study_ptr theStudy, Table_i* theTable, CORBA::Long theHRow, CORBA::Long theVRow )
-     : PrsObject_i(theStudy), myTable( theTable ), myHRow( theHRow ), myVRow( theVRow )
+VISU::Curve_i::Curve_i( SALOMEDS::Study_ptr theStudy, Table_i* theTable,
+                       CORBA::Long theHRow, CORBA::Long theVRow,
+                       CORBA::Long theZRow )
+: PrsObject_i(theStudy), myTable( theTable ), myHRow( theHRow ),
+  myVRow( theVRow ), myZRow( theZRow )
 {
   myAuto = true;
   myLine = VISU::Curve::SOLIDLINE;
@@ -533,7 +536,7 @@ string VISU::Curve_i::GetVerUnits()
 /*!
   Gets curve data
 */
-int VISU::Curve_i::GetData( double*& theHorList, double*& theVerList )
+int VISU::Curve_i::GetData( double*& theHorList, double*& theVerList, QStringList& zList )
 {
   theHorList = 0; theVerList = 0;
   // getting table SObject by it's entry
@@ -542,10 +545,13 @@ int VISU::Curve_i::GetData( double*& theHorList, double*& theVerList )
   SALOMEDS::GenericAttribute_var        anAttr;
   SALOMEDS::AttributeTableOfInteger_var anInt;
   SALOMEDS::AttributeTableOfReal_var    aReal;
+
+  QString tip = "%1: %2", z_data;
+
   if ( !SO->_is_nil() ) {
     if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfInteger" ) ) {
       anInt = SALOMEDS::AttributeTableOfInteger::_narrow( anAttr );
-      int nbCols = anInt->GetNbColumns() ;
+      int nbCols = anInt->GetNbColumns(), nbRows = anInt->GetNbRows();
       if ( nbCols > 0 && myHRow > 0 && myHRow <= anInt->GetNbRows() && myVRow > 0 && myVRow <= anInt->GetNbRows() ) {
        int nbPoints = 0;
        for ( int j = 1; j <= nbCols; j++ ) {
@@ -556,10 +562,24 @@ int VISU::Curve_i::GetData( double*& theHorList, double*& theVerList )
          theHorList = new double[ nbPoints ];
          theVerList = new double[ nbPoints ];
          int k = 0;
+
+         SALOMEDS::StringSeq_var rowTitles = anInt->GetRowTitles();
+
          for ( int j = 1; j <= nbCols; j++ ) {
            if ( anInt->HasValue( myHRow, j ) && anInt->HasValue( myVRow, j ) ) {
              theHorList[k] = anInt->GetValue( myHRow, j );
              theVerList[k] = anInt->GetValue( myVRow, j );
+
+             z_data = tip.arg( GetHorTitle().c_str() ).arg( theHorList[k] ) + "\n";
+             z_data += tip.arg( GetVerTitle().c_str() ).arg( theVerList[k] );
+
+             if( myZRow>0 && myZRow<=nbRows && anInt->HasValue( myZRow, j ) )
+             {
+               string title;
+               title = rowTitles[ myZRow-1 ];
+               z_data += "\n" + tip.arg( title.c_str() ).arg( anInt->GetValue( myZRow, j ) );
+             }
+             zList.append( z_data );
              k++;
            }
          }
@@ -569,7 +589,7 @@ int VISU::Curve_i::GetData( double*& theHorList, double*& theVerList )
     }
     else if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfReal" ) ) {
       aReal = SALOMEDS::AttributeTableOfReal::_narrow( anAttr );
-      int nbCols = aReal->GetNbColumns() ;
+      int nbCols = aReal->GetNbColumns(), nbRows = aReal->GetNbRows();
       if ( nbCols > 0 && myHRow > 0 && myHRow <= aReal->GetNbRows() && myVRow > 0 && myVRow <= aReal->GetNbRows() ) {
        int nbPoints = 0;
        for ( int j = 1; j <= nbCols; j++ ) {
@@ -580,10 +600,24 @@ int VISU::Curve_i::GetData( double*& theHorList, double*& theVerList )
          theHorList = new double[ nbPoints ];
          theVerList = new double[ nbPoints ];
          int k = 0;
+
+         SALOMEDS::StringSeq_var rowTitles = aReal->GetRowTitles();
+
          for ( int j = 1; j <= nbCols; j++ ) {
            if ( aReal->HasValue( myHRow, j ) && aReal->HasValue( myVRow, j ) ) {
              theHorList[k] = aReal->GetValue( myHRow, j );
              theVerList[k] = aReal->GetValue( myVRow, j );
+
+             z_data = tip.arg( GetHorTitle().c_str() ).arg( theHorList[k] ) + "\n";
+             z_data += tip.arg( GetVerTitle().c_str() ).arg( theVerList[k] );
+
+             if( myZRow>0 && myZRow<=nbRows && aReal->HasValue( myZRow, j ) )
+             {
+               string title;
+               title = rowTitles[ myZRow-1 ];
+               z_data += "\n" + tip.arg( title.c_str() ).arg( aReal->GetValue( myZRow, j ) );
+             }
+             zList.append( z_data );
              k++;
            }
          }
@@ -611,9 +645,10 @@ SPlot2d_Curve* VISU::Curve_i::CreatePresentation()
   crv->setVerUnits( GetVerUnits().c_str() );
   double* xList = 0;
   double* yList = 0;
-  int     nbPoints = GetData( xList, yList );
+  QStringList zList;
+  int     nbPoints = GetData( xList, yList, zList );
   if ( nbPoints > 0 && xList && yList ) {
-    crv->setData( xList, yList, nbPoints );
+    crv->setData( xList, yList, nbPoints, zList );
   }
   //cout << "********** Number of points: " << nbPoints <<endl;
   //for ( int i =0 ; i < nbPoints; i++ ) {
@@ -639,6 +674,10 @@ VISU::Storable* VISU::Curve_i::Restore( const Storable::TRestoringMap& theMap, S
   myName = VISU::Storable::FindValue(theMap,"myName").latin1();
   myHRow = VISU::Storable::FindValue(theMap,"myHRow").toInt();
   myVRow = VISU::Storable::FindValue(theMap,"myVRow").toInt();
+  bool ok = false;
+  QString z_str = VISU::Storable::FindValue(theMap,"myZRow", &ok);
+  myZRow = ok ? z_str.toInt() : 0;
+
   myColor.R = VISU::Storable::FindValue(theMap,"myColor.R").toDouble();
   myColor.G = VISU::Storable::FindValue(theMap,"myColor.G").toDouble();
   myColor.B = VISU::Storable::FindValue(theMap,"myColor.B").toDouble();
@@ -656,6 +695,7 @@ void VISU::Curve_i::ToStream( std::ostringstream& theStr )
   Storable::DataToStream( theStr, "myName",      myName.c_str() );
   Storable::DataToStream( theStr, "myHRow",      myHRow );
   Storable::DataToStream( theStr, "myVRow",      myVRow );
+  Storable::DataToStream( theStr, "myZRow",      myZRow );
   Storable::DataToStream( theStr, "myColor.R",   myColor.R );
   Storable::DataToStream( theStr, "myColor.G",   myColor.G );
   Storable::DataToStream( theStr, "myColor.B",   myColor.B );
@@ -679,7 +719,7 @@ VISU::Storable* VISU::Curve_i::Restore(SALOMEDS::SObject_ptr theSObject,
   SALOMEDS::Study_var aStudy = theSObject->GetStudy();
   VISU::Table_i* pTable = GetTable(aStudy, theSObject->GetFather());
   if( pTable != NULL ) {
-    VISU::Curve_i* pResent = new VISU::Curve_i( aStudy, pTable, 0, 0 );
+    VISU::Curve_i* pResent = new VISU::Curve_i( aStudy, pTable, 0, 0, 0 );
     return pResent->Restore( theMap, theSObject);
   }
   return NULL;
index 5ba1efc3db4b22d76cacdcdfe7fe3b0ffcf23a11..fa899f04d228945f77caa6a2dd7898d463c5294a 100644 (file)
@@ -90,7 +90,8 @@ namespace VISU{
     Curve_i();
     Curve_i( const Curve_i& );
   public:
-    Curve_i( SALOMEDS::Study_ptr theStudy, Table_i* theTable, CORBA::Long theHRow, CORBA::Long theVRow );
+    Curve_i( SALOMEDS::Study_ptr theStudy, Table_i* theTable,
+            CORBA::Long theHRow, CORBA::Long theVRow, CORBA::Long theZRow );
     virtual ~Curve_i();
     virtual VISU::VISUType GetType() { return VISU::TCURVE;};
 
@@ -119,6 +120,7 @@ namespace VISU{
     Table_i*                myTable;
     int                     myHRow;
     int                     myVRow;
+    int                     myZRow;
     struct SALOMEDS::Color  myColor;
     VISU::Curve::MarkerType myMarker;
     VISU::Curve::LineType   myLine;
@@ -132,6 +134,7 @@ namespace VISU{
 
     int GetHRow() const { return myHRow;}
     int GetVRow() const { return myVRow;}
+    int GetZRow() const { return myZRow;}
 
     virtual Storable* Restore( const Storable::TRestoringMap& theMap, SALOMEDS::SObject_ptr theSO);
 
@@ -151,7 +154,7 @@ namespace VISU{
     virtual std::string GetVerTitle();
     virtual std::string GetHorUnits();
     virtual std::string GetVerUnits();
-    virtual int    GetData( double*& theHorList, double*& theVerList );
+    virtual int GetData( double*& theHorList, double*& theVerList, QStringList& );
 
     virtual SPlot2d_Curve* CreatePresentation();
   };
index ad6239f34bc063c14644a506458031ca37d7231a..82d68a197416d70e23c578a719de8b65babb23a2 100644 (file)
 #include <qstrlist.h>
 #include <qdir.h>
 
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#define NO_CAS_CATCH
+#endif
+
+#include <Standard_Failure.hxx>
+
+#ifdef NO_CAS_CATCH
+#include <Standard_ErrorHandler.hxx>
+#else
+#include "CASCatch.hxx"
+#endif
+
 using namespace std;
 
 
@@ -116,7 +128,7 @@ VISU_TimeAnimation::~VISU_TimeAnimation()
   for (int i = 0; i < getNbFields(); i++) {
     clearData(myFieldsLst[i]);
   }
-  clearFieldData();
+
   /* Terminates the execution of the thread. 
    * The thread may or may not be terminated immediately, 
    * depending on the operating system's scheduling policies. 
@@ -241,23 +253,39 @@ namespace
       
       bool anIsCreated = false;
       TPrs3d* aPresent = new TPrs3d(theResult, false);
-      CASCatch_TRY{       
-       try{
-         if(aPresent->Create(aMeshName.latin1(),anEntity,aFieldName.latin1(),aTimeStampId)){
-           anIsCreated = true;
-           theData.myPrs[aFrameId++] = aPresent;
-           aMin = std::min(aPresent->GetMin(), aMin);
-           aMax = std::max(aPresent->GetMax(), aMax);
-         }
-       }catch(std::exception& exc){
-         INFOS("Follow exception was occured :\n"<<exc.what());
-       }catch(...){
-         INFOS("Unknown exception was occured!");
-       }
-      }CASCatch_CATCH(Standard_Failure) {
-       Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-       INFOS("Follow signal was occured :\n"<<aFail->GetMessageString());
+#ifdef NO_CAS_CATCH
+      try{       
+        OCC_CATCH_SIGNALS;
+#else
+      CASCatch_TRY{
+        try{
+#endif
+          if(aPresent->Create(aMeshName.latin1(),anEntity,aFieldName.latin1(),aTimeStampId)){
+            anIsCreated = true;
+            theData.myPrs[aFrameId++] = aPresent;
+            aMin = std::min(aPresent->GetMin(), aMin);
+            aMax = std::max(aPresent->GetMax(), aMax);
+          }
+#ifdef NO_CAS_CATCH
+        }catch(Standard_Failure) {
+          Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+          INFOS("Follow signal was occured :\n"<<aFail->GetMessageString());
+        }catch(std::exception& exc){
+          INFOS("Follow exception was occured :\n"<<exc.what());
+        }catch(...){
+          INFOS("Unknown exception was occured!");
+        }
+#else
+        }catch(std::exception& exc){
+          INFOS("Follow exception was occured :\n"<<exc.what());
+        }catch(...){
+          INFOS("Unknown exception was occured!");
+        }
+      }CASCatch_CATCH(Standard_Failure){
+        Handle(Standard_Failure) aFail = Standard_Failure::Caught();          
+        INFOS("Follow signal was occured :\n"<<aFail->GetMessageString());
       }
+#endif
       if(!anIsCreated)
        aPresent->_remove_ref();
     }
@@ -665,73 +693,59 @@ void VISU_TimeAnimation::run()
       // We must unlock mutex for some time before grabbing to allow view updating
       qApp->unlock();
       msleep(delay);
-      if (!myIsActive) {
-        emit stopped();
-        return;
-      }
       qApp->lock();
       if(!(myFieldsLst[0].myField)) // break, if field was deleted.
-             break;
+       break;
       if (myDumpFormat.compare("AVI") != 0) {
-             QString aFile(myDumpPath);
-             QString aName = QString("%1").arg(myFieldsLst[0].myTiming[myFrame]);
-             int aPos = -1;
-             while ((aPos = aName.find(".")) > -1 )
-               aName.replace(aPos, 1, "_");
-             aFile += aName;
-             aFile += ".";
-             aFile += myDumpFormat.lower();
-             myView->dumpViewToFormat(aFile,myDumpFormat);          
-      }
-      else
-      {
-             QFileInfo aFileInfo(myDumpPath);
-             QString aDirPath = aFileInfo.dirPath(true);
-             QString aBaseName = aFileInfo.fileName();
-
-             switch (myFrame) {
-             case 0: 
-               break;
-             case 1:
-               myFileIndex += 5;
-               break;
-             default:
-               if (myProportional) {
-                 double p = (myFieldsLst[0].myTiming[myFrame] -
-                             myFieldsLst[0].myTiming[myFrame-1]) / aOneVal;
-                 myFileIndex += (long) (5*p);
-               } else {
-                 myFileIndex += 5;
-               }
-             }
-
-             QString aFile = aDirPath + QDir::separator() + aBaseName;
-             aFile += "_";
-             aFile += QString("%1").arg(myFileIndex).rightJustify(8, '0');
-#ifndef WNT
-             aFile += ".jpeg";
-#else
-        aFile += ".bmp";
-#endif
+       QString aFile(myDumpPath);
+       QString aName = QString("%1").arg(myFieldsLst[0].myTiming[myFrame]);
+       int aPos = -1;
+       while ((aPos = aName.find(".")) > -1 )
+         aName.replace(aPos, 1, "_");
+       aFile += aName;
+       aFile += ".";
+       aFile += myDumpFormat.lower();
+       myView->dumpViewToFormat(aFile,myDumpFormat);
+      } else {
+       QFileInfo aFileInfo(myDumpPath);
+       QString aDirPath = aFileInfo.dirPath(true);
+       QString aBaseName = aFileInfo.fileName();
 
-             /* check image size is divisable 16
-             myView->dumpViewToFormat(aFile,"JPEG");
-             */
-             SUIT_ViewWindow* aView = myView;
-             QImage img = aView->dumpView();
-             if (!img.isNull()) {
-               int width = img.width(); width = (width/16)*16;
-               int height = img.height(); height = (height/16)*16;
-               QImage copy = img.copy(0, 0, width, height);
-#ifndef WNT
-               if (copy.save(aFile, "JPEG")) {
-#else
-          if (copy.save(aFile, "BMP")) {
-#endif
-                 anIndexList.append(myFileIndex);
-                 aNbFiles++;
-               }
-             }
+       switch (myFrame) {
+       case 0: 
+         break;
+       case 1:
+         myFileIndex += 5;
+         break;
+       default:
+         if (myProportional) {
+           double p = (myFieldsLst[0].myTiming[myFrame] -
+                       myFieldsLst[0].myTiming[myFrame-1]) / aOneVal;
+           myFileIndex += (long) (5*p);
+         } else {
+           myFileIndex += 5;
+         }
+       }
+
+       QString aFile = aDirPath + QDir::separator() + aBaseName;
+       aFile += "_";
+       aFile += QString("%1").arg(myFileIndex).rightJustify(8, '0');
+       aFile += ".jpeg";
+
+       /* check image size is divisable 16
+       myView->dumpViewToFormat(aFile,"JPEG");
+       */
+       SUIT_ViewWindow* aView = myView;
+       QImage img = aView->dumpView();
+       if (!img.isNull()) {
+         int width = img.width(); width = (width/16)*16;
+         int height = img.height(); height = (height/16)*16;
+         QImage copy = img.copy(0, 0, width, height);
+         if (copy.save(aFile, "JPEG")) {
+           anIndexList.append(myFileIndex);
+           aNbFiles++;
+         }
+       }
       }
     }
 
@@ -750,33 +764,28 @@ void VISU_TimeAnimation::run()
   }
 
   // make AVI file if need
-  if (isDumping && myDumpFormat.compare("AVI") == 0)
-  {
+  if (isDumping && myDumpFormat.compare("AVI") == 0) {
     double aFPS = 17.3 * mySpeed;
 
     QFileInfo aFileInfo(myDumpPath);
     QString aDirPath = aFileInfo.dirPath(true);
     QString aBaseName = aFileInfo.fileName();
 
-#ifndef WNT
     // add missing files
-    if (anIndexList.count() > 1)
-    {
+    if (anIndexList.count() > 1) {
       QString aFFile = aDirPath + QDir::separator() + aBaseName;
       aFFile += QString("_%1.jpeg");
       int aStartIndex = anIndexList[0], anEndIndex;
-      for (int i = 1; i < anIndexList.count(); i++)
-      {
-             anEndIndex = anIndexList[i];
-             QString aCurFile = aFFile.arg(QString::number(aStartIndex).rightJustify(8, '0'));
-             QStringList aCommands;
-             for (int j = aStartIndex+1; j < anEndIndex; j++)
-        {
-               QString aFile = aFFile.arg(QString::number(j).rightJustify(8, '0'));
-               aCommands.append(QString("ln -s %1 %2").arg(aCurFile).arg(aFile));
-             }
-             system(aCommands.join(" ; \\\n").latin1());
-             aStartIndex = anEndIndex;
+      for (int i = 1; i < anIndexList.count(); i++) {
+       anEndIndex = anIndexList[i];
+       QString aCurFile = aFFile.arg(QString::number(aStartIndex).rightJustify(8, '0'));
+       QStringList aCommands;
+       for (int j = aStartIndex+1; j < anEndIndex; j++) {
+         QString aFile = aFFile.arg(QString::number(j).rightJustify(8, '0'));
+         aCommands.append(QString("ln -s %1 %2").arg(aCurFile).arg(aFile));
+       }
+       system(aCommands.join(" ; \\\n").latin1());
+       aStartIndex = anEndIndex;
       }
     }
 
@@ -803,114 +812,6 @@ void VISU_TimeAnimation::run()
     aCmd += " | xargs rm";
     aCmd += " )";
     system(aCmd.latin1());
-#else
-
-    //create avi file
-    IAVIFile *pfile;
-    AVIFileInit();
-    HRESULT hr = AVIFileOpen( &pfile, myDumpPath.latin1(), OF_WRITE|OF_CREATE, NULL );
-    if ( hr!=AVIERR_OK )
-    {
-      AVIFileExit();
-      QMessageBox::information( NULL, "INFO", "Can't Open Avi file", 1 );
-    }
-    
-    if (anIndexList.count() > 1)
-    {
-      QString aFFile = aDirPath + QDir::separator() + aBaseName;
-      aFFile += QString("_%1.bmp");
-      int aStartIndex = anIndexList[0], anEndIndex;
-
-      QImage anImage;
-
-      IAVIStream *ps = 0;
-      IAVIStream *psCompressed = 0;
-      int index = 0;
-
-      QStringList FileToDelete;
-
-      for (int i = 1; i < anIndexList.count(); i++)
-      {
-             anEndIndex = anIndexList[i];
-             QString aCurFile = aFFile.arg(QString::number(aStartIndex).rightJustify(8, '0'));
-
-        //load current image
-        HBITMAP hbm=(HBITMAP)LoadImage(NULL,aCurFile.latin1(),IMAGE_BITMAP,0,0,LR_LOADFROMFILE|LR_CREATEDIBSECTION );
-
-        DIBSECTION dibs; int sbm = GetObject(hbm,sizeof(dibs),&dibs);
-        if ( sbm == 0 )
-        {
-          AVIFileExit();
-          QMessageBox::information( NULL, "INFO", "BAD Param DIB", 1 );
-        }
-
-             for (int j = aStartIndex+1; j < anEndIndex; j++)
-        {
-          // if no avi stream - create it
-          if ( !ps )
-          {
-            AVISTREAMINFO strhdr; ZeroMemory( &strhdr, sizeof( strhdr ) );
-            strhdr.fccType = streamtypeVIDEO;// stream type            
-            strhdr.fccHandler = 0; 
-            strhdr.dwScale = 10;
-            strhdr.dwRate = 173 * mySpeed;            
-            strhdr.dwSuggestedBufferSize  = dibs.dsBmih.biSizeImage;
-            SetRect(&strhdr.rcFrame, 0, 0, dibs.dsBmih.biWidth, dibs.dsBmih.biHeight);
-            hr=AVIFileCreateStream( pfile, &ps, &strhdr );
-            if ( hr!=AVIERR_OK )
-            {
-              AVIFileExit();
-              QMessageBox::information( NULL, "INFO", "Can't create video stream", 1 );
-              break;
-            }
-          }
-          // if no avi compressed stream - create it
-          if ( !psCompressed )
-          {
-            AVICOMPRESSOPTIONS opts; ZeroMemory( &opts, sizeof( opts ) );
-            opts.fccHandler=mmioFOURCC('C','V','I','D');
-            //opts.fccHandler=mmioFOURCC('M','P','4','2');
-            //opts.dwQuality = -1;
-            hr = AVIMakeCompressedStream( &psCompressed, ps, &opts, NULL );
-            if ( hr != AVIERR_OK )
-            {
-              AVIFileExit();
-              QMessageBox::information( NULL, "INFO", "Can't create video compressed stream", 1 );
-              break;
-            }
-            hr = AVIStreamSetFormat( psCompressed, 0, &dibs.dsBmih, dibs.dsBmih.biSize+dibs.dsBmih.biClrUsed*sizeof(RGBQUAD));
-            if ( hr != AVIERR_OK )
-            {
-              AVIFileExit();
-              QMessageBox::information( NULL, "INFO", "Can't set format to compressed stream", 1 );
-              break;
-            }
-          }
-          // add image to avi stream
-          hr = AVIStreamWrite( psCompressed, index, 1, dibs.dsBm.bmBits, dibs.dsBmih.biSizeImage, AVIIF_KEYFRAME, NULL, NULL);
-          if ( hr!=AVIERR_OK )
-          {
-            AVIFileExit();
-            QMessageBox::information( NULL, "INFO", "Can't add frame to stream ", 1 );
-            break;
-          }
-          index++;
-    
-             }
-             aStartIndex = anEndIndex;
-        FileToDelete.append( aCurFile );
-      }
-
-      // close all streams and avi file
-      AVIStreamRelease( psCompressed );
-      AVIStreamRelease( ps );
-      AVIFileRelease( pfile );
-      AVIFileExit();
-
-      //delete temporary pictures (bmp)
-      system( QDir::convertSeparators(QString( "del %1_* /f /q" ).arg( myDumpPath )).latin1() );
-    }
-#endif
   }
 
   emit stopped();
@@ -984,7 +885,6 @@ std::string VISU_TimeAnimation::setDumpFormat(const char* theFormat)
 //------------------------------------------------------------------------
 bool VISU_TimeAnimation::checkAVIMaker() const
 {
-#ifndef WNT
   QStrList aDumpFormats = QImageIO::outputFormats();
   if (aDumpFormats.find("JPEG") < 0) return false;
 
@@ -993,9 +893,6 @@ bool VISU_TimeAnimation::checkAVIMaker() const
   aCmd += " >& /dev/null";
   int iErr = system(aCmd.latin1());
   return (iErr == 0);
-#else
-  return true;
-#endif
 }
 
 //************************************************************************
index 1ab9c2549a4970939ee0140343d0d10caa6ae874..c8bd8a59f34e3b2f0bef0809fb6743327752d121 100644 (file)
@@ -198,7 +198,9 @@ VISU_Actor* VISU::Vectors_i::CreateActor(const Handle(SALOME_InteractiveObject)&
     anActor->GetProperty()->SetLineWidth(GetLineWidth());
     SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
     int  aDispMode = aResourceMgr->integerValue("VISU", "vectors_represent", 1);
+    bool toUseShading = aResourceMgr->booleanValue("VISU", "represent_shading", false);
     anActor->SetRepresentation(aDispMode);
+    anActor->SetShading(toUseShading);
     UpdateActor(anActor);
   }catch(...){
     anActor->Delete();
index 29c69d215329ec00af4c72e545299389e48626fb..cb6425f49db1ecf6c4f9ca6ef8a32aca6a1eff5c 100644 (file)
@@ -360,9 +360,10 @@ namespace VISU {
            aSPlot2dC->setVerUnits( theCurve->GetVerUnits().c_str() );
            double* xList = 0;
            double* yList = 0;
-           int     nbPoints = theCurve->GetData( xList, yList );
+           QStringList zList;
+           int     nbPoints = theCurve->GetData( xList, yList, zList );
            if (nbPoints > 0 && xList && yList) {
-             aSPlot2dC->setData( xList, yList, nbPoints );
+             aSPlot2dC->setData( xList, yList, nbPoints, zList );
            }
            if (!theCurve->IsAuto()) {
              aSPlot2dC->setLine((Plot2d_Curve::LineType)theCurve->GetLine(),
@@ -408,9 +409,10 @@ namespace VISU {
            aSPlot2dC->setVerUnits( theCurve->GetVerUnits().c_str() );
            double* xList = 0;
            double* yList = 0;
-           int     nbPoints = theCurve->GetData( xList, yList );
+           QStringList zList;
+           int     nbPoints = theCurve->GetData( xList, yList, zList );
            if ( nbPoints > 0 && xList && yList ) {
-             aSPlot2dC->setData( xList, yList, nbPoints );
+             aSPlot2dC->setData( xList, yList, nbPoints, zList );
            }
            if ( !theCurve->IsAuto() ) {
              aSPlot2dC->setLine((Plot2d_Curve::LineType)theCurve->GetLine(), theCurve->GetLineWidth());
index 22adc03a33963bc05f6e8a308afecd7541ecd312..894b76fc400543dfa2c46071d3187ceb271a317a 100644 (file)
@@ -156,9 +156,14 @@ namespace VISU {
          myApplication->setWindowShown(SalomeApp_Application::WT_LogWindow,myState);
          break;
        case VISU::View::VIEWER:{
-         ViewManagerList aViewManagerList = myApplication->viewManagers();
-         // to do something
-         // ...
+         ViewManagerList mgrs = myApplication->viewManagers();
+         ViewManagerList::const_iterator anIt = mgrs.begin(), aLast = mgrs.end();
+         for( ; anIt!=aLast; anIt++ )
+         {
+           const QPtrVector<SUIT_ViewWindow>& views = (*anIt)->getViews();
+           for( int i=0; i<views.count(); i++ )
+             views[i]->setShown( myState );
+         }
          break;
        }}
       }
index c0c4e5058bc22121afc0d09b750d805e4bd3f199..d57c29651e2d6cb29b857033cf1cd2ac9e36c81d 100644 (file)
@@ -259,7 +259,7 @@ namespace VISU
     static  void SetFocalPoint (SUIT_ViewWindow* theViewWindow, const CORBA::Double theFocalPnt[3]);
     virtual void SetFocalPoint (const VISU::View3D::XYZ theCoord);
 
-    static  void View3D_i::GetFocalPoint (SUIT_ViewWindow* theViewWindow, CORBA::Double theFocalPnt[3]);
+    static  void GetFocalPoint (SUIT_ViewWindow* theViewWindow, CORBA::Double theFocalPnt[3]);
     virtual VISU::View3D::XYZ_slice* GetFocalPoint();
 
     static  void SetParallelScale (SUIT_ViewWindow* theViewWindow, CORBA::Double theScale);
index 384afc383f54e920675a51cf882dd8d769327a01..98950247707cd814aad0d40a6d22ce854d9f6c5e 100644 (file)
@@ -42,7 +42,7 @@ SWIG_DEF = libVISU_Swig.i
 EXPORT_PYSCRIPTS = libVISU_Swig.py 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 test_events.py batch_test_events.py visu_split_views.py \
+       visu_swig_test.py visu_split_views.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
 EXPORT_SHAREDPYSCRIPTS = VISU_shared_modules.py
index 280bb30d02d63e97c1224fda00fc3c7820a29056..21bf54759d5b669c368b650b38903d2d81961475 100644 (file)
@@ -17,7 +17,7 @@
 //  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
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //
 //
 %}
 
 
+/*
+  managing C++ exception in the Python API
+*/
+%exception
+{
+  class PyAllowThreadsGuard {
+   public:
+    // Py_BEGIN_ALLOW_THREADS
+    PyAllowThreadsGuard() { _save = PyEval_SaveThread(); }
+    // Py_END_ALLOW_THREADS
+    ~PyAllowThreadsGuard() { PyEval_RestoreThread(_save); }
+   private:
+    PyThreadState *_save;
+  };
+
+  PyAllowThreadsGuard guard;
+
+  $action
+}
+
 class Convertor{
 public:
   Convertor(){};
@@ -51,4 +71,4 @@ public:
   View3D();
   void Display(ScalarMap* theScalarMap);
   void SetPosition(int theX, int theY);
-};
\ No newline at end of file
+};
index 2d8b23bbeb046ed1ae561bab900b822aac6981fe..15d5b7fe3907f0595d6c5a510fd73e5e4a02fd8e 100644 (file)
@@ -152,7 +152,7 @@ def CreateStudyForMed(theVisu, theFileName) :
             print "OK"
 
             return [aStudy, myViewManager, myView]
-    raise RuntimeError, "Error: There is no shuch file."
+    raise RuntimeError, "Error: There is no such file."
 
 def getMedSObject(theStudy = myLocalStudy ):
     if theStudy is None:
index 18f4ef48aa124e92ef0f7dcc1197642d6c2e3d46..63cf2bc078700bf64049d14eff02a292faf45db5 100644 (file)
@@ -155,6 +155,10 @@ VVTK_MainWindow::~VVTK_MainWindow()
 //----------------------------------------------------------------------------
 void VVTK_MainWindow::onDumpView()
 {
+  QImage img = dumpView();
+  if( img.isNull() )
+    return; 
+
   SUIT_Application* app = SUIT_Session::session()->activeApplication();
   QString fileName = app->getFileName( false, QString::null,
                                       tr( "TLT_IMAGE_FILES" ),
@@ -162,10 +166,6 @@ void VVTK_MainWindow::onDumpView()
   if( fileName.isEmpty() )
     return;
 
-  QImage img = dumpView();
-  if( img.isNull() )
-    return; 
-
   QString fmt = SUIT_Tools::extension( fileName ).upper();
   if( fmt.isEmpty() )
     fmt = QString( "BMP" ); // default format
@@ -245,7 +245,7 @@ VVTK_MainWindow
   if ( accelAction == SUIT_Accel::ZoomFit )
     onFitAll();
   else {
-    int anEvent = convertAction( accelAction );
+    int anEvent = SVTK::convertAction( accelAction );
     InvokeEvent( anEvent, 0 );
   }
 }
index 602d19ba575317ccc202f011fb944274f5a34d4d..e59a57e946833e84ba32cde8e72ce70d1f4e76cd 100644 (file)
@@ -413,3 +413,16 @@ void VVTK_PickingDlg::onColorButtonPressed()
   if( aColor.isValid() )
     mySelectionColorButton->setPaletteBackgroundColor( aColor );
 }
+
+void VVTK_PickingDlg::keyPressEvent( QKeyEvent* e )
+{
+  QDialog::keyPressEvent( e );
+  if ( e->isAccepted() )
+    return;
+
+  if ( e->key() == Key_F1 )
+    {
+      e->accept();
+      onClickHelp();
+    }
+}
index 9cd68798953b6ad31f238af6a15463838dca0353..81b2576cfb95a4f377fb9f424d4b980e65c586ec 100644 (file)
@@ -89,6 +89,7 @@ private:
                                 void* theCallData);
 
   void             KeyPressed();
+  void             keyPressEvent( QKeyEvent* e );
 
 private:
   QtxDblSpinBox*   myCursorSizeSpinBox;
index 58c8bc3640a0c14890fb10bb76c3535b52f0ac18..908d825b9c04f7ba22ad4631f44b85d6f23f4cb2 100644 (file)
@@ -64,7 +64,7 @@ VVTK_PrimitiveBox::VVTK_PrimitiveBox( QWidget* parent ) :
 
   myPrimitiveType = VISU_OpenGLPointSpriteMapper::PointSprite;
 
-  QString aRootDir = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/";
+  QString aRootDir = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/visu/";
   myMainTexture = aRootDir + "sprite_texture.bmp";
   myAlphaTexture = aRootDir + "sprite_alpha.bmp";
 
@@ -335,7 +335,7 @@ void VVTK_PrimitiveBox::setFaceLimit( int theFaceLimit )
 
 void VVTK_PrimitiveBox::onBrowseMainTexture()
 {
-  QString aRootDir = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/";
+  QString aRootDir = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/visu/";
   QString aFileName = QFileDialog::getOpenFileName( aRootDir, "Bitmap (*.bmp *.jpg *.png)", this );
 
   if( aFileName.isNull() )
@@ -347,7 +347,7 @@ void VVTK_PrimitiveBox::onBrowseMainTexture()
 
 void VVTK_PrimitiveBox::onBrowseAlphaTexture()
 {
-  QString aRootDir = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/";
+  QString aRootDir = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/visu/";
   QString aFileName = QFileDialog::getOpenFileName( aRootDir, "Bitmap (*.bmp *.jpg *.png)", this );
 
   if( aFileName.isNull() )
index 35ec9c9d142845d63a392bdeeec09776414c16a8..3d287ec4619962a75d050aad72d8e98f6e334371 100644 (file)
@@ -209,3 +209,16 @@ bool VVTK_RecorderDlg::onBrowseFile()
 
   return true;
 }
+
+void VVTK_RecorderDlg::keyPressEvent( QKeyEvent* e )
+{
+  QDialog::keyPressEvent( e );
+  if ( e->isAccepted() )
+    return;
+
+  if ( e->key() == Key_F1 )
+    {
+      e->accept();
+      onHelp();
+    }
+}
index 5c2ead334bf9af8f1b4807d9ec32a6b0324e8e1b..23b5a1df53834b590da90871b6cf1069ecdafa68 100644 (file)
@@ -58,6 +58,9 @@ public:
 
   QString          fileName() const { return myFileName; }
 
+private:
+  void             keyPressEvent( QKeyEvent* e );
+
 protected slots:
   void             onStart();
   void             onClose();
index 6191e727989a69e6344a65e43cd3269ec8a225b0..55b1fb7aac4f1caf73a8b3138263998ad94dfb23 100644 (file)
@@ -528,8 +528,8 @@ void VVTK_SegmentationCursorDlg::UpdateInsideGaussPoints()
 {
   int aPrimitiveType = VISU_OpenGLPointSpriteMapper::PointSprite;
   vtkFloatingPointType aClamp = 200.0;
-  QString aMainTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/sprite_texture.bmp";
-  QString anAlphaTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/sprite_alpha.bmp";
+  QString aMainTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/visu/sprite_texture.bmp";
+  QString anAlphaTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/visu/sprite_alpha.bmp";
   vtkFloatingPointType anAlphaThreshold = 0.1;
   int aResolution = 8;
   int aMinSize = 3;
@@ -596,8 +596,8 @@ void VVTK_SegmentationCursorDlg::UpdateOutsideGaussPoints()
 {
   vtkFloatingPointType aClamp = 256.0;
   int aPrimitiveType = VISU_OpenGLPointSpriteMapper::PointSprite;
-  QString aMainTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/sprite_texture.bmp";
-  QString anAlphaTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/sprite_alpha.bmp";
+  QString aMainTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/visu/sprite_texture.bmp";
+  QString anAlphaTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/visu/sprite_alpha.bmp";
   vtkFloatingPointType anAlphaThreshold = 0.1;
   int aResolution = 8;
   int aSize = 25;
@@ -899,3 +899,16 @@ bool VVTK_SegmentationCursorDlg::CheckNumberOfFaces()
            myOutsidePrimitiveBox->getPrimitiveType() == VISU_OpenGLPointSpriteMapper::GeomSphere &&
            aNumberOfPoints * myOutsidePrimitiveBox->getFaceNumber() > myOutsidePrimitiveBox->getFaceLimit() );
 }
+
+void VVTK_SegmentationCursorDlg::keyPressEvent( QKeyEvent* e )
+{
+  QDialog::keyPressEvent( e );
+  if ( e->isAccepted() )
+    return;
+
+  if ( e->key() == Key_F1 )
+    {
+      e->accept();
+      onClickHelp();
+    }
+}
index 8f1e462a5e067076e63c6b5c65a803f1032c997d..50d17609fdf306c1bf1a9d93e97ecf4514c2a850 100644 (file)
@@ -125,6 +125,8 @@ private:
                                 unsigned long theEvent,
                                 void* theClientData, 
                                 void* theCallData);
+  
+  void             keyPressEvent( QKeyEvent* e );
 
 protected slots:
   virtual void     done( int );
index cbd0d46a85a1c705e02917bfbd72d91da74b344c..b0d70802dba05899c2066d7fb39b3024644007f4 100755 (executable)
@@ -49,7 +49,8 @@ VVTK_ViewWindow
   SVTK_ViewWindow(theDesktop),
   myMainWindow1(NULL),
   myMainWindow2(NULL),
-  myView2(NULL)
+  myView2(NULL),
+  myDumpImage(QImage())
 {}
 
 //----------------------------------------------------------------------------
@@ -277,10 +278,20 @@ VVTK_ViewWindow
 ::dumpView()
 {
   if( myMainWindow1->GetInteractor()->hasFocus() )
-    return myMainWindow1->dumpView();
+    {
+      if ( myMainWindow1->getToolBar()->hasMouse() || myDumpImage.isNull() )
+       return myMainWindow1->dumpView();
+      else
+       return myDumpImage;
+    }
   
   if( myMainWindow2->GetInteractor()->hasFocus() )
-    return myMainWindow2->dumpView();
+    {
+      if ( myMainWindow1->getToolBar()->hasMouse() || myDumpImage.isNull() )
+       return myMainWindow2->dumpView();
+      else
+       return myDumpImage;
+    }
 
   return QImage();
 }
@@ -294,3 +305,14 @@ VVTK_ViewWindow
   myMainWindow2->SetBackgroundColor( theColor );
 }
 
+
+//----------------------------------------------------------------------------
+void
+VVTK_ViewWindow
+::RefreshDumpImage()
+{ 
+  if( myMainWindow1->GetInteractor()->hasFocus() )
+    myDumpImage = myMainWindow1->dumpView();
+  else if ( myMainWindow2->GetInteractor()->hasFocus() )
+    myDumpImage = myMainWindow2->dumpView();
+}
index ca0ab04c8630650bd967e74cb56c9b06e210f791..7e2dbf05960d6ad0964f6bb5d1ccbbaa9224c22d 100755 (executable)
@@ -27,6 +27,8 @@
 #include "VVTK.h"
 #include "SVTK_ViewWindow.h"
 
+#include <qimage.h>
+
 #include <string>
 
 class VVTK_MainWindow1;
@@ -105,6 +107,11 @@ public:
   setBackgroundColor( const QColor& );
 
   //----------------------------------------------------------------------------
+
+  //! Refresh dump images of the viewers
+  virtual
+  void RefreshDumpImage();
+  
 public slots:
   //! Redefine SVTK_ViewWindow::onSelectionChanged method
   virtual
@@ -134,6 +141,9 @@ protected:
 
   VVTK_MainWindow2* myMainWindow2; //!< The manage segmented view
   SVTK_View* myView2; //!< The manage segmented view
+
+private:
+  QImage myDumpImage;
 };
 
 #ifdef WIN32