]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
merging from ScalarMap_ON_GROUP_3_2_0 to V3_2_0_maintainance mergefrom_ScalarMap_ON_GROUP_3_2_0_30Nov06
authorenk <enk@opencascade.com>
Thu, 30 Nov 2006 09:04:41 +0000 (09:04 +0000)
committerenk <enk@opencascade.com>
Thu, 30 Nov 2006 09:04:41 +0000 (09:04 +0000)
88 files changed:
doc/salome/gui/VISU/files/scalar_map_presentation.htm
doc/salome/gui/VISU/pics/scalarbarproperties.png
idl/VISU_Gen.idl
resources/Visu_add.png [new file with mode: 0644]
resources/Visu_cutplane.png [deleted file]
resources/Visu_cutplanes.png [new file with mode: 0644]
resources/Visu_remove.png [new file with mode: 0644]
resources/Visu_tree_container.png [new file with mode: 0644]
resources/Visu_tree_curve.png [new file with mode: 0644]
resources/Visu_tree_cutlines.png [new file with mode: 0755]
resources/Visu_tree_cutlines_gr.png [new file with mode: 0644]
resources/Visu_tree_cutplanes.png [new file with mode: 0755]
resources/Visu_tree_cutplanes_gr.png [new file with mode: 0644]
resources/Visu_tree_deformed.png [new file with mode: 0755]
resources/Visu_tree_deformed_gr.png [new file with mode: 0644]
resources/Visu_tree_gauss_points.png [new file with mode: 0644]
resources/Visu_tree_isosurfaces.png [new file with mode: 0755]
resources/Visu_tree_isosurfaces_gr.png [new file with mode: 0644]
resources/Visu_tree_mesh.png [new file with mode: 0644]
resources/Visu_tree_plot3d.png [new file with mode: 0755]
resources/Visu_tree_plot3d_gr.png [new file with mode: 0644]
resources/Visu_tree_result.png [new file with mode: 0644]
resources/Visu_tree_scalarmapondeformedshape.png [new file with mode: 0755]
resources/Visu_tree_scalarmapondeformedshape_gr.png [new file with mode: 0644]
resources/Visu_tree_scalars.png [new file with mode: 0755]
resources/Visu_tree_scalars_gr.png [new file with mode: 0644]
resources/Visu_tree_streamlines.png [new file with mode: 0755]
resources/Visu_tree_streamlines_gr.png [new file with mode: 0644]
resources/Visu_tree_table.png [new file with mode: 0644]
resources/Visu_tree_vectors.png [new file with mode: 0755]
resources/Visu_tree_vectors_gr.png [new file with mode: 0644]
src/CONVERTOR/VISU_Convertor_impl.hxx
src/ENGINE/VISU_Engine_i.cc
src/ENGINE/VISU_Engine_i.hh
src/PIPELINE/Makefile.in
src/PIPELINE/VISU_CutLinesPL.cxx
src/PIPELINE/VISU_CutPlanesPL.cxx
src/PIPELINE/VISU_CutPlanesPL.hxx
src/PIPELINE/VISU_DeformedShapePL.cxx
src/PIPELINE/VISU_DeformedShapePL.hxx
src/PIPELINE/VISU_Extractor.cxx
src/PIPELINE/VISU_IsoSurfacesPL.cxx
src/PIPELINE/VISU_IsoSurfacesPL.hxx
src/PIPELINE/VISU_Plot3DPL.cxx
src/PIPELINE/VISU_Plot3DPL.hxx
src/PIPELINE/VISU_PrsMergerPL.cxx [new file with mode: 0644]
src/PIPELINE/VISU_PrsMergerPL.hxx [new file with mode: 0644]
src/PIPELINE/VISU_ScalarMapOnDeformedShapePL.cxx
src/PIPELINE/VISU_ScalarMapOnDeformedShapePL.hxx
src/PIPELINE/VISU_StreamLinesPL.cxx
src/VISUGUI/VISU_images.po
src/VISUGUI/VISU_msg_en.po
src/VISUGUI/VisuGUI.cxx
src/VISUGUI/VisuGUI_PopupTools.cxx
src/VISUGUI/VisuGUI_ScalarBarDlg.cxx
src/VISUGUI/VisuGUI_ScalarBarDlg.h
src/VISUGUI/VisuGUI_TimeAnimation.cxx
src/VISUGUI/VisuGUI_Tools.cxx
src/VISU_I/Makefile.in
src/VISU_I/VISU_ColoredPrs3d_i.cc
src/VISU_I/VISU_ColoredPrs3d_i.hh
src/VISU_I/VISU_CorbaMedConvertor.cxx
src/VISU_I/VISU_CutLines_i.cc
src/VISU_I/VISU_CutLines_i.hh
src/VISU_I/VISU_CutPlanes_i.cc
src/VISU_I/VISU_CutPlanes_i.hh
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.hh
src/VISU_I/VISU_Gen_i.cc
src/VISU_I/VISU_IsoSurfaces_i.cc
src/VISU_I/VISU_IsoSurfaces_i.hh
src/VISU_I/VISU_Mesh_i.cc
src/VISU_I/VISU_Plot3D_i.cc
src/VISU_I/VISU_Plot3D_i.hh
src/VISU_I/VISU_PrsMerger_i.cc [new file with mode: 0644]
src/VISU_I/VISU_PrsMerger_i.hh [new file with mode: 0644]
src/VISU_I/VISU_Result_i.cc
src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc
src/VISU_I/VISU_ScalarMapOnDeformedShape_i.hh
src/VISU_I/VISU_StreamLines_i.cc
src/VISU_I/VISU_StreamLines_i.hh
src/VISU_I/VISU_Table_i.cc
src/VISU_I/VISU_TimeAnimation.cxx
src/VISU_I/VISU_Vectors_i.cc
src/VISU_I/VISU_Vectors_i.hh
src/VISU_SWIG/visu.py

index 49ea4f575be10e75748734bed6154eb13511cf7f..aeac6a34905b353dca489015fe27973d9b7e0e05 100755 (executable)
@@ -18,25 +18,28 @@ h1.whs1 { margin-top:0px; margin-bottom:0px; }
 p.whs2 { margin-top:0px; margin-bottom:0px; }\r
 img_whs3 { border:none; float:none; width:30px; height:30px; border-style:none; }\r
 p.whs4 { margin-left:40px; margin-top:0px; margin-bottom:0px; }\r
-p.whs5 { font-style:italic; color:#ff0000; margin-left:40px; margin-top:0px; margin-bottom:0px; }\r
-img_whs6 { border:none; width:31px; height:27px; float:none; border-style:none; }\r
-p.whs7 { margin-left:0px; margin-top:0px; margin-bottom:0px; }\r
-p.whs8 { margin-left:0px; background-image:url('../texture_horiz_ltbluebubbles.jpg'); margin-top:0px; margin-bottom:0px; }\r
-img_whs9 { border:none; float:none; width:36px; height:38px; border-style:none; }\r
-img_whs10 { border:none; width:336px; height:501px; float:none; border-style:none; }\r
-ul.whs11 { list-style:disc; }\r
-p.whs12 { margin-left:36px; margin-top:0px; margin-bottom:0px; }\r
-p.whs13 { font-weight:bold; margin-left:24px; margin-top:0px; margin-bottom:0px; }\r
-p.whs14 { margin-left:40px; font-weight:bold; margin-top:0px; margin-bottom:0px; }\r
-p.whs15 { margin-left:24px; margin-top:0px; margin-bottom:0px; }\r
-p.whs16 { font-weight:bold; margin-left:36px; margin-top:0px; margin-bottom:0px; }\r
-p.whs17 { margin-left:60px; margin-top:0px; margin-bottom:0px; }\r
-p.whs18 { margin-left:36px; font-weight:bold; margin-top:0px; margin-bottom:0px; }\r
-p.whs19 { margin-left:120px; margin-top:0px; margin-bottom:0px; }\r
-img_whs20 { border:none; width:308px; height:241px; float:none; border-style:none; }\r
-p.whs21 { margin-left:72px; margin-top:0px; margin-bottom:0px; }\r
-p.whs22 { margin-left:48px; margin-top:0px; margin-bottom:0px; }\r
-img_whs23 { border:none; width:433px; height:303px; float:none; border-style:none; }\r
+p.whs5 { margin-top:0px; margin-bottom:0px; margin-left:72px; }\r
+p.whs6 { font-style:italic; color:#ff0000; margin-left:40px; margin-top:0px; margin-bottom:0px; }\r
+img_whs7 { border:none; width:31px; height:27px; float:none; border-style:none; }\r
+p.whs8 { margin-left:0px; margin-top:0px; margin-bottom:0px; }\r
+p.whs9 { margin-left:0px; background-image:url('../texture_horiz_ltbluebubbles.jpg'); margin-top:0px; margin-bottom:0px; }\r
+img_whs10 { border:none; float:none; width:36px; height:38px; border-style:none; }\r
+img_whs11 { border:none; width:374px; height:643px; float:none; border-style:none; }\r
+ul.whs12 { list-style:disc; }\r
+p.whs13 { margin-left:36px; margin-top:0px; margin-bottom:0px; }\r
+p.whs14 { margin-left:36px; margin-top:0px; margin-bottom:0px; font-weight:bold; }\r
+p.whs15 { font-weight:bold; margin-left:24px; margin-top:0px; margin-bottom:0px; }\r
+p.whs16 { margin-left:40px; font-weight:bold; margin-top:0px; margin-bottom:0px; }\r
+p.whs17 { margin-left:24px; margin-top:0px; margin-bottom:0px; }\r
+p.whs18 { font-weight:bold; margin-left:36px; margin-top:0px; margin-bottom:0px; }\r
+p.whs19 { margin-left:60px; margin-top:0px; margin-bottom:0px; }\r
+p.whs20 { margin-top:0px; margin-bottom:0px; margin-left:36px; }\r
+p.whs21 { margin-left:36px; font-weight:bold; margin-top:0px; margin-bottom:0px; }\r
+p.whs22 { margin-left:120px; margin-top:0px; margin-bottom:0px; }\r
+img_whs23 { border:none; width:308px; height:241px; float:none; border-style:none; }\r
+p.whs24 { margin-left:72px; margin-top:0px; margin-bottom:0px; }\r
+p.whs25 { margin-left:48px; margin-top:0px; margin-bottom:0px; }\r
+img_whs26 { border:none; width:433px; height:303px; float:none; border-style:none; }\r
 -->\r
 </style><script type="text/javascript" language="JavaScript">\r
 <!--\r
@@ -47,9 +50,9 @@ if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))
   strNSS += "p.whs2 {margin-top:1pt;margin-bottom:1pt; }";\r
   strNSS += "p.whs4 {margin-top:1pt;margin-bottom:1pt; }";\r
   strNSS += "p.whs5 {margin-top:1pt;margin-bottom:1pt; }";\r
-  strNSS += "p.whs7 {margin-left:1pt;margin-top:1pt;margin-bottom:1pt; }";\r
+  strNSS += "p.whs6 {margin-top:1pt;margin-bottom:1pt; }";\r
   strNSS += "p.whs8 {margin-left:1pt;margin-top:1pt;margin-bottom:1pt; }";\r
-  strNSS += "p.whs12 {margin-top:1pt;margin-bottom:1pt; }";\r
+  strNSS += "p.whs9 {margin-left:1pt;margin-top:1pt;margin-bottom:1pt; }";\r
   strNSS += "p.whs13 {margin-top:1pt;margin-bottom:1pt; }";\r
   strNSS += "p.whs14 {margin-top:1pt;margin-bottom:1pt; }";\r
   strNSS += "p.whs15 {margin-top:1pt;margin-bottom:1pt; }";\r
@@ -57,8 +60,11 @@ if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))
   strNSS += "p.whs17 {margin-top:1pt;margin-bottom:1pt; }";\r
   strNSS += "p.whs18 {margin-top:1pt;margin-bottom:1pt; }";\r
   strNSS += "p.whs19 {margin-top:1pt;margin-bottom:1pt; }";\r
+  strNSS += "p.whs20 {margin-top:1pt;margin-bottom:1pt; }";\r
   strNSS += "p.whs21 {margin-top:1pt;margin-bottom:1pt; }";\r
   strNSS += "p.whs22 {margin-top:1pt;margin-bottom:1pt; }";\r
+  strNSS += "p.whs24 {margin-top:1pt;margin-bottom:1pt; }";\r
+  strNSS += "p.whs25 {margin-top:1pt;margin-bottom:1pt; }";\r
   strNSS +="</style>";\r
   document.write(strNSS);\r
 }\r
@@ -131,20 +137,26 @@ if (window.writeIntopicBar)
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs4">- creating of a 3D presentation on the \r
basis of a field;</p>\r
+<p class="whs4">- creating a 3D presentation on the basis \r
of a field:</p>\r
 \r
-<p class="whs4">- coloring of the cells of this presentation, \r
+<p class="whs5">&nbsp;&nbsp;&nbsp;&nbsp;- \r
+ on the whole mesh (default)</p>\r
+\r
+<p class="whs5">&nbsp;&nbsp;&nbsp;&nbsp;- \r
+ on group(s) of the mesh</p>\r
+\r
+<p class="whs4">- coloring the cells of this presentation, \r
  according the scalar or vector values applied to this cells;</p>\r
 \r
-<p class="whs4">- creating of a scalar bar: a scale, representing \r
the correspondence &nbsp;between \r
+<p class="whs4">- creating a scalar bar representing the \r
+ correspondence &nbsp;between \r
  the scalar values of the field and the used colors. </p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
 <p class="whs2">All other types of field \r
- presentation are based on the <span style="font-weight: bold;"><B>Scalar \r
+ presentations are based on the <span style="font-weight: bold;"><B>Scalar \r
  Map. </B></span></p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
@@ -153,26 +165,24 @@ if (window.writeIntopicBar)
        style="margin-top: 0px; margin-bottom: 0px;">To create a Scalar Map \r
  presentation:</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs6">&nbsp;</p>\r
 \r
 <p class="whs4">- Right-click on one of the time stamps \r
  of the field in the Object browser and from the pop-up menu choose <span \r
  style="font-weight: bold;"><B>Scalar Map, </B></span><span>or</span></p>\r
 \r
-<p class="whs4">&nbsp;</p>\r
-\r
 <p class="whs4">- Click on one of the time stamps of the \r
  field in the Object browser and select from the main menu <span style="font-weight: bold;"><B>Visualization \r
- &gt; Scalar Map</B></span>, or click <img src="../pics/scalarmapicon.jpg" x-maintain-ratio="TRUE" width="31px" height="27px" border="0" class="img_whs6"> icon<span style="font-weight: bold;"> \r
+ &gt; Scalar Map</B></span>, or click <img src="../pics/scalarmapicon.jpg" x-maintain-ratio="TRUE" width="31px" height="27px" border="0" class="img_whs7"> icon<span style="font-weight: bold;"> \r
  <B></B></span>in the <span style="font-weight: bold;"><B>Visualization Toolbar</B></span></p>\r
 \r
 <p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs7">The following dialog box will appear:</p>\r
+<p class="whs8">The following dialog box will appear:</p>\r
 \r
-<p class="whs7">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs8"><img src="../note1.gif" x-maintain-ratio="TRUE" width="36px" height="38px" border="0" class="img_whs9">This dialog box is equal \r
+<p class="whs9"><img src="../note1.gif" x-maintain-ratio="TRUE" width="36px" height="38px" border="0" class="img_whs10">This dialog box is equal \r
  for all types of field presentations and it will be present as an additional \r
  tab in all dialog boxes allowing to create the other types of presentations. \r
  It allows to set the parameters of <span style="font-weight: bold;"><B>Scalar \r
@@ -184,23 +194,32 @@ if (window.writeIntopicBar)
 \r
 <p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs7">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="../pics/scalarbarproperties.png" x-maintain-ratio="TRUE" width="336px" height="501px" border="0" class="img_whs10"></p>\r
+<p class="whs8">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="../pics/scalarbarproperties.png" x-maintain-ratio="TRUE" width="374px" height="643px" border="0" class="img_whs11"></p>\r
+\r
+<p class="whs8">&nbsp;</p>\r
+\r
+<ul type="disc" class="whs12">\r
+       \r
+       <li class=kadov-p><p class="whs13"><span style="font-weight: bold;"><B>Build \r
+ presentation on groups</B></span>: You can choose the groups on which <span \r
+ style="font-weight: bold;"><B>Scalar Map</B></span> can be built from the list \r
+ to the left and add them in the list to the right.</p></li>\r
+</ul>\r
 \r
-<p class="whs7">&nbsp;</p>\r
+<p class="whs13"><span>&nbsp;</span></p>\r
 \r
-<ul type="disc" class="whs11">\r
+<ul type="disc" class="whs12">\r
        \r
-       <li class=kadov-p><p class="whs12"><span style="font-weight: bold;"><B>Scalar \r
- range parameters:</B></span></p></li>\r
+       <li class=kadov-p><p class="whs14">Scalar range parameters:</p></li>\r
 </ul>\r
 \r
-<p class="whs12">&nbsp;</p>\r
+<p class="whs13">&nbsp;</p>\r
 \r
-<ul type="disc" class="whs11">\r
+<ul type="disc" class="whs12">\r
        \r
-       <ul type="disc" class="whs11">\r
+       <ul type="disc" class="whs12">\r
                \r
-               <li class=kadov-p><p class="whs13">Scalar Mode <span \r
+               <li class=kadov-p><p class="whs15">Scalar Mode <span \r
  style="font-weight: normal;">field: This field allows to choose the mode \r
  of transformation of vector values into scalar values for creation of \r
  the presentation. It can be module of the vector or one of three components \r
@@ -209,38 +228,38 @@ if (window.writeIntopicBar)
        </ul>\r
 </ul>\r
 \r
-<p class="whs14">&nbsp;</p>\r
+<p class="whs16">&nbsp;</p>\r
 \r
-<ul type="disc" class="whs11">\r
+<ul type="disc" class="whs12">\r
        \r
-       <ul type="disc" class="whs11">\r
+       <ul type="disc" class="whs12">\r
                \r
-               <li class=kadov-p><p class="whs13">Logarithmic scaling \r
+               <li class=kadov-p><p class="whs15">Logarithmic scaling \r
  <span style="font-weight: normal;">check box: You can apply logarithmic \r
  scaling to the color scale of the presentation.</span></p></li>\r
        </ul>\r
 </ul>\r
 \r
-<p class="whs15">&nbsp;</p>\r
+<p class="whs17">&nbsp;</p>\r
 \r
-<ul type="disc" class="whs11">\r
+<ul type="disc" class="whs12">\r
        \r
-       <ul type="disc" class="whs11">\r
+       <ul type="disc" class="whs12">\r
                \r
-               <li class=kadov-p><p class="whs15"><span style="font-weight: bold;"><B>Use \r
+               <li class=kadov-p><p class="whs17"><span style="font-weight: bold;"><B>Use \r
  field range: </B></span>if this check box is selected, all cells of the field \r
  presentation will be colored according the values applied to these cells. \r
  &nbsp;</p></li>\r
        </ul>\r
 </ul>\r
 \r
-<p class="whs15">&nbsp;</p>\r
+<p class="whs17">&nbsp;</p>\r
 \r
-<ul type="disc" class="whs11">\r
+<ul type="disc" class="whs12">\r
        \r
-       <ul type="disc" class="whs11">\r
+       <ul type="disc" class="whs12">\r
                \r
-               <li class=kadov-p><p class="whs13">Use imposed range: \r
+               <li class=kadov-p><p class="whs15">Use imposed range: \r
  <span style="font-weight: normal;">here you can define your own range \r
  of scalar values of the field, on the basis of which this presentation \r
  will be constructed. The cells of the field presentation with applied \r
@@ -258,24 +277,24 @@ if (window.writeIntopicBar)
 \r
 <p class="whs4">&nbsp;</p>\r
 \r
-<ul type="disc" class="whs11">\r
+<ul type="disc" class="whs12">\r
        \r
-       <li class=kadov-p><p class="whs16">Colors and Labels</p></li>\r
+       <li class=kadov-p><p class="whs18">Colors and Labels</p></li>\r
        \r
-       <li class=kadov-p><p class="whs17"><span style="font-weight: bold;"><B>Nb. \r
+       <li class=kadov-p><p class="whs19"><span style="font-weight: bold;"><B>Nb. \r
  of colors </B></span>field: In this field you can enter the number of colors, \r
  which will be used for coloring of cells containing scalar values.</p></li>\r
        \r
-       <li class=kadov-p><p class="whs17"><span style="font-weight: bold;"><B>Nb. \r
+       <li class=kadov-p><p class="whs19"><span style="font-weight: bold;"><B>Nb. \r
  of labels </B></span>field: In this field you can enter the number of labels, \r
  indicating graduation of the scalar bar.</p></li>\r
 </ul>\r
 \r
 <p class="whs4">&nbsp;</p>\r
 \r
-<ul type="disc" class="whs11">\r
+<ul type="disc" class="whs12">\r
        \r
-       <li class=kadov-p><p class="whs7"><span style="font-weight: bold;"><B>Orientation: \r
+       <li class=kadov-p><p class="whs20"><span style="font-weight: bold;"><B>Orientation: \r
  </B></span>You can select <span style="font-weight: bold;"><B>Vertical </B></span>or<span \r
  style="font-weight: bold;"><B> Horizontal </B></span>orientation of the scalar \r
  bar. &nbsp;</p></li>\r
@@ -283,18 +302,18 @@ if (window.writeIntopicBar)
 \r
 <p class="whs4">&nbsp;</p>\r
 \r
-<ul type="disc" class="whs11">\r
+<ul type="disc" class="whs12">\r
        \r
-       <li class=kadov-p><p class="whs7"><span style="font-weight: bold;"><B>Origin:</B></span> \r
+       <li class=kadov-p><p class="whs20"><span style="font-weight: bold;"><B>Origin:</B></span> \r
  you can enter <span style="font-weight: bold;"><B>X</B></span> &amp; <span style="font-weight: bold;"><B>Y</B></span> \r
  coordinates of the origin of the scalar bar.</p></li>\r
 </ul>\r
 \r
 <p class="whs4">&nbsp;</p>\r
 \r
-<ul type="disc" class="whs11">\r
+<ul type="disc" class="whs12">\r
        \r
-       <li class=kadov-p><p class="whs7">&nbsp;<span \r
+       <li class=kadov-p><p class="whs20">&nbsp;<span \r
  style="font-weight: bold;"><B>Dimensions</B></span>: \r
  you can enter <span style="font-weight: bold;"><B>Width</B></span> and <span \r
  style="font-weight: bold;"><B>Height</B></span> of the scalar bar.</p></li>\r
@@ -302,67 +321,67 @@ if (window.writeIntopicBar)
 \r
 <p class="whs4">&nbsp;</p>\r
 \r
-<ul type="disc" class="whs11">\r
+<ul type="disc" class="whs12">\r
        \r
-       <li class=kadov-p><p class="whs7"><span style="font-weight: bold;"><B>Save \r
+       <li class=kadov-p><p class="whs20"><span style="font-weight: bold;"><B>Save \r
  as default values </B></span>check box allows to save this parameters for \r
  all presentations, which will be constructed later.</p></li>\r
 </ul>\r
 \r
-<p class="whs7">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<ul type="disc" class="whs11">\r
+<ul type="disc" class="whs12">\r
        \r
-       <li class=kadov-p><p class="whs18">Text properties <span \r
+       <li class=kadov-p><p class="whs21">Text properties <span \r
  style="font-weight: normal;">button allows you to define from the following \r
  dialog box:</span></p></li>\r
 </ul>\r
 \r
 <p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs19"><img src="../pics/textproperty.png" x-maintain-ratio="TRUE" width="308px" height="241px" border="0" class="img_whs20"></p>\r
+<p class="whs22"><img src="../pics/textproperty.png" x-maintain-ratio="TRUE" width="308px" height="241px" border="0" class="img_whs23"></p>\r
 \r
-<p class="whs12">&nbsp;</p>\r
+<p class="whs13">&nbsp;</p>\r
 \r
-<ul type="disc" class="whs11">\r
+<ul type="disc" class="whs12">\r
        \r
-       <li class=kadov-p><p class="whs21"><span style="font-weight: bold;"><B>Title</B></span> \r
+       <li class=kadov-p><p class="whs24"><span style="font-weight: bold;"><B>Title</B></span> \r
  of the field, on the basis of which this presentation is created,</p></li>\r
        \r
-       <li class=kadov-p><p class="whs21">Font<span style="font-weight: bold;"> \r
+       <li class=kadov-p><p class="whs24">Font<span style="font-weight: bold;"> \r
  <B></B></span>properties of the <span style="font-weight: bold;"><B>Title</B></span>, \r
  displayed in the Viewer</p></li>\r
        \r
-       <li class=kadov-p><p class="whs21">Font<span style="font-weight: bold;"> \r
+       <li class=kadov-p><p class="whs24">Font<span style="font-weight: bold;"> \r
  <B></B></span>properties of the <span style="font-weight: bold;"><B>Labels</B></span>, \r
  displayed in the Viewer. &nbsp;</p></li>\r
 </ul>\r
 \r
-<p class="whs21">&nbsp;</p>\r
+<p class="whs24">&nbsp;</p>\r
 \r
-<p class="whs22">After you have finished with setting these \r
+<p class="whs25">After you have finished with setting these \r
  parameters, click <span style="font-weight: bold;"><B>OK. </B></span>Your presentation \r
  with scalar bar will be immediately displayed in the viewer: </p>\r
 \r
-<p class="whs7">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="../pics/scalarrangesn.png" x-maintain-ratio="TRUE" width="433px" height="303px" border="0" class="img_whs23"></p>\r
+<p class="whs4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="../pics/scalarrangesn.png" x-maintain-ratio="TRUE" width="433px" height="303px" border="0" class="img_whs26"></p>\r
 \r
-<p class="whs7">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs7">\r
+<p class="whs8">\r
 <a href="javascript:void(0);" onClick="var e; if (parseInt(navigator.appVersion)>=4){e=event;}  if (parseInt(navigator.appVersion) >=2 && typeof(PickupDialog_Invoke) == 'function') PickupDialog_Invoke(e,'','Creating field presentations','creating_field_presentations.htm');return false;" title="Related Topics"><img src="../ss_btn_related_topics.gif" border=0 height=17 width=82 alt="Related Topics"></a>\r
 \r
 \r
  </p>\r
 \r
-<p class="whs7">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs7">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs7">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs7">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
 <script type="text/javascript" language="JavaScript" title="WebHelpRelatedTopics"><!--\r
 if (parseInt(navigator.appVersion) >= 3 && typeof (WritePopupMenuLayer) == "function")\r
index 83311861b9563d2f684ad4a5ae3077286588ba87..db018aec78b978cfc9c6bf0b68002a8f060a7038 100755 (executable)
Binary files a/doc/salome/gui/VISU/pics/scalarbarproperties.png and b/doc/salome/gui/VISU/pics/scalarbarproperties.png differ
index 3001e0b04955ac73c6ad334c7fbc142cb60f0373..751a83649e3741c243e54ea27a1682e99c0de39f 100644 (file)
@@ -43,6 +43,8 @@ module VISU {
   //-------------------------------------------------------
   typedef string IdType;
 
+  typedef sequence<string> string_array;
+
   /*!
    * This enumeration contains a set of elements defining the type
    * of the scaling, which can be applied on different presentations.
@@ -76,6 +78,7 @@ module VISU {
     TDEFORMEDSHAPE, /*!< Deformed shape 3D presentation object */
     TSCALARMAPONDEFORMEDSHAPE, /*!< Scalar map on deformed shape 3D presentation object */
     TGAUSSPOINTS, /*!< Gauss Points 3D presentation object */
+    TPRSMERGER, /*!< PRS merger 3D presentation object */
     TPLOT3D, /*!< Plot3D 3D presentation object */
     TCUTPLANES, /*!< Cut planes 3D presentation object */
     TCUTLINES, /*!< Cut lines 3D presentation object */
@@ -534,6 +537,44 @@ module VISU {
      * Gets the type of orientation of the scalar bar (to provide backward compatibility).
      */
     Orientation GetBarOrientation();
+
+    /*!
+     * PrsMerger method:
+     * Set mesh on group as geometry of presentation.(clear all previously added groups).
+     * \param theMeshName  - mesh name
+     * \param theGroupName - group name
+     */
+    void SetMeshOnGroup(in string theMeshName,
+                       in string theGroupName);
+
+    /*!
+     * PrsMerger method:
+     * Add group as geometry of presentation.
+     * \param theMeshName  - mesh name
+     * \param theGroupName - group name
+     */
+    long AddMeshOnGroup(in string theMeshName,
+                       in string theGroupName);
+
+    
+    /*!
+     * PrsMerger method:
+     * Set scalar map of presentation.
+     * \param theMeshName  - mesh name
+     * \param theFieldName - the name of scalar field
+     * \param theStampsNum - the iteration number for scalar field
+     * \param theEntity    - entity of scalar field
+     */
+    void SetScalarMap(in string theMeshName,
+                     in Entity theEntity,
+                     in string theFieldName,
+                     in long theStampsNum);
+
+    /*!
+     * PrsMerger method:
+     * Remove all groups.(The scalar map will be placed on all mesh).
+     */
+    void RemoveAllGeom();
   };
 
   //-------------------------------------------------------
@@ -583,6 +624,7 @@ module VISU {
     void SetColor(in SALOMEDS::Color theColor);
   };
 
+
   //-------------------------------------------------------
   /*! \brief Scalar Map on Deformed shape presentation interface
    *
@@ -624,6 +666,27 @@ module VISU {
     void SetScalarField(in string theMeshName,in string theFieldName,
                        in long theIteration,in Entity theEntity);
 
+
+    /*!
+     * Get scalar iteration number
+     */
+    long GetScalarLIteration();
+
+    /*!
+     * Get scalar entity
+     */
+    Entity GetScalarEEntity();
+
+    /*!
+     * Get scalar field name
+     */
+    string GetScalarCFieldName();
+
+    /*!
+     * Get mesh name
+     */
+    string GetScalarCMeshName();
+    
   };
   //-------------------------------------------------------
   /*!
diff --git a/resources/Visu_add.png b/resources/Visu_add.png
new file mode 100644 (file)
index 0000000..a7e93b8
Binary files /dev/null and b/resources/Visu_add.png differ
diff --git a/resources/Visu_cutplane.png b/resources/Visu_cutplane.png
deleted file mode 100644 (file)
index 5e92cf6..0000000
Binary files a/resources/Visu_cutplane.png and /dev/null differ
diff --git a/resources/Visu_cutplanes.png b/resources/Visu_cutplanes.png
new file mode 100644 (file)
index 0000000..5e92cf6
Binary files /dev/null and b/resources/Visu_cutplanes.png differ
diff --git a/resources/Visu_remove.png b/resources/Visu_remove.png
new file mode 100644 (file)
index 0000000..e85afb6
Binary files /dev/null and b/resources/Visu_remove.png differ
diff --git a/resources/Visu_tree_container.png b/resources/Visu_tree_container.png
new file mode 100644 (file)
index 0000000..40aa4d3
Binary files /dev/null and b/resources/Visu_tree_container.png differ
diff --git a/resources/Visu_tree_curve.png b/resources/Visu_tree_curve.png
new file mode 100644 (file)
index 0000000..e17c5f4
Binary files /dev/null and b/resources/Visu_tree_curve.png differ
diff --git a/resources/Visu_tree_cutlines.png b/resources/Visu_tree_cutlines.png
new file mode 100755 (executable)
index 0000000..f6ffc7c
Binary files /dev/null and b/resources/Visu_tree_cutlines.png differ
diff --git a/resources/Visu_tree_cutlines_gr.png b/resources/Visu_tree_cutlines_gr.png
new file mode 100644 (file)
index 0000000..fc35bc8
Binary files /dev/null and b/resources/Visu_tree_cutlines_gr.png differ
diff --git a/resources/Visu_tree_cutplanes.png b/resources/Visu_tree_cutplanes.png
new file mode 100755 (executable)
index 0000000..1d93c8a
Binary files /dev/null and b/resources/Visu_tree_cutplanes.png differ
diff --git a/resources/Visu_tree_cutplanes_gr.png b/resources/Visu_tree_cutplanes_gr.png
new file mode 100644 (file)
index 0000000..bbc4727
Binary files /dev/null and b/resources/Visu_tree_cutplanes_gr.png differ
diff --git a/resources/Visu_tree_deformed.png b/resources/Visu_tree_deformed.png
new file mode 100755 (executable)
index 0000000..68d2782
Binary files /dev/null and b/resources/Visu_tree_deformed.png differ
diff --git a/resources/Visu_tree_deformed_gr.png b/resources/Visu_tree_deformed_gr.png
new file mode 100644 (file)
index 0000000..1d619f4
Binary files /dev/null and b/resources/Visu_tree_deformed_gr.png differ
diff --git a/resources/Visu_tree_gauss_points.png b/resources/Visu_tree_gauss_points.png
new file mode 100644 (file)
index 0000000..7eca580
Binary files /dev/null and b/resources/Visu_tree_gauss_points.png differ
diff --git a/resources/Visu_tree_isosurfaces.png b/resources/Visu_tree_isosurfaces.png
new file mode 100755 (executable)
index 0000000..0229c7a
Binary files /dev/null and b/resources/Visu_tree_isosurfaces.png differ
diff --git a/resources/Visu_tree_isosurfaces_gr.png b/resources/Visu_tree_isosurfaces_gr.png
new file mode 100644 (file)
index 0000000..e5a4d46
Binary files /dev/null and b/resources/Visu_tree_isosurfaces_gr.png differ
diff --git a/resources/Visu_tree_mesh.png b/resources/Visu_tree_mesh.png
new file mode 100644 (file)
index 0000000..0ff2187
Binary files /dev/null and b/resources/Visu_tree_mesh.png differ
diff --git a/resources/Visu_tree_plot3d.png b/resources/Visu_tree_plot3d.png
new file mode 100755 (executable)
index 0000000..ac64425
Binary files /dev/null and b/resources/Visu_tree_plot3d.png differ
diff --git a/resources/Visu_tree_plot3d_gr.png b/resources/Visu_tree_plot3d_gr.png
new file mode 100644 (file)
index 0000000..e73180b
Binary files /dev/null and b/resources/Visu_tree_plot3d_gr.png differ
diff --git a/resources/Visu_tree_result.png b/resources/Visu_tree_result.png
new file mode 100644 (file)
index 0000000..a9eccf9
Binary files /dev/null and b/resources/Visu_tree_result.png differ
diff --git a/resources/Visu_tree_scalarmapondeformedshape.png b/resources/Visu_tree_scalarmapondeformedshape.png
new file mode 100755 (executable)
index 0000000..77c346c
Binary files /dev/null and b/resources/Visu_tree_scalarmapondeformedshape.png differ
diff --git a/resources/Visu_tree_scalarmapondeformedshape_gr.png b/resources/Visu_tree_scalarmapondeformedshape_gr.png
new file mode 100644 (file)
index 0000000..d2f73eb
Binary files /dev/null and b/resources/Visu_tree_scalarmapondeformedshape_gr.png differ
diff --git a/resources/Visu_tree_scalars.png b/resources/Visu_tree_scalars.png
new file mode 100755 (executable)
index 0000000..d0c93c5
Binary files /dev/null and b/resources/Visu_tree_scalars.png differ
diff --git a/resources/Visu_tree_scalars_gr.png b/resources/Visu_tree_scalars_gr.png
new file mode 100644 (file)
index 0000000..d9a018a
Binary files /dev/null and b/resources/Visu_tree_scalars_gr.png differ
diff --git a/resources/Visu_tree_streamlines.png b/resources/Visu_tree_streamlines.png
new file mode 100755 (executable)
index 0000000..c0213de
Binary files /dev/null and b/resources/Visu_tree_streamlines.png differ
diff --git a/resources/Visu_tree_streamlines_gr.png b/resources/Visu_tree_streamlines_gr.png
new file mode 100644 (file)
index 0000000..8f1a62a
Binary files /dev/null and b/resources/Visu_tree_streamlines_gr.png differ
diff --git a/resources/Visu_tree_table.png b/resources/Visu_tree_table.png
new file mode 100644 (file)
index 0000000..90799f6
Binary files /dev/null and b/resources/Visu_tree_table.png differ
diff --git a/resources/Visu_tree_vectors.png b/resources/Visu_tree_vectors.png
new file mode 100755 (executable)
index 0000000..5ff8c7b
Binary files /dev/null and b/resources/Visu_tree_vectors.png differ
diff --git a/resources/Visu_tree_vectors_gr.png b/resources/Visu_tree_vectors_gr.png
new file mode 100644 (file)
index 0000000..3a7e114
Binary files /dev/null and b/resources/Visu_tree_vectors_gr.png differ
index 6069283339856526210bf76e02700e45f765b0f6..a1ad7407bc5baba30face66d286ad6dae0f12e30 100644 (file)
@@ -140,6 +140,7 @@ namespace VISU
     TVTKOutput* 
     GetVTKOutput();
   };
+  typedef SharedPtr<TAppendFilter> PAppendFilter;
 
 
   //---------------------------------------------------------------
index beed4013c68640be0ca4270d39aea2380441dc2a..b68276c62a3b6bd520c6ff36cb5d77bc73073ff4 100644 (file)
@@ -325,7 +325,6 @@ namespace VISU{
     return myVisuGen->Plot3DOnField(theResult,theMeshName,theEntity,theFieldName,theIteration);
   }
 
-
   Table_ptr VISU_Gen_i::CreateTable(const char* theTableEntry){
     return myVisuGen->CreateTable(theTableEntry);
   }
index f4be886571986bb1b44c0d1e15f9ba480d019687..0f237c348d46acf2bfec398c94469c01c081d04d 100644 (file)
@@ -107,6 +107,7 @@ namespace VISU{
     virtual ScalarMapOnDeformedShape_ptr ScalarMapOnDeformedShapeOnField
                                       (Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
                                       const char* theFieldName, CORBA::Double theIteration);
+
     //Create Digital Presentation
     virtual Table_ptr CreateTable(const char* theTableEntry);
     virtual Curve_ptr CreateCurve(Table_ptr theTable, CORBA::Long theHRow, CORBA::Long theVRow);
index 198eadded5ef6a7b3c79f9f14220b12abd97ed5a..64ee4b76c2a19ea0ff41e69a82b24b4f43347e88 100644 (file)
@@ -57,7 +57,8 @@ EXPORT_HEADERS = \
        VISU_PlanesWidget.hxx \
        VISU_SphereWidget.hxx \
        VISU_WidgetCtrl.hxx \
-       VISU_ScalarMapOnDeformedShapePL.hxx
+       VISU_ScalarMapOnDeformedShapePL.hxx \
+       VISU_PrsMergerPL.hxx
 
 # Libraries targets
 
@@ -87,7 +88,8 @@ LIB_SRC = \
        VISU_SphereWidget.cxx \
        VISU_WidgetCtrl.cxx \
        VISU_ScalarBarCtrl.cxx \
-       VISU_ScalarMapOnDeformedShapePL.cxx
+       VISU_ScalarMapOnDeformedShapePL.cxx \
+       VISU_PrsMergerPL.cxx
 
 # Executables targets
 
index a7561e48721ccd0a10fd1927e45c0f2d6a139f18..3da0ca4a2f96a78d554e1a21e760080303091322 100644 (file)
@@ -151,7 +151,7 @@ VISU_CutLinesPL
   
   CorrectPnt(myBasePnt,aBaseBounds);
 
-  VISU_ScalarMapPL::Update();
+  VISU_PrsMergerPL::Update();
 }
 
 
index c1780194a75ac10a7406e36702feed48612b0cbe..91a2f6492ad2b70716c57bf7f68adcbdddeadb8f 100644 (file)
@@ -74,14 +74,14 @@ VISU_CutPlanesPL
     for (int i = 0, iend = GetNbParts(); i < iend; i++)
       if(!aPipeLine->IsPartDefault(i))         SetPartPosition(i, aPipeLine->GetPartPosition(i));
   }
-  VISU_ScalarMapPL::ShallowCopy(thePipeLine);
+  Superclass::ShallowCopy(thePipeLine);
 }
 
 void
 VISU_CutPlanesPL
 ::Init()
 {
-  VISU_ScalarMapPL::Init();
+  Superclass::Init();
 
   SetNbParts(10);
   myBasePlane[0] = YZ;
@@ -110,7 +110,7 @@ VISU_CutPlanesPL
   CutWithPlanes(myAppendPolyData,aDataSet,myNbParts,aDir,aBounds,
                myPartPosition,myPartCondition,myDisplacement[0]);
 
-  VISU_ScalarMapPL::Update();
+  Superclass::Update();
 }
 
 void
index cea06cb220c4f9927e603eb01f4e7b70458cc99e..671a53308fa17c51ce49d204ad77b8e0531752c3 100644 (file)
 #ifndef VISU_CutPlanesPL_HeaderFile
 #define VISU_CutPlanesPL_HeaderFile
 
-#include "VISU_ScalarMapPL.hxx"
+#include "VISU_PrsMergerPL.hxx"
 
 #include <vector>
 
 class vtkAppendPolyData;
 
-class VISU_CutPlanesPL : public VISU_ScalarMapPL{
+class VISU_CutPlanesPL : public VISU_PrsMergerPL{
 protected:
   VISU_CutPlanesPL();
   VISU_CutPlanesPL(const VISU_CutPlanesPL&);
 public:
-  vtkTypeMacro(VISU_CutPlanesPL,VISU_ScalarMapPL);
+  vtkTypeMacro(VISU_CutPlanesPL,VISU_PrsMergerPL);
   static VISU_CutPlanesPL* New();
 
   virtual
index 43314db9b910c8c28d50a718016feece030331d1..0a69dc9b838cd412785c0c357076da0e4f44d89a 100644 (file)
@@ -57,7 +57,7 @@ VISU_DeformedShapePL
   if(VISU_DeformedShapePL *aPipeLine = dynamic_cast<VISU_DeformedShapePL*>(thePipeLine)){
     SetScale(aPipeLine->GetScale());
   }
-  VISU_ScalarMapPL::ShallowCopy(thePipeLine);
+  TSupperClass::ShallowCopy(thePipeLine);
 }
 
 vtkFloatingPointType
@@ -103,11 +103,12 @@ void
 VISU_DeformedShapePL
 ::Init()
 {
-  VISU_ScalarMapPL::Init();
+  TSupperClass::Init();
   vtkFloatingPointType aScalarRange[2];
   GetSourceRange(aScalarRange);
 
   vtkDataSet* aDataSet = GetInput2();
+  //vtkDataSet* aDataSet = GetScalars()->GetInput();
   vtkFloatingPointType aScaleFactor = VISU_DeformedShapePL::GetScaleFactor( aDataSet );
 
   static double EPS = 1.0 / VTK_LARGE_FLOAT;
@@ -129,14 +130,14 @@ void
 VISU_DeformedShapePL
 ::Update()
 {
-  VISU_ScalarMapPL::Update();
+  TSupperClass::Update();
 }
 
 void
 VISU_DeformedShapePL
 ::SetMapScale(vtkFloatingPointType theMapScale)
 {
-  VISU_ScalarMapPL::SetMapScale(theMapScale);
+  TSupperClass::SetMapScale(theMapScale);
 
   myWarpVector->SetScaleFactor(myScaleFactor*theMapScale);
   Modified();
index 96c3d0ebe7ea62e18f21561abd8b88404930a2d5..4cb3aa8b2a4743cc46788a7d19388933c9615e6c 100644 (file)
 #ifndef VISU_DeformedShapePL_HeaderFile
 #define VISU_DeformedShapePL_HeaderFile
 
-#include "VISU_ScalarMapPL.hxx"
+#include "VISU_PrsMergerPL.hxx"
 
 class vtkCellDataToPointData;
 class SALOME_Transform;
 class vtkWarpVector;
 
-class VISU_DeformedShapePL : public VISU_ScalarMapPL
+class VISU_DeformedShapePL : public VISU_PrsMergerPL
 {
+  typedef VISU_PrsMergerPL TSupperClass;
+  
 protected:
   VISU_DeformedShapePL();
   VISU_DeformedShapePL(const VISU_DeformedShapePL&);
@@ -43,7 +45,7 @@ protected:
   ~VISU_DeformedShapePL();
 
 public:
-  vtkTypeMacro(VISU_DeformedShapePL,VISU_ScalarMapPL);
+  vtkTypeMacro(VISU_DeformedShapePL,TSupperClass);
 
   static
   VISU_DeformedShapePL* 
index 82eec5dc8f20800ae485bb562de52e91caafd486..c33d071a614944277d1bba6625e3dfe06ce802ac 100644 (file)
@@ -100,7 +100,7 @@ void VISU_Extractor::Execute(){
     output->GetPointData()->CopyVectorsOn();
     int aNbElems = input->GetNumberOfPoints();
     vtkPointData *inData = input->GetPointData(), *outData = output->GetPointData();
-    if(inData->GetAttribute(vtkDataSetAttributes::VECTORS))
+    if(!inData->GetAttribute(vtkDataSetAttributes::SCALARS))
       execute(aNbElems,myScalarMode,inData,outData);
     else
       output->GetPointData()->CopyScalarsOn();
index 2d0be6cc83452081ab4c9762f4c50bee04728b05..c8b9eaeaf1b1717356cd0e55d21d7ddc06b29cfa 100644 (file)
@@ -60,7 +60,7 @@ VISU_IsoSurfacesPL
     vtkFloatingPointType aRange[2] = {aPipeLine->GetMin(), aPipeLine->GetMax()};
     SetRange(aRange);
   }
-  VISU_ScalarMapPL::ShallowCopy(thePipeLine);
+  TSupperClass::ShallowCopy(thePipeLine);
 }
 
 int
@@ -82,7 +82,7 @@ void
 VISU_IsoSurfacesPL
 ::SetScaling(int theScaling) 
 {
-  VISU_ScalarMapPL::SetScaling(theScaling);
+  TSupperClass::SetScaling(theScaling);
   SetRange(myRange);
 }
 void
@@ -118,7 +118,7 @@ void
 VISU_IsoSurfacesPL
 ::Init()
 {
-  VISU_ScalarMapPL::Init();
+  TSupperClass::Init();
 
   SetNbParts(10);
   vtkFloatingPointType aScalarRange[2];
@@ -139,14 +139,14 @@ void
 VISU_IsoSurfacesPL
 ::Update()
 {
-  VISU_ScalarMapPL::Update();
+  TSupperClass::Update();
 }
 
 void
 VISU_IsoSurfacesPL
 ::SetMapScale(vtkFloatingPointType theMapScale)
 {
-  VISU_ScalarMapPL::SetMapScale(theMapScale);
+  TSupperClass::SetMapScale(theMapScale);
 
   vtkFloatingPointType aRange[2] = {GetMax() - theMapScale*(GetMax()-GetMin()), GetMax()};
   vtkFloatingPointType aNewRange[2] = {aRange[0], aRange[1]};
index 2049a761a832a6fd97594048077f6b02fb19e798..bd29bbb905243c53ce30f56c16641bdec474018f 100644 (file)
 #ifndef VISU_IsoSurfacesPL_HeaderFile
 #define VISU_IsoSurfacesPL_HeaderFile
 
-#include "VISU_ScalarMapPL.hxx"
+#include "VISU_PrsMergerPL.hxx"
 
 class vtkContourFilter;
 class vtkCellDataToPointData;
 
-class VISU_IsoSurfacesPL : public VISU_ScalarMapPL
+class VISU_IsoSurfacesPL : public VISU_PrsMergerPL
 {
+  typedef VISU_ScalarMapPL TSupperClass;
+
 protected:
   VISU_IsoSurfacesPL();
   VISU_IsoSurfacesPL(const VISU_IsoSurfacesPL&);
@@ -42,7 +44,7 @@ protected:
   ~VISU_IsoSurfacesPL();
 
 public:
-  vtkTypeMacro(VISU_IsoSurfacesPL,VISU_ScalarMapPL);
+  vtkTypeMacro(VISU_IsoSurfacesPL,TSupperClass);
 
   static
   VISU_IsoSurfacesPL* 
index 2b87e56f32ba96130af4c7a0868ce2f8f0164a7b..e5de36c4356c48f243145fb98dc10021b95a2a2c 100644 (file)
@@ -77,7 +77,7 @@ ShallowCopy(VISU_PipeLine *thePipeLine)
     SetContourPrs( aPipeLine->GetIsContourPrs() );
     SetNumberOfContours( aPipeLine->GetNumberOfContours() );
   }
-  VISU_ScalarMapPL::ShallowCopy(thePipeLine);
+  TSupperClass::ShallowCopy(thePipeLine);
 }
 
 VISU_CutPlanesPL::PlaneOrientation
@@ -133,7 +133,7 @@ void
 VISU_Plot3DPL::
 Init()
 {
-  VISU_ScalarMapPL::Init();
+  TSupperClass::Init();
 
   myOrientation = GetOrientation(GetInput2());
   SetScaleFactor(GetScaleFactor(GetInput2()));
@@ -213,7 +213,7 @@ Update()
 
   myWarpScalar->SetNormal(aPlaneNormal);
 
-  VISU_ScalarMapPL::Update();
+  TSupperClass::Update();
 }
 
 void
@@ -388,7 +388,7 @@ void VISU_Plot3DPL::GetMinMaxPosition( vtkFloatingPointType& minPos,
 
 void VISU_Plot3DPL::SetMapScale(vtkFloatingPointType theMapScale)
 {
-  VISU_ScalarMapPL::SetMapScale(theMapScale);
+  TSupperClass::SetMapScale(theMapScale);
 
   if ( myIsContour ) {
     vtkFloatingPointType aRange[2];
index cb237fa78a8261c6d4e6ff57e7bde9ea1efa2738..59012133176a60081829a22d068bd45b8348be1a 100644 (file)
@@ -27,7 +27,7 @@
 #ifndef VISU_Plot3DPL_HeaderFile
 #define VISU_Plot3DPL_HeaderFile
 
-#include "VISU_ScalarMapPL.hxx"
+#include "VISU_PrsMergerPL.hxx"
 #include "VISU_CutPlanesPL.hxx"
 
 class vtkWarpScalar;
@@ -35,13 +35,14 @@ class vtkContourFilter;
 class vtkGeometryFilter;
 class vtkCellDataToPointData;
 
-class VISU_Plot3DPL : public VISU_ScalarMapPL{
+class VISU_Plot3DPL : public VISU_PrsMergerPL{
+  typedef VISU_ScalarMapPL TSupperClass;
 protected:
   VISU_Plot3DPL();
   VISU_Plot3DPL(const VISU_Plot3DPL&);
 
 public:
-  vtkTypeMacro(VISU_Plot3DPL,VISU_ScalarMapPL);
+  vtkTypeMacro(VISU_Plot3DPL,TSupperClass);
   static VISU_Plot3DPL* New();
   virtual ~VISU_Plot3DPL();
 
diff --git a/src/PIPELINE/VISU_PrsMergerPL.cxx b/src/PIPELINE/VISU_PrsMergerPL.cxx
new file mode 100644 (file)
index 0000000..229a728
--- /dev/null
@@ -0,0 +1,401 @@
+//  VISU OBJECT : interactive object for VISU entities implementation
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+//
+// File:    VISU_PrsMergerPL.cxx
+// Author:  Eugeny Nikolaev
+// Module : VISU
+
+#include "VISU_PrsMergerPL.hxx"
+#include "VISU_MeshPL.hxx"
+#include "VISU_ScalarMapPL.hxx"
+#include "VISU_MergeFilter.hxx"
+#include "VISU_IDMapper.hxx"
+#include "VTKViewer_AppendFilter.h"
+
+#include "VISU_PipeLineUtils.hxx"
+
+#include <vtkMapper.h>
+#include <vtkDataSet.h>
+#include <vtkObjectFactory.h>
+#include <vtkMergeFilter.h>
+#include <vtkDataSetMapper.h>
+#include <vtkUnstructuredGrid.h>
+#include <vtkObject.h>
+#include <vtkFloatArray.h>
+#include <vtkPointData.h>
+#include <vtkCellData.h>
+#include <vtkCellType.h>
+#include <vtkCell.h>
+
+#include <vector>
+#include <set>
+
+#ifdef _DEBUG_
+static int MYDEBUG = 0;
+#else
+static int MYDEBUG = 0;
+#endif
+
+
+using namespace std;
+
+vtkStandardNewMacro(VISU_PrsMergerPL);
+
+VISU_PrsMergerPL
+::VISU_PrsMergerPL()
+{
+  myScalars = NULL;
+  
+  //myMergeFilter->Delete();
+  myMeshGeometryList.clear();
+}
+
+VISU_PrsMergerPL
+::~VISU_PrsMergerPL()
+{
+  myMeshGeometryList.clear();
+}
+
+void
+VISU_PrsMergerPL
+::RemoveAllGeom()
+{
+  myMeshGeometryList.clear();
+  this->Execute();
+}
+
+void
+VISU_PrsMergerPL
+::ShallowCopy(VISU_PipeLine *thePipeLine)
+{
+  VISU_PrsMergerPL* aPipeLine = dynamic_cast<VISU_PrsMergerPL*>(thePipeLine);
+  if(this == aPipeLine){
+    TSupperClass::ShallowCopy(thePipeLine);
+    return;
+  }
+  if(aPipeLine){
+    int aNbGeoms = aPipeLine->GetNbGeometry();
+    if (MYDEBUG) MESSAGE("aNbGeoms="<<aNbGeoms);
+    myMeshGeometryList.clear();
+    for(int i=0; i<aNbGeoms; i++){
+      AddBackGeometry(aPipeLine->GetGeometry(i),false);
+    }
+    SetScalars(aPipeLine->GetScalars(),true);
+  }
+  TSupperClass::ShallowCopy(thePipeLine);
+}
+
+bool
+VISU_PrsMergerPL
+::SetGeometry(VISU_PipeLine* theGeometry,bool theUpdate)
+{
+  myMeshGeometryList.clear();
+  if(this->checkGeometry(theGeometry)){
+    myMeshGeometryList.push_back(theGeometry);
+    if (MYDEBUG) MESSAGE("this->GetGeometry(0)->GetIDMapper()="<<this->GetGeometry(0)->GetIDMapper());
+    
+    if(theUpdate)
+      this->Execute();
+
+    return true;
+  } else
+    return false;
+  
+}
+
+int
+VISU_PrsMergerPL
+::AddBackGeometry(VISU_PipeLine* theGeometry,bool theUpdate)
+{
+  if(theGeometry == NULL) return -1;
+  int aGeomNum = this->GetGeometryNumber(theGeometry);
+  if(aGeomNum == -1){
+    bool aCheckGeom = this->checkGeometry(theGeometry);
+    if(aCheckGeom){
+      myMeshGeometryList.push_back(theGeometry);
+      
+      if(theUpdate)
+       this->Execute();
+
+      return (myMeshGeometryList.size()-1);
+    } else {
+      return -1;
+    }
+  } else {
+    return aGeomNum;
+  }
+}
+
+int
+VISU_PrsMergerPL
+::GetGeometryNumber(VISU_PipeLine* theGeometry)
+{
+  TPipeLine aPipeLine = theGeometry;
+  TPipeLines::const_iterator aIter = myMeshGeometryList.begin();
+  for(int i=0;aIter != myMeshGeometryList.end();aIter++,i++){
+    if( theGeometry == (*aIter).GetPointer() )
+      return i;
+  }
+  
+  return -1;
+}
+
+void
+VISU_PrsMergerPL
+::RemoveGeometryById(int theId)
+{
+  if(theId >=0 && theId < myMeshGeometryList.size()){
+    TPipeLines::iterator aIter = myMeshGeometryList.begin();
+    for(;aIter != myMeshGeometryList.end();aIter++){
+      if( myMeshGeometryList[theId] == (*aIter)){
+       myMeshGeometryList.erase(aIter);
+       this->Execute();
+       break;
+      }
+    }
+  }
+}
+
+VISU_PipeLine*
+VISU_PrsMergerPL
+::GetGeometry(int theId)
+{
+  if(theId >=0 && theId < myMeshGeometryList.size()){
+    return myMeshGeometryList[theId].GetPointer();
+  }
+  else
+    return NULL;
+}
+
+VISU_PipeLine*
+VISU_PrsMergerPL
+::GetScalars()
+{
+  return myScalars.GetPointer();
+}
+
+int
+VISU_PrsMergerPL
+::GetNbGeometry()
+{
+  return myMeshGeometryList.size();
+}
+
+bool
+VISU_PrsMergerPL
+::SetScalars(VISU_PipeLine* theInput,bool theUpdate)
+{
+  if(MYDEBUG) MESSAGE("VISU_PrsMergerPL::SetScalars()");
+  if ( this->checkScalars( theInput ) ){
+    myScalars = theInput;
+    VISU_ScalarMapPL* aScalarMap = dynamic_cast<VISU_ScalarMapPL*>(this->GetScalars());
+    myScalarRanges = aScalarMap->GetScalarRange();
+    if(theUpdate)
+      this->Execute();
+    return true;
+  } else
+    return false;
+}
+
+void
+VISU_PrsMergerPL
+::Init()
+{
+  Superclass::Init();
+  if(MYDEBUG) MESSAGE("VISU_PrsMergerPL::Init() this="<<this);
+  this->Execute();
+}
+
+void
+VISU_PrsMergerPL
+::Update()
+{
+  if(MYDEBUG) MESSAGE("VISU_PrsMergerPL::Update()");
+  Superclass::Update();
+}
+
+void
+VISU_PrsMergerPL
+::Build()
+{
+  if(MYDEBUG) MESSAGE("VISU_PrsMergerPL::Build()");
+  TSupperClass::Build(); // call DoHook method
+}
+
+void
+VISU_PrsMergerPL
+::SetInitialRange()
+{
+  myMapper->UseLookupTableScalarRangeOff();
+}
+
+bool
+VISU_PrsMergerPL
+::checkGeometry(const VISU_PipeLine* thePipeLine)
+{
+  const VISU::PIDMapper& aMapper  = thePipeLine->GetIDMapper();
+  int aNbPoints = aMapper->GetVTKOutput()->GetNumberOfPoints();
+  if (this->GetNbGeometry() > 0){
+    const VISU::PIDMapper& aMapper2 = this->GetGeometry(0)->GetIDMapper();
+    int aNbPoints2 = aMapper2->GetVTKOutput()->GetNumberOfPoints();
+    if(aNbPoints2 != aNbPoints)
+      return false;
+  } else if (this->GetScalars()) {
+    const VISU::PIDMapper& aMapper2 = this->GetScalars()->GetIDMapper();
+    int aNbPoints2 = aMapper2->GetVTKOutput()->GetNumberOfPoints();
+    if(aNbPoints2 != aNbPoints)
+      return false;
+  }
+  return true;
+}
+
+bool
+VISU_PrsMergerPL
+::checkScalars(const VISU_PipeLine* thePipeLine)
+{
+  const VISU::PIDMapper& aMapper  = thePipeLine->GetIDMapper();
+  int aNbPoints = aMapper->GetVTKOutput()->GetNumberOfPoints();
+  if (this->GetNbGeometry() > 0){
+    const VISU::PIDMapper& aMapper2 = this->GetGeometry(0)->GetIDMapper();
+    int aNbPoints2 = aMapper2->GetVTKOutput()->GetNumberOfPoints();
+    if(aNbPoints2 != aNbPoints)
+      return false;
+  }
+  return true;
+}
+
+void
+VISU_PrsMergerPL
+::Execute(){
+  /* Where are next situations:
+   * 1. Timestamp on entity=NODE
+   * 1.1 Group Cell         - OK
+   * 1.2 Group Cell + Point - ERR (remove points groups)
+   * 1.3 Group Node         - ERR (remove points groups)
+   * 2. Timesatamp on entity=CELL
+   * 2.1 Group Cell         - OK
+   * 2.2 Group Point        - ERR (remove points groups)
+   */
+
+
+
+  if(MYDEBUG) MESSAGE("VISU_PrsMergerPL::Execute()");
+
+  if(myMeshGeometryList.size() != 0)
+    {
+      
+      typedef std::vector<int> TVec;
+      
+      vtkUnstructuredGrid* output = vtkUnstructuredGrid::New();
+      TVec aObjIds; // vector with object ids
+      vtkFloatArray* newArray = vtkFloatArray::New();
+
+      VISU_ScalarMapPL* aScalarMap = dynamic_cast<VISU_ScalarMapPL*>(this->GetScalars());
+      const VISU::PIDMapper& aScalarMapper  = myScalars->GetIDMapper();
+      
+      // copy points to output from input scalar map
+      output->SetPoints(aScalarMapper->GetVTKOutput()->GetPoints());
+      
+      int newCellId;
+      int anbGeoms = this->GetNbGeometry();
+      for(int i=0; i < anbGeoms; i++) {
+       VISU_PipeLine* aCurrGeometry  = this->GetGeometry(i);
+       const VISU::PIDMapper& aGM  = aCurrGeometry->GetIDMapper();
+       int aNbCells = aGM->GetVTKOutput()->GetNumberOfCells();
+       if (aNbCells >0 )
+         if (aGM->GetVTKOutput()->GetCell(0)->GetCellType() == VTK_VERTEX )
+           continue;
+
+       vtkIdList* ptIds = vtkIdList::New(); 
+       ptIds->Allocate(VTK_CELL_SIZE);
+
+       for(int j=0; j < aNbCells; j++){
+
+         int anObjID = aGM->GetElemObjID(j);
+         aObjIds.push_back(anObjID);
+         
+         // copy cells to output from input geoms
+         aGM->GetVTKOutput()->GetCellPoints(j, ptIds);
+         newCellId = output->InsertNextCell(aGM->GetVTKOutput()->GetCellType(j),ptIds);
+       }
+       ptIds->Delete();
+      }      
+      
+
+      //copy array values
+      vtkDataArray* da;
+      if((da = aScalarMapper->GetVTKOutput()->GetPointData()->GetArray("VISU_FIELD"))){
+       output->GetPointData()->AddArray(da);
+       vtkDataArray* vc = aScalarMapper->GetVTKOutput()->GetPointData()->GetVectors();
+       if(vc)
+         output->GetPointData()->SetVectors(vc);
+      }
+      if((da = aScalarMapper->GetVTKOutput()->GetCellData()->GetArray("VISU_FIELD"))){
+       if(MYDEBUG){
+         MESSAGE("aScalarMapper NumberOfComponents="<<da->GetNumberOfComponents());
+         MESSAGE("aScalarMapper NumberOfTuples    ="<<da->GetNumberOfTuples());
+       }
+
+       newArray->SetNumberOfComponents(da->GetNumberOfComponents());
+       newArray->SetNumberOfTuples(aObjIds.size());
+       newArray->SetName("VISU_FIELD");
+       
+       TVec::const_iterator aIdsIter = aObjIds.begin();
+       for(int i=0; aIdsIter != aObjIds.end(); aIdsIter++){
+         int anObjID = *aIdsIter;
+         int aVTKID  = aScalarMapper->GetElemVTKID(anObjID);
+         newArray->SetTuple(i,da->GetTuple(aVTKID));
+         i++;
+       }
+       output->GetCellData()->AddArray(newArray);
+
+       // need in vectors array and scalars array
+       if(vtkDataArray* vc = aScalarMapper->GetVTKOutput()->GetCellData()->GetVectors()){
+         output->GetCellData()->SetVectors(newArray);
+       }
+       else if(vtkDataArray* sc = aScalarMapper->GetVTKOutput()->GetCellData()->GetScalars())
+         output->GetCellData()->SetScalars(newArray);
+      }
+      
+      if(MYDEBUG){
+       MESSAGE("output:");
+       output->Print(cout);
+      }
+
+
+      SetInput(output);
+      
+      output->Delete();
+      newArray->Delete();
+    }
+  else
+    {
+      if(myScalars != NULL)
+       {
+         VISU_ScalarMapPL* aScalarMap = dynamic_cast<VISU_ScalarMapPL*>(this->GetScalars());
+         VISU_PrsMergerPL* aPrsMerger = dynamic_cast<VISU_PrsMergerPL*>(this->GetScalars());
+         if(aScalarMap != NULL){
+           SetInput(aScalarMap->GetInput());
+         }
+       }
+    }
+}
diff --git a/src/PIPELINE/VISU_PrsMergerPL.hxx b/src/PIPELINE/VISU_PrsMergerPL.hxx
new file mode 100644 (file)
index 0000000..e0cc94f
--- /dev/null
@@ -0,0 +1,188 @@
+//  VISU OBJECT : interactive object for VISU entities implementation
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+//
+// File:    VISU_PrsMergerPL.hxx
+// Author:  Eugeny Nikolaev
+// Module : VISU
+
+#ifndef VISU_PrsMergerPL_HeaderFile
+#define VISU_PrsMergerPL_HeaderFile
+
+#include "VISU_ScalarMapPL.hxx"
+
+class VISU_PrsMergerPL : public VISU_ScalarMapPL
+{
+  typedef VISU_ScalarMapPL TSupperClass;
+
+protected:
+  VISU_PrsMergerPL();
+  VISU_PrsMergerPL(const VISU_PrsMergerPL&);
+  
+  virtual
+  ~VISU_PrsMergerPL();
+
+public:
+
+  typedef TVTKSmartPtr<VISU_PipeLine> TPipeLine;
+  typedef std::vector<TPipeLine> TPipeLines;
+  
+  vtkTypeMacro(VISU_PrsMergerPL,TSupperClass);
+  
+  static
+  VISU_PrsMergerPL*
+  New();
+  
+  virtual
+  void
+  ShallowCopy(VISU_PipeLine *thePipeLine);
+
+  /*!
+   * Add geometry of presentation to myMeshGeometryList.
+   * \params theGeometry - visu pipeline with geometry.
+   * \params theUpdate - update pipeline if true.
+   * \retval TRUE - if geometry and scalars on the common mesh, esle FALSE.
+   */
+  virtual
+  bool
+  SetGeometry(VISU_PipeLine* theGeometry,bool theUpdate=true);
+
+  /*!
+   * Add geometry to back of myMeshGeometryList.
+   * \params theInput - visu pipeline with geometry.
+   * \params theUpdate - update pipeline if true.
+   * \retval index of added geometry. (must be >= 0)
+   * \retval -1, if geometry not added.
+   */
+  virtual
+  int
+  AddBackGeometry(VISU_PipeLine* theGeometry,bool theUpdate=true);
+
+  /*!
+   * Get geometry id of myMeshGeometryList.
+   * \retval index of geometry. (must be >= 0)
+   * \retval -1 - if geometry not exists.
+   */
+  virtual
+  int
+  GetGeometryNumber(VISU_PipeLine* theGeometry);
+
+  /*!
+   * Remove geometry with id = theId from myMeshGeometryList.
+   * the id in [0,...]
+   */
+  virtual
+  void
+  RemoveGeometryById(int theId);
+
+  /*! Removes all geometries.
+   */
+  virtual
+  void
+  RemoveAllGeom();
+
+  /*!
+   * Gets geometry of presentation by id.
+   * \retval VISU_MeshPL - pointer
+   * the id in [0,...]
+   */
+  virtual
+  VISU_PipeLine*
+  GetGeometry(int theId=0);
+
+  /*!
+   * Gets number of geometrys
+   * \retval int - number
+   */
+  virtual
+  int
+  GetNbGeometry();
+
+  /*!
+   * Sets scalar values and ids by VISU_ScalarMapPL object.
+   * \params theInput - visu pipeline with scalar values
+   * \params theUpdate - update pipeline if true.
+   * \retval TRUE - if scalars and geometry on the common mesh, esle FALSE.
+   */
+  virtual
+  bool
+  SetScalars(VISU_PipeLine* theInput,bool theUpdate=false);
+  
+  /*!
+   * Gets input VISU_ScalarMapPL, which contain scalar values and ids.
+   */
+  virtual
+  VISU_PipeLine*
+  GetScalars();
+  
+  virtual
+  void
+  Init();
+
+  virtual
+  void
+  Build();
+  
+  /*!
+   * Calculate presentation, by merging of Geometry and Scalar Values.
+   */
+  virtual
+  void
+  Update();
+
+  /*!
+   * Set ranges of scalar values by input myScalars ranges.
+   */
+  void SetInitialRange();
+
+protected:
+  TPipeLines     myMeshGeometryList;
+  
+  TPipeLine      myScalars;
+
+  vtkFloatingPointType* myScalarRanges;
+
+private:
+  
+  /*!
+   * Check if thePipeLine and "first element of list myMeshGeometryList" or 
+   * "myScalars", has
+   * common DataPoints (simple check number of points).
+   * \retval TRUE - if has common points, esle FALSE.
+   */
+  bool
+  checkGeometry(const VISU_PipeLine* thePipeLine);
+
+  
+  /*!
+   * Check if thePipeLine and first element of list myMeshGeometryList, has
+   * common DataPoints (simple check number of points).
+   * \retval TRUE - if has common points, esle FALSE.
+   */
+  bool
+  checkScalars(const VISU_PipeLine* thePipeLine);
+
+  void
+  Execute();
+
+};
+
+#endif
index 16759ec68e6c385467bbb2310d33cc38461d4213..41dd9936d3efc092b2a9ba7be60e94e2bc81a1af 100644 (file)
@@ -84,7 +84,7 @@ void
 VISU_ScalarMapOnDeformedShapePL
 ::Init()
 {
-  if (GetScalars() == NULL) SetScalars(GetInput2());
+  if (GetScalarsUnstructuredGrid() == NULL) SetScalars(GetInput2());
   
   Superclass::Init();
   
@@ -173,7 +173,7 @@ VISU_ScalarMapOnDeformedShapePL
   VISU_ScalarMapOnDeformedShapePL *aPipeLine = dynamic_cast<VISU_ScalarMapOnDeformedShapePL*>(thePipeLine);
   if(aPipeLine){
      SetScale(aPipeLine->GetScale());
-     SetScalars(aPipeLine->GetScalars());
+     SetScalars(aPipeLine->GetScalarsUnstructuredGrid());
      vtkFloatingPointType aRange[2];
      aPipeLine->GetSourceRange(aRange);
      SetScalarRange(aRange);
@@ -190,7 +190,7 @@ VISU_ScalarMapOnDeformedShapePL
 ::SetScalars(vtkDataSet *theScalars)
 {
   myScalars = theScalars;
-  vtkUnstructuredGrid* aScalars = GetScalars();
+  vtkUnstructuredGrid* aScalars = GetScalarsUnstructuredGrid();
   vtkCellData *aInCellData = GetInput()->GetCellData();
 
   if(aScalars->GetPointData()->GetScalars())
@@ -215,7 +215,7 @@ VISU_ScalarMapOnDeformedShapePL
  */
 vtkUnstructuredGrid* 
 VISU_ScalarMapOnDeformedShapePL
-::GetScalars()
+::GetScalarsUnstructuredGrid()
 {
   return myScalars.GetPointer();
 }
index 66553b302f784eff7437cb32db54b8e31ce4dfd3..7e537df6bc03e1b83c8303c1dd142ec3b7988870 100644 (file)
@@ -27,7 +27,7 @@
 #ifndef VISU_ScalarMapOnDeformedShapePL_HeaderFile
 #define VISU_ScalarMapOnDeformedShapePL_HeaderFile
 
-#include "VISU_ScalarMapPL.hxx"
+#include "VISU_PrsMergerPL.hxx"
 
 class vtkMergeFilter;
 class vtkWarpVector;
@@ -35,7 +35,7 @@ class vtkUnstructuredGrid;
 class vtkCellDataToPointData;
 class vtkPointDataToCellData;
 
-class VISU_ScalarMapOnDeformedShapePL : public VISU_ScalarMapPL
+class VISU_ScalarMapOnDeformedShapePL : public VISU_PrsMergerPL
 {
 protected:
   VISU_ScalarMapOnDeformedShapePL();
@@ -44,7 +44,7 @@ protected:
   
   VISU_ScalarMapOnDeformedShapePL(const VISU_ScalarMapOnDeformedShapePL&);
 public:
-  vtkTypeMacro(VISU_ScalarMapOnDeformedShapePL,VISU_ScalarMapPL);
+  vtkTypeMacro(VISU_ScalarMapOnDeformedShapePL,VISU_PrsMergerPL);
 
   static VISU_ScalarMapOnDeformedShapePL* New();
 
@@ -59,7 +59,7 @@ public:
   virtual void GetSourceRange(vtkFloatingPointType theRange[2]);
 
   virtual void SetScalars(vtkDataSet *theScalars);
-  virtual vtkUnstructuredGrid* GetScalars();
+  virtual vtkUnstructuredGrid* GetScalarsUnstructuredGrid();
 
 public:
   //! Redefined method for initialization of the pipeline.
index b1f7471c04b8d540d5f190538a026d99222f5164..cea287a7ccb1ffecd183aa1f970fe6ff4ee6a9af 100644 (file)
@@ -494,7 +494,7 @@ void
 VISU_StreamLinesPL
 ::Init()
 {
-  VISU_ScalarMapPL::Init();
+  VISU_PrsMergerPL::Init();
   vtkPointSet* aDataSet = myExtractor->GetOutput();
   vtkFloatingPointType anIntStep = GetBaseIntegrationStep(aDataSet);
   vtkFloatingPointType aPropagationTime = GetBasePropagationTime(aDataSet);
@@ -519,7 +519,7 @@ void
 VISU_StreamLinesPL
 ::Update()
 {
-  VISU_ScalarMapPL::Update();
+  VISU_PrsMergerPL::Update();
 }
 
 void
index afee2ba532d05975ed8447d23cce6030d4d9c833..15dc4652add3ab0901efe13390e58be4e8ab0dd0 100644 (file)
@@ -54,7 +54,7 @@ msgid "ICON_ISO_SURFACES"
 msgstr "Visu_isosurfaces.png"
 
 msgid "ICON_CUT_PLANES"
-msgstr "Visu_cutplane.png"
+msgstr "Visu_cutplanes.png"
 
 msgid "ICON_CUT_LINES"
 msgstr "Visu_cutlines.png"
@@ -65,6 +65,80 @@ msgstr "Visu_streamlines.png"
 msgid "ICON_PLOT2D"
 msgstr "Visu_plot2d.png"
 
+# Tree icons for presentations
+
+msgid "ICON_TREE_RESULT"
+msgstr "Visu_tree_result.png"
+
+msgid "ICON_TREE_TABLE"
+msgstr "Visu_tree_table.png"
+
+msgid "ICON_TREE_CURVE"
+msgstr "Visu_tree_curve.png"
+
+msgid "ICON_TREE_CONTAINER"
+msgstr "Visu_tree_container.png"
+
+msgid "ICON_TREE_MESH"
+msgstr "Visu_tree_mesh.png"
+
+msgid "ICON_TREE_SCALAR_MAP"
+msgstr "Visu_tree_scalars.png"
+
+msgid "ICON_TREE_SCALAR_MAP_GROUPS"
+msgstr "Visu_tree_scalars_gr.png"
+
+msgid "ICON_TREE_DEFORMED_SHAPE"
+msgstr "Visu_tree_deformed.png"
+
+msgid "ICON_TREE_DEFORMED_SHAPE_GROUPS"
+msgstr "Visu_tree_deformed_gr.png"
+
+msgid "ICON_TREE_SCALAR_MAP_ON_DEFORMED_SHAPE"
+msgstr "Visu_tree_scalarmapondeformedshape.png"
+
+msgid "ICON_TREE_SCALAR_MAP_ON_DEFORMED_SHAPE_GROUPS"
+msgstr "Visu_tree_scalarmapondeformedshape_gr.png"
+
+msgid "ICON_TREE_VECTORS"
+msgstr "Visu_tree_vectors.png"
+
+msgid "ICON_TREE_VECTORS_GROUPS"
+msgstr "Visu_tree_vectors_gr.png"
+
+msgid "ICON_TREE_ISO_SURFACES"
+msgstr "Visu_tree_isosurfaces.png"
+
+msgid "ICON_TREE_ISO_SURFACES_GROUPS"
+msgstr "Visu_tree_isosurfaces_gr.png"
+
+msgid "ICON_TREE_CUT_PLANES"
+msgstr "Visu_tree_cutplanes.png"
+
+msgid "ICON_TREE_CUT_PLANES_GROUPS"
+msgstr "Visu_tree_cutplanes_gr.png"
+
+msgid "ICON_TREE_CUT_LINES"
+msgstr "Visu_tree_cutlines.png"
+
+msgid "ICON_TREE_CUT_LINES_GROUPS"
+msgstr "Visu_tree_cutlines_gr.png"
+
+msgid "ICON_TREE_STREAM_LINES"
+msgstr "Visu_tree_streamlines.png"
+
+msgid "ICON_TREE_STREAM_LINES_GROUPS"
+msgstr "Visu_tree_streamlines_gr.png"
+
+msgid "ICON_TREE_PLOT_3D"
+msgstr "Visu_tree_plot3d.png"
+
+msgid "ICON_TREE_PLOT_3D_GROUPS"
+msgstr "Visu_tree_plot3d_gr.png"
+
+msgid "ICON_TREE_GAUSS_POINTS"
+msgstr "Visu_tree_gauss_points.png"
+
 # Representation menu
 
 msgid "ICON_POINTS"
@@ -132,3 +206,9 @@ msgstr "Visu_recording_stop.png"
 
 msgid "ICON_LOAD_TEXTURE"
 msgstr "Visu_load_texture.png"
+
+msgid "ICON_ADD"
+msgstr "Visu_add.png"
+
+msgid "ICON_REMOVE"
+msgstr "Visu_remove.png"
index 488918678930dd2c567c62fdcd1b9ae4d56aa174..dc4456926c22be5f3146bd0d2a15fb7f38ef43df 100644 (file)
@@ -114,6 +114,12 @@ msgstr "Height:"
 msgid "VISU_PREF_SECOND_TAB"
 msgstr "Scalar range, Sweep, MED import, Shading"
 
+msgid "PRS_ON_GROUPS"
+msgstr "Build presentation on groups"
+
+msgid "NO_GROUPS"
+msgstr "No groups in the mesh"
+
 msgid "VISU_SCALAR_RANGE"
 msgstr "Scalar range"
 
index 4645d8817172c00cd069af9d3f0cc64df15c2c17..c967459c4ae60577422fe79ebf5b28a092d94419 100644 (file)
 #include "VisuGUI_BuildProgressDlg.h"
 #include "VisuGUI_TransparencyDlg.h"
 
-#include "VISU_ScalarMap_i.hh"
+#include "VISU_PrsMerger_i.hh"
 #include "VisuGUI_ScalarBarDlg.h"
 
 #include "VISU_DeformedShape_i.hh"
@@ -545,7 +545,7 @@ void
 VisuGUI::
 OnCreateScalarMap()
 {
-  CreatePrs3d<VISU::ScalarMap_i,VisuGUI_ScalarBarDlg,1>(this);
+  CreatePrs3d<VISU::PrsMerger_i,VisuGUI_ScalarBarDlg,1>(this);
 }
 
 
@@ -751,7 +751,7 @@ OnEditScalarMap()
 {
   Handle(SALOME_InteractiveObject) anIO;
   if (VISU::Prs3d_i* aPrs3d = GetPrsToModify(this, &anIO))
-    EditPrs3d<VISU::ScalarMap_i, VisuGUI_ScalarBarDlg, 1>(this, anIO, aPrs3d);
+    EditPrs3d<VISU::PrsMerger_i, VisuGUI_ScalarBarDlg, 1>(this, anIO, aPrs3d);
 }
 
 void
@@ -1749,10 +1749,10 @@ OnCopyPresentation()
       aSameMesh->SameAs(aMeshPrs);
     }
     break;
-  case VISU::TSCALARMAP:
+  case VISU::TPRSMERGER:
     {
-      VISU::ScalarMap_i* aScalarPrs = dynamic_cast<VISU::ScalarMap_i*>(aPrsObject);
-      VISU::ScalarMap_i* aSameScalar = new VISU::ScalarMap_i(aScalarPrs->GetResult(),true);
+      VISU::PrsMerger_i* aScalarPrs = dynamic_cast<VISU::PrsMerger_i*>(aPrsObject);
+      VISU::PrsMerger_i* aSameScalar = new VISU::PrsMerger_i(aScalarPrs->GetResult(),true);
       aSameScalar->SameAs(aScalarPrs);
     }
     break;
@@ -2485,7 +2485,7 @@ createPopupMenus()
 
   // Rules
 
-  QString aPrsAll ("'VISU::TSCALARMAP' 'VISU::TISOSURFACE' 'VISU::TDEFORMEDSHAPE' 'VISU::TCUTPLANES' "
+  QString aPrsAll ("'VISU::TPRSMERGER' 'VISU::TISOSURFACE' 'VISU::TDEFORMEDSHAPE' 'VISU::TCUTPLANES' "
                    "'VISU::TCUTLINES' 'VISU::TVECTORS' 'VISU::TSTREAMLINES' 'VISU::TPLOT3D' 'VISU::TSCALARMAPONDEFORMEDSHAPE'");
 
   // VISU root commands
@@ -2548,13 +2548,13 @@ createPopupMenus()
 
   // 3D presentations commands
   QString aPrsType    = " and $type in {'VISU::TMESH' " + aPrsAll + "}";
-  QString aInsideType = " and $type in {'VISU::TMESH' 'VISU::TSCALARMAP' 'VISU::TDEFORMEDSHAPE'}";
-  QString aSurfFrameType   = " and $type in {'VISU::TMESH' 'VISU::TSCALARMAP''VISU::TDEFORMEDSHAPE' 'VISU::TSCALARMAPONDEFORMEDSHAPE'}";
-  QString aSurfType   = " and $type in {'VISU::TMESH' 'VISU::TSCALARMAP' 'VISU::TISOSURFACE' 'VISU::TDEFORMEDSHAPE' 'VISU::TCUTPLANES' "
+  QString aInsideType = " and $type in {'VISU::TMESH' 'VISU::TPRSMERGER' 'VISU::TDEFORMEDSHAPE'}";
+  QString aSurfFrameType   = " and $type in {'VISU::TMESH' 'VISU::TPRSMERGER''VISU::TDEFORMEDSHAPE' 'VISU::TSCALARMAPONDEFORMEDSHAPE'}";
+  QString aSurfType   = " and $type in {'VISU::TMESH' 'VISU::TSCALARMAP' 'VISU::TPRSMERGER' 'VISU::TISOSURFACE' 'VISU::TDEFORMEDSHAPE' 'VISU::TCUTPLANES' "
                         " 'VISU::TPLOT3D' 'VISU::TSCALARMAPONDEFORMEDSHAPE'}";
-  QString aShrinkType = " and $type in {'VISU::TMESH' 'VISU::TSCALARMAP' 'VISU::TISOSURFACE' "
+  QString aShrinkType = " and $type in {'VISU::TMESH' 'VISU::TSCALARMAP' 'VISU::TPRSMERGER' 'VISU::TISOSURFACE' "
                         "'VISU::TDEFORMEDSHAPE' 'VISU::TCUTPLANES' 'VISU::TCUTLINES' 'VISU::TPLOT3D' 'VISU::TSCALARMAPONDEFORMEDSHAPE'}";
-  QString aLineType   = " and $type in {'VISU::TMESH' 'VISU::TSCALARMAP' 'VISU::TISOSURFACE' 'VISU::TDEFORMEDSHAPE' "
+  QString aLineType   = " and $type in {'VISU::TMESH' 'VISU::TSCALARMAP' 'VISU::TPRSMERGER' 'VISU::TISOSURFACE' 'VISU::TDEFORMEDSHAPE' "
                         "'VISU::TCUTPLANES' 'VISU::TCUTLINES' 'VISU::TSTREAMLINES' 'VISU::TPLOT3D' 'VISU::TSCALARMAPONDEFORMEDSHAPE' }";
 
   aRule = "selcount=1";
@@ -2608,7 +2608,7 @@ createPopupMenus()
   mgr->setRule( action( VISU_CLEAR_CONTAINER ), aRule, true );
 
   mgr->setRule( action( VISU_EDIT_SCALARMAP ),
-               "selcount=1 and type='VISU::TSCALARMAP'", true );
+               "selcount=1 and type='VISU::TPRSMERGER'", true );
   mgr->setRule( action( VISU_EDIT_DEFORMEDSHAPE ),
                "selcount=1 and type='VISU::TDEFORMEDSHAPE'", true );
   mgr->setRule( action( VISU_EDIT_SCALARMAPONDEFORMEDSHAPE ),
@@ -2651,6 +2651,8 @@ createPopupMenus()
   aRule = "client='ObjectBrowser' and $type in {'VISU::TENTITY' 'VISU::TFAMILY' 'VISU::TGROUP'}";
   mgr->setRule( action( VISU_CREATE_PRS ), aRule + " and selcount=1", true );
   mgr->setRule( action( VISU_CREATE_MANY_PRS ), aRule + " and selcount>1", true );
+  mgr->setRule( action( VISU_EDIT_PLOT3D ),
+               "selcount=1 and type='VISU::TPLOT3D'", true );
 
   //aRule = "client='ObjectBrowser' and type='MEDFIELD'";
   //mgr->setRule( action( VISU_IMPORT_MED ), aRule, true );
index 45d034d939acaee43cca21f06586e49fa9324069..a434301a58b8069bd743b811372745a13794c198 100644 (file)
@@ -93,7 +93,7 @@ QString VisuGUI_Selection::type( const int ind ) const
       ENUM2STRING( aResStr, VISU::TCURVE );
       ENUM2STRING( aResStr, VISU::TCONTAINER );
       ENUM2STRING( aResStr, VISU::TMESH );
-      ENUM2STRING( aResStr, VISU::TSCALARMAP );
+      ENUM2STRING( aResStr, VISU::TPRSMERGER );
       ENUM2STRING( aResStr, VISU::TISOSURFACE );
       ENUM2STRING( aResStr, VISU::TDEFORMEDSHAPE );
       ENUM2STRING( aResStr, VISU::TSCALARMAPONDEFORMEDSHAPE );
index 45e47f88ce54d5d0ba08857be07a1b70bb2f982d..136d539962dc6ae1608a93a3cde397e7c73b4000 100644 (file)
@@ -38,9 +38,8 @@
 #include "VISUConfig.hh"
 #include "VISU_Convertor.hxx"
 
-#include "VISU_ScalarMapPL.hxx"
-#include "VISU_ScalarMap_i.hh"
 #include "VISU_ScalarMapAct.h"
+#include "VISU_Result_i.hh"
 
 #include "LightApp_Application.h"
 
@@ -55,6 +54,7 @@
 
 #include <vtkTextProperty.h>
 
+using namespace VISU;
 using namespace std;
 
 
@@ -81,6 +81,50 @@ VisuGUI_ScalarBarPane::VisuGUI_ScalarBarPane (QWidget * parent, bool SetPref):
   setSpacing(6);
   //setMargin(11);
 
+  // Presentation type ================================================
+  myMainGroupBox = new QGroupBox(tr(""), this, "myMainGroupBox");
+  myMainGroupBox->setColumnLayout(0, Qt::Vertical );                          
+  myMainGroupBox->layout()->setSpacing( 0 );
+  myMainGroupBox->layout()->setMargin( 0 );
+  QGridLayout* aMainGroupBoxLayout = new QGridLayout( myMainGroupBox->layout() );
+  myMainGroupBox->setAlignment( Qt::AlignTop );
+  aMainGroupBoxLayout->setSpacing( 6 );
+  aMainGroupBoxLayout->setMargin( 11 );
+    
+  myOnGroupsCB = new QCheckBox (tr("PRS_ON_GROUPS"), myMainGroupBox);
+  myOnGroupsCB->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+
+  // Lists of groups and add/remove buttons
+  QPixmap addImage    ( aResourceMgr->loadPixmap("VISU", tr("ICON_ADD")));
+  QPixmap removeImage ( aResourceMgr->loadPixmap("VISU", tr("ICON_REMOVE")));
+
+  myAllGroups = new VisuGUI_ListBox(myMainGroupBox, "myAllGroups");
+  myAllGroups->setSelectionMode(QListBox::Extended);
+  
+  myAddButton = new QToolButton(myMainGroupBox);
+  myAddButton->setPixmap( addImage );
+
+  myRemoveButton = new QToolButton(myMainGroupBox);
+  myRemoveButton->setPixmap( removeImage );
+  
+  mySelectedGroups = new VisuGUI_ListBox(myMainGroupBox, "mySelectedGroups");
+  mySelectedGroups->setSelectionMode(QListBox::Extended);
+
+  // Layouting
+  QVBoxLayout* buttonsLayout = new QVBoxLayout();
+  buttonsLayout->addWidget(myAddButton);
+  buttonsLayout->addSpacing(6);
+  buttonsLayout->addWidget(myRemoveButton);
+  buttonsLayout->addStretch();
+  
+  aMainGroupBoxLayout->addMultiCellWidget( myOnGroupsCB, 0, 0, 0, 2);
+  aMainGroupBoxLayout->addWidget( myAllGroups, 1, 0 );
+  aMainGroupBoxLayout->addLayout( buttonsLayout, 1, 1 );
+  aMainGroupBoxLayout->addWidget( mySelectedGroups, 1, 2 );
+  aMainGroupBoxLayout->setRowStretch(1, 10);
+
+  mySelectedGroups->installEventFilter(this);
+  
   // Range ============================================================
   RangeGroup = new QButtonGroup (tr("SCALAR_RANGE_GRP"), this, "RangeGroup");
   RangeGroup->setColumnLayout(0, Qt::Vertical );
@@ -259,6 +303,11 @@ VisuGUI_ScalarBarPane::VisuGUI_ScalarBarPane (QWidget * parent, bool SetPref):
   CheckGroupLayout->addWidget(myPreviewCheck , 0, 0 );
 
   // signals and slots connections ===========================================
+  connect( myOnGroupsCB, SIGNAL( toggled( bool ) ), this, SLOT( onTypeChanged() ) );
+  connect( myAllGroups,  SIGNAL( doubleClicked( QListBoxItem* ) ), this, SLOT( onListDoubleClicked( QListBoxItem* ) ) );
+  connect( mySelectedGroups,  SIGNAL( doubleClicked( QListBoxItem* ) ), this, SLOT( onListDoubleClicked( QListBoxItem* ) ) );
+  connect( myAddButton, SIGNAL(clicked()), this, SLOT(onAdd()));
+  connect( myRemoveButton, SIGNAL(clicked()), this, SLOT(onRemove()));
   connect( RangeGroup,   SIGNAL( clicked( int ) ), this, SLOT( changeRange( int ) ) );
   connect( myModeCombo,   SIGNAL( activated( int ) ), this, SLOT( changeScalarMode( int ) ) );
   connect( OrientGroup,  SIGNAL( clicked( int ) ), this, SLOT( changeDefaults( int ) ) );
@@ -271,6 +320,7 @@ VisuGUI_ScalarBarPane::VisuGUI_ScalarBarPane (QWidget * parent, bool SetPref):
   connect( WidthSpin,    SIGNAL( valueChanged( double ) ), this, SLOT( updatePreview() ));
   connect( HeightSpin,   SIGNAL( valueChanged( double ) ), this, SLOT( updatePreview() ));
   connect( CBLog,        SIGNAL( toggled( bool ) ), this, SLOT( updatePreview() ));
+  onTypeChanged();
   changeRange( 0 );
   changeDefaults( 0 );
   myIsStoreTextProp = false;
@@ -546,9 +596,46 @@ void VisuGUI_ScalarBarPane::storeToResources() {
 /**
  * Initialise dialog box from presentation object
  */
-void VisuGUI_ScalarBarPane::initFromPrsObject(VISU::ScalarMap_i* thePrs) {
+void VisuGUI_ScalarBarPane::initFromPrsObject(VISU::PrsMerger_i* thePrs) {
   initFromResources();
   myScalarMap = thePrs;
+
+  // type of presentation and groups
+  VISU::Result_i* theResult = myScalarMap->GetResult();
+  VISU_Convertor* aInput = theResult->GetInput();
+  
+  const VISU::TMeshMap& aMeshMap = aInput->GetMeshMap();
+  
+  VISU::TMeshMap::const_iterator aMeshIter = aMeshMap.find(thePrs->GetMeshName());
+  if(aMeshIter!=aMeshMap.end()){
+    const PMesh& aMesh = aMeshIter->second;
+    const TGroupMap& aGroupMap = aMesh->myGroupMap;
+    TGroupMap::const_iterator aGroupIter = aGroupMap.begin();
+    for(;aGroupIter!=aGroupMap.end();aGroupIter++)
+      {
+       const string& aGroupName = aGroupIter->first;
+       if(thePrs->CheckGroup(&aGroupName[0]))
+         myAllGroups->insertItem( QString(aGroupName) );
+      }
+  }
+
+  if (myAllGroups->count() < 1)
+    {
+      myAllGroups->insertItem( tr("NO_GROUPS") );
+      myMainGroupBox->setEnabled(false);
+    }
+  else
+    {
+      // Get names of the groups
+      string_array_var aGroupNames = thePrs->getGroupNames();
+      for(int i=0; i<aGroupNames->length(); i++)
+       mySelectedGroups->insertItem( QString(aGroupNames[i]) );
+      
+      if (mySelectedGroups->count() > 0)
+       myOnGroupsCB->setChecked(true);
+    }
+
+  //
   myTitle = thePrs->GetTitle();
   setPosAndSize( thePrs->GetPosX(),
                 thePrs->GetPosY(),
@@ -563,7 +650,7 @@ void VisuGUI_ScalarBarPane::initFromPrsObject(VISU::ScalarMap_i* thePrs) {
     setLogarithmic(false);
   }
   vtkFloatingPointType aRange[2];
-  thePrs->GetScalarMapPL()->GetSourceRange(aRange);
+  thePrs->GetPrsMergerPL()->GetSourceRange(aRange);
   Rmin = aRange[0]; Rmax = aRange[1];
   setRange( thePrs->GetMin(), thePrs->GetMax(),
            /*0.0, 0.0,*/ thePrs->IsRangeFixed() );
@@ -651,9 +738,9 @@ void VisuGUI_ScalarBarPane::createScalarBar()
   if (myScalarMap == NULL) return;
 
   if (!check()) return;
-  myScalarMapPL = VISU_ScalarMapPL::New();
-  if(myScalarMap->GetScalarMapPL())
-    myScalarMapPL->ShallowCopy(myScalarMap->GetScalarMapPL());
+  myScalarMapPL = VISU_PrsMergerPL::New();
+  if(myScalarMap->GetPrsMergerPL())
+    myScalarMapPL->ShallowCopy(myScalarMap->GetPrsMergerPL());
   
   if ( myBusy ) return;
 
@@ -766,10 +853,33 @@ void VisuGUI_ScalarBarPane::deletePreview()
   if (SVTK_ViewWindow* vf = VISU::GetActiveViewWindow<SVTK_ViewWindow>())
     vf->Repaint();
 }
+
+/*!
+  Event filter
+*/
+bool VisuGUI_ScalarBarPane::eventFilter (QObject* object, QEvent* event)
+{
+  if (event->type() == QEvent::KeyPress) {
+    QKeyEvent* aKeyEvent = (QKeyEvent*)event;
+    if (object == mySelectedGroups && aKeyEvent->key() == Key_Delete)
+      onRemove();
+  }
+  return QObject::eventFilter(object, event);
+}
+
 /**
  * Store values to presentation object
  */
-int VisuGUI_ScalarBarPane::storeToPrsObject(VISU::ScalarMap_i* thePrs) {
+int VisuGUI_ScalarBarPane::storeToPrsObject(VISU::PrsMerger_i* thePrs) {
+  thePrs->RemoveAllGeom();
+
+  if (myOnGroupsCB->isChecked())
+    {  
+      QString aMeshName = thePrs->GetMeshName();
+      for (int i = 0; i < mySelectedGroups->count(); i++)
+       thePrs->AddMeshOnGroup( aMeshName , mySelectedGroups->text(i) );
+    }
+    
   thePrs->SetScalarMode(myModeCombo->currentItem());
   thePrs->SetPosition(XSpin->value(), YSpin->value());
   thePrs->SetSize(WidthSpin->value(), HeightSpin->value());
@@ -833,6 +943,71 @@ int VisuGUI_ScalarBarPane::storeToPrsObject(VISU::ScalarMap_i* thePrs) {
   return 1;
 }
 
+/*!
+  Called when the checkbox is toggled
+*/
+void VisuGUI_ScalarBarPane::onTypeChanged( )
+{
+  bool toEnable = myOnGroupsCB->isChecked();
+  if (!toEnable)
+    {
+      myAllGroups->clearSelection();
+      mySelectedGroups->clearSelection();
+    }
+  myAllGroups->setEnabled( toEnable );
+  mySelectedGroups->setEnabled( toEnable );
+  myAddButton->setEnabled( toEnable );
+  myRemoveButton->setEnabled( toEnable );
+}
+
+/*!
+  Called when add button is clicked, adds item to choosen groups
+*/
+void VisuGUI_ScalarBarPane::onAdd()
+{
+  QStringList aList;
+  
+  for (int i = 0; i < myAllGroups->count(); i++)
+    if (myAllGroups->isSelected(i))
+      aList.append(myAllGroups->text(i));
+
+  for (int i = 0; i < mySelectedGroups->count(); i++)
+    aList.remove(mySelectedGroups->text(i));
+    
+  mySelectedGroups->insertStringList(aList);
+}
+
+/*!
+  Called when remove button is clicked, remove selected items from choosen
+*/
+void VisuGUI_ScalarBarPane::onRemove()
+{
+  QPtrList<QListBoxItem> aList;
+  aList.setAutoDelete(false);
+  for (int i = 0; i < mySelectedGroups->count(); i++)
+    if (mySelectedGroups->isSelected(i))
+      aList.append(mySelectedGroups->item(i));
+  
+  for (int i = 0; i < aList.count(); i++)
+    delete aList.at(i);
+}
+
+/*!
+  Called when an item of listbox is double-clicked
+*/
+void VisuGUI_ScalarBarPane::onListDoubleClicked( QListBoxItem* theItem )
+{
+  QListBox* aListBox = theItem->listBox();
+
+  if (aListBox == myAllGroups)
+    {
+      if (!mySelectedGroups->findItem( theItem->text(), Qt::ExactMatch ))
+       mySelectedGroups->insertItem(theItem->text());
+    }
+  else if (aListBox == mySelectedGroups)
+    delete theItem;
+}
+
 /*!
   Called when orientation is changed
 */
@@ -916,7 +1091,7 @@ void VisuGUI_ScalarBarPane::changeScalarMode( int theMode )
       vtkFloatingPointType aRange[2];
       int aMode = myScalarMap->GetScalarMode();
       myScalarMap->SetScalarMode(theMode);
-      myScalarMap->GetScalarMapPL()->GetSourceRange(aRange);
+      myScalarMap->GetPrsMergerPL()->GetSourceRange(aRange);
       MinEdit->setText( QString::number( aRange[0] ) );
       MaxEdit->setText( QString::number( aRange[1] ) );
       myScalarMap->SetScalarMode(aMode);
@@ -1116,6 +1291,22 @@ VisuGUI_ScalarBarDlg::VisuGUI_ScalarBarDlg (SalomeApp_Module* theModule, bool Se
   connect( buttonHelp,   SIGNAL( clicked() ), this, SLOT( onHelp() ) );
 }
 
+/*!
+  Set values in the dialog from the presentation
+*/
+void VisuGUI_ScalarBarDlg::initFromPrsObject(VISU::PrsMerger_i* thePrs)
+{
+  myScalarPane->initFromPrsObject(thePrs);
+}
+
+/*!
+  Set values to presentation from the dialog
+*/
+int VisuGUI_ScalarBarDlg::storeToPrsObject(VISU::PrsMerger_i* thePrs)
+{
+  return myScalarPane->storeToPrsObject(thePrs);
+}
+
 /*!
   Called when <OK> button is clicked, validates data and closes dialog
 */
@@ -1297,3 +1488,5 @@ void VisuGUI_TextPrefDlg::keyPressEvent( QKeyEvent* e )
       onHelp();
     }
 }
+
+
index d9d0f6f2e909adce0adecc8c64e1424d89b1c5bd..404e065301e7c5f86a45e875bf9a5b9b75341633 100644 (file)
@@ -43,8 +43,9 @@
 #include <qtoolbutton.h>
 
 #include "QtxDblSpinBox.h"
+#include "QtxListBox.h"
 
-#include "VISU_ScalarMap_i.hh"
+#include "VISU_PrsMerger_i.hh"
 
 class QButtonGroup;
 class QGroupBox;
@@ -58,7 +59,7 @@ class QComboBox;
 class QVBox;
 class QToolButton;
 
-class QtxDblSpinBox;
+class QListBoxItem;
 class SalomeApp_Module;
 class SVTK_FontWidget;
 class VISU_ScalarMapAct;
@@ -100,6 +101,19 @@ class VisuGUI_TextPrefDlg: public QDialog
 };
 
 
+class VisuGUI_ListBox: public QtxListBox
+{
+  Q_OBJECT;
+  
+ public:
+  VisuGUI_ListBox( QWidget * parent = 0, const char * name = 0, WFlags f = 0 )
+    : QtxListBox(parent, name, f) {};
+  ~VisuGUI_ListBox() {};
+
+  virtual QSize sizeHint() const { return minimumSizeHint(); };
+};
+
+
 class VisuGUI_ScalarBarPane : public QVBox
 {
   Q_OBJECT;
@@ -129,13 +143,22 @@ class VisuGUI_ScalarBarPane : public QVBox
   void initFromResources();
   void storeToResources();
 
-  void initFromPrsObject(VISU::ScalarMap_i* thePrs);
-  int storeToPrsObject(VISU::ScalarMap_i* thePrs);
+  void initFromPrsObject(VISU::PrsMerger_i* thePrs);
+  int storeToPrsObject(VISU::PrsMerger_i* thePrs);
 
   bool check();
   void deletePreview();
 
+  bool eventFilter (QObject* object, QEvent* event);
+
  protected:
+  QGroupBox* myMainGroupBox;
+  QCheckBox* myOnGroupsCB;
+  VisuGUI_ListBox* myAllGroups;
+  VisuGUI_ListBox* mySelectedGroups;
+  QToolButton* myAddButton;
+  QToolButton* myRemoveButton;
+
   QButtonGroup*   RangeGroup;
   QRadioButton*   RBFrange;
   QRadioButton*   RBIrange;
@@ -168,6 +191,11 @@ class VisuGUI_ScalarBarPane : public QVBox
   bool myIsStoreTextProp;
 
  private slots:
+  void onTypeChanged();
+  void onListDoubleClicked( QListBoxItem* theItem );
+  void onAdd();
+  void onRemove();
+
   void changeDefaults( int );
   void changeRange( int );
   void XYChanged( double );
@@ -182,8 +210,8 @@ class VisuGUI_ScalarBarPane : public QVBox
 
   QCheckBox* myPreviewCheck;
   VISU_ScalarMapAct* myPreviewActor;
-  VISU::ScalarMap_i* myScalarMap;
-  VISU_ScalarMapPL* myScalarMapPL;
+  VISU::PrsMerger_i* myScalarMap;
+  VISU_PrsMergerPL* myScalarMapPL;
   std::string       myTitle;
 
   bool myBusy;
@@ -203,8 +231,8 @@ class VisuGUI_ScalarBarDlg : public QDialog
   void initFromResources() {myScalarPane->initFromResources();}
   void storeToResources() {myScalarPane->storeToResources();}
 
-  void initFromPrsObject(VISU::ScalarMap_i* thePrs) {myScalarPane->initFromPrsObject(thePrs);}
-  int storeToPrsObject(VISU::ScalarMap_i* thePrs) {return myScalarPane->storeToPrsObject(thePrs);}
+  void initFromPrsObject(VISU::PrsMerger_i* thePrs);
+  int storeToPrsObject(VISU::PrsMerger_i* thePrs);
 
  private:
   void keyPressEvent( QKeyEvent* e );
index d38c68d1e3c4058c4b26ac1d7e208fece4dfc776..5f3ea9e9fa6923c864e1c2bbd00b241abb58b864 100644 (file)
@@ -696,7 +696,7 @@ void SetupDlg::onFieldChange (int theIndex)
   }
 
   switch (aPrsType) {
-  case VISU::TSCALARMAP: //Scalar Map
+  case VISU::TPRSMERGER: //Scalar Map
     myTypeCombo->setCurrentItem(myTypeId2ComboId[TSCALARMAP_ITEM]);
     break;
   case VISU::TISOSURFACE: //Iso Surfaces
@@ -742,7 +742,7 @@ void SetupDlg::onTypeChanged (int theIndex)
 
     switch (aType) {
     case TSCALARMAP_ITEM: //Scalar Map
-      aData.myPrsType = VISU::TSCALARMAP;
+      aData.myPrsType = VISU::TPRSMERGER;
       break;
     case TISOSURFACE_ITEM: //Iso Surfaces
       aData.myPrsType = VISU::TISOSURFACE;
@@ -836,7 +836,7 @@ void SetupDlg::onPreferencesDlg()
   switch (aType) {
   case TSCALARMAP_ITEM: //Scalar Map
     c.suspend();
-    EditPrs<VISU::ScalarMap_i,VisuGUI_ScalarBarDlg>(myModule,aData,myAnimator);
+    EditPrs<VISU::PrsMerger_i,VisuGUI_ScalarBarDlg>(myModule,aData,myAnimator);
     break;
   case TISOSURFACE_ITEM: //Iso Surfaces
     c.suspend();
index 14058e8b416e942fa94eafb9062e0f79d643567a..f3326d1e71048bcafdc22acacb8f31b958356198 100644 (file)
@@ -1130,6 +1130,9 @@ namespace VISU
       }
     }
 
+    SalomeApp_Module* aModule = (SalomeApp_Module*)theModule;
+    UpdateObjBrowser(aModule, false, aResultSObj);
+
     theModule->application()->putInfo(QObject::tr("INF_DONE"));
     // Make "Save" button active
     theModule->getApp()->updateActions();
@@ -1165,7 +1168,7 @@ namespace VISU
       if (!CORBA::is_nil(aVisuObj)) {
         VISU::VISUType aType = aVisuObj->GetType();
         switch (aType) {
-        case VISU::TSCALARMAP:
+       case VISU::TPRSMERGER:
         case VISU::TISOSURFACE:
         case VISU::TDEFORMEDSHAPE:
         case VISU::TCUTPLANES:
index a786b8da15d1d0938320b9c47bf900baa61ba7ee..0ca543c6739c092ef0d66dac7ca51f5cb5ea4dd9 100644 (file)
@@ -55,7 +55,8 @@ LIB_SRC = \
        VISU_TimeAnimation.cxx \
        VISU_CorbaMedConvertor.cxx \
        VISU_DumpPython.cc \
-       VISU_ScalarMapOnDeformedShape_i.cc
+       VISU_ScalarMapOnDeformedShape_i.cc \
+       VISU_PrsMerger_i.cc
 
 LIB_MOC = \
        VISU_TimeAnimation.h
@@ -101,7 +102,8 @@ EXPORT_HEADERS = \
        VISU_ViewManager_i.hh \
        VISU_View_i.hh \
        VISU_TimeAnimation.h \
-       VISU_ScalarMapOnDeformedShape_i.hh
+       VISU_ScalarMapOnDeformedShape_i.hh \
+       VISU_PrsMerger_i.hh
 
 # additionnal information to compil and link file
 CPPFLAGS += \
index 90d6c02237d755bc578c14c39d0292f19f16f6a6..08657c70532f9a2bd21659394b75e7ceb390b24c 100644 (file)
@@ -687,6 +687,8 @@ VISU::ColoredPrs3d_i
 }
 
 //----------------------------------------------------------------------------
+
+
 VISU::Storable* 
 VISU::ColoredPrs3d_i
 ::Build(int theRestoring)
@@ -723,6 +725,17 @@ VISU::ColoredPrs3d_i
       CORBA::String_var anIOR = GetID();
       CreateAttributes(myStudy,anEntry.c_str(),aRefFatherEntry.c_str(),anIOR,myName.c_str(),"",aComment.latin1(),true);
       mySObject = myStudy->FindObjectIOR(anIOR);
+      
+      // Set icon
+      if (GetIconName() != 0)
+       {
+         SALOMEDS::GenericAttribute_var anAttr;
+         SALOMEDS::AttributePixMap_var  aPixmap;
+
+         anAttr  = aStudyBuilder->FindOrCreateAttribute( mySObject, "AttributePixMap" );
+         aPixmap = SALOMEDS::AttributePixMap::_narrow( anAttr );
+         aPixmap ->SetPixMap(GetIconName());
+       }
     }
 #ifndef _DEXCEPT_
   }catch(std::exception& exc){
index 865326772152cb39f9869269cfcfea5b9a358b46..03f07d9cdfd63a719bcc06b4a28f81d36dadd4d2 100644 (file)
@@ -312,6 +312,10 @@ namespace VISU
     virtual
     void 
     DoHook();
+
+    virtual
+    const char*
+    GetIconName() = 0;
   };
 
 }
index 5ac0922b254c65fa5d53b395b1243dc81f410465..0b3b3b9ca702daec39fd2d1b9955550db43fd3ea 100644 (file)
@@ -518,9 +518,9 @@ namespace
          for(int i=0;i<aLen;i++){
            int anId = aGeom2ProfileIds[i];
            aGeom2Profile.push_back(anId);
-           cout << "------------------------------->" << anId << endl;
+           if(MYDEBUG) cout << "------------------------------->" << anId << endl;
          }
-         cout << endl;
+         if(MYDEBUG) cout << endl;
        } catch(...) {
          continue;
        }
index bdc199d49327cca8ef9749f1f07d47de950647cc..d078935e3bf934381f1173d2e6fc87c3bd080be1 100644 (file)
@@ -50,7 +50,7 @@ static int MYDEBUG = 0;
 int VISU::CutLines_i::IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity, 
                                 const char* theFieldName, int theIteration, int isMemoryCheck)
 {
-  return VISU::ScalarMap_i::IsPossible(theResult,theMeshName,theEntity,theFieldName,theIteration,isMemoryCheck);
+  return TSuperClass::IsPossible(theResult,theMeshName,theEntity,theFieldName,theIteration,isMemoryCheck);
 }
 
 int VISU::CutLines_i::myNbPresent = 0;
@@ -67,6 +67,7 @@ CutLines_i(Result_i* theResult,
   Prs3d_i(theResult,theAddToStudy),
   ColoredPrs3d_i(theResult,theAddToStudy),
   ScalarMap_i(theResult,theAddToStudy),
+  TSuperClass(theResult,theAddToStudy),
   myCutLinesPL(NULL),
   myUseAbsLength(false)
 {}
@@ -79,6 +80,7 @@ CutLines_i(Result_i* theResult,
   Prs3d_i(theResult,theSObject),
   ColoredPrs3d_i(theResult,theSObject),
   ScalarMap_i(theResult,theSObject),
+  TSuperClass(theResult,theSObject),
   myCutLinesPL(NULL),
   myUseAbsLength(false)
 {
@@ -149,7 +151,7 @@ VISU::Storable* VISU::CutLines_i::Restore(const Storable::TRestoringMap& theMap)
 
 
 void VISU::CutLines_i::ToStream(std::ostringstream& theStr){
-  ScalarMap_i::ToStream(theStr);
+  TSuperClass::ToStream(theStr);
 
   int aNbLines = GetNbLines();
   
@@ -322,14 +324,24 @@ void VISU::CutLines_i::DoHook(){
   if(!myPipeLine) myPipeLine = VISU_CutLinesPL::New();
   myCutLinesPL = dynamic_cast<VISU_CutLinesPL*>(myPipeLine);
 
-  ScalarMap_i::DoHook();
+  TSuperClass::DoHook();
+}
+
+const char*
+VISU::CutLines_i
+::GetIconName()
+{
+  if (!GetNumberOfGeom())
+    return "ICON_TREE_CUT_LINES";
+  else
+    return "ICON_TREE_CUT_LINES_GROUPS";
 }
 
 VISU_Actor* 
 VISU::CutLines_i
 ::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
 {
-  if(VISU_Actor* anActor = ScalarMap_i::CreateActor(theIO)){
+  if(VISU_Actor* anActor = TSuperClass::CreateActor(theIO)){
     anActor->SetVTKMapping(true);
     SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
     int aDispMode = aResourceMgr->integerValue("VISU" , "cut_lines_represent", 2);
index 92b74b9b79f2ef4d22c246fa76ede05d18f1627a..1eb7d3461614e6020184d0e6cfb8d8a9003a6957 100644 (file)
 #ifndef VISU_CutLines_i_HeaderFile
 #define VISU_CutLines_i_HeaderFile
 
-#include "VISU_ScalarMap_i.hh"
+#include "VISU_PrsMerger_i.hh"
 
 class VISU_CutLinesPL;
 
 namespace VISU{
   class CutLines_i : public virtual POA_VISU::CutLines,
-                     public virtual ScalarMap_i
+                     public virtual PrsMerger_i
   {
     static int myNbPresent;
     CutLines_i();
     CutLines_i(const CutLines_i&);
 
   public:
-    typedef ScalarMap_i TSuperClass;
+    typedef PrsMerger_i TSuperClass;
 
     explicit
     CutLines_i(Result_i* theResult,
@@ -104,6 +104,8 @@ namespace VISU{
   protected:
     virtual void DoHook();
 
+    virtual const char* GetIconName();
+
     VISU_CutLinesPL *myCutLinesPL;
     TCurvesInv myMapCurvesInverted;
     CORBA::Boolean myUseAbsLength;
index c4b952e594f443d0349300035b7275d033483f24..300957a4af4078151c6c5a8e688ea9421af44737 100644 (file)
@@ -43,7 +43,7 @@ static int MYDEBUG = 0;
 int VISU::CutPlanes_i::IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity, 
                                  const char* theFieldName, int theIteration, int isMemoryCheck)
 {
-  return VISU::ScalarMap_i::IsPossible(theResult,theMeshName,theEntity,theFieldName,theIteration,isMemoryCheck);
+  return TSuperClass::IsPossible(theResult,theMeshName,theEntity,theFieldName,theIteration,isMemoryCheck);
 }
 
 
@@ -62,6 +62,7 @@ CutPlanes_i(Result_i* theResult,
   Prs3d_i(theResult,theAddToStudy),
   ColoredPrs3d_i(theResult,theAddToStudy),
   ScalarMap_i(theResult,theAddToStudy),
+  TSuperClass(theResult,theAddToStudy),
   myCutPlanesPL(NULL)
 {}
 
@@ -73,6 +74,7 @@ CutPlanes_i(Result_i* theResult,
   Prs3d_i(theResult,theSObject),
   ColoredPrs3d_i(theResult,theSObject),
   ScalarMap_i(theResult,theSObject),
+  TSuperClass(theResult,theSObject),
   myCutPlanesPL(NULL)
 {
 }
@@ -81,7 +83,7 @@ CutPlanes_i(Result_i* theResult,
 VISU::Storable* VISU::CutPlanes_i::Create(const char* theMeshName, VISU::Entity theEntity, 
                                          const char* theFieldName, int theIteration)
 {
-  return ScalarMap_i::Create(theMeshName,theEntity,theFieldName,theIteration);
+  return TSuperClass::Create(theMeshName,theEntity,theFieldName,theIteration);
 }
 
 
@@ -105,7 +107,7 @@ VISU::Storable* VISU::CutPlanes_i::Restore(const Storable::TRestoringMap& theMap
 
 
 void VISU::CutPlanes_i::ToStream(std::ostringstream& theStr){
-  ScalarMap_i::ToStream(theStr);
+  TSuperClass::ToStream(theStr);
 
   Storable::DataToStream( theStr, "myNbPlanes", int(GetNbPlanes()));
   Storable::DataToStream( theStr, "myDisplacement", GetDisplacement());
@@ -182,14 +184,24 @@ void VISU::CutPlanes_i::DoHook(){
   if(!myPipeLine) myPipeLine = VISU_CutPlanesPL::New();
   myCutPlanesPL = dynamic_cast<VISU_CutPlanesPL*>(myPipeLine);
 
-  ScalarMap_i::DoHook();
+  TSuperClass::DoHook();
+}
+
+const char*
+VISU::CutPlanes_i
+::GetIconName()
+{
+  if (!GetNumberOfGeom())
+    return "ICON_TREE_CUT_PLANES";
+  else
+    return "ICON_TREE_CUT_PLANES_GROUPS";
 }
 
 VISU_Actor* 
 VISU::CutPlanes_i
 ::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
 {
-  if(VISU_Actor* anActor = ScalarMap_i::CreateActor(theIO)){
+  if(VISU_Actor* anActor = TSuperClass::CreateActor(theIO)){
     anActor->SetVTKMapping(true);
     SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
     int aDispMode = aResourceMgr->integerValue("VISU" , "cut_planes_represent", 1);
index de65dbb7911c6f083bfdc30361da31d7d350970b..fb14934318cddcf19ca29e9e313dea37214996d7 100644 (file)
 #ifndef VISU_CutPlanes_i_HeaderFile
 #define VISU_CutPlanes_i_HeaderFile
 
-#include "VISU_ScalarMap_i.hh"
+#include "VISU_PrsMerger_i.hh"
 
 class VISU_CutPlanesPL;
 
 namespace VISU{
   class CutPlanes_i : public virtual POA_VISU::CutPlanes,
-                     public virtual ScalarMap_i
+                     public virtual PrsMerger_i
   {
     static int myNbPresent;
     CutPlanes_i();
     CutPlanes_i(const CutPlanes_i&);
 
   public:
-    typedef ScalarMap_i TSuperClass;
+    typedef PrsMerger_i TSuperClass;
 
     explicit
     CutPlanes_i(Result_i* theResult,
@@ -77,6 +77,8 @@ namespace VISU{
   protected:
     virtual void DoHook();
 
+    virtual const char* GetIconName();
+
     VISU_CutPlanesPL *myCutPlanesPL;
 
   public:
index 8c2920dccd005ea1c7522027ecdfe7e0e527fbb9..eea7502853829d3e4c6c65aa5c0b671b2220112a 100644 (file)
@@ -49,7 +49,7 @@ int VISU::DeformedShape_i::IsPossible(Result_i* theResult, const char* theMeshNa
                                      const char* theFieldName, int theIteration, int isMemoryCheck)
 {
   try{
-    if(!VISU::ScalarMap_i::IsPossible(theResult,theMeshName,theEntity,theFieldName,theIteration,isMemoryCheck)) return 0;
+    if(!TSuperClass::IsPossible(theResult,theMeshName,theEntity,theFieldName,theIteration,isMemoryCheck)) return 0;
     const VISU::PField aField = theResult->GetInput()->GetField(theMeshName,(VISU::TEntity)theEntity,theFieldName);
     return aField->myNbComp > 1;
   }catch(std::exception& exc){
@@ -74,6 +74,7 @@ DeformedShape_i(Result_i* theResult,
   Prs3d_i(theResult,theAddToStudy),
   ColoredPrs3d_i(theResult,theAddToStudy),
   ScalarMap_i(theResult,theAddToStudy),
+  TSuperClass(theResult,theAddToStudy),
   myDeformedShapePL(NULL)
 {
   if(MYDEBUG) MESSAGE("DeformedShape_i::DeformedShape_i");
@@ -87,6 +88,7 @@ DeformedShape_i(Result_i* theResult,
   Prs3d_i(theResult,theSObject),
   ColoredPrs3d_i(theResult,theSObject),
   ScalarMap_i(theResult,theSObject),
+  TSuperClass(theResult,theSObject),
   myDeformedShapePL(NULL)
 {
   if(MYDEBUG) MESSAGE("DeformedShape_i::DeformedShape_i");
@@ -110,7 +112,7 @@ VISU::Storable* VISU::DeformedShape_i::Create(const char* theMeshName, VISU::Ent
 {
   myIsColored = false;
   myColor.R = myColor.G = myColor.B = 0.5;
-  return ScalarMap_i::Create(theMeshName,theEntity,theFieldName,theIteration);
+  return TSuperClass::Create(theMeshName,theEntity,theFieldName,theIteration);
 }
 
 
@@ -129,7 +131,7 @@ VISU::Storable* VISU::DeformedShape_i::Restore(const Storable::TRestoringMap& th
 
 
 void VISU::DeformedShape_i::ToStream(std::ostringstream& theStr){
-  ScalarMap_i::ToStream(theStr);
+  TSuperClass::ToStream(theStr);
 
   Storable::DataToStream( theStr, "myFactor", GetScale() );
 
@@ -158,10 +160,21 @@ void VISU::DeformedShape_i::DoHook(){
   myDeformedShapePL = dynamic_cast<VISU_DeformedShapePL*>(myPipeLine);
   myPipeLine->GetMapper()->SetScalarVisibility(IsColored());
 
-  ScalarMap_i::DoHook();
+  TSuperClass::DoHook();
 }
 
 
+const char*
+VISU::DeformedShape_i
+::GetIconName()
+{
+  if (!GetNumberOfGeom())
+    return "ICON_TREE_DEFORMED_SHAPE";
+  else
+    return "ICON_TREE_DEFORMED_SHAPE_GROUPS";
+}  
+
+
 void VISU::DeformedShape_i::SetMapScale(double theMapScale){
   myDeformedShapePL->SetMapScale(theMapScale);
 }
@@ -171,7 +184,7 @@ VISU_Actor*
 VISU::DeformedShape_i
 ::CreateActor(const Handle(SALOME_InteractiveObject)& theIO, bool toSupressShrinking) 
 {
-  VISU_Actor* anActor = VISU::ScalarMap_i::CreateActor(theIO, true);
+  VISU_Actor* anActor = TSuperClass::CreateActor(theIO, true);
   anActor->SetVTKMapping(false);
   SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
   int  aDispMode = aResourceMgr->integerValue("VISU", "deformed_shape_represent", 1);
@@ -199,6 +212,6 @@ void VISU::DeformedShape_i::UpdateActor(VISU_Actor* theActor) {
       myPipeLine->GetMapper()->SetScalarVisibility(0);
       anActor->GetProperty()->SetColor(myColor.R,myColor.G,myColor.B);
     }
-    VISU::ScalarMap_i::UpdateActor(theActor);
+    TSuperClass::UpdateActor(theActor);
   }
 }
index 42854699e5679991f2f24fa8ba90cf8d8f2b4555..0e8586e67d567c8e87dcddfb3a99ece706d4496a 100644 (file)
 #ifndef VISU_DeformedShape_i_HeaderFile
 #define VISU_DeformedShape_i_HeaderFile
 
-#include "VISU_ScalarMap_i.hh"
+#include "VISU_PrsMerger_i.hh"
 
 class VISU_DeformedShapePL;
 
 namespace VISU{
   class DeformedShape_i : public virtual POA_VISU::DeformedShape,
-                         public virtual ScalarMap_i
+                         public virtual PrsMerger_i
   {
     static int myNbPresent;
     DeformedShape_i();
     DeformedShape_i(const DeformedShape_i&);
 
   public:
-    typedef ScalarMap_i TSuperClass;
+    typedef PrsMerger_i TSuperClass;
 
     explicit
     DeformedShape_i(Result_i* theResult,
@@ -67,6 +67,8 @@ namespace VISU{
 
   protected:
     virtual void DoHook();
+    
+    virtual const char* GetIconName();
 
     VISU_DeformedShapePL *myDeformedShapePL;
     SALOMEDS::Color myColor;
index 6b83971170bdb34e2430f3e934b90c7cdc2dddaf..98e197c8e0b5d24702a30b4e21eb73ba68bba95c 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "VISU_Prs3d_i.hh"
 #include "VISU_Mesh_i.hh"
+#include "VISU_PrsMerger_i.hh"
 #include "VISU_ScalarMap_i.hh"
 #include "VISU_IsoSurfaces_i.hh"
 #include "VISU_DeformedShape_i.hh"
@@ -249,7 +250,27 @@ namespace VISU
     return thePrefix;
   }
 
-
+  //===========================================================================
+  std::string
+  PrsMergerToPython(SALOMEDS::SObject_ptr theSObject,
+                   VISU::PrsMerger_i* theServant,
+                   std::ostream& theStr,
+                   std::string& theName,
+                   const std::string& theConstructorName,
+                   const std::string& theArgumentName,
+                   std::string thePrefix)
+  {
+    thePrefix = ScalarMapToPython(theSObject,theServant,theStr,theName,theConstructorName,theArgumentName,thePrefix);
+    string_array_var aGroupNames = theServant->getGroupNames();
+    for(int i=0; i<aGroupNames->length(); i++)
+      {
+       theStr<<thePrefix<<theName<<".AddMeshOnGroup('"
+             <<theServant->GetMeshName()<<"','"
+             <<aGroupNames[i]<<"')"<<endl;
+      }
+    return thePrefix;
+  }
+  
   //===========================================================================
   std::string
   DeformedShapeToPython(SALOMEDS::SObject_ptr theSObject,
@@ -715,6 +736,12 @@ namespace VISU
            return;
           }
           break;
+        case VISU::TPRSMERGER:
+          if(PrsMerger_i* aServant = dynamic_cast<PrsMerger_i*>(GetServant(anObj).in())){
+           thePrefix = PrsMergerToPython(theSObject,aServant,theStr,aName,"ScalarMapOnField",theArgumentName,thePrefix);
+           theStr<<thePrefix<<"pass"<<endl<<endl;
+          }
+          return;
         case VISU::TSCALARMAP:
           if(ScalarMap_i* aServant = dynamic_cast<ScalarMap_i*>(GetServant(anObj).in())){
            thePrefix = ScalarMapToPython(theSObject,aServant,theStr,aName,"ScalarMapOnField",theArgumentName,thePrefix);
index c80ef747ece03d9b3c8fef45cbbfa4464102fc05..5b613f6f7fe26893087e8c6415ee56ef41280855 100644 (file)
@@ -255,6 +255,10 @@ namespace VISU
     void
     DoHook();
 
+    virtual 
+    const char* 
+    GetIconName() {return "ICON_TREE_GAUSS_POINTS";}
+
     virtual 
     VISU_PipeLine* 
     GetPipeLine();
index 8dcc584c518d0bdbc157287dab0091b0d1d8a39f..da7fbcabde5e75a4690650bae1610c907b1e6a02 100644 (file)
@@ -43,6 +43,7 @@
 #include "VISU_Table_i.hh"
 #include "VISU_TimeAnimation.h"
 #include "VISU_ScalarMapOnDeformedShape_i.hh"
+#include "VISU_PrsMerger_i.hh"
 
 #include "VISU_Actor.h"
 
@@ -203,7 +204,7 @@ namespace VISU
   void RegistryStorable() {
     Storable::Registry(Result_i::myComment.c_str(),&(Result_i::Restore));
     Storable::Registry(Mesh_i::myComment.c_str(),&(Restore<Mesh_i>));
-    Storable::Registry(ScalarMap_i::myComment.c_str(),&(Restore<ScalarMap_i>));
+    //    Storable::Registry(ScalarMap_i::myComment.c_str(),&(Restore<ScalarMap_i>));
     Storable::Registry(GaussPoints_i::myComment.c_str(),&(Restore<GaussPoints_i>));
     Storable::Registry(DeformedShape_i::myComment.c_str(),&(Restore<DeformedShape_i>));
     Storable::Registry(CutPlanes_i::myComment.c_str(),&(Restore<CutPlanes_i>));
@@ -216,6 +217,7 @@ namespace VISU
     Storable::Registry(Curve_i::myComment.c_str(),&(Curve_i::Restore));
     Storable::Registry(Container_i::myComment.c_str(),&(Container_i::Restore));
     Storable::Registry(ScalarMapOnDeformedShape_i::myComment.c_str(),&(Restore<ScalarMapOnDeformedShape_i>));
+    Storable::Registry(PrsMerger_i::myComment.c_str(),&(Restore<PrsMerger_i>));
   }
 
 
@@ -330,6 +332,7 @@ namespace VISU
              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("PRSMERGER")) ) aVISUType = VISU::TPRSMERGER;
              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;
@@ -872,7 +875,8 @@ namespace VISU
                                             const char* theFieldName,
                                             CORBA::Double theIteration)
   {
-    return Prs3dOnField<VISU::ScalarMap_i>(theResult,theMeshName,theEntity,theFieldName,theIteration,true)._retn();
+    //return Prs3dOnField<VISU::ScalarMap_i>(theResult,theMeshName,theEntity,theFieldName,theIteration,true)._retn();
+    return Prs3dOnField<VISU::PrsMerger_i>(theResult,theMeshName,theEntity,theFieldName,theIteration)._retn();
   }
 
   GaussPoints_ptr VISU_Gen_i::GaussPointsOnField(Result_ptr theResult,
index 0f0077bc244aa7e1e4a435b459082b38508940a9..03559ba3e75ea02604117a7e9b34e7375dd6abd0 100644 (file)
@@ -43,7 +43,7 @@ static int MYDEBUG = 0;
 int VISU::IsoSurfaces_i::IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity, 
                                    const char* theFieldName, int theIteration, int isMemoryCheck)
 {
-  return VISU::ScalarMap_i::IsPossible(theResult,theMeshName,theEntity,theFieldName,theIteration,isMemoryCheck);
+  return TSuperClass::IsPossible(theResult,theMeshName,theEntity,theFieldName,theIteration,isMemoryCheck);
 }
 
 int VISU::IsoSurfaces_i::myNbPresent = 0;
@@ -60,6 +60,7 @@ IsoSurfaces_i(Result_i* theResult,
   Prs3d_i(theResult,theAddToStudy),
   ColoredPrs3d_i(theResult,theAddToStudy),
   ScalarMap_i(theResult,theAddToStudy),
+  TSuperClass(theResult,theAddToStudy),
   myIsoSurfacesPL(NULL)
 {}
 
@@ -71,6 +72,7 @@ IsoSurfaces_i(Result_i* theResult,
   Prs3d_i(theResult,theSObject),
   ColoredPrs3d_i(theResult,theSObject),
   ScalarMap_i(theResult,theSObject),
+  TSuperClass(theResult,theSObject),
   myIsoSurfacesPL(NULL)
 {
 }
@@ -79,7 +81,7 @@ IsoSurfaces_i(Result_i* theResult,
 VISU::Storable* VISU::IsoSurfaces_i::Create(const char* theMeshName, VISU::Entity theEntity, 
                                            const char* theFieldName, int theIteration)
 {
-  return ScalarMap_i::Create(theMeshName,theEntity,theFieldName,theIteration);
+  return TSuperClass::Create(theMeshName,theEntity,theFieldName,theIteration);
 }
 
 
@@ -96,7 +98,7 @@ VISU::Storable* VISU::IsoSurfaces_i::Restore(const Storable::TRestoringMap& theM
 }
 
 void VISU::IsoSurfaces_i::ToStream(std::ostringstream& theStr){
-  ScalarMap_i::ToStream(theStr);
+  TSuperClass::ToStream(theStr);
 
   Storable::DataToStream( theStr, "myNbSurface", int(GetNbSurfaces()) );
   Storable::DataToStream( theStr, "myRange[0]", GetSubMin() );
@@ -135,15 +137,24 @@ void VISU::IsoSurfaces_i::DoHook(){
   if(!myPipeLine) myPipeLine = VISU_IsoSurfacesPL::New();
   myIsoSurfacesPL = dynamic_cast<VISU_IsoSurfacesPL*>(myPipeLine);
 
-  ScalarMap_i::DoHook();
+  TSuperClass::DoHook();
 }
 
+const char*
+VISU::IsoSurfaces_i
+::GetIconName()
+{
+  if (!GetNumberOfGeom())
+    return "ICON_TREE_ISO_SURFACES";
+  else
+    return "ICON_TREE_ISO_SURFACES_GROUPS";
+}
 
 VISU_Actor* 
 VISU::IsoSurfaces_i
 ::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
 {
-  if(VISU_Actor* anActor = ScalarMap_i::CreateActor(theIO)){
+  if(VISU_Actor* anActor = TSuperClass::CreateActor(theIO)){
     anActor->SetVTKMapping(true);
     SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
     int  aDispMode = aResourceMgr->integerValue("VISU" , "iso_surfaces_represent", 2);
index 56db9093c1d88d23a368a36e1450bddeafb02cdb..96b87ddd9d2ba5ddc8013e4acd45f7e93069bf46 100644 (file)
 #ifndef VISU_IsoSurfaces_i_HeaderFile
 #define VISU_IsoSurfaces_i_HeaderFile
 
-#include "VISU_ScalarMap_i.hh"
+#include "VISU_PrsMerger_i.hh"
 
 class VISU_IsoSurfacesPL;
 
 namespace VISU{
   class IsoSurfaces_i : public virtual POA_VISU::IsoSurfaces,
-                       public virtual ScalarMap_i
+                       public virtual PrsMerger_i
   {
     static int myNbPresent;
     IsoSurfaces_i();
     IsoSurfaces_i(const IsoSurfaces_i&);
 
   public:
-    typedef ScalarMap_i TSuperClass;
+    typedef PrsMerger_i TSuperClass;
 
     explicit
     IsoSurfaces_i(Result_i* theResult,
@@ -64,6 +64,8 @@ namespace VISU{
 
   protected:
     virtual void DoHook();
+    virtual const char* GetIconName();
+
     VISU_IsoSurfacesPL* myIsoSurfacesPL;
 
   public:
index ababd5074ccc8c94689164a913db0acd42ab994b..c10839bfbf4ac41bb81cd5afb9d123b6043e4b28 100644 (file)
@@ -96,6 +96,10 @@ void VISU::Mesh_i::RemoveFromStudy()
     }
   };
 
+  // Unset icon
+  SALOMEDS::StudyBuilder_var aStudyBuilder = myStudy->NewBuilder();
+  aStudyBuilder->RemoveAttribute(GetSObject(), "AttributePixMap");
+  
   ProcessVoidEvent(new TRemoveFromStudy(this));
 }
 
@@ -294,6 +298,15 @@ VISU::Storable* VISU::Mesh_i::Build (int theRestoring)
       CORBA::String_var aString = GetID();
       anIOR->SetValue(aString);
     }
+
+    // Set icon
+    SALOMEDS::GenericAttribute_var anAttr;
+    SALOMEDS::AttributePixMap_var  aPixmap;
+    
+    anAttr  = aStudyBuilder->FindOrCreateAttribute( mySObject, "AttributePixMap" );
+    aPixmap = SALOMEDS::AttributePixMap::_narrow( anAttr );
+    aPixmap->SetPixMap("ICON_TREE_MESH");
+
   }catch(std::exception& exc){
     INFOS("Follow exception was occured :\n"<<exc.what());
     return NULL;
index d86ca318333de8fa0ea93bbb963ab641722cdbb5..396b3c97679fbb82a6683187b3eab64c9cb00b9f 100644 (file)
@@ -40,7 +40,7 @@ static int MYDEBUG = 0;
 int VISU::Plot3D_i::IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity,
                               const char* theFieldName, int theIteration, int isMemoryCheck)
 {
-  return VISU::ScalarMap_i::IsPossible
+  return TSuperClass::IsPossible
     (theResult,theMeshName,theEntity,theFieldName,theIteration,isMemoryCheck);
 }
 
@@ -57,6 +57,7 @@ VISU::Plot3D_i
   Prs3d_i(theResult,theAddToStudy),
   ColoredPrs3d_i(theResult,theAddToStudy),
   ScalarMap_i(theResult,theAddToStudy),
+  TSuperClass(theResult,theAddToStudy),
   myPlot3DPL(NULL)
 {}
 
@@ -67,13 +68,14 @@ VISU::Plot3D_i
   Prs3d_i(theResult,theSObject),
   ColoredPrs3d_i(theResult,theSObject),
   ScalarMap_i(theResult,theSObject),
+  TSuperClass(theResult,theSObject),
   myPlot3DPL(NULL)
 {}
 
 VISU::Storable* VISU::Plot3D_i::Create (const char* theMeshName, VISU::Entity theEntity,
                                        const char* theFieldName, int theIteration)
 {
-  return ScalarMap_i::Create(theMeshName,theEntity,theFieldName,theIteration);
+  return TSuperClass::Create(theMeshName,theEntity,theFieldName,theIteration);
 }
 
 VISU::Storable* VISU::Plot3D_i::Restore (const Storable::TRestoringMap& theMap)
@@ -94,7 +96,7 @@ VISU::Storable* VISU::Plot3D_i::Restore (const Storable::TRestoringMap& theMap)
 
 void VISU::Plot3D_i::ToStream (std::ostringstream& theStr)
 {
-  ScalarMap_i::ToStream(theStr);
+  TSuperClass::ToStream(theStr);
 
   Storable::DataToStream(theStr, "myBasePlane", int(GetOrientationType()));
   Storable::DataToStream(theStr, "aRot[0]", GetRotateX());
@@ -183,14 +185,24 @@ void VISU::Plot3D_i::DoHook()
   if (!myPipeLine) myPipeLine = VISU_Plot3DPL::New();
   myPlot3DPL = dynamic_cast<VISU_Plot3DPL*>(myPipeLine);
 
-  ScalarMap_i::DoHook();
+  TSuperClass::DoHook();
+}
+
+const char*
+VISU::Plot3D_i
+::GetIconName()
+{
+  if (!GetNumberOfGeom())
+    return "ICON_TREE_PLOT_3D";
+  else
+    return "ICON_TREE_PLOT_3D_GROUPS";
 }
 
 VISU_Actor* 
 VISU::Plot3D_i
 ::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
 {
-  if(VISU_Actor* anActor = ScalarMap_i::CreateActor(theIO)){
+  if(VISU_Actor* anActor = TSuperClass::CreateActor(theIO)){
     anActor->SetVTKMapping(true);
     SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
     int aDispMode = aResourceMgr->integerValue("VISU", "plot3d_represent", 2);
index d509b545689fee1a0718035b7534001e206b6ab9..b5fceca313c49b5320c1cc9f3a52edc06786d470 100644 (file)
 #ifndef VISU_Plot3D_i_HeaderFile
 #define VISU_Plot3D_i_HeaderFile
 
-#include "VISU_ScalarMap_i.hh"
+#include "VISU_PrsMerger_i.hh"
 
 class VISU_Plot3DPL;
 
 namespace VISU {
   class Plot3D_i : public virtual POA_VISU::Plot3D,
-                   public virtual ScalarMap_i
+                   public virtual PrsMerger_i
   {
     static int myNbPresent;
     Plot3D_i();
     Plot3D_i(const Plot3D_i&);
 
   public:
-    typedef ScalarMap_i TSuperClass;
+    typedef PrsMerger_i TSuperClass;
 
     explicit
     Plot3D_i (Result_i* theResult, bool theAddToStudy = true);
@@ -75,6 +75,8 @@ namespace VISU {
   protected:
     virtual void DoHook();
 
+    virtual const char* GetIconName();
+
     VISU_Plot3DPL *myPlot3DPL;
 
   public:
diff --git a/src/VISU_I/VISU_PrsMerger_i.cc b/src/VISU_I/VISU_PrsMerger_i.cc
new file mode 100644 (file)
index 0000000..61afd4b
--- /dev/null
@@ -0,0 +1,542 @@
+//  VISU OBJECT : interactive object for VISU entities implementation
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+//
+//  File   : VISU_PrsMerger_i.cc
+//  Author : Eugeny Nikolaev
+//  Module : VISU
+
+#include "VISU_PrsMerger_i.hh"
+#include "VISU_PrsMergerPL.hxx"
+#include "VISU_MeshPL.hxx"
+#include "VISU_ScalarMapPL.hxx"
+#include "VISU_Convertor.hxx"
+
+#include "VISU_Result_i.hh"
+#include "VISU_ScalarMapAct.h"
+#include "VISU_ScalarMap_i.hh"
+#include "SUIT_ResourceMgr.h"
+
+#include "SUIT_Session.h"
+#include "SALOME_Event.hxx"
+#include "SalomeApp_Study.h"
+#include "SalomeApp_Application.h"
+
+#include <vtkUnstructuredGrid.h>
+#include <vtkCellType.h>
+#include <vtkProperty.h>
+#include <vtkMapper.h>
+
+using namespace VISU;
+using namespace std;
+
+#ifdef _DEBUG_
+static int MYDEBUG = 0;
+#else
+static int MYDEBUG = 0;
+#endif
+
+static int INCMEMORY = 4;
+
+int VISU::PrsMerger_i::IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity, 
+                                 const char* theFieldName, int theIteration, int isMemoryCheck)
+{
+  try{
+    float aSize = INCMEMORY*
+      theResult->GetInput()->GetTimeStampSize(theMeshName,(VISU::TEntity)theEntity,theFieldName,theIteration);
+    bool aResult = true;
+    if(isMemoryCheck){
+      aResult = VISU_PipeLine::CheckAvailableMemory(aSize);
+      MESSAGE("PrsMerger_i::IsPossible - CheckAvailableMemory = "<<float(aSize)<<"; aResult = "<<aResult);
+    }
+    return aResult;
+  }catch(std::exception& exc){
+    INFOS("Follow exception was occured :\n"<<exc.what());
+  }catch(...){
+    INFOS("Unknown exception was occured!");
+  }
+  return 0;
+}
+
+int VISU::PrsMerger_i::myNbPresent = 0;
+QString VISU::PrsMerger_i::GenerateName() { return VISU::GenerateName("ScalarMap",myNbPresent++);}
+
+const string VISU::PrsMerger_i::myComment = "PRSMERGER";
+const char* VISU::PrsMerger_i::GetComment() const { return myComment.c_str();}
+
+VISU::PrsMerger_i::
+PrsMerger_i(Result_i* theResult, 
+           bool theAddToStudy) : 
+  PrsObject_i(theResult->GetStudyDocument()), 
+  Prs3d_i(theResult,theAddToStudy),
+  ColoredPrs3d_i(theResult,theAddToStudy),
+  ScalarMap_i(theResult,theAddToStudy),
+  myPrsMergerPL(NULL),
+  myScalarsPL(VISU_ScalarMapPL::New())
+{
+}
+
+VISU::PrsMerger_i::
+PrsMerger_i(Result_i* theResult, 
+           SALOMEDS::SObject_ptr theSObject):
+  PrsObject_i(theResult->GetStudyDocument()), 
+  Prs3d_i(theResult,theSObject),
+  ColoredPrs3d_i(theResult,theSObject),
+  ScalarMap_i(theResult,theSObject),
+  myPrsMergerPL(NULL),
+  myScalarsPL(VISU_ScalarMapPL::New())
+{
+}
+
+VISU::Storable* VISU::PrsMerger_i::Create(const char* theMeshName, VISU::Entity theEntity, 
+                                         const char* theFieldName, int theIteration)
+{
+  if (MYDEBUG) MESSAGE("PrsMerger_i::Create");
+  myIsColored = true;
+  myColor.R = myColor.G = myColor.B = 0.5;
+  VISU::Storable* aRes = TSuperClass::Create(theMeshName,theEntity,theFieldName,theIteration);
+  this->SetScalarMap(theMeshName,theEntity,theFieldName,theIteration);
+
+  return aRes;
+}
+
+VISU::Storable* VISU::PrsMerger_i::Restore(const Storable::TRestoringMap& theMap)
+{
+  if (MYDEBUG) MESSAGE("VISU::PrsMerger_i::Restore");
+  
+  TSuperClass::Restore(theMap);
+  
+  SetScalarMap(myMeshName.c_str(),
+              VISU::Entity(myEntity),
+              myFieldName.c_str(),
+              myIteration);
+  //  myMeshName = VISU::Storable::FindValue(theMap,"myMeshName").latin1();
+  QStringList aStrSubMeshName = QStringList::split("|",VISU::Storable::FindValue(theMap,"myGeomNameList") );
+  QStringList aStrEntity      = QStringList::split("|",VISU::Storable::FindValue(theMap,"myGeomEntityList") );
+  int aC1 = aStrSubMeshName.count();
+  int aC2 = aStrEntity.count();
+  if(aC1 != aC2){
+    // warning situation
+    return this;
+  }
+  for(int i=0;i < aC2;i++){
+    std::string aSubMeshName = aStrSubMeshName[i];
+    int              aEntity = aStrEntity[i].toInt();
+    if(aEntity == -1){
+      // add group
+      AddMeshOnGroup(myMeshName.c_str(),
+                    aSubMeshName.c_str());
+    } else if (aEntity >= 0){
+      // entity and family
+      if(aSubMeshName == ""){
+       // entity
+       SetMeshOnEntity(myMeshName.c_str(),
+                       VISU::Entity(aEntity));
+      } else {
+       // family
+       SetFamilyOnEntity(myMeshName.c_str(),
+                         VISU::Entity(aEntity),
+                         aSubMeshName.c_str());
+      }
+      
+    }
+  }
+  
+  return this;
+}
+
+void VISU::PrsMerger_i::ToStream(std::ostringstream& theStr)
+{
+  if (MYDEBUG) MESSAGE("VISU::PrsMerger_i::ToStream:");
+  TSuperClass::ToStream(theStr);
+  
+  QString aStrSubMeshName,aStrEntity;
+  TNameAndEntityList::iterator aIter = myGeomNameEntityList.begin();
+  for(;aIter!=myGeomNameEntityList.end();aIter++){
+    std::string aStr = aIter->first + "|";
+    aStrSubMeshName.append(aStr.c_str());
+    aStrEntity.append(QString::number(aIter->second) + "|");
+  }
+
+  Storable::DataToStream( theStr, "myMeshName", myMeshName.c_str() );
+  Storable::DataToStream( theStr, "myGeomNameList",  aStrSubMeshName.latin1());
+  Storable::DataToStream( theStr, "myGeomEntityList",  aStrEntity.latin1());
+  
+}
+
+void VISU::PrsMerger_i::clearMeshList()
+{
+  VISU_PrsMergerPL::TPipeLines::const_iterator aIter = myMeshPLList.begin();
+  for(int i=0;aIter != myMeshPLList.end();aIter++,i++){
+    ((*aIter).GetPointer())->Delete();
+  }
+  myMeshPLList.clear();
+  myGeomNameEntityList.clear();
+}
+
+void VISU::PrsMerger_i::RemoveAllGeom()
+{
+  clearMeshList();
+  myPrsMergerPL->RemoveAllGeom();
+
+  UpdateIcon();
+}
+
+
+VISU::PrsMerger_i::~PrsMerger_i(){
+  if(MYDEBUG) if (MYDEBUG) MESSAGE("PrsMerger_i::~PrsMerger_i()");
+  this->clearMeshList();
+}
+
+void
+VISU::PrsMerger_i
+::SameAs(const Prs3d_i* theOrigin)
+{
+  if (MYDEBUG) MESSAGE("VISU::PrsMerger_i::SameAs:");
+
+  TSuperClass::SameAs(theOrigin);
+
+  if(const PrsMerger_i* aPrs3d = dynamic_cast<const PrsMerger_i*>(theOrigin)){
+    PrsMerger_i* anOrigin = const_cast<PrsMerger_i*>(aPrs3d);
+    this->SetScalarMap(myMeshName.c_str(),VISU::Entity(myEntity),myFieldName.c_str(),myIteration);
+    string_array_var aGroupNames = anOrigin->getGroupNames();
+    for(int i=0;i<aGroupNames->length();i++){
+      this->AddMeshOnGroup(myMeshName.c_str(),aGroupNames[i]);
+    }
+    Update();
+  }
+}
+
+VISU_Actor* 
+VISU::PrsMerger_i
+::CreateActor(const Handle(SALOME_InteractiveObject)& theIO, bool toSupressShrinking) 
+{
+  if (MYDEBUG) MESSAGE("VISU::PrsMerger_i::CreateActor:");
+  return VISU::ScalarMap_i::CreateActor(theIO, true);
+}
+
+VISU_Actor* VISU::PrsMerger_i::CreateActor(const Handle(SALOME_InteractiveObject)& theIO) 
+{
+  return CreateActor(theIO, false);
+}
+
+void VISU::PrsMerger_i::UpdateActor(VISU_Actor* theActor) {
+  if (MYDEBUG) MESSAGE("VISU::PrsMerger_i::UpdateActor");
+  TSuperClass::UpdateActor(theActor);
+}
+
+void
+VISU::PrsMerger_i::
+SetMeshOnGroup(const char* theMeshName, 
+              const char* theGroupName)
+{
+  if (MYDEBUG) MESSAGE("VISU::PrsMerger_i::SetMeshOnGroup:");
+  VISU::PIDMapper anIDMapper;
+  anIDMapper = myResult->GetInput()->GetMeshOnGroup(theMeshName,theGroupName);
+
+  VISU_MeshPL* aTmpMesh = VISU_MeshPL::New();
+  aTmpMesh->SetIDMapper(anIDMapper);
+
+  if(myPrsMergerPL->SetGeometry(aTmpMesh)){
+    this->clearMeshList();
+    myMeshPLList.push_back(aTmpMesh);
+    TPairStringAndInt aPair((std::string)theGroupName,-1);
+    myGeomNameEntityList.push_back(aPair);
+  }
+  else
+    aTmpMesh->Delete();
+
+  UpdateIcon();
+}
+
+CORBA::Long
+VISU::PrsMerger_i::
+AddMeshOnGroup(const char* theMeshName, 
+              const char* theGroupName)
+{
+  if (MYDEBUG) MESSAGE("VISU::PrsMerger_i::AddMeshOnGroup |"<< theGroupName <<"|");
+  CORBA::Long aRetVal = -1;
+  VISU::PIDMapper anIDMapper;
+  anIDMapper = myResult->GetInput()->GetMeshOnGroup(theMeshName,theGroupName);
+  if(!anIDMapper)
+    MESSAGE("Warning: There are no mesh with group=|"<<theGroupName<<"|");
+  VISU_MeshPL* aTmpMesh = VISU_MeshPL::New();
+  aTmpMesh->SetIDMapper(anIDMapper);
+
+  aRetVal = myPrsMergerPL->AddBackGeometry(aTmpMesh);
+  
+  if(aRetVal >-1 ){
+    myMeshPLList.push_back(aTmpMesh);
+    TPairStringAndInt aPair((std::string)theGroupName,-1);
+    myGeomNameEntityList.push_back(aPair);
+  }
+  else
+    aTmpMesh->Delete();
+  
+  if (MYDEBUG) MESSAGE("AddMeshOnGroup nbGeoms after  ="<<myPrsMergerPL->GetNbGeometry());
+
+  UpdateIcon();
+
+  return aRetVal;
+}
+
+void
+VISU::PrsMerger_i::
+SetFamilyOnEntity(const char* theMeshName, 
+                 const VISU::Entity theEntity,
+                 const char* theFamilyName)
+{
+  VISU::PIDMapper anIDMapper;
+  anIDMapper = myResult->GetInput()->GetFamilyOnEntity(theMeshName,(VISU::TEntity)theEntity,theFamilyName);
+
+  
+  VISU_MeshPL* aTmpMesh = VISU_MeshPL::New();
+  aTmpMesh->SetIDMapper(anIDMapper);
+
+  if(myPrsMergerPL->SetGeometry(aTmpMesh)){
+    myMeshPLList.push_back(aTmpMesh);
+    TPairStringAndInt aPair((std::string)theFamilyName,(int)theEntity);
+    myGeomNameEntityList.push_back(aPair);
+  }
+  else
+    aTmpMesh->Delete();
+}
+
+void
+VISU::PrsMerger_i::
+SetMeshOnEntity(const char* theMeshName, 
+               const VISU::Entity theEntity)
+{
+  VISU::PIDMapper anIDMapper;
+  anIDMapper = myResult->GetInput()->GetMeshOnEntity(theMeshName,(VISU::TEntity)theEntity);
+  VISU_MeshPL* aTmpMesh = VISU_MeshPL::New();
+  aTmpMesh->SetIDMapper(anIDMapper);
+
+  if(myPrsMergerPL->SetGeometry(aTmpMesh)){
+    myMeshPLList.push_back(aTmpMesh);
+    TPairStringAndInt aPair("",(int)theEntity);
+    myGeomNameEntityList.push_back(aPair);
+  }
+  else
+    aTmpMesh->Delete();
+}
+
+void
+VISU::PrsMerger_i::
+SetScalarMap(const char* theMeshName, 
+            const VISU::Entity theEntity,
+            const char* theFieldName,
+            CORBA::Long theStampsNum)
+{
+  if (MYDEBUG) MESSAGE("VISU::PrsMerger_i::SetScalarMap");
+  VISU::PIDMapper anIDMapper;
+  anIDMapper = myResult->GetInput()->GetTimeStampOnMesh(theMeshName,(VISU::TEntity)theEntity,theFieldName,int(theStampsNum));
+
+  myEntity    = (VISU::TEntity)theEntity;
+  myFieldName = theFieldName;
+  myIteration = theStampsNum;
+
+  myScalarsPL->SetIDMapper(anIDMapper);
+  myPrsMergerPL->SetScalars(myScalarsPL);
+}
+
+void
+VISU::PrsMerger_i::
+SetScalarMap(VISU_PipeLine* thePipeLine)
+{
+  if (MYDEBUG) MESSAGE("VISU::PrsMerger_i::SetScalarMap");
+  VISU_ScalarMapPL* aInputScalars = dynamic_cast<VISU_ScalarMapPL*>(thePipeLine);
+  VISU::PIDMapper anIDMapper = aInputScalars->GetIDMapper();
+  myScalarsPL->SetIDMapper(anIDMapper);
+  if(aInputScalars)
+    myPrsMergerPL->SetScalars(myScalarsPL);
+}
+
+void
+VISU::PrsMerger_i::
+RemoveGeometryByName(const char* theName)
+{
+  // not implemented yet.
+}
+
+void
+VISU::PrsMerger_i::
+RemoveGeometryById(CORBA::Long theId)
+{
+  if(myGeomNameEntityList.size() != myMeshPLList.size()){
+    // warning situation. Some information lost
+    // check myGeomNameEntityList and myMeshPLList
+  }
+    
+  if(theId >=0 && (int)theId < myMeshPLList.size()){
+    VISU_PrsMergerPL::TPipeLines::iterator aIter = myMeshPLList.begin();
+    for(;aIter != myMeshPLList.end();aIter++){
+      if( myMeshPLList[theId] == (*aIter)){
+       myMeshPLList.erase(aIter);
+       break;
+      }
+    }
+  }
+  if(theId >=0 && (int)theId < myGeomNameEntityList.size()){
+    TNameAndEntityList::iterator aIter = myGeomNameEntityList.begin();
+    for(;aIter != myGeomNameEntityList.end();aIter++){
+      if( myGeomNameEntityList[theId] == (*aIter) ){
+       myGeomNameEntityList.erase(aIter);
+       break;
+      }
+    }
+  }
+  myPrsMergerPL->RemoveGeometryById((int)theId);
+}
+
+void 
+VISU::PrsMerger_i
+::DoHook(){
+  if(!myPipeLine) myPipeLine = VISU_PrsMergerPL::New();
+  myPrsMergerPL = dynamic_cast<VISU_PrsMergerPL*>(myPipeLine);
+  myPipeLine->GetMapper()->SetScalarVisibility(IsColored());
+  TSuperClass::DoHook();
+}
+
+const char*
+VISU::PrsMerger_i
+::GetIconName()
+{
+  if (!GetNumberOfGeom())
+    return "ICON_TREE_SCALAR_MAP";
+  else
+    return "ICON_TREE_SCALAR_MAP_GROUPS";
+}
+
+void VISU::PrsMerger_i
+::UpdateIcon()
+{
+  if (mySObject->_is_nil())
+    return;
+
+  SALOMEDS::StudyBuilder_var aStudyBuilder = myStudy->NewBuilder();
+
+  // Check if the icon needs to be updated, update if necessary
+  SALOMEDS::GenericAttribute_var anAttr;
+  SALOMEDS::AttributePixMap_var  aPixmap;
+
+  anAttr  = aStudyBuilder->FindOrCreateAttribute( mySObject, "AttributePixMap" );
+  aPixmap = SALOMEDS::AttributePixMap::_narrow( anAttr );
+
+  if ( aPixmap->GetPixMap() != (std::string)GetIconName() )
+    aPixmap->SetPixMap(GetIconName());
+
+  // Update Object Browser
+  SUIT_Session* aSession = SUIT_Session::session();
+  QPtrList<SUIT_Application> anApplications = aSession->applications();
+  QPtrListIterator<SUIT_Application> anIter (anApplications);
+  while (SUIT_Application* aSApp = anIter.current()) {
+    SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>(aSApp);
+    if (!anApp) return;
+    SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(anApp->activeStudy());
+    if (!aStudy) return;
+    if (_PTR(Study) aCStudy = aStudy->studyDS()) {
+      if (myStudy->StudyId() == aCStudy->StudyId()) {
+       anApp->updateObjectBrowser();
+       break;
+      }
+    }
+    ++anIter;
+  }
+}
+
+CORBA::Long
+VISU::PrsMerger_i
+::GetNumberOfGeom()
+{
+  if(myPrsMergerPL)
+    return myPrsMergerPL->GetNbGeometry();
+  else
+    return 0;
+}
+
+string_array*
+VISU::PrsMerger_i
+::getGroupNames()
+{
+  string_array_var myseq = new string_array;
+  if(myPrsMergerPL){
+    vector<string> aGroupNames;
+    TNameAndEntityList::const_iterator aIter = myGeomNameEntityList.begin();
+    for(;aIter!=myGeomNameEntityList.end();aIter++){
+      TPairStringAndInt aPair = (*aIter);
+      if(aPair.second == -1)
+       aGroupNames.push_back(aPair.first);
+    }
+    myseq->length(aGroupNames.size());
+    vector<string>::const_iterator aNamesIter = aGroupNames.begin();
+    for(int i=0;aNamesIter!=aGroupNames.end();i++,aNamesIter++){
+      myseq[i] = CORBA::string_dup((*aNamesIter).c_str());
+    }
+  }
+  return myseq._retn();
+}
+
+bool
+VISU::PrsMerger_i
+::CheckGroup(const char* theGroupName)
+{
+  if (MYDEBUG) MESSAGE("PrsMerger_i::CheckGroup :|"<<theGroupName<<"|");
+  string aMeshName  = myMeshName;
+  string aGroupName = theGroupName;
+
+  VISU::PIDMapper anIDMapper;
+  anIDMapper = myResult->GetInput()->GetMeshOnGroup(aMeshName,theGroupName);
+  if (MYDEBUG) MESSAGE("anIDMapper="<<anIDMapper);
+  if(!anIDMapper) return false;
+  
+  bool aAllPoints = true;
+  if(anIDMapper->GetVTKOutput()->GetNumberOfCells()>0){
+    int aVtkCellType = anIDMapper->GetVTKOutput()->GetCellType(0);
+    if (MYDEBUG) MESSAGE("CellType="<<aVtkCellType);
+    switch(myEntity){
+    case NODE_ENTITY:
+    case CELL_ENTITY:
+      if(aVtkCellType != VTK_LINE &&
+        aVtkCellType != VTK_POLY_LINE && 
+        aVtkCellType != VTK_VERTEX &&
+        aVtkCellType != VTK_PIXEL)
+       aAllPoints = false;
+      break;
+    case EDGE_ENTITY:
+      if(aVtkCellType == VTK_LINE ||
+        aVtkCellType == VTK_POLY_LINE)
+       aAllPoints = false;
+      break;
+    case FACE_ENTITY:
+      if(aVtkCellType == VTK_TRIANGLE ||
+        aVtkCellType == VTK_TRIANGLE_STRIP ||
+        aVtkCellType == VTK_POLYGON ||
+        aVtkCellType == VTK_QUAD)
+       aAllPoints = false;
+      break;
+    }
+  }
+
+  if (MYDEBUG) MESSAGE("return="<<!aAllPoints);
+  return (!aAllPoints);
+}
+
diff --git a/src/VISU_I/VISU_PrsMerger_i.hh b/src/VISU_I/VISU_PrsMerger_i.hh
new file mode 100644 (file)
index 0000000..986d102
--- /dev/null
@@ -0,0 +1,212 @@
+//  VISU OBJECT : interactive object for VISU entities implementation
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+//
+//  File   : VISU_PrsMerger_i.hh
+//  Author : Eugeny Nikolaev
+//  Module : VISU
+
+#ifndef VISU_PrsMerger_i_HeaderFile
+#define VISU_PrsMerger_i_HeaderFile
+#include "VISU_ScalarMap_i.hh"
+#include "VISU_PrsMergerPL.hxx"
+
+#include "VISUConfig.hh"
+
+class VISU_MeshPL;
+  
+namespace VISU{
+  
+  class PrsMerger_i : public virtual POA_VISU::ScalarMap,
+                     public virtual ScalarMap_i
+  {
+
+    /*!
+     * eON_GROUP - mesh created on group
+     * eFAMILY_ON_ENTITY - mesh created on family on entity
+     * eON_ENTITY - mesh created on entity (default value)
+     */
+    enum EMeshGeomPlace {eON_GROUP=1,eFAMILY_ON_ENTITY=2,eON_ENTITY=3};
+    
+    static int myNbPresent;
+    PrsMerger_i();
+    PrsMerger_i(const PrsMerger_i&);
+    
+  public:
+    
+    typedef ScalarMap_i TSuperClass;
+    typedef std::pair<std::string,int> TPairStringAndInt;
+    typedef std::vector<TPairStringAndInt> TNameAndEntityList;
+    
+    explicit
+    PrsMerger_i(Result_i* theResult,
+               bool theAddToStudy);
+    explicit
+    PrsMerger_i(Result_i* theResult,
+               SALOMEDS::SObject_ptr theSObject);
+    virtual void SameAs(const Prs3d_i* theOrigin);
+    virtual ~PrsMerger_i();
+
+    virtual VISU::VISUType GetType() { return VISU::TPRSMERGER;};
+
+    virtual CORBA::Boolean IsColored() { return myIsColored; }
+    virtual void ShowColored(CORBA::Boolean theColored) { myIsColored = theColored; }
+
+    virtual SALOMEDS::Color GetColor() { return myColor;}
+    virtual void SetColor(const SALOMEDS::Color& theColor) { myColor = theColor;}
+
+    VISU_PrsMergerPL* GetPrsMergerPL(){ return myPrsMergerPL;}
+
+  protected:
+    virtual void DoHook();
+    virtual const char* GetIconName();
+    void UpdateIcon();
+    void clearMeshList();
+    
+    VISU_PrsMergerPL* myPrsMergerPL;
+    VISU_PrsMergerPL::TPipeLines  myMeshPLList;
+    VISU_ScalarMapPL* myScalarsPL;
+    
+    SALOMEDS::Color myColor;
+    bool myIsColored;
+
+    /*! Warning! This variable must be maked as list, if
+     * you we will need in different mesh entities (ENTITY,FAMILY,GROUP) as geometries.
+     */
+    TNameAndEntityList myGeomNameEntityList;
+    
+  public:
+    static int IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity,
+                         const char* theFieldName, int theIteration, int isMemoryCheck = true);
+    
+    virtual Storable* Create(const char* theMeshName, VISU::Entity theEntity,
+                            const char* theFieldName, int theIteration);
+
+    virtual void ToStream(std::ostringstream& theStr);
+
+    virtual Storable* Restore(const Storable::TRestoringMap& theMap);
+    
+    static const std::string myComment;
+    virtual const char* GetComment() const;
+    virtual QString GenerateName();
+
+    virtual 
+    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) ;
+
+    /*!
+     * Sets geometry of mesh as group
+     */
+    virtual void SetMeshOnGroup(const char* theMeshName, 
+                               const char* theGroupName);
+
+    /*!
+     * Add geometry of mesh as group
+     * \retval the id of added group.
+     */
+    virtual CORBA::Long AddMeshOnGroup(const char* theMeshName, 
+                                      const char* theGroupName);
+    
+    /*!
+     * Remove geometry from list by Name
+     */
+    virtual void RemoveGeometryByName(const char* theName);
+
+    /*!
+     * Removes geometry from list by id
+     * Note: theId number in [0,...]
+     *
+     * Waring: if you delete not 0 element, others indexes will be increased.
+     * Example:
+     * 0,1,2,3,4 - indexes
+     * remove 2 index
+     * new sequence:
+     * 0,1,2,3,4 , where are 0 = 0, 1 = 1, 3 = 2, 4 = 3.
+     */
+    virtual void RemoveGeometryById(CORBA::Long theId);
+    
+    
+    /*!
+     * Sets geometry of mesh as family on entity
+     */
+    virtual void SetFamilyOnEntity(const char* theMeshName, 
+                                  const VISU::Entity theEntity,
+                                  const char* theFamilyName);
+
+    /*!
+     * Sets geometry of mesh as mesh on entity
+     */
+    virtual void SetMeshOnEntity(const char* theMeshName, 
+                                const VISU::Entity theEntity);
+
+    
+    /*!
+     * Sets scalars as scalar map
+     */
+    virtual void SetScalarMap(const char* theMeshName, 
+                             const VISU::Entity theEntity,
+                             const char* theFieldName,
+                             CORBA::Long theStampsNum);
+
+    /*!
+     * Get number of geometries.
+     */
+    CORBA::Long GetNumberOfGeom();
+    
+
+    /*!
+     * Get group names.
+     */
+    string_array* getGroupNames();
+
+    /*!
+     * Sets scalars as scalar map
+     */
+    void SetScalarMap(VISU_PipeLine* thePipeLine);
+
+    /*!
+     * Removes all geometries.
+     */
+    virtual void RemoveAllGeom();
+
+
+    /*! Warning!
+     * see \a myGeomNameEntityList
+     */
+    virtual CORBA::Long GetMeshGeometryPlace(CORBA::Long theId){return CORBA::Long(1);};// must bee filled
+
+    /*!
+     * Return true, if group is good, esle false.
+     * May be used, if SetScalarMap(...) olready .
+     */
+    bool CheckGroup(const char* theGroupName);
+    
+  };
+  
+}
+
+#endif
index 77871bc129df7a6a02d017bb51c19b3b1764b9ea..c8b5beeefb14a3f391ea045a9af6782b3146c94b 100644 (file)
@@ -1039,11 +1039,22 @@ VISU::Result_i
     theIsAtOnce = true;
 
   if(Build(SALOMEDS::SObject::_nil(),theIsAtOnce)){
+    
+    // Set icon
+    SALOMEDS::StudyBuilder_var aStudyBuilder = myStudyDocument->NewBuilder();
+
+    SALOMEDS::GenericAttribute_var anAttr;
+    SALOMEDS::AttributePixMap_var  aPixmap;
+    
+    anAttr  = aStudyBuilder->FindOrCreateAttribute( mySObject, "AttributePixMap" );
+    aPixmap = SALOMEDS::AttributePixMap::_narrow( anAttr );
+    aPixmap ->SetPixMap("ICON_TREE_RESULT");
+
     if(theIsBuildAll)
       return BuildAll();
     return true;
   }
-
+  
   return false;
 }
 
index d2c7a7d366ce123d32a4d7eab4a43b62bdfd6154..244879cc35d7442380e240e3468d178f57dfe08b 100644 (file)
@@ -26,7 +26,6 @@
 
 #include "VISU_ScalarMapOnDeformedShapePL.hxx"
 #include "VISU_Result_i.hh"
-#include "VISU_ScalarMap_i.hh"
 #include "VISU_ScalarMapOnDeformedShape_i.hh"
 #include "VISU_Convertor.hxx"
 #include "VISU_ScalarMapAct.h"
@@ -53,7 +52,7 @@ int VISU::ScalarMapOnDeformedShape_i::IsPossible(Result_i* theResult, const char
 {
   bool aResult = false;
   try{
-    aResult = VISU::ScalarMap_i::IsPossible(theResult,theMeshName,theEntity,theFieldName,theIteration,false);
+    aResult = TSuperClass::IsPossible(theResult,theMeshName,theEntity,theFieldName,theIteration,false);
     if(isMemoryCheck && aResult){
       const VISU::PField aField = theResult->GetInput()->GetField(theMeshName,(VISU::TEntity)theEntity,theFieldName);
       if(aField->myNbComp <= 1)
@@ -84,6 +83,7 @@ ScalarMapOnDeformedShape_i(Result_i* theResult,
   Prs3d_i(theResult,theAddToStudy),
   ColoredPrs3d_i(theResult,theAddToStudy),
   ScalarMap_i(theResult,theAddToStudy),
+  TSuperClass(theResult,theAddToStudy),
   myScalarMapOnDeformedShapePL(NULL),
   myScalarIteration(1)
 {
@@ -96,6 +96,7 @@ ScalarMapOnDeformedShape_i(Result_i* theResult,
   Prs3d_i(theResult,theSObject),
   ColoredPrs3d_i(theResult,theSObject),
   ScalarMap_i(theResult,theSObject),
+  TSuperClass(theResult,theSObject),
   myScalarMapOnDeformedShapePL(NULL),
   myScalarIteration(1)
 {
@@ -225,6 +226,16 @@ void VISU::ScalarMapOnDeformedShape_i::DoHook()
   TSuperClass::DoHook();
 }
 
+const char*
+VISU::ScalarMapOnDeformedShape_i
+::GetIconName()
+{
+  if (!GetNumberOfGeom())
+    return "ICON_TREE_SCALAR_MAP_ON_DEFORMED_SHAPE";
+  else
+    return "ICON_TREE_SCALAR_MAP_ON_DEFORMED_SHAPE_GROUPS";
+}
+
 VISU_Actor* VISU::ScalarMapOnDeformedShape_i::CreateActor(const Handle(SALOME_InteractiveObject)& theIO) 
 {
   if(MYDEBUG) cout << "VISU::ScalarMapOnDeformedShape_i::CreateActor:"<<__LINE__<<endl;
@@ -291,14 +302,22 @@ void VISU::ScalarMapOnDeformedShape_i::SetScalarMeshName(const char* theName){
 std::string VISU::ScalarMapOnDeformedShape_i::GetScalarMeshName(){
   return myScalarMeshName;
 }
+char* VISU::ScalarMapOnDeformedShape_i::GetScalarCMeshName(){
+  return &this->GetScalarMeshName()[0];
+}
 
 void VISU::ScalarMapOnDeformedShape_i::SetScalarFieldName(const char* theName){
   myScalarFieldName = theName;
 }
+
 std::string VISU::ScalarMapOnDeformedShape_i::GetScalarFieldName(){
   return myScalarFieldName;
 }
 
+char* VISU::ScalarMapOnDeformedShape_i::GetScalarCFieldName(){
+  return &this->GetScalarFieldName()[0];
+}
+
 void VISU::ScalarMapOnDeformedShape_i::SetScalarIteration(const int theValue){
   myScalarIteration = theValue;
 }
@@ -308,6 +327,10 @@ int VISU::ScalarMapOnDeformedShape_i::GetScalarIteration(){
   return myScalarIteration;
 }
 
+CORBA::Long VISU::ScalarMapOnDeformedShape_i::GetScalarLIteration(){
+  return CORBA::Long(this->GetScalarIteration());
+}
+
 void VISU::ScalarMapOnDeformedShape_i::SetScalarEntity(const VISU::TEntity theValue){
   myScalarEntity = theValue;
 }
index f80fce72af36fdb5029093cdfd1ba65c7cd6de1e..7914398b19491e2b89a56316ece615e5f375974d 100644 (file)
@@ -27,7 +27,7 @@
 #ifndef VISU_ScalarMapOnDeformedShape_i_HeaderFile
 #define VISU_ScalarMapOnDeformedShape_i_HeaderFile
 
-#include "VISU_ScalarMap_i.hh"
+#include "VISU_PrsMerger_i.hh"
 
 class VISU_ScalarMapOnDeformedShapePL;
 
@@ -35,7 +35,7 @@ namespace VISU{
   
   //! Class of Scalar Map on Deformed Shape presentation.
   class ScalarMapOnDeformedShape_i : public virtual POA_VISU::ScalarMapOnDeformedShape,
-                                    public virtual ScalarMap_i
+                                    public virtual PrsMerger_i
   {
     static int myNbPresent;
     ScalarMapOnDeformedShape_i();
@@ -43,7 +43,7 @@ namespace VISU{
     
   public:
     
-    typedef ScalarMap_i TSuperClass;
+    typedef PrsMerger_i TSuperClass;
     
     explicit
     ScalarMapOnDeformedShape_i(Result_i* theResult,
@@ -89,6 +89,10 @@ namespace VISU{
     void
     DoHook();
 
+    virtual 
+    const char* 
+    GetIconName();
+
     VISU_ScalarMapOnDeformedShapePL *myScalarMapOnDeformedShapePL;
     SALOMEDS::Color myColor;
     bool myIsColored;
@@ -131,10 +135,13 @@ namespace VISU{
 
     virtual void SetScalarFieldName(const char* theName);
     virtual std::string GetScalarFieldName();
+    virtual char* GetScalarCFieldName();
     virtual void SetScalarIteration(const int theValue);
     virtual int GetScalarIteration();
+    virtual CORBA::Long GetScalarLIteration();
     virtual void SetScalarMeshName(const char* theName);
     virtual std::string GetScalarMeshName();
+    virtual char* GetScalarCMeshName();
     virtual void SetScalarEntity(const VISU::TEntity theValue);
     virtual VISU::TEntity GetScalarEntity();
     virtual void SetScalarEEntity(const VISU::Entity theValue);
index 7aa8273bef16fc7f98260f04be310c3356a084a1..ba959d3ae53c7480e6bc2a450afe214fdc7fdc11 100644 (file)
@@ -50,7 +50,7 @@ int VISU::StreamLines_i::IsPossible(Result_i* theResult, const char* theMeshName
                                    const char* theFieldName, int theIteration, int isMemoryCheck)
 {
   try{
-    if(!VISU::ScalarMap_i::IsPossible(theResult,theMeshName,theEntity,theFieldName,theIteration,false)) 
+    if(!TSuperClass::IsPossible(theResult,theMeshName,theEntity,theFieldName,theIteration,false)) 
       return 0;
 
     VISU::PIDMapper anIDMapper = 
@@ -83,6 +83,7 @@ StreamLines_i(Result_i* theResult,
   Prs3d_i(theResult,theAddToStudy),
   ColoredPrs3d_i(theResult,theAddToStudy),
   ScalarMap_i(theResult,theAddToStudy),
+  PrsMerger_i(theResult,theAddToStudy),
   DeformedShape_i(theResult,theAddToStudy),
   myStreamLinesPL(NULL),
   myAppendFilter(vtkAppendFilter::New())
@@ -97,6 +98,7 @@ StreamLines_i(Result_i* theResult,
   Prs3d_i(theResult,theSObject),
   ColoredPrs3d_i(theResult,theSObject),
   ScalarMap_i(theResult,theSObject),
+  PrsMerger_i(theResult,theSObject),
   DeformedShape_i(theResult,theSObject),
   myStreamLinesPL(NULL),
   myAppendFilter(vtkAppendFilter::New())
@@ -260,6 +262,15 @@ void VISU::StreamLines_i::DoHook(){
   DeformedShape_i::DoHook();
 }
 
+const char*
+VISU::StreamLines_i
+::GetIconName()
+{
+  if (!GetNumberOfGeom())
+    return "ICON_TREE_STREAM_LINES";
+  else
+    return "ICON_TREE_STREAM_LINES_GROUPS";
+}
 
 void VISU::StreamLines_i::Update() {
   SetSource();
index 9c4af6fe53abb771eaa323ae7562a9e947a19e49..f02c591f953cf2a1260dd27043ff508c9a9ba5be 100644 (file)
@@ -72,6 +72,9 @@ namespace VISU{
 
   protected:
     virtual void DoHook();
+
+    virtual const char* GetIconName();
+    
     virtual void SetSource(VISU::Prs3d_ptr thePrs3d);
     virtual void SetSource(VISU::Prs3d_i* thePrs3d);
     virtual void SetSource();
index 899595bda3c5473d5c510c8e3310638210c74c9a..89f0576db23ff4ca1e40d44ac3bb1acaf9f661b4 100644 (file)
@@ -212,7 +212,15 @@ VISU::Storable* VISU::Table_i::Build( int theRestoring )
        // mpv (PAL5357): reference attributes are unnecessary now
        //SALOMEDS::SObject_var refSO = Builder->NewObject( mySObj );
        //Builder->Addreference( refSO, SO );
-      }
+    }
+
+    // Set icon
+    SALOMEDS::AttributePixMap_var  aPixmap;
+
+    anAttr  = Builder->FindOrCreateAttribute( mySObj, "AttributePixMap" );
+    aPixmap = SALOMEDS::AttributePixMap::_narrow( anAttr );
+    aPixmap->SetPixMap("ICON_TREE_TABLE");
+
     return this;
   }
   return NULL;
@@ -385,6 +393,16 @@ VISU::Storable* VISU::Curve_i::Build(int theRestoring )
                                          true );
        // create SObject referenced to real table object
        mySObj = SALOMEDS::SObject::_duplicate(myStudy->FindObjectID(anEntry.c_str()));
+
+       // Set icon
+       SALOMEDS::StudyBuilder_var aStudyBuilder =  myStudy->NewBuilder();
+
+       SALOMEDS::GenericAttribute_var anAttr;
+       SALOMEDS::AttributePixMap_var  aPixmap;
+    
+       anAttr  = aStudyBuilder->FindOrCreateAttribute( mySObj, "AttributePixMap" );
+       aPixmap = SALOMEDS::AttributePixMap::_narrow( anAttr );
+       aPixmap ->SetPixMap("ICON_TREE_CURVE");
       }
       return this;
     }
@@ -897,6 +915,16 @@ VISU::Storable* VISU::Container_i::Build( int theRestoring )
                                       aComment.latin1(),
                                       true );
     mySObj = SALOMEDS::SObject::_duplicate(myStudy->FindObjectID(anEntry.c_str()));
+
+    // Set icon
+    SALOMEDS::StudyBuilder_var aStudyBuilder = myStudy->NewBuilder();
+
+    SALOMEDS::GenericAttribute_var anAttr;
+    SALOMEDS::AttributePixMap_var  aPixmap;
+    
+    anAttr  = aStudyBuilder->FindOrCreateAttribute( mySObj, "AttributePixMap" );
+    aPixmap = SALOMEDS::AttributePixMap::_narrow( anAttr );
+    aPixmap ->SetPixMap("ICON_TREE_CONTAINER");
   }
   return this;
 }
index bd64fe81cf576b8e7413cbb09d55e554e6010bf4..711a86e3816d2852bec3ccab3249c8af6522bd94 100644 (file)
@@ -28,7 +28,7 @@
 #include "VISU_Result_i.hh"
 #include "VISU_Prs3d_i.hh"
 #include "VISU_Mesh_i.hh"
-#include "VISU_ScalarMap_i.hh"
+#include "VISU_PrsMerger_i.hh"
 #include "VISU_IsoSurfaces_i.hh"
 #include "VISU_DeformedShape_i.hh"
 #include "VISU_ScalarMapOnDeformedShape_i.hh"
@@ -153,7 +153,7 @@ bool VISU_TimeAnimation::addField (_PTR(SObject) theField)
   FieldData aNewData;
   aNewData.myField = theField;
   aNewData.myNbFrames = 0;
-  aNewData.myPrsType = VISU::TSCALARMAP;
+  aNewData.myPrsType = VISU::TPRSMERGER;
   aNewData.myOffset[0] = aNewData.myOffset[1] = aNewData.myOffset[2] = 0;
   VISU::Storable::TRestoringMap aMap = getMapOfValue(aNewData.myField);
   if(VISU::Storable::FindValue(aMap,"myComment") != QString("FIELD"))
@@ -333,7 +333,7 @@ namespace
       int aRangeType = VISU::GetResourceMgr()->integerValue("VISU" , "scalar_range_type", 0);
       if( aRangeType != 1 ){
        for(long aFrameId = 0; aFrameId < theData.myNbFrames; aFrameId++) {
-         if (VISU::ScalarMap_i* aPrs = dynamic_cast<VISU::ScalarMap_i*>(theData.myPrs[aFrameId])){
+         if (VISU::PrsMerger_i* aPrs = dynamic_cast<VISU::PrsMerger_i*>(theData.myPrs[aFrameId])){
            aPrs->SetRange(aMin, aMax);
            aPrs->SetOffset(theData.myOffset);
          }
@@ -399,8 +399,8 @@ void VISU_TimeAnimation::generatePresentations(CORBA::Long theFieldNum) {
 
   using namespace VISU;
   switch (aData.myPrsType) {
-  case VISU::TSCALARMAP: // ScalarMap
-    GeneratePresentations<ScalarMap_i>(myStudy,
+  case VISU::TPRSMERGER: // ScalarMap
+    GeneratePresentations<PrsMerger_i>(myStudy,
                                       aData,
                                       aResult,
                                       isRangeDefined(),
@@ -1424,8 +1424,8 @@ std::string GetPresentationComment (VISU::VISUType thePrsType)
 {
   std::string aPrsCmt;
   switch (thePrsType) {
-  case VISU::TSCALARMAP:
-    aPrsCmt = VISU::ScalarMap_i::myComment;
+  case VISU::TPRSMERGER:
+    aPrsCmt = VISU::PrsMerger_i::myComment;
     break;
   case VISU::TISOSURFACE:
     aPrsCmt = VISU::IsoSurfaces_i::myComment;
@@ -1609,8 +1609,8 @@ void VISU_TimeAnimation::restoreFromStudy(_PTR(SObject) theField)
     string aStr = aName->Value();
     QString strName (aStr.c_str());
 
-    if (strName == VISU::ScalarMap_i::myComment.c_str())
-      aData.myPrsType = VISU::TSCALARMAP;
+    if (strName == VISU::PrsMerger_i::myComment.c_str())
+      aData.myPrsType = VISU::TPRSMERGER;
     else if (strName == VISU::IsoSurfaces_i::myComment.c_str())
       aData.myPrsType = VISU::TISOSURFACE;
     else if (strName == VISU::CutPlanes_i::myComment.c_str())
index c8bd8a59f34e3b2f0bef0809fb6743327752d121..e4408f5e4d1b4b78f986fb84fcd90376af578e1b 100644 (file)
@@ -82,6 +82,7 @@ Vectors_i(Result_i* theResult,
   Prs3d_i(theResult,theAddToStudy),
   ColoredPrs3d_i(theResult,theAddToStudy),
   ScalarMap_i(theResult,theAddToStudy),
+  PrsMerger_i(theResult,theAddToStudy),
   DeformedShape_i(theResult,theAddToStudy),
   myVectorsPL(NULL)
 {
@@ -95,6 +96,7 @@ Vectors_i(Result_i* theResult,
   Prs3d_i(theResult,theSObject),
   ColoredPrs3d_i(theResult,theSObject),
   ScalarMap_i(theResult,theSObject),
+  PrsMerger_i(theResult,theSObject),
   DeformedShape_i(theResult,theSObject),
   myVectorsPL(NULL)
 {
@@ -178,6 +180,17 @@ void VISU::Vectors_i::DoHook(){
 }
 
 
+const char*
+VISU::Vectors_i
+::GetIconName()
+{
+  if (!GetNumberOfGeom())
+    return "ICON_TREE_VECTORS";
+  else
+    return "ICON_TREE_VECTORS_GROUPS";
+}
+
+
 VISU_PipeLine* VISU::Vectors_i::GetPipeLine(){
   VISU_PipeLine* aPipeLine = VISU_VectorsPL::New();
   aPipeLine->SetIDMapper(myPipeLine->GetIDMapper());
index 9177228d0792272e73a7ecdef1825e39d6a3b8be..873820df610349384c12f0970ee584f1f47ee2c2 100644 (file)
@@ -67,6 +67,9 @@ namespace VISU{
 
   protected:
     virtual void DoHook();
+
+    virtual const char* GetIconName();
+    
     virtual VISU_PipeLine* GetPipeLine();
 
     VISU_VectorsPL *myVectorsPL;
index 8e237dfbb8f3d358c0e1aafa335acde19139e81a..7ed0b3ffe4ce5cdae0ac4d6e66485ada337ddaf4 100644 (file)
@@ -641,6 +641,26 @@ def CreatePrsForResult(theVisu, theResult, theView, thePrsTypeList, thePictureDi
                                             aPrsObj.RemoveFromStudy()
                                         else :
                                             aVISUObjList.append(aPrsObj)
+
+                                if HasValue(thePrsTypeList,VISU.TGAUSSPOINTS) :
+                                    print "          Creating GaussPointsOnField",
+                                    aPrsObj = theVisu.GaussPointsOnField(theResult,aMeshName,anEntity,aFieldName,aTimeStampId)
+                                    if aPrsObj is None : print "Error"
+                                    else :
+                                        print ",OK"
+                                        theView.DisplayOnly(aPrsObj)
+                                        theView.FitAll()
+                                        aPictureName = thePictureDir + aMeshNamePic + "_" + anEntityId + "_" + aFieldName + "_" + str(aTimeStampId) + "_TGAUSSPOINTS." + thePictureExt
+                                        aPictureName = re.sub("\s+","_", aPictureName)
+                                        theView.SavePicture(aPictureName)
+                                        if theIsAutoDelete :
+                                            aPrsObj.RemoveFromStudy()
+                                            pass
+                                        else :
+                                            aVISUObjList.append(aPrsObj)
+                                            pass
+                                        pass
+                                    pass
                                 
     return aVISUObjList
 
@@ -951,7 +971,7 @@ def try_vectors_parameters(thePattern, theNum):
     
     return anObj
 
-def dump_vetctors_parameters(theObject):
+def dump_vectors_parameters(theObject):
     
     dump_deformedshape_parameters(theObject)
     
@@ -984,6 +1004,96 @@ def dump_isosurfaces_parameters(theObject):
     dump_scalarmap_parameters(theObject)
     print "GetNbSurfaces() = "+ str(theObject.GetNbSurfaces())
 
+# ----------------------------
+# SCALAR MAP ON DEFORMED SHAPE
+# ----------------------------
+def dump_scalarmapondeformedshape_parameters(theObject):
+    dump_scalarmap_parameters(theObject)
+    print "GetScale()          =", theObject.GetScale()
+    print "GetScalarCMeshName ()=|",theObject.GetScalarCMeshName(),"|"
+    print "GetScalarCFieldName()=|",theObject.GetScalarCFieldName(),"|"
+    print "GetScalarEEntity()   =",theObject.GetScalarEEntity()
+    print "GetScalarLIteration()=",theObject.GetScalarLIteration()
+    pass
+
+def try_scalarmapondeformedshape_parameters(thePattern):
+
+    if thePattern  is None : return None 
+    import copy
+    import random
+
+    anObj = try_scalarmap_parameters(thePattern)
+
+    # --- SCALING ---
+    print 
+    anObj.SetScale( anObj.GetScale()/random.random()*random.randint(1,10))
+
+    # --- Scalar Field ---
+    # not implemented yet.
+    
+    return anObj
+# ----------------------
+# PLOT 3D 
+# ----------------------
+def dump_plot3d_parameters(theObject):
+    dump_scalarmap_parameters(theObject)
+    print "GetOrientationType()=",str(theObject.GetOrientationType())
+    print "GetRotateX()=",theObject.GetRotateX()
+    print "GetRotateY()=",theObject.GetRotateY()
+    print "GetPlanePosition()=",theObject.GetPlanePosition()
+    print "IsPositionRelative()=",theObject.IsPositionRelative()
+    print "GetScaleFactor()=",theObject.GetScaleFactor()
+    print "GetIsContourPrs()=",theObject.GetIsContourPrs()
+    print "GetNbOfContours()=",theObject.GetNbOfContours()
+    pass
+
+def try_plot3d_parameters(thePattern):
+    if thePattern is None : return None
+    import random
+    
+    anObj = try_scalarmap_parameters(thePattern)
+
+    ORIENT = [VISU.Plot3D.XY, VISU.Plot3D.YZ, VISU.Plot3D.ZX]
+
+    theXAngle = random.random()*random.randint(-180,180)
+    theYAngle = random.random()*random.randint(-180,180)
+
+    # ORIENTATION and ANGLES
+    anObj.SetOrientation(ORIENT[random.randint(0,2)],theXAngle,theYAngle)
+
+    # Plane position (revative)
+    anObj.SetPlanePosition(random.random(),1)
+
+    # SCALE FACTOR
+    anObj.SetScaleFactor(random.random()*random.randint(-10000,10000))
+
+    # CONTOUR PRS
+    anObj.SetContourPrs(random.randint(0,1))
+    if anObj.GetIsContourPrs():
+        anObj.SetNbOfContours(random.randint(1,999))
+        pass
+    
+    pass
+
+# ----------------------
+# Gauss points
+# ----------------------
+def dump_gausspoints_parameters(theObject):
+    
+    print "\tGetScalarMode() = " + str(anObj.GetScalarMode())
+    print "\tGetMin() = " + str(anObj.GetMin()) + "  GetMax() = " + str (anObj.GetMax())
+    print "\tGetPosX() = ", str(anObj.GetPosX()) + "  GetPosY() = ", str(anObj.GetPosY())
+    print "\tGetWidth() = ", str ( anObj.GetWidth()) + "  GetHeight() = " + str(anObj.GetHeight())
+    print "\tGetNbColors() = " + str(anObj.GetNbColors())
+    print "\tGetLabels() = " + str(anObj.GetLabels())
+    print "\tGetTitle() = " + str(anObj.GetTitle())
+    pass
+
+def try_plot3d_parameters(thePattern):
+    if thePattern is None : return None
+    import random
+    
+    pass
 
 # ----------------------
 # TABLES AND CURVES