]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
This commit was generated by cvs2git to create tag mergeto_BR_V5_DEV_22Jan09
authoradmin <salome-admin@opencascade.com>
Thu, 15 Jan 2009 08:05:40 +0000 (08:05 +0000)
committeradmin <salome-admin@opencascade.com>
Thu, 15 Jan 2009 08:05:40 +0000 (08:05 +0000)
'mergeto_BR_V5_DEV_22Jan09'.

Sprout from BR_QT4_Dev 2008-08-28 09:52:33 UTC abd <abd@opencascade.com> 'Fix compilation problems on Win32 platform'
Cherrypick from BR_QT4_Dev 2008-09-16 07:21:15 UTC vsr <vsr@opencascade.com> 'Implement 'make dist' and 'make distcheck' steps support':
    Makefile.am
    adm_local/Makefile.am
    adm_local/unix/config_files/Makefile.am
    adm_local/unix/make_common_starter.am
    bin/Makefile.am
    doc/Makefile.am
    doc/salome/Makefile.am
    doc/salome/gui/Makefile.am
    doc/salome/gui/VISU/doxyfile.in
    doc/salome/gui/VISU/doxyfile_idl.in
    doc/salome/tui/Makefile.am
    idl/Makefile.am
    src/CONVERTOR/Makefile.am
    src/ENGINE/Makefile.am
    src/VISU_SWIG/Makefile.am
Cherrypick from BR_QT4_Dev 2007-05-25 14:40:53 UTC admin <salome-admin@opencascade.com> 'This commit was generated by cvs2git to create branch 'BR_QT4_Dev'.':
    doc/salome/gui/VISU/pics/smds1.png
    resources/Visu_cutplane.png
Cherrypick from master 2008-03-07 07:46:09 UTC jfa <jfa@opencascade.com> 'Join modifications from BR_Dev_For_4_0 tag V4_1_1.':
    doc/salome/gui/VISU/files/about_structure_of_med_object.htm
    doc/salome/gui/VISU/files/about_tables.htm
    doc/salome/gui/VISU/files/animating_presentations.htm
    doc/salome/gui/VISU/files/changing_visualization_parameters_of_the_presenetation.htm
    doc/salome/gui/VISU/files/creating_curves.htm
    doc/salome/gui/VISU/files/creating_field_presentations.htm
    doc/salome/gui/VISU/files/creating_presentations.htm
    doc/salome/gui/VISU/files/creating_xy_plot.htm
    doc/salome/gui/VISU/files/cut_lines_presentation.htm
    doc/salome/gui/VISU/files/cut_lines_resentation.htm
    doc/salome/gui/VISU/files/deformed_shape_presentation.htm
    doc/salome/gui/VISU/files/displaying_hiding_presentations.htm
    doc/salome/gui/VISU/files/displaying_tables.htm
    doc/salome/gui/VISU/files/getting_elements_attributes.htm
    doc/salome/gui/VISU/files/getting_started.htm
    doc/salome/gui/VISU/files/importing_med_objects.htm
    doc/salome/gui/VISU/files/importing_tables.htm
    doc/salome/gui/VISU/files/insideframe.htm
    doc/salome/gui/VISU/files/introduction.htm
    doc/salome/gui/VISU/files/iso_surfaces_presentation.htm
    doc/salome/gui/VISU/files/points.htm
    doc/salome/gui/VISU/files/running_visu.htm
    doc/salome/gui/VISU/files/scalar_map_presentation.htm
    doc/salome/gui/VISU/files/scaling_presentations.htm
    doc/salome/gui/VISU/files/setting_properties_of_xy_plots.htm
    doc/salome/gui/VISU/files/shrink.htm
    doc/salome/gui/VISU/files/stream_lines_presentation.htm
    doc/salome/gui/VISU/files/surface.htm
    doc/salome/gui/VISU/files/surfaceframe.htm
    doc/salome/gui/VISU/files/sweeping.htm
    doc/salome/gui/VISU/files/vectors_presentation.htm
    doc/salome/gui/VISU/files/wireframe.htm
    doc/salome/gui/VISU/pics/animation.png
    doc/salome/gui/VISU/pics/createcurves.png
    doc/salome/gui/VISU/pics/cutlines.png
    doc/salome/gui/VISU/pics/dataonelements1.png
    doc/salome/gui/VISU/pics/dataonelements2.png
    doc/salome/gui/VISU/pics/image157.gif
    doc/salome/gui/VISU/pics/scalarbarproperties.png
    doc/salome/gui/VISU/pics/set_rotation_point_dialog1.png
    doc/salome/gui/VISU/pics/set_rotation_point_dialog2.png
    doc/salome/gui/VISU/pics/view_rotation_point.png
    doc/salome/gui/VISU/visugenidl_doc/VISU__Gen_8idl.html
    doc/salome/gui/VISU/visugenidl_doc/VISU__Gen_8idl__incl.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1Animation.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1Animation__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1Base.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1Base__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1ColoredPrs3d.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1ColoredPrs3dCache.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1ColoredPrs3dCache__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1ColoredPrs3dHolder.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1ColoredPrs3dHolder__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1ColoredPrs3d__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1Container.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1Container__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1Curve.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1Curve__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1CutLines.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1CutLines__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1CutPlanes.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1CutPlanes__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1DeformedShape.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1DeformedShape__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1GaussPoints.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1GaussPoints__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1IsoSurfaces.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1IsoSurfaces__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1Mesh.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1Mesh__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1Plot3D.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1Plot3D__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1Prs3d.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1Prs3d__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1PrsObject.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1PrsObject__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1RemovableObject.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1RemovableObject__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1Result.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1Result__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1ScalarMap.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1ScalarMapOnDeformedShape.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1ScalarMapOnDeformedShape__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1ScalarMap__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1StreamLines.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1StreamLines__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1Table.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1TableView.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1TableView__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1Table__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1VISU__Gen.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1VISU__Gen__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1Vectors.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1Vectors__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1View.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1View3D.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1View3D__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1ViewManager.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1ViewManager__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1View__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1XYPlot.html
    doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1XYPlot__inherit__graph.jpg
    doc/salome/gui/VISU/visugenidl_doc/namespaceVISU.html
    doc/salome/gui/VISU/whdata/whftdata.js
    doc/salome/gui/VISU/whdata/whftdata0.htm
    doc/salome/gui/VISU/whdata/whfts.htm
    doc/salome/gui/VISU/whdata/whfts.js
    doc/salome/gui/VISU/whdata/whfwdata.js
    doc/salome/gui/VISU/whdata/whfwdata0.htm
    doc/salome/gui/VISU/whdata/whgdata.js
    doc/salome/gui/VISU/whdata/whgdata0.htm
    doc/salome/gui/VISU/whdata/whglo.htm
    doc/salome/gui/VISU/whdata/whglo.js
    doc/salome/gui/VISU/whdata/whidata.js
    doc/salome/gui/VISU/whdata/whidx.htm
    doc/salome/gui/VISU/whdata/whidx.js
    doc/salome/gui/VISU/whdata/whtdata.js
    doc/salome/gui/VISU/whdata/whtdata0.htm
    doc/salome/gui/VISU/whdata/whtoc.htm
    doc/salome/gui/VISU/whdata/whtoc.js
    doc/salome/gui/VISU/whgdata/whlstf0.htm
    doc/salome/gui/VISU/whgdata/whlstf1.htm
    doc/salome/gui/VISU/whgdata/whlstf2.htm
    doc/salome/gui/VISU/whgdata/whlstf3.htm
    doc/salome/gui/VISU/whgdata/whlstf4.htm
    doc/salome/gui/VISU/whgdata/whlstf5.htm
    doc/salome/gui/VISU/whgdata/whlstf6.htm
    doc/salome/gui/VISU/whgdata/whlstf7.htm
    doc/salome/gui/VISU/whgdata/whlstf8.htm
    doc/salome/gui/VISU/whgdata/whlstf9.htm
    doc/salome/gui/VISU/whgdata/whlstfl0.htm
    doc/salome/gui/VISU/whgdata/whlstfl1.htm
    doc/salome/gui/VISU/whgdata/whlstfl10.htm
    doc/salome/gui/VISU/whgdata/whlstfl11.htm
    doc/salome/gui/VISU/whgdata/whlstfl12.htm
    doc/salome/gui/VISU/whgdata/whlstfl13.htm
    doc/salome/gui/VISU/whgdata/whlstfl14.htm
    doc/salome/gui/VISU/whgdata/whlstfl15.htm
    doc/salome/gui/VISU/whgdata/whlstfl16.htm
    doc/salome/gui/VISU/whgdata/whlstfl17.htm
    doc/salome/gui/VISU/whgdata/whlstfl18.htm
    doc/salome/gui/VISU/whgdata/whlstfl19.htm
    doc/salome/gui/VISU/whgdata/whlstfl2.htm
    doc/salome/gui/VISU/whgdata/whlstfl20.htm
    doc/salome/gui/VISU/whgdata/whlstfl21.htm
    doc/salome/gui/VISU/whgdata/whlstfl22.htm
    doc/salome/gui/VISU/whgdata/whlstfl23.htm
    doc/salome/gui/VISU/whgdata/whlstfl24.htm
    doc/salome/gui/VISU/whgdata/whlstfl3.htm
    doc/salome/gui/VISU/whgdata/whlstfl4.htm
    doc/salome/gui/VISU/whgdata/whlstfl5.htm
    doc/salome/gui/VISU/whgdata/whlstfl6.htm
    doc/salome/gui/VISU/whgdata/whlstfl7.htm
    doc/salome/gui/VISU/whgdata/whlstfl8.htm
    doc/salome/gui/VISU/whgdata/whlstfl9.htm
    doc/salome/gui/VISU/whgdata/whlstg0.htm
    doc/salome/gui/VISU/whgdata/whlsti0.htm
    doc/salome/gui/VISU/whgdata/whlstt0.htm
    doc/salome/gui/VISU/whgdata/whlstt1.htm
    doc/salome/gui/VISU/whgdata/whlstt2.htm
    doc/salome/gui/VISU/whgdata/whlstt3.htm
    doc/salome/gui/VISU/whgdata/whlstt4.htm
    doc/salome/gui/VISU/whgdata/whlstt5.htm
    doc/salome/gui/VISU/whgdata/whlstt6.htm
    doc/salome/gui/VISU/whgdata/whlstt7.htm
    doc/salome/gui/VISU/whgdata/whnvf30.htm
    doc/salome/gui/VISU/whgdata/whnvf31.htm
    doc/salome/gui/VISU/whgdata/whnvf32.htm
    doc/salome/gui/VISU/whgdata/whnvf33.htm
    doc/salome/gui/VISU/whgdata/whnvl31.htm
    doc/salome/gui/VISU/whgdata/whnvl32.htm
    doc/salome/gui/VISU/whgdata/whnvl33.htm
    doc/salome/gui/VISU/whgdata/whnvp30.htm
    doc/salome/gui/VISU/whgdata/whnvp31.htm
    doc/salome/gui/VISU/whgdata/whnvp32.htm
    doc/salome/gui/VISU/whgdata/whnvp33.htm
    doc/salome/gui/VISU/whgdata/whnvt30.htm
    doc/salome/gui/VISU/whgdata/whnvt31.htm
    doc/salome/gui/VISU/whgdata/whnvt32.htm
    doc/salome/gui/VISU/whgdata/whnvt33.htm
    doc/salome/gui/VISU/whxdata/whftdata0.xml
    doc/salome/gui/VISU/whxdata/whfts.xml
    doc/salome/gui/VISU/whxdata/whfwdata0.xml
    doc/salome/gui/VISU/whxdata/whgdata0.xml
    doc/salome/gui/VISU/whxdata/whglo.xml
    doc/salome/gui/VISU/whxdata/whidx.xml
    doc/salome/gui/VISU/whxdata/whtdata0.xml
    doc/salome/gui/VISU/whxdata/whtoc.xml
    doc/salome/tui/VISU/doxyfile.in
    doc/salome/tui/VISU/sources/bg_salome.gif
    doc/salome/tui/VISU/sources/static/examples_VISU.html
    doc/salome/tui/VISU/sources/static/overview_VISU.html
    src/PIPELINE/VISU_ScalarMapOnDeformedShapePL.cxx
    src/PIPELINE/VISU_ScalarMapOnDeformedShapePL.hxx
    src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.cxx
    src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.h
    src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc
    src/VISU_I/VISU_ScalarMapOnDeformedShape_i.hh
Cherrypick from BR_V5_DEV 2008-10-29 14:04:50 UTC dmv <dmv@opencascade.com> 'Icons Plot2DView and Curves in Object Browser are missing in series 4x and 5x':
    configure.ac
    resources/Makefile.am
    src/CONVERTOR/VISU_Convertor_impl.cxx
    src/ENGINE/VISU_Engine_i.cc
    src/ENGINE/VISU_Engine_i.hh
    src/OBJECT/Makefile.am
    src/OBJECT/VISU_DataSetActor.cxx
    src/OBJECT/VISU_DataSetActor.h
    src/OBJECT/VISU_GaussPtsAct.cxx
    src/OBJECT/VISU_GaussPtsAct.h
    src/OBJECT/VISU_GaussPtsDeviceActor.cxx
    src/OBJECT/VISU_GaussPtsDeviceActor.h
    src/OBJECT/VISU_GaussPtsSettings.cxx
    src/OBJECT/VISU_GaussPtsSettings.h
    src/OBJECT/VISU_MeshAct.cxx
    src/OBJECT/VISU_MeshAct.h
    src/OBJECT/VISU_ScalarMapAct.cxx
    src/OBJECT/VISU_ScalarMapAct.h
    src/PIPELINE/Makefile.am
    src/PIPELINE/SALOME_ExtractGeometry.h
    src/PIPELINE/SALOME_ExtractPolyDataGeometry.h
    src/PIPELINE/VISUPipeLine.cxx
    src/PIPELINE/VISU_ColoredPL.cxx
    src/PIPELINE/VISU_ColoredPL.hxx
    src/PIPELINE/VISU_CutLinesPL.cxx
    src/PIPELINE/VISU_CutPlanesPL.cxx
    src/PIPELINE/VISU_DataSetMapperHolder.cxx
    src/PIPELINE/VISU_DataSetMapperHolder.hxx
    src/PIPELINE/VISU_DeformedShapePL.cxx
    src/PIPELINE/VISU_GaussPointsPL.cxx
    src/PIPELINE/VISU_IsoSurfacesPL.cxx
    src/PIPELINE/VISU_IsoSurfacesPL.hxx
    src/PIPELINE/VISU_LookupTable.cxx
    src/PIPELINE/VISU_LookupTable.hxx
    src/PIPELINE/VISU_MapperHolder.hxx
    src/PIPELINE/VISU_MeshPL.cxx
    src/PIPELINE/VISU_PipeLine.cxx
    src/PIPELINE/VISU_PipeLine.hxx
    src/PIPELINE/VISU_Plot3DPL.cxx
    src/PIPELINE/VISU_PointSpriteMapperHolder.cxx
    src/PIPELINE/VISU_PolyDataMapperHolder.cxx
    src/PIPELINE/VISU_PolyDataMapperHolder.hxx
    src/PIPELINE/VISU_ScalarBarCtrl.cxx
    src/PIPELINE/VISU_ScalarMapPL.cxx
    src/PIPELINE/VISU_StreamLinesPL.cxx
    src/PIPELINE/VISU_VectorsPL.cxx
    src/VISUGUI/VisuGUI_ClippingDlg.cxx
    src/VISUGUI/VisuGUI_ClippingDlg.h
    src/VISUGUI/VisuGUI_CutPlanesDlg.cxx
    src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx
    src/VISUGUI/VisuGUI_DeformedShapeDlg.h
    src/VISUGUI/VisuGUI_Displayer.cxx
    src/VISUGUI/VisuGUI_Module.cxx
    src/VISUGUI/VisuGUI_Module.h
    src/VISUGUI/VisuGUI_Prs3dTools.h
    src/VISUGUI/VisuGUI_Slider.cxx
    src/VISUGUI/VisuGUI_Slider.h
    src/VISUGUI/VisuGUI_Tools.h
    src/VISUGUI/VisuGUI_VectorsDlg.cxx
    src/VISUGUI/VisuGUI_ViewTools.h
    src/VISU_I/Makefile.am
    src/VISU_I/VISUConfig.cc
    src/VISU_I/VISU_ColoredPrs3dCache_i.cc
    src/VISU_I/VISU_ColoredPrs3dCache_i.hh
    src/VISU_I/VISU_ColoredPrs3dFactory.cc
    src/VISU_I/VISU_ColoredPrs3dHolder_i.cc
    src/VISU_I/VISU_ColoredPrs3dHolder_i.hh
    src/VISU_I/VISU_CorbaMedConvertor.cxx
    src/VISU_I/VISU_CutLines_i.cc
    src/VISU_I/VISU_CutPlanes_i.cc
    src/VISU_I/VISU_DeformedShape_i.cc
    src/VISU_I/VISU_Gen_i.cc
    src/VISU_I/VISU_Gen_i.hh
    src/VISU_I/VISU_IsoSurfaces_i.cc
    src/VISU_I/VISU_Plot3D_i.cc
    src/VISU_I/VISU_Prs3d_i.cc
    src/VISU_I/VISU_Prs3d_i.hh
    src/VISU_I/VISU_ResultUtils.cc
    src/VISU_I/VISU_Result_i.cc
    src/VISU_I/VISU_StreamLines_i.cc
    src/VISU_I/VISU_Table_i.cc
    src/VISU_I/VISU_TimeAnimation.cxx
    src/VISU_I/VISU_Vectors_i.cc
    src/VISU_I/VISU_View_i.hh
    src/VVTK/Makefile.am
    src/VVTK/VVTK_MainWindow.cxx
    src/VVTK/VVTK_MainWindow.h
    src/VVTK/VVTK_PickingDlg.cxx
    src/VVTK/VVTK_Renderer.cxx
    src/VVTK/VVTK_ViewModel.cxx
Cherrypick from BR_V5_IMP_P8 2009-01-15 08:05:39 UTC sln <sln@opencascade.com> '0019819: EDF 643 VISU : Scalar bar ergonomics. Default origin and size of scalar bar changed':
    doc/salome/gui/VISU/images/barproperty.png
    doc/salome/gui/VISU/images/scalarbarproperties.png
    doc/salome/gui/VISU/input/a3d_presentations.doc
    doc/salome/gui/VISU/input/field_presentations.doc
    doc/salome/gui/VISU/input/index.doc
    doc/salome/gui/VISU/input/scalar_map.doc
    idl/VISU_Gen.idl
    resources/SalomeApp.xml
    src/OBJECT/VISU_Actor.cxx
    src/OBJECT/VISU_Actor.h
    src/OBJECT/VISU_VectorsAct.cxx
    src/OBJECT/VISU_VectorsAct.h
    src/PIPELINE/VISU_ScalarBarActor.cxx
    src/PIPELINE/VISU_ScalarBarActor.hxx
    src/VISUGUI/Makefile.am
    src/VISUGUI/VisuGUI.cxx
    src/VISUGUI/VisuGUI.h
    src/VISUGUI/VisuGUI_ActionsDef.h
    src/VISUGUI/VisuGUI_GaussPointsDlg.cxx
    src/VISUGUI/VisuGUI_GaussPointsDlg.h
    src/VISUGUI/VisuGUI_Prs3dDlg.cxx
    src/VISUGUI/VisuGUI_Prs3dDlg.h
    src/VISUGUI/VisuGUI_Selection.cxx
    src/VISUGUI/VisuGUI_Selection.h
    src/VISUGUI/VisuGUI_Tools.cxx
    src/VISU_I/VISU_ColoredPrs3d_i.cc
    src/VISU_I/VISU_ColoredPrs3d_i.hh
    src/VISU_I/VISU_DumpPython.cc
    src/VISU_I/VISU_GaussPoints_i.cc
    src/VISU_I/VISU_Mesh_i.cc
    src/VISU_I/VISU_Mesh_i.hh
    src/VISU_I/VISU_Prs3dUtils.cc
    src/VISU_I/VISU_Prs3dUtils.hh
    src/VISU_I/VISU_ScalarMap_i.cc
    src/VISU_I/VISU_ScalarMap_i.hh
Delete:
    doc/salome/gui/VISU/images/exportmedfile.png
    doc/salome/gui/VISU/images/table.png
    doc/salome/gui/VISU/images/table3d.png
    doc/salome/gui/VISU/images/tablesn1.png
    doc/salome/gui/VISU/images/tablesn2.png
    doc/salome/gui/VISU/input/table_3d.doc
    src/CONVERTOR/VISU_ElnoMeshValue.hxx
    src/CONVERTOR/VISU_TableReader.cxx
    src/CONVERTOR/VISU_TableReader.hxx
    src/CONVERTOR/VISU_VTKTypeList.hxx
    src/OBJECT/VISU_ActorBase.cxx
    src/OBJECT/VISU_ActorBase.h
    src/OBJECT/VISU_IsoSurfActor.cxx
    src/OBJECT/VISU_IsoSurfActor.h
    src/OBJECT/VISU_PointMap3dActor.cxx
    src/OBJECT/VISU_PointMap3dActor.h
    src/PIPELINE/VISU_DeformationPL.cxx
    src/PIPELINE/VISU_DeformationPL.hxx
    src/PIPELINE/VISU_DeformedGridPL.cxx
    src/PIPELINE/VISU_DeformedGridPL.hxx
    src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx
    src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.hxx
    src/PIPELINE/VISU_ElnoAssembleFilter.cxx
    src/PIPELINE/VISU_ElnoAssembleFilter.hxx
    src/PIPELINE/VISU_ElnoDisassembleFilter.cxx
    src/PIPELINE/VISU_ElnoDisassembleFilter.hxx
    src/PIPELINE/VISU_LabelPointsFilter.cxx
    src/PIPELINE/VISU_LabelPointsFilter.hxx
    src/PIPELINE/VISU_MergedPL.cxx
    src/PIPELINE/VISU_MergedPL.hxx
    src/PIPELINE/VISU_OptionalDeformationPL.cxx
    src/PIPELINE/VISU_OptionalDeformationPL.hxx
    src/VISUGUI/VISU_images.ts
    src/VISUGUI/VISU_msg_en.ts
    src/VISUGUI/VisuGUI_DeformedShapeAndScalarMapDlg.cxx
    src/VISUGUI/VisuGUI_DeformedShapeAndScalarMapDlg.h
    src/VISUGUI/VisuGUI_FileInfoDlg.cxx
    src/VISUGUI/VisuGUI_FileInfoDlg.h
    src/VISUGUI/VisuGUI_Table3dDlg.cxx
    src/VISUGUI/VisuGUI_Table3dDlg.h
    src/VISU_I/VISU_Deformation_i.cc
    src/VISU_I/VISU_Deformation_i.hh
    src/VISU_I/VISU_DeformedShapeAndScalarMap_i.cc
    src/VISU_I/VISU_DeformedShapeAndScalarMap_i.hh
    src/VISU_I/VISU_MonoColorPrs_i.cc
    src/VISU_I/VISU_MonoColorPrs_i.hh
    src/VISU_I/VISU_OptionalDeformation_i.cc
    src/VISU_I/VISU_OptionalDeformation_i.hh
    src/VISU_I/VISU_PointMap3d_i.cc
    src/VISU_I/VISU_PointMap3d_i.hh
    src/VISU_SWIG/visu_pointmap3d.py

208 files changed:
Makefile.am
adm_local/Makefile.am
adm_local/unix/config_files/Makefile.am
adm_local/unix/make_common_starter.am
bin/Makefile.am
configure.ac
doc/Makefile.am
doc/salome/Makefile.am
doc/salome/gui/Makefile.am
doc/salome/gui/VISU/doxyfile.in
doc/salome/gui/VISU/doxyfile_idl.in
doc/salome/gui/VISU/images/barproperty.png
doc/salome/gui/VISU/images/exportmedfile.png [deleted file]
doc/salome/gui/VISU/images/scalarbarproperties.png
doc/salome/gui/VISU/images/table.png [deleted file]
doc/salome/gui/VISU/images/table3d.png [deleted file]
doc/salome/gui/VISU/images/tablesn1.png [deleted file]
doc/salome/gui/VISU/images/tablesn2.png [deleted file]
doc/salome/gui/VISU/input/a3d_presentations.doc
doc/salome/gui/VISU/input/field_presentations.doc
doc/salome/gui/VISU/input/index.doc
doc/salome/gui/VISU/input/scalar_map.doc
doc/salome/gui/VISU/input/table_3d.doc [deleted file]
doc/salome/gui/VISU/pics/smds1.png
doc/salome/gui/VISU/visugenidl_doc/VISU__Gen_8idl.html
doc/salome/gui/VISU/visugenidl_doc/interfaceVISU_1_1ScalarMapOnDeformedShape.html
doc/salome/gui/VISU/visugenidl_doc/namespaceVISU.html
doc/salome/gui/VISU/whdata/whftdata0.htm
doc/salome/gui/VISU/whdata/whtdata0.htm
doc/salome/gui/VISU/whgdata/whlstt3.htm
doc/salome/gui/VISU/whgdata/whlstt4.htm
doc/salome/gui/VISU/whxdata/whftdata0.xml
doc/salome/gui/VISU/whxdata/whtdata0.xml
doc/salome/tui/Makefile.am
idl/Makefile.am
idl/VISU_Gen.idl
resources/Makefile.am
resources/SalomeApp.xml
resources/Visu_cutplane.png [new file with mode: 0644]
src/CONVERTOR/Makefile.am
src/CONVERTOR/VISU_Convertor_impl.cxx
src/CONVERTOR/VISU_ElnoMeshValue.hxx [deleted file]
src/CONVERTOR/VISU_TableReader.cxx [deleted file]
src/CONVERTOR/VISU_TableReader.hxx [deleted file]
src/CONVERTOR/VISU_VTKTypeList.hxx [deleted file]
src/ENGINE/Makefile.am
src/ENGINE/VISU_Engine_i.cc
src/ENGINE/VISU_Engine_i.hh
src/OBJECT/Makefile.am
src/OBJECT/VISU_Actor.cxx
src/OBJECT/VISU_Actor.h
src/OBJECT/VISU_ActorBase.cxx [deleted file]
src/OBJECT/VISU_ActorBase.h [deleted file]
src/OBJECT/VISU_DataSetActor.cxx
src/OBJECT/VISU_DataSetActor.h
src/OBJECT/VISU_GaussPtsAct.cxx
src/OBJECT/VISU_GaussPtsAct.h
src/OBJECT/VISU_GaussPtsDeviceActor.cxx
src/OBJECT/VISU_GaussPtsDeviceActor.h
src/OBJECT/VISU_GaussPtsSettings.cxx
src/OBJECT/VISU_GaussPtsSettings.h
src/OBJECT/VISU_IsoSurfActor.cxx [deleted file]
src/OBJECT/VISU_IsoSurfActor.h [deleted file]
src/OBJECT/VISU_MeshAct.cxx
src/OBJECT/VISU_MeshAct.h
src/OBJECT/VISU_PointMap3dActor.cxx [deleted file]
src/OBJECT/VISU_PointMap3dActor.h [deleted file]
src/OBJECT/VISU_ScalarMapAct.cxx
src/OBJECT/VISU_ScalarMapAct.h
src/OBJECT/VISU_VectorsAct.cxx
src/OBJECT/VISU_VectorsAct.h
src/PIPELINE/Makefile.am
src/PIPELINE/SALOME_ExtractGeometry.h
src/PIPELINE/SALOME_ExtractPolyDataGeometry.h
src/PIPELINE/VISUPipeLine.cxx
src/PIPELINE/VISU_ColoredPL.cxx
src/PIPELINE/VISU_ColoredPL.hxx
src/PIPELINE/VISU_CutLinesPL.cxx
src/PIPELINE/VISU_CutPlanesPL.cxx
src/PIPELINE/VISU_DataSetMapperHolder.cxx
src/PIPELINE/VISU_DataSetMapperHolder.hxx
src/PIPELINE/VISU_DeformationPL.cxx [deleted file]
src/PIPELINE/VISU_DeformationPL.hxx [deleted file]
src/PIPELINE/VISU_DeformedGridPL.cxx [deleted file]
src/PIPELINE/VISU_DeformedGridPL.hxx [deleted file]
src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx [deleted file]
src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.hxx [deleted file]
src/PIPELINE/VISU_DeformedShapePL.cxx
src/PIPELINE/VISU_ElnoAssembleFilter.cxx [deleted file]
src/PIPELINE/VISU_ElnoAssembleFilter.hxx [deleted file]
src/PIPELINE/VISU_ElnoDisassembleFilter.cxx [deleted file]
src/PIPELINE/VISU_ElnoDisassembleFilter.hxx [deleted file]
src/PIPELINE/VISU_GaussPointsPL.cxx
src/PIPELINE/VISU_IsoSurfacesPL.cxx
src/PIPELINE/VISU_IsoSurfacesPL.hxx
src/PIPELINE/VISU_LabelPointsFilter.cxx [deleted file]
src/PIPELINE/VISU_LabelPointsFilter.hxx [deleted file]
src/PIPELINE/VISU_LookupTable.cxx
src/PIPELINE/VISU_LookupTable.hxx
src/PIPELINE/VISU_MapperHolder.hxx
src/PIPELINE/VISU_MergedPL.cxx [deleted file]
src/PIPELINE/VISU_MergedPL.hxx [deleted file]
src/PIPELINE/VISU_MeshPL.cxx
src/PIPELINE/VISU_OptionalDeformationPL.cxx [deleted file]
src/PIPELINE/VISU_OptionalDeformationPL.hxx [deleted file]
src/PIPELINE/VISU_PipeLine.cxx
src/PIPELINE/VISU_PipeLine.hxx
src/PIPELINE/VISU_Plot3DPL.cxx
src/PIPELINE/VISU_PointSpriteMapperHolder.cxx
src/PIPELINE/VISU_PolyDataMapperHolder.cxx
src/PIPELINE/VISU_PolyDataMapperHolder.hxx
src/PIPELINE/VISU_ScalarBarActor.cxx
src/PIPELINE/VISU_ScalarBarActor.hxx
src/PIPELINE/VISU_ScalarBarCtrl.cxx
src/PIPELINE/VISU_ScalarMapOnDeformedShapePL.cxx [new file with mode: 0644]
src/PIPELINE/VISU_ScalarMapOnDeformedShapePL.hxx [new file with mode: 0644]
src/PIPELINE/VISU_ScalarMapPL.cxx
src/PIPELINE/VISU_StreamLinesPL.cxx
src/PIPELINE/VISU_VectorsPL.cxx
src/VISUGUI/Makefile.am
src/VISUGUI/VISU_images.ts [deleted file]
src/VISUGUI/VISU_msg_en.ts [deleted file]
src/VISUGUI/VisuGUI.cxx
src/VISUGUI/VisuGUI.h
src/VISUGUI/VisuGUI_ActionsDef.h
src/VISUGUI/VisuGUI_ClippingDlg.cxx
src/VISUGUI/VisuGUI_ClippingDlg.h
src/VISUGUI/VisuGUI_CutPlanesDlg.cxx
src/VISUGUI/VisuGUI_DeformedShapeAndScalarMapDlg.cxx [deleted file]
src/VISUGUI/VisuGUI_DeformedShapeAndScalarMapDlg.h [deleted file]
src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx
src/VISUGUI/VisuGUI_DeformedShapeDlg.h
src/VISUGUI/VisuGUI_Displayer.cxx
src/VISUGUI/VisuGUI_FileInfoDlg.cxx [deleted file]
src/VISUGUI/VisuGUI_FileInfoDlg.h [deleted file]
src/VISUGUI/VisuGUI_GaussPointsDlg.cxx
src/VISUGUI/VisuGUI_GaussPointsDlg.h
src/VISUGUI/VisuGUI_Module.cxx
src/VISUGUI/VisuGUI_Module.h
src/VISUGUI/VisuGUI_Prs3dDlg.cxx
src/VISUGUI/VisuGUI_Prs3dDlg.h
src/VISUGUI/VisuGUI_Prs3dTools.h
src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.cxx [new file with mode: 0644]
src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.h [new file with mode: 0644]
src/VISUGUI/VisuGUI_Selection.cxx
src/VISUGUI/VisuGUI_Selection.h
src/VISUGUI/VisuGUI_Slider.cxx
src/VISUGUI/VisuGUI_Slider.h
src/VISUGUI/VisuGUI_Table3dDlg.cxx [deleted file]
src/VISUGUI/VisuGUI_Table3dDlg.h [deleted file]
src/VISUGUI/VisuGUI_Tools.cxx
src/VISUGUI/VisuGUI_Tools.h
src/VISUGUI/VisuGUI_VectorsDlg.cxx
src/VISUGUI/VisuGUI_ViewTools.h
src/VISU_I/Makefile.am
src/VISU_I/VISUConfig.cc
src/VISU_I/VISU_ColoredPrs3dCache_i.cc
src/VISU_I/VISU_ColoredPrs3dCache_i.hh
src/VISU_I/VISU_ColoredPrs3dFactory.cc
src/VISU_I/VISU_ColoredPrs3dHolder_i.cc
src/VISU_I/VISU_ColoredPrs3dHolder_i.hh
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_CutPlanes_i.cc
src/VISU_I/VISU_Deformation_i.cc [deleted file]
src/VISU_I/VISU_Deformation_i.hh [deleted file]
src/VISU_I/VISU_DeformedShapeAndScalarMap_i.cc [deleted file]
src/VISU_I/VISU_DeformedShapeAndScalarMap_i.hh [deleted file]
src/VISU_I/VISU_DeformedShape_i.cc
src/VISU_I/VISU_DumpPython.cc
src/VISU_I/VISU_GaussPoints_i.cc
src/VISU_I/VISU_Gen_i.cc
src/VISU_I/VISU_Gen_i.hh
src/VISU_I/VISU_IsoSurfaces_i.cc
src/VISU_I/VISU_Mesh_i.cc
src/VISU_I/VISU_Mesh_i.hh
src/VISU_I/VISU_MonoColorPrs_i.cc [deleted file]
src/VISU_I/VISU_MonoColorPrs_i.hh [deleted file]
src/VISU_I/VISU_OptionalDeformation_i.cc [deleted file]
src/VISU_I/VISU_OptionalDeformation_i.hh [deleted file]
src/VISU_I/VISU_Plot3D_i.cc
src/VISU_I/VISU_PointMap3d_i.cc [deleted file]
src/VISU_I/VISU_PointMap3d_i.hh [deleted file]
src/VISU_I/VISU_Prs3dUtils.cc
src/VISU_I/VISU_Prs3dUtils.hh
src/VISU_I/VISU_Prs3d_i.cc
src/VISU_I/VISU_Prs3d_i.hh
src/VISU_I/VISU_ResultUtils.cc
src/VISU_I/VISU_Result_i.cc
src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc [new file with mode: 0644]
src/VISU_I/VISU_ScalarMapOnDeformedShape_i.hh [new file with mode: 0644]
src/VISU_I/VISU_ScalarMap_i.cc
src/VISU_I/VISU_ScalarMap_i.hh
src/VISU_I/VISU_StreamLines_i.cc
src/VISU_I/VISU_Table_i.cc
src/VISU_I/VISU_TimeAnimation.cxx
src/VISU_I/VISU_Vectors_i.cc
src/VISU_I/VISU_View_i.hh
src/VISU_SWIG/Makefile.am
src/VISU_SWIG/visu_pointmap3d.py [deleted file]
src/VVTK/Makefile.am
src/VVTK/VVTK_MainWindow.cxx
src/VVTK/VVTK_MainWindow.h
src/VVTK/VVTK_PickingDlg.cxx
src/VVTK/VVTK_Renderer.cxx
src/VVTK/VVTK_ViewModel.cxx

index d0f229775fd7d941ce41b2e1cfec5e08f95f494f..f594b4d1ccfe79e82d47b8c6b4da4a27e0a7729f 100644 (file)
 
 include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
+ACLOCAL_AMFLAGS = -I adm_local/unix/config_files \
+                  -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
+                  -I ${GUI_ROOT_DIR}/adm_local/unix/config_files \
+                  -I ${MED_ROOT_DIR}/adm_local/unix/config_files
+
 SUBDIRS = adm_local idl resources src doc bin 
 
 DISTCLEANFILES = a.out aclocal.m4 configure
 
-salomeinclude_DATA=VISU_version.h
+salomeinclude_DATA = VISU_version.h
 
-EXTRA_DIST+= \
-       build_configure \
-       clean_configure \
+EXTRA_DIST +=          \
+       build_configure \
+       clean_configure \
        LICENCE
 
 dist-hook:
@@ -42,7 +47,7 @@ dist-hook:
 usr_docs:
        (cd doc && $(MAKE) $(AM_MAKEFLAGS) usr_docs)
 
-docs:usr_docs
+docs: usr_docs
 
 dev_docs:
        (cd doc && $(MAKE) $(AM_MAKEFLAGS) dev_docs)
index 76fe0fa5ff1505e9fefd859c28411681900990d2..ed00ea01e6fcfc3652ae6f4c1005839af0ae61fa 100644 (file)
@@ -19,4 +19,4 @@
 
 include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
-SUBDIRS= unix
\ No newline at end of file
+SUBDIRS = unix
\ No newline at end of file
index f4266455b0fdb6bc00ff1e35591a72eca89d8fac..a482e6be83fc6e7a54c794d11bbdcf9554affa4e 100644 (file)
@@ -18,5 +18,5 @@
 # 
 include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
-dist_admlocalm4_DATA= \
+dist_admlocalm4_DATA = \
     check_VISU.m4
index d53f5c10d993212d71a1e075eafee96b6e160133..d863afd8436bf3549f2446c9b1810f0910702ffd 100644 (file)
@@ -7,48 +7,63 @@
 #
 
 # Standard directory for installation
-salomeincludedir   = $(includedir)/@PACKAGE@
-libdir             = $(prefix)/lib@LIB_LOCATION_SUFFIX@/@PACKAGE@
-bindir             = $(prefix)/bin/@PACKAGE@
+salomeincludedir   = $(includedir)/salome
+libdir             = $(prefix)/lib@LIB_LOCATION_SUFFIX@/salome
+bindir             = $(prefix)/bin/salome
 purebindir         = $(prefix)/bin
 salomescriptdir    = $(bindir)
+salomepythondir    = $(pythondir)/salome
+salomepyexecdir    = $(pyexecdir)/salome
 
 # Tests environment folders
 testsenvirondir    = $(prefix)/Tests/environ
 testsenvironcshdir = $(prefix)/Tests/environ/csh
 
 # Directory for installing idl files
-salomeidldir       = $(prefix)/idl/@PACKAGE@
+salomeidldir       = $(prefix)/idl/salome
 
 # Directory for installing resource files
-salomeresdir       = $(prefix)/share/@PACKAGE@/resources/@MODULE_NAME@
+salomeresdir       = $(prefix)/share/salome/resources/@MODULE_NAME@
 
 # Directories for installing admin files
-admlocaldir       = $(prefix)/adm_local
-admlocalunixdir     = $(admlocaldir)/unix
-admlocalm4dir        = $(admlocaldir)/unix/config_files
+admlocaldir        = $(prefix)/adm_local
+admlocalunixdir    = $(admlocaldir)/unix
+admlocalm4dir      = $(admlocaldir)/unix/config_files
 
 # Shared modules installation directory
-sharedpkgpythondir =$(pkgpythondir)/shared_modules
+sharedpkgpythondir = $(salomepythondir)/shared_modules
 
 # Documentation directory
-docdir             = $(datadir)/doc/@PACKAGE@
+docdir             = $(datadir)/doc/salome
 
 # common rules
 
-# moc-files generation
+# meta object implementation files generation (moc)
 %_moc.cxx: %.h
        $(MOC) $< -o $@
 
-# qm-files generation
+# translation (*.qm) files generation (lrelease)
 %.qm: %.ts
        $(LRELEASE) $< -qm $@
 
-EXTRA_DIST=$(MOC_FILES:%_moc.cxx=%.h) $(nodist_salomeres_DATA:%.qm=%.ts)
+# resource files generation (qrcc)
+qrc_%.cxx: %.qrc
+       $(QRCC) $< -o $@ -name $(*F)
 
+# qt forms files generation (uic)
+ui_%.h: %.ui
+       $(UIC) -o $@ $<
+
+# extra distributed files
+EXTRA_DIST = $(MOC_FILES:%_moc.cxx=%.h) $(QRC_FILES:qrc_%.cxx=%.qrc) \
+             $(UIC_FILES:ui_%.h=%.ui) $(nodist_salomeres_DATA:%.qm=%.ts)
+
+# customize clean operation
 mostlyclean-local:
        rm -f @builddir@/*_moc.cxx
        rm -f @builddir@/*.qm
+       rm -f @builddir@/ui_*.h
+       rm -f @builddir@/qrc_*.cxx
 
 # tests
 tests: unittest
index e81b2089afbc8abac23f4f90225d9c726832531e..a5f6e4f92beff77ddfc4a62ca53be4e95771ba54 100644 (file)
@@ -18,5 +18,8 @@
 
 include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
-nodist_salomescript_DATA= VERSION
-EXTRA_DIST+= VERSION.in
+# non-distributed files 
+nodist_salomescript_DATA = VERSION
+
+# distributed files
+dist_salomescript_SCRIPTS =
index b5113abc454d9944fad36dd4a0b2dfd29cf0220c..b21738e3901d726071b2aeb851bb1778f88ebb9d 100644 (file)
@@ -6,7 +6,7 @@
 #
 
 
-AC_INIT([Salome2 Project VISU module], [5.0.0], [webmaster.salome@opencascade.com], [salome])
+AC_INIT([Salome2 Project VISU module], [5.1.0], [webmaster.salome@opencascade.com], [SalomeVISU])
 AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
 AC_CANONICAL_HOST
 AC_CANONICAL_TARGET
@@ -354,11 +354,11 @@ AC_OUTPUT([ \
        ./doc/Makefile \
        ./doc/salome/Makefile \
        ./doc/salome/gui/Makefile \
+       ./doc/salome/gui/VISU/Makefile \
        ./doc/salome/gui/VISU/doxyfile \
        ./doc/salome/gui/VISU/doxyfile_idl \
        ./doc/salome/tui/Makefile \
-       ./doc/salome/tui/VISU/doxyfile \
-       ./doc/salome/tui/VISU/sources/static/tree.js \
+       ./doc/salome/tui/doxyfile \
        ./idl/Makefile \
        ./resources/VISUCatalog.xml \
        ./resources/Makefile \
index 68f247f877f126a5739512f2fe9987e7ad662d33..cdcfd951a7d94bac27c5d138c13b5a64a30075f5 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 # 
 
-SUBDIRS= salome
+SUBDIRS = salome
 
-EXTRA_DIST= html
\ No newline at end of file
+usr_docs:
+       (cd salome && $(MAKE) $(AM_MAKEFLAGS) usr_docs)
+
+docs: usr_docs
+
+dev_docs:
+       (cd salome && $(MAKE) $(AM_MAKEFLAGS) dev_docs)
index 35fbf228fee24cfdb83290822b5e456858b03830..344600a1a6d5ce75d59386c9faff31b08e122b75 100644 (file)
@@ -18,9 +18,9 @@
 #
 # $Header$
 
-SUBDIRS= tui gui
-SUBDIRSTUI= tui
-SUBDIRSGUI= gui
+SUBDIRS = tui gui
+SUBDIRSTUI = tui
+SUBDIRSGUI = gui
 
 usr_docs:
        @@SETX@; for d in $(SUBDIRSGUI); do     \
index 1ec04c7a64a270e47900d28749697f2c8dcb20ed..abde2b5ab2dba68e5bc0a63f7b1db579635f646c 100644 (file)
 
 include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
-EXTRA_DIST+=VISU
-
-doxygen=@DOXYGEN@
+SUBDIRS = VISU
 
 usr_docs:
-       cd ./VISU; \
-       echo "Processing VISU_Gen.idl file: "; \
-       $(doxygen) ./doxyfile_idl; \
-       echo "Running doxygen in directory: "`pwd`; \
-       $(doxygen) ./doxyfile;
+       (cd VISU && $(MAKE) $(AM_MAKEFLAGS) usr_docs)
 
 docs: usr_docs
-
-clean-local:
-       rm -fr `ls | grep -v "Makefile"`
-       rm -fr VISU
-
-install-data-local: usr_docs
-       mkdir -p $(docdir)/gui
-       cp -rf VISU $(docdir)/gui
-       -find $(PWD) -name CVS -prune -exec rm -rf {} \;
-
-uninstall-local:
-       rm -rf $(docdir)/gui/VISU
-
-docguidir=$(docdir)/gui/VISU
-
-nodist_docgui_DATA= VISU/doxyfile
-nodist_docgui_DATA+= VISU/doxyfile_idl
-EXTRA_DIST+= VISU/doxyfile.in
-EXTRA_DIST+= VISU/doxyfile_idl.in
index b8330d48a01eae4eaa94dd88f21b5ec7e23f01a9..9aa594fc70eeab6bf072e1637c5b708fbb9913a1 100755 (executable)
@@ -2,7 +2,7 @@
 # Project related configuration options
 #---------------------------------------------------------------------------
 PROJECT_NAME      = "Post-Pro Module Reference Manual v.@VERSION@"
-OUTPUT_DIRECTORY  = ./
+OUTPUT_DIRECTORY  = .
 CREATE_SUBDIRS   = NO
 OUTPUT_LANGUAGE   = English
 TAB_SIZE          = 5
@@ -18,13 +18,15 @@ WARNINGS          = YES
 #---------------------------------------------------------------------------
 INPUT             = @srcdir@/input               
 FILE_PATTERNS     = *.doc
+EXCLUDE           = 
 IMAGE_PATH        = @srcdir@/images
+EXAMPLE_PATH      = 
 
 #---------------------------------------------------------------------------
 #HTML related options
 #---------------------------------------------------------------------------
 GENERATE_HTML     = YES
-HTML_OUTPUT       = ./
+HTML_OUTPUT       = .
 HTML_HEADER       = @srcdir@/static/header.html
 HTML_FOOTER       = @srcdir@/static/footer.html
 #HTML_STYLESHEET  = @srcdir@/static/doxygen.css
@@ -46,4 +48,4 @@ GENERATE_RTF      = NO
 #---------------------------------------------------------------------------
 #External reference options
 #---------------------------------------------------------------------------
-TAGFILES = visugen_doc.tag=./visugen_doc
\ No newline at end of file
+TAGFILES          = visugen_doc.tag=visugen_doc
index 60d89c2d3c2ab3baa9662ca36f433734e2c62c98..18af834e1f25ae1a083f46336bf9321f6bc3d585 100755 (executable)
@@ -2,7 +2,7 @@
 # Project related configuration options
 #---------------------------------------------------------------------------
 PROJECT_NAME      = "Post-Pro Module Reference Manual v.@VERSION@"
-OUTPUT_DIRECTORY  = ./
+OUTPUT_DIRECTORY  = .
 CREATE_SUBDIRS   = NO
 OUTPUT_LANGUAGE   = English
 USE_WINDOWS_ENCODING   = NO
@@ -66,8 +66,8 @@ VERBATIM_HEADERS       = YES
 #---------------------------------------------------------------------------
 # configuration options related to warning and progress messages
 #---------------------------------------------------------------------------
-QUIET             = NO
-WARNINGS          = YES
+QUIET                  = NO
+WARNINGS               = YES
 WARN_IF_UNDOCUMENTED   = YES
 WARN_IF_DOC_ERROR      = YES
 WARN_NO_PARAMDOC       = NO
@@ -86,7 +86,7 @@ RECURSIVE         = NO
 #HTML related options
 #---------------------------------------------------------------------------
 GENERATE_HTML     = YES
-HTML_OUTPUT       = ./visugen_doc
+HTML_OUTPUT       = visugen_doc
 HTML_HEADER       = @srcdir@/static/header.html
 HTML_FOOTER       = @srcdir@/static/footer.html
 #HTML_STYLESHEET  = @srcdir@/static/doxygen.css
@@ -134,4 +134,4 @@ DOT_CLEANUP            = YES
 #---------------------------------------------------------------------------
 #External reference options
 #---------------------------------------------------------------------------
-GENERATE_TAGFILE  = visugen_doc.tag
+GENERATE_TAGFILE       = visugen_doc.tag
index 6bc74cec101b76e103f39ca67dec2d8ec54ead45..f095a330c1fc8ab1a5033865b01baefc56e4d0bf 100644 (file)
Binary files a/doc/salome/gui/VISU/images/barproperty.png and b/doc/salome/gui/VISU/images/barproperty.png differ
diff --git a/doc/salome/gui/VISU/images/exportmedfile.png b/doc/salome/gui/VISU/images/exportmedfile.png
deleted file mode 100644 (file)
index c2fc56f..0000000
Binary files a/doc/salome/gui/VISU/images/exportmedfile.png and /dev/null differ
index b60ed8988ad552a4b04bf063ba75cf34bfa49750..318497db8ae0e169a667995dd014ec206cbee0ce 100644 (file)
Binary files a/doc/salome/gui/VISU/images/scalarbarproperties.png and b/doc/salome/gui/VISU/images/scalarbarproperties.png differ
diff --git a/doc/salome/gui/VISU/images/table.png b/doc/salome/gui/VISU/images/table.png
deleted file mode 100644 (file)
index 473aeff..0000000
Binary files a/doc/salome/gui/VISU/images/table.png and /dev/null differ
diff --git a/doc/salome/gui/VISU/images/table3d.png b/doc/salome/gui/VISU/images/table3d.png
deleted file mode 100644 (file)
index 1b19990..0000000
Binary files a/doc/salome/gui/VISU/images/table3d.png and /dev/null differ
diff --git a/doc/salome/gui/VISU/images/tablesn1.png b/doc/salome/gui/VISU/images/tablesn1.png
deleted file mode 100644 (file)
index 4db643e..0000000
Binary files a/doc/salome/gui/VISU/images/tablesn1.png and /dev/null differ
diff --git a/doc/salome/gui/VISU/images/tablesn2.png b/doc/salome/gui/VISU/images/tablesn2.png
deleted file mode 100644 (file)
index 4b3b85d..0000000
Binary files a/doc/salome/gui/VISU/images/tablesn2.png and /dev/null differ
index 852bb5a39389dc465c6541a7808f0cd7c306542d..0c944e43f0c11397feb9632889e8c8cc0fea64e6 100644 (file)
@@ -29,6 +29,7 @@
 <li>\ref segmentation_page</li>
 <li>\ref recording_in_gauss_viewer_page</li>
 </ul>
+<li>\ref values_labeling_page</li>
 </ul>
 <li>\subpage viewing_3d_presentations_page</li>
 <ul>
index a60c43cb24627d61948141fe83d355ed786ba010..1987b13a7856722f72d4d42fb498aeba69f8e1c6 100644 (file)
@@ -26,6 +26,7 @@
 <li>\ref segmentation_page</li>
 <li>\ref recording_in_gauss_viewer_page</li>
 </ul>
+<li>\subpage values_labeling_page</li>
 </ul>
 
 */
\ No newline at end of file
index 402f3a699b4de22d7ff4cd70d51e052277f922b0..8ca330b509ceb7419215936e74115b50fcfba7bc 100644 (file)
@@ -35,6 +35,7 @@
 <li>\ref segmentation_page</li>
 <li>\ref recording_in_gauss_viewer_page</li>
 </ul>
+<li>\ref values_labeling_page</li>
 </ul>
 <li>\ref viewing_3d_presentations_page</li>
 <ul>
index 1f92cc3cb7a57c767ad51fd6ffde18309b15071e..e99ab907271735cdc322ee571f46f77799791f82 100644 (file)
@@ -91,7 +91,7 @@ orientation of the scalar bar.</li>
 <li><b>Origin:</b> you can enter X & Y coordinates of the origin of
 the scalar bar.</li>
 <li><b>Dimensions:</b> you can enter \b Width and \b Height of the
-scalar bar.</li>
+scalar bar specified in % of the size of view.</li>
 <li><b>Text properties</b> button allows you to define from the
 following dialog box:
 
@@ -110,11 +110,11 @@ following dialog box:
 \image html barproperty.png
 
 <ul>
-<li>Relative \b width and \b height of \b Title (in percents),</li>
-<li>Relative \b width and \b height of \b Labels (in percents),</li>
-<li>Relative \b width and \b height of \b Bar (in percents),</li>
+<li>Relative \b size of \b Title (in percents of the width of scalar bar widget),</li>
+<li>Relative \b size of \b Labels (in percents of the width of scalar bar widget),</li>
+<li>Relative \b width and \b height of \b Bar (in percents of the width and height of scalar bar widget),</li>
 <li>Visibility of \b Units in \b Title,</li>
-<li>Format of \b Labels.</li>
+<li>Precision of \b Labels which specifies the number of characters to be printed, the number of decimal places, or the number of significant digits</li>
 </ul>
 </li>
 </ul>
diff --git a/doc/salome/gui/VISU/input/table_3d.doc b/doc/salome/gui/VISU/input/table_3d.doc
deleted file mode 100644 (file)
index 15a36d2..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*!
-
-\page table_3d_page Table 3D presentation
-
-\n <b>Table 3D</b> is a 3D graphic presentation of data contained in the table. 
-The relief and coloring of the resulting
-presentation both correspond to the values contained in the table. The values from the first column of the 
-table define X-axis. The values from the second to the last columns define Z-axis. Y increases with a fixed step starting from Y=0. 
-To successfully produce a Table 3D presentation, the table should not contain empty fields. 
-
-<em>To create a Table 3D presentation:</em>
-\par
-&ndash; Right-click on an XLS table in the
-Object browser and from the context menu choose <b>Show</b>, or <b>Show only</b>
-
-\image html table.png
-
-The table will be immediately displayed in the Viewer.
-
-Choose <b>Edit</b> in the context menu if you wish to change the layout of the presentation.
-
-\image html table3d.png
-
-\par
-<ul>
-<li><b>Scale Factor</b> - visualization scaling of all values of the table.</li>
-<li><b>Presentation type:</b></li>
-<ul>
-<li>\b Surface - Plot 3D will be represented with a smooth surface.</li>
-
-\image html tablesn2.png
-
-<li>\b Contour - Plot 3D will be represented with a set of contours.</li>
-
-\image html tablesn1.png
-
-</ul>
-<li><b>Number of contours</b> - allows to define the number of
-contours (active when Contour presentation type is selected).</li>
-<li> <b>Scalar Bar</b> tab allows to define the parameters of the scalar
-bar displayed with this presentation (\ref scalar_map_page "see also").</li>
-</ul>
-
-It is also possible to choose \b Wireframe or \b Shading \b Representation type, change
-such properties as \b Opacity and <b> Line Width </b> and <b> Translate </b> presentation from the context menu.  
-
-
-
-*/
\ No newline at end of file
index f74008d4577b87ddc1a355c8e1ceacdf886d1df0..24c5feda71d28271be6e63a1388b1b6aaa3cea20 100755 (executable)
Binary files a/doc/salome/gui/VISU/pics/smds1.png and b/doc/salome/gui/VISU/pics/smds1.png differ
index 25789b67e60bc18264a17007248efa8e2858ad04..5d34130d68ec32f48c19426cf5ea542b3f122965 100644 (file)
@@ -74,7 +74,7 @@ Include dependency graph for VISU_Gen.idl:<p><center><img src="VISU__Gen_8idl__i
 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deformed shape presentation interface.  <a href="interfaceVISU_1_1DeformedShape.html#_details">More...</a><br></td></tr>
 <tr><td class="memItemLeft" nowrap align="right" valign="top">interface &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfaceVISU_1_1ScalarMapOnDeformedShape.html">VISU.ScalarMapOnDeformedShape</a></td></tr>
 
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deformed shape and Scalar Map presentation interface.  <a href="interfaceVISU_1_1ScalarMapOnDeformedShape.html#_details">More...</a><br></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Scalar Map on Deformed shape presentation interface.  <a href="interfaceVISU_1_1ScalarMapOnDeformedShape.html#_details">More...</a><br></td></tr>
 <tr><td class="memItemLeft" nowrap align="right" valign="top">interface &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfaceVISU_1_1Plot3D.html">VISU.Plot3D</a></td></tr>
 
 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="interfaceVISU_1_1Plot3D.html">Plot3D</a> interface.  <a href="interfaceVISU_1_1Plot3D.html#_details">More...</a><br></td></tr>
index 7909505277362199db3c75a4aa3bdf0dbb7a0018..878345b4c0b68e14a7f1c0691991c0558636cf28 100644 (file)
@@ -14,7 +14,7 @@
 <!-- Generated by Doxygen 1.4.7 -->
 <div class="nav">
 <a class="el" href="namespaceVISU.html">VISU</a>.<a class="el" href="interfaceVISU_1_1ScalarMapOnDeformedShape.html">ScalarMapOnDeformedShape</a></div>
-<h1>VISU.ScalarMapOnDeformedShape Interface Reference</h1><!-- doxytag: class="VISU::ScalarMapOnDeformedShape" --><!-- doxytag: inherits="VISU::ScalarMap" -->Deformed shape and Scalar Map presentation interface.  
+<h1>VISU.ScalarMapOnDeformedShape Interface Reference</h1><!-- doxytag: class="VISU::ScalarMapOnDeformedShape" --><!-- doxytag: inherits="VISU::ScalarMap" -->Scalar Map on Deformed shape presentation interface.  
 <a href="#_details">More...</a>
 <p>
 <code>import &quot;VISU_Gen.idl&quot;;</code>
index 8de0ca8a0eab6c52afbe9baf1f503ca2359b08f4..9543044bb6becbe5efd1c5892d95ff3db0a236ef 100644 (file)
@@ -60,7 +60,7 @@
 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deformed shape presentation interface.  <a href="interfaceVISU_1_1DeformedShape.html#_details">More...</a><br></td></tr>
 <tr><td class="memItemLeft" nowrap align="right" valign="top">interface &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfaceVISU_1_1ScalarMapOnDeformedShape.html">ScalarMapOnDeformedShape</a></td></tr>
 
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deformed shape and Scalar Map presentation interface.  <a href="interfaceVISU_1_1ScalarMapOnDeformedShape.html#_details">More...</a><br></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Scalar Map on Deformed shape presentation interface.  <a href="interfaceVISU_1_1ScalarMapOnDeformedShape.html#_details">More...</a><br></td></tr>
 <tr><td class="memItemLeft" nowrap align="right" valign="top">interface &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfaceVISU_1_1Plot3D.html">Plot3D</a></td></tr>
 
 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="interfaceVISU_1_1Plot3D.html">Plot3D</a> interface.  <a href="interfaceVISU_1_1Plot3D.html#_details">More...</a><br></td></tr>
index 5acacd5e88d1cac92f45254d6b16ab705b761b34..eae6a6241a9dd52c55b2e7e94d6e43cbe29598b7 100755 (executable)
@@ -49,7 +49,7 @@ aTE("Plot2D Viewer","plot2d_viewer.htm");
 aTE("Plot 3D presentation","plot_3d_presentation.htm");
 aTE("Primitive Types","primitive_types.htm");
 aTE("Scalar Bar","scalar_bar.htm");
-aTE("Deformed Shape and Scalar Map presentation","scalar_map_on_deformed_shape_presentation.htm");
+aTE("Scalar Map on Deformed Shape presentation","scalar_map_on_deformed_shape_presentation.htm");
 aTE("Segmentation","segmentation.htm");
 aTE("Types of Gauss Points Presentations","types_of_gauss_points_presentations.htm");
 aTE("VTK 3D Viewer","vtk_3d_viewer.htm");
index 67da6bc2d33244fe90cd223d8d4e6ce270908feb..fe3b5c793b370bfc25b247e040ae5520868f5c92 100755 (executable)
@@ -24,7 +24,7 @@
        aTE(2,0,"Deformed Shape presentation","files/deformed_shape_presentation.htm");
        aTE(2,0,"Vectors Presentation","files/vectors_presentation.htm");
        aTE(2,0,"Stream Lines presentation","files/stream_lines_presentation.htm");
-       aTE(2,0,"Deformed Shape and Scalar Map presentation","scalar_map_on_deformed_shape_presentation.htm");
+       aTE(2,0,"Scalar Map on Deformed Shape presentation","scalar_map_on_deformed_shape_presentation.htm");
        aTE(2,0,"Plot 3D presentation","plot_3d_presentation.htm");
        aTE(2,0,"Animating presentations","files/animating_presentations.htm");
        aTE(1,9,"Gauss Points Presentations");
index 56224cc4ea7d9816e5845da11b0201304c93c8cd..d960e94db7ebb7006ebb2c4f4be5357893fde3b6 100755 (executable)
@@ -53,7 +53,7 @@ img {vertial-align:middle;}
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nobr><a href="../files/deformed_shape_presentation.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Deformed Shape presentation</a></nobr><br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nobr><a href="../files/vectors_presentation.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Vectors Presentation</a></nobr><br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nobr><a href="../files/stream_lines_presentation.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Stream Lines presentation</a></nobr><br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nobr><a href="../scalar_map_on_deformed_shape_presentation.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Deformed Shape and Scalar Map presentation</a></nobr><br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nobr><a href="../scalar_map_on_deformed_shape_presentation.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Scalar Map on Deformed Shape presentation</a></nobr><br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nobr><a href="../plot_3d_presentation.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Plot 3D presentation</a></nobr><br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nobr><a href="../files/animating_presentations.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Animating presentations</a></nobr><br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nobr><a name="4"></a><a href="whlstt4.htm#4" target="_self" title="closed book"><img src="../whd_toc1.gif" border="0" align="absmiddle"> Gauss Points Presentations</a></nobr><br>
index 49593c242b42cb211a735013e303652758afa0bd..253afb61247f5727f90cfd1c04d105f63806d03b 100755 (executable)
@@ -53,7 +53,7 @@ img {vertial-align:middle;}
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nobr><a href="../files/deformed_shape_presentation.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Deformed Shape presentation</a></nobr><br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nobr><a href="../files/vectors_presentation.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Vectors Presentation</a></nobr><br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nobr><a href="../files/stream_lines_presentation.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Stream Lines presentation</a></nobr><br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nobr><a href="../scalar_map_on_deformed_shape_presentation.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Deformed Shape and Scalar Map presentation</a></nobr><br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nobr><a href="../scalar_map_on_deformed_shape_presentation.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Scalar Map on Deformed Shape presentation</a></nobr><br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nobr><a href="../plot_3d_presentation.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Plot 3D presentation</a></nobr><br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nobr><a href="../files/animating_presentations.htm"><img src="../whd_toc3.gif" border="0" align="absmiddle"> Animating presentations</a></nobr><br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nobr><a name="4"></a><a href="whlstt3.htm#4" target="_self"><img src="../whd_toc2.gif" border="0" align="absmiddle"> Gauss Points Presentations</a></nobr><br>
index 37c3d3378b37d5246a6b2e92e3ad7e9b4ccc3092..18b3f31dcf3074863959b13fc9f2c7c6d7773c5b 100755 (executable)
@@ -37,7 +37,7 @@
 <topic name="Plot 3D presentation" url="plot_3d_presentation.htm" />
 <topic name="Primitive Types" url="primitive_types.htm" />
 <topic name="Scalar Bar" url="scalar_bar.htm" />
-<topic name="Deformed Shape and Scalar Map presentation" url="scalar_map_on_deformed_shape_presentation.htm" />
+<topic name="Scalar Map on Deformed Shape presentation" url="scalar_map_on_deformed_shape_presentation.htm" />
 <topic name="Segmentation" url="segmentation.htm" />
 <topic name="Types of Gauss Points Presentations" url="types_of_gauss_points_presentations.htm" />
 <topic name="VTK 3D Viewer" url="vtk_3d_viewer.htm" />
index 13b3a71505b62082f9554632aab80bbcbebb4a64..14a0dff2ade979f20858261be2735c7024800ec9 100755 (executable)
@@ -16,7 +16,7 @@
       <item name="Deformed Shape presentation" url="files/deformed_shape_presentation.htm" />
       <item name="Vectors Presentation" url="files/vectors_presentation.htm" />
       <item name="Stream Lines presentation" url="files/stream_lines_presentation.htm" />
-      <item name="Deformed Shape and Scalar Map presentation" url="scalar_map_on_deformed_shape_presentation.htm" />
+      <item name="Scalar Map on Deformed Shape presentation" url="scalar_map_on_deformed_shape_presentation.htm" />
       <item name="Plot 3D presentation" url="plot_3d_presentation.htm" />
       <item name="Animating presentations" url="files/animating_presentations.htm" />
       <book name="Gauss Points Presentations" >
index 0f139546878569444ffe4a879afcbfba6bcb3786..2c7beb8e97b1878463c425dca4840a688a27d71d 100644 (file)
 
 include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
-EXTRA_DIST+=VISU
+EXTRA_DIST += images static
 
-dev_docs:
-       cp -fr $(srcdir)/VISU ./INPUT; \
-       cp -f ./VISU/doxyfile ./INPUT; \
-       cd INPUT; \
-       sed 's|../../../share/salome|$(top_srcdir)|' ./doxyfile > ./doxyfile1; \
-       sed 's|../../build/salome|$(top_builddir)|' ./doxyfile1 > ./doxyfile2; \
-       mv -f doxyfile2 doxyfile1; \
-       echo "DOXYGEN SUPPORT PYTHON - @DOXYGEN_WITH_PYTHON@"; \
-       if( test "x@DOXYGEN_WITH_PYTHON@" = "xyes"); then \
-         sed 's|python_extension_must_be_here|*.py|' ./doxyfile1 > ./doxyfile2; \
-         mv -f doxyfile2 doxyfile1; \
-         $(DOXYGEN) -u ./doxyfile1; \
-       else \
-         sed 's|python_extension_must_be_here||' ./doxyfile1 > ./doxyfile2; \
-         mv -f doxyfile2 doxyfile1; \
-       fi; \
-       if( test "x@DOXYGEN_WITH_STL@" = "xyes"); then \
-         sed -e 's|BUILTIN_STL_SUPPORT    = NO|BUILTIN_STL_SUPPORT    = YES|' ./doxyfile1 > ./doxyfile2; \
-         mv -f doxyfile2 doxyfile1; \
-       fi; \
-       mv -f doxyfile1 doxyfile; \
-       echo "Running doxygen in directory:"`pwd`; \
-       $(DOXYGEN) ./doxyfile; \
-       cd ../; \
-       cp -fr $(srcdir)/VISU/sources/ VISU ; \
-       rm -fr INPUT
+dev_docs: doxyfile
+       echo "Running doxygen in directory: "`pwd`; \
+       $(DOXYGEN) $<;
 
-doctuidir=$(docdir)/tui/VISU
+clean-local:
+       -rm -fr VISU doxygen.bak
 
-nodist_doctui_DATA= VISU/doxyfile
-EXTRA_DIST+= VISU/doxyfile.in
+install-data-local:
+       if test -d VISU; then \
+         $(INSTALL) -d $(DESTDIR)$(docdir)/tui ; \
+         cp -rp VISU $(DESTDIR)$(docdir)/tui ; \
+       fi;
+
+uninstall-local:
+       rm -rf $(DESTDIR)$(docdir)/tui/VISU
index 538f127b00945690a9e6ffab7a11725394ec273b..cddec2313ef6fc058bc7e061f90725961844c63c 100644 (file)
 
 include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
-BASEIDL_FILES= VISU_Gen.idl
-
-EXTRA_DIST+= $(BASEIDL_FILES)
+BASEIDL_FILES = VISU_Gen.idl
 
 # This variable defines the files to be installed
-salomeidl_DATA = $(BASEIDL_FILES)
+dist_salomeidl_DATA = $(BASEIDL_FILES)
 
 # VISU idl common library
 lib_LTLIBRARIES = libSalomeIDLVISU.la
 
 # Sources built from idl files
-nodist_libSalomeIDLVISU_la_SOURCES= VISU_GenSK.cc
+nodist_libSalomeIDLVISU_la_SOURCES = VISU_GenSK.cc
 
 # header files must be exported: other modules have to use this library
-nodist_salomeinclude_HEADERS= $(BASEIDL_FILES:%.idl=%.hh)
+nodist_salomeinclude_HEADERS = $(BASEIDL_FILES:%.idl=%.hh)
 
-libSalomeIDLVISU_la_CPPFLAGS =\
-       -I$(top_builddir)/salome_adm/unix \
-       -I$(top_builddir)/idl \
+libSalomeIDLVISU_la_CPPFLAGS =                 \
+       -I$(top_builddir)/salome_adm/unix       \
+       -I$(top_builddir)/idl                   \
        @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @KERNEL_CXXFLAGS@ @MED_CXXFLAGS@
 libSalomeIDLVISU_la_LDFLAGS = -no-undefined -version-info=0:0:0
 libSalomeIDLVISU_la_LIBADD  = @CORBA_LIBS@ $(MED_LDFLAGS) -lSalomeIDLMED
@@ -64,14 +62,14 @@ SUFFIXES = .idl .hh SK.cc
        $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
 
 install-exec-local: $(BASEIDL_FILES:%=$(top_srcdir)/idl/%)
-       $(INSTALL) -d  $(pkgpythondir)
+       $(INSTALL) -d  $(DESTDIR)$(salomepythondir)
        ls $^ | while read file; do \
-         $(OMNIORB_IDL) $(IDLPYFLAGS) -C$(pkgpythondir) $$file ; \
+         $(OMNIORB_IDL) $(IDLPYFLAGS) -C$(DESTDIR)$(salomepythondir) $$file ; \
        done
 
 # uninstall-local removes too much, but it works in distcheck
 uninstall-local:
-       rm -rf $(pkgpythondir)/*
+       rm -rf $(DESTDIR)$(salomepythondir)/*
 
 mostlyclean-local: clean-idls
 
index a048426206acb656f5444619ff4f612eadae363b..a6357f39f6a3511e8bb140789d4d460c18e25536 100644 (file)
@@ -106,6 +106,18 @@ module VISU {
     TALL
   };
 
+  /* Clipping planes management */
+  struct ClippingPlane {
+    double X;
+    double Y;
+    double Z;
+    double dX;
+    double dY;
+    double dZ;
+    boolean isAuto;
+    string name;
+  };
+    
   interface Base {
     /*!
      * Returns ID of the object.
@@ -295,6 +307,7 @@ module VISU {
                         SHADED,
                         INSIDEFRAME,
                         SURFACEFRAME,
+                        FEATURE_EDGES,
                         SHRINK
   };
 
@@ -349,6 +362,17 @@ module VISU {
      * \return The type of representation of the mesh.
      */
     PresentationType GetPresentationType();
+
+    /*!
+     * Switches shrink mode of presentation
+     * Note: SetPresentationType(SHRINK) is same as SetShrink(True)
+     */
+    void SetShrink(in boolean toShrink);
+
+    /*!
+     * Returns current state of shrink mode
+     */
+    boolean IsShrank();
   };
 
 
@@ -508,6 +532,32 @@ module VISU {
      */
     long GetScalarMode();
 
+    /*!  
+     * Set the visibility of a distribution curve.
+     * \param theIs is used to switch on/off the visibility of a distribution curve.
+     */
+    void SetIsDistributionVisible(in boolean theIs);
+
+    //! Gets current visibility of a distribution curve
+    boolean GetIsDistributionVisible();
+
+    //! Gets current filtering by scalars mode
+    boolean IsScalarFilterUsed();
+
+    void UseScalarFiltering( in boolean theUseScalarFilter );
+
+    /*!
+     * Sets scalar range - min and max boundaries of the scalar bar.
+     * \param theMin  Min boundary of the scalar bar.
+     * \param theMax  Max boundary of the scalar bar.
+     * \param theIsFilter  if true then filter by scalars.
+     */
+    void SetScalarFilterRange( in double theMin, in double theMax );
+
+    double GetScalarFilterMin();
+
+    double GetScalarFilterMax();
+
     /*!
      * Add group as geometry of presentation.
      * \param theMeshName  - mesh name
@@ -672,6 +722,16 @@ module VISU {
 
   interface ScalarMap : ColoredPrs3d, ScaledPrs3d {
 
+    /*!
+     * Returns visibility state of scalar bar
+     */
+    boolean IsBarVisible();
+
+    /*!
+     * Sets visibility state of scalar bar
+     */
+    void SetBarVisible(in boolean theVisible);
+
   };
 
   //-------------------------------------------------------
@@ -2209,6 +2269,37 @@ module VISU {
      * Get or create %ColoredPrs3dCache object.
      */
     ColoredPrs3dCache GetColoredPrs3dCache(in SALOMEDS::Study theStudy);
+
+    
+    /* Clipping planes management */
+
+    /*Create a clipping plane and return its ID (position in corresponded array) 
+      Id of clipping plane could be changed after deletion of other clipping plane
+    */
+    long CreateClippingPlane(in double X, in double Y, in double Z, 
+                            in double dX, in double dY, in double dZ, 
+                            in boolean auto, in string name);
+    
+    void EditClippingPlane(in long id, in double X, in double Y, in double Z, 
+                            in double dX, in double dY, in double dZ, 
+                            in boolean auto, in string name);
+    
+    /* Returns clipping plane by its Id */
+    ClippingPlane GetClippingPlane(in long id);
+    
+    /* Deletes clipping plane by its Id */
+    boolean DeleteClippingPlane(in long id);
+    
+    /* Applyes a clipping plane with Id to presentation thePrs */
+    boolean ApplyClippingPlane(in Prs3d thePrs, in long id);
+
+    /* Detaches a clipping plane with Id from presentation thePrs */
+    boolean DetachClippingPlane(in Prs3d thePrs, in long id);
+    
+    
+    /* Get number of clipping planes */
+    long GetClippingPlanesNb();
+
   };
 
   /*! \brief %View interface
@@ -2217,8 +2308,8 @@ module VISU {
    * the following types: 3d, Table, XY plot.
    * %View interface is a base for all types of %view interfaces.
    */
-  interface View: Base {
-
+  interface View: Base, SALOME::GenericObj 
+  {
     /*! \brief %ViewRepresentation enumeration
      *
      * displaying part ("ALL" isn't setable)
@@ -2741,6 +2832,8 @@ module VISU {
      */
     void Destroy(in View theView);
   };
+
+
 };
 
 #endif
index 148851d3139cb16220b60237cbcedb840617cf6d..db62fb167c09b962336ac86d617fe1735ad75365 100644 (file)
@@ -27,14 +27,18 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am
 # ===============================================================
 #
 
-dist_salomeres_DATA= \
+dist_salomeres_DATA = \
 ModuleVisu.png \
 SalomeApp.xml \
 sprite_alpha.bmp \
 sprite_texture.bmp \
 Vertex_Program_ARB.txt \
+Visu_actor_selection.png \
 Visu_add.png \
+Visu_apply.png \
 Visu_anim.png \
+Visu_cell_selection.png \
+Visu_close.png \
 VISU.config \
 Visu_cutlines.png \
 Visu_cutplanes.png \
@@ -43,14 +47,18 @@ Visu_deformed.png \
 VISU_en.xml \
 Visu_eraseall.png \
 VISU_fr.xml \
+Visu_gauss_point_selection.png \
 Visu_gauss_points.png \
 Visu_graduated_axes.png \
+Visu_help.png \
 Visu_import_med.png \
 Visu_isosurfaces.png \
 Visu_load_texture.png \
+Visu_ok.png \
 Visu_PlaneSegmentation.png \
 Visu_plot2d.png \
 Visu_plot3d.png \
+Visu_point_selection.png \
 Visu_points.png \
 Visu_recording_pause.png \
 Visu_recording_play.png \
@@ -63,6 +71,9 @@ Visu_scalars_anim.png \
 Visu_scalars.png \
 Visu_scaling.png \
 Visu_selectall.png \
+Visu_selection_panel.png \
+Visu_slider_panel.png \
+Visu_sweep_panel.png \
 Visu_selectionactor.png \
 Visu_selectioncell.png \
 Visu_selectionedge.png \
@@ -110,7 +121,10 @@ Visu_slider_previous.png \
 Visu_slider_play.png \
 Visu_slider_pause.png \
 Visu_slider_next.png \
-Visu_slider_last.png
+Visu_holo_render.png \
+Visu_slider_last.png \
+Visu_DeactivatePlane.png \
+Visu_planemanager.png
 
-EXTRA_DIST+= VISUCatalog.xml.in
-nodist_salomeres_DATA=VISUCatalog.xml
+# VSR: little trick to avoid putting if VISUCatalog.xml to the distribution archive
+nodist_salomeres_SCRIPTS = VISUCatalog.xml
index dfd869d57f1c581e8002b5b50a95ecc7ff4881de..af06b9dd357bbf52092fcaf8e5688d9ea4ca5e64 100644 (file)
     <parameter name="scalar_def_represent"     value="2"/>
     <parameter name="scalar_def_shrink"        value="false"/>
     <parameter name="represent_shading"        value="false"/>
-    <parameter name="scalar_bar_horizontal_height" value="0.05"/>
-    <parameter name="scalar_bar_horizontal_width"  value="0.5" />
-    <parameter name="scalar_bar_horizontal_x" value="0.01"/>
+    <parameter name="feature_edges_angle"      value="30.0"/>
+    <parameter name="show_feature_edges"       value="true"/>
+    <parameter name="show_boundary_edges"      value="false"/>
+    <parameter name="show_manifold_edges"      value="false"/>
+    <parameter name="show_non_manifold_edges"  value="false"/>
+    <parameter name="feature_edges_coloring"   value="false"/>
+    <parameter name="scalar_bar_horizontal_height" value="0.08"/>
+    <parameter name="scalar_bar_horizontal_width"  value="0.8" />
+    <parameter name="scalar_bar_horizontal_x" value="0.1"/>
     <parameter name="scalar_bar_horizontal_y" value="0.01"/>
-    <parameter name="scalar_bar_horizontal_title_height" value="0"/>
-    <parameter name="scalar_bar_horizontal_title_width" value="0"/>
-    <parameter name="scalar_bar_horizontal_label_height" value="0"/>
-    <parameter name="scalar_bar_horizontal_label_width" value="0"/>
+    <parameter name="scalar_bar_horizontal_title_size" value="0"/>
+    <parameter name="scalar_bar_horizontal_label_size" value="0"/>
     <parameter name="scalar_bar_horizontal_bar_height" value="0"/>
     <parameter name="scalar_bar_horizontal_bar_width" value="0"/>
     <parameter name="scalar_bar_label_color"  value="255, 255, 255"/>
-    <parameter name="scalar_bar_label_font"   value="Arial,Bold,Italic,Underline,12"/>
-    <parameter name="scalar_bar_label_format" value="%-#6.3g" />
+    <parameter name="scalar_bar_label_font"   value="Arial,Bold,Italic,Shadow,12"/>
+    <parameter name="scalar_bar_label_precision" value="3" />
     <parameter name="scalar_bar_logarithmic"  value="false"/>
+    <!-- RKV : Begin -->
+    <!-- Do filter by scalars or don't -->
+    <parameter name="scalar_bar_filter_by_scalars"  value="false"/>
+    <!-- Show distribution curve or don't -->
+    <parameter name="scalar_bar_show_distribution"  value="false"/>
+    <!-- RKV : End -->
     <parameter name="scalar_bar_mode"         value="0" />
     <parameter name="scalar_bar_num_colors"   value="64"/>
     <parameter name="scalar_bar_num_labels"   value="5" />
     <parameter name="scalar_bar_orientation"  value="0" />
     <parameter name="scalar_bar_title_color"  value="255, 255, 255"/>
-    <parameter name="scalar_bar_title_font"   value="Arial,Bold,Italic,Underline,12"/>
+    <parameter name="scalar_bar_title_font"   value="Arial,Bold,Italic,Shadow,12"/>
     <parameter name="scalar_bar_display_units"   value="true"/>
-    <parameter name="scalar_bar_vertical_height" value="0.5" />
-    <parameter name="scalar_bar_vertical_width"  value="0.05"/>
+    <parameter name="scalar_bar_vertical_height" value="0.8" />
+    <parameter name="scalar_bar_vertical_width"  value="0.08"/>
     <parameter name="scalar_bar_vertical_x"      value="0.01"/>
-    <parameter name="scalar_bar_vertical_y"      value="0.01"/>
+    <parameter name="scalar_bar_vertical_y"      value="0.1"/>
     <parameter name="scalar_bar_vertical_title_height" value="0"/>
     <parameter name="scalar_bar_vertical_title_width" value="0"/>
     <parameter name="scalar_bar_vertical_label_height" value="0"/>
     <parameter name="picking_pyramid_height"  value="1.0"/>
     <parameter name="picking_selection_color" value="255, 255, 0"/>
     <parameter name="picking_point_tolerance" value="0.01"/>
+    <parameter name="picking_info_window"  value="true" />
     <parameter name="picking_transparency" value="50" />
-    <parameter name="picking_position"     value="0"  />
+    <parameter name="picking_position"     value="1"  />
+    <parameter name="picking_camera_movement"  value="true" />
     <parameter name="picking_zoom_factor"  value="1.5"/>
     <parameter name="picking_step_number"  value="10" />
     <parameter name="picking_display_parent_mesh" value="false" />
     <parameter name="recorder_progressive" value="true" />
     <parameter name="cache_memory_mode"    value="1" />
     <parameter name="cache_memory_limit"   value="512" />
+    <parameter name="values_labeling_color"  value="255, 255, 255"/>
+    <parameter name="values_labeling_font"   value="Arial,Bold,Italic,Shadow,12"/>
   </section>
   <section name="resources">
     <!-- Module resources -->
diff --git a/resources/Visu_cutplane.png b/resources/Visu_cutplane.png
new file mode 100644 (file)
index 0000000..5e92cf6
Binary files /dev/null and b/resources/Visu_cutplane.png differ
index 3953664f9f38c7c85d63d848549c07fe7892a0eb..b6ddf017a6e656dbf7c40dca210b587bda7179df 100644 (file)
@@ -41,6 +41,7 @@ salomeinclude_HEADERS= \
        VISU_Convertor_impl.hxx \
        VISU_ConvertorUtils.hxx \
        VISU_MergeFilter.hxx \
+       VISU_MergeFilterUtilities.hxx \
        VISU_AppendFilter.hxx \
        VISU_AppendPolyData.hxx \
        VISU_AppendFilterUtilities.hxx \
@@ -48,6 +49,7 @@ salomeinclude_HEADERS= \
        VISU_UsedPointsFilter.hxx \
        VISU_CommonCellsFilter.hxx \
        VISUConvertor.hxx \
+       VISU_MedConvertor.hxx \
        VISU_GaussMergeFilter.hxx \
        VISU_TableReader.hxx
 
index e35b3626d2b4597ab2b7c1821dddf03edad3afbc..53911e281677991046f6bbd01d5392e6c6f9c8d8 100644 (file)
@@ -353,11 +353,18 @@ namespace
                   const VISU::PMeshOnEntityImpl& theMeshOnEntity,
                   const VISU::PProfileImpl& theProfile)
   {
+    // rnv fix for issue 19999:
+    // Throw exception in case if mesh on entity from profile is not equal
+    // input mesh on entity. This exception catch in tne VISU_Convertor_impl::GetTimeStampOnMesh
+    // function.
+    if(theProfile->myMeshOnEntity && theProfile->myMeshOnEntity != theMeshOnEntity.get())
+      EXCEPTION(std::runtime_error,"GetMeshOnProfile >> theProfile->myMeshOnEntity != theMeshOnEntity.get()");
+
     if(theProfile->myIsVTKDone)
       return true;
    
-    if(theProfile->myMeshOnEntity && theProfile->myMeshOnEntity != theMeshOnEntity.get())
-      return false;
+    //    if(theProfile->myMeshOnEntity && theProfile->myMeshOnEntity != theMeshOnEntity.get())
+    //      return false;
       
     VISU::TTimerLog aTimerLog(MYDEBUG,"GetMeshOnProfile");
     INITMSG(MYDEBUG,"GetMeshOnProfile - anEntity = "<<theMeshOnEntity->myEntity<<std::endl);
diff --git a/src/CONVERTOR/VISU_ElnoMeshValue.hxx b/src/CONVERTOR/VISU_ElnoMeshValue.hxx
deleted file mode 100644 (file)
index 42e4699..0000000
+++ /dev/null
@@ -1,162 +0,0 @@
-//  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_ElnoMeshValue.hxx
-//  Author : Alexey PETROV
-//  Module : VISU
-
-#ifndef VISU_ElnoMeshValue_HeaderFile
-#define VISU_ElnoMeshValue_HeaderFile
-
-#include "VISU_VTKTypeList.hxx"
-#include <vtkDataSetAttributes.h>
-
-
-/*! 
-  \file VISU_ElnoMeshValue.hxx
-  \brief The file contains declarations for the acess to the specific ELNO MED data
-*/
-
-namespace VISU
-{
-  //---------------------------------------------------------------
-  template< int elno_type >
-  struct TGetElnoNodeData
-  {
-    typedef typename TL::TEnum2VTKArrayType< elno_type >::TResult TVTKDataArray;
-    typedef typename TL::TEnum2VTKBasicType< elno_type >::TResult TDataType;
-    TVTKDataArray *myElnoDataArray;
-    vtkIntArray *myElnoDataMapper;
-    int myElemInfo[3];
-
-
-    //----------------------------------------------------------------------------
-    TGetElnoNodeData( vtkDataArray *theElnoDataArray,
-                     vtkDataArray *theElnoDataMapper )
-      : myElnoDataArray( TVTKDataArray::SafeDownCast( theElnoDataArray ) )
-      , myElnoDataMapper( vtkIntArray::SafeDownCast( theElnoDataMapper ) )
-    {}
-
-
-    //----------------------------------------------------------------------------
-    TDataType*
-    operator () ( vtkIdType theCellId, vtkIdType theLocalPntId )
-    {
-      myElnoDataMapper->GetTupleValue( theCellId, myElemInfo );
-
-      vtkIdType aPos = myElemInfo[ 0 ] + theLocalPntId * myElemInfo[ 1 ];
-
-      return myElnoDataArray->GetPointer( aPos );
-    }
-
-
-    //----------------------------------------------------------------------------
-    int
-    getNbComp()
-    {
-      myElnoDataMapper->GetTupleValue( 0, myElemInfo );
-
-      return myElemInfo[ 1 ];
-    }
-  };
-
-
-  //----------------------------------------------------------------------------------------------
-  template< int elno_type >
-  struct TSetElnoNodeData
-  {
-    typedef typename TL::TEnum2VTKArrayType< elno_type >::TResult TVTKDataArray;
-    typedef typename TL::TEnum2VTKBasicType< elno_type >::TResult TDataType;
-
-    //----------------------------------------------------------------------------------------------
-    TSetElnoNodeData( vtkIdType theEffectNbComp,
-                     vtkIdType theRealNbComp,
-                     vtkIdType theNbTuples,
-                     const char* theDataArrayName,
-                     const char* theMapperArrayName )
-      : myElnoDataArray( TVTKDataArray::New() )
-      , myElnoDataMapper( vtkIntArray::New() )
-    {
-      myElnoDataArray->SetNumberOfComponents( theEffectNbComp );
-      myElnoDataArray->SetNumberOfTuples( theNbTuples );
-      myElnoDataArray->SetName( theDataArrayName );
-
-      myElnoDataMapper->SetNumberOfComponents( 3 );
-      myElnoDataMapper->Allocate( theNbTuples * 3 );
-      myElnoDataMapper->SetName( theMapperArrayName );
-
-      myElemInfo[ 0 ] = 0;
-      myElemInfo[ 1 ] = theRealNbComp;
-      myElemInfo[ 2 ] = 0;
-    }
-
-
-    //----------------------------------------------------------------------------------------------
-    ~TSetElnoNodeData()
-    {
-      myElnoDataArray->Delete();
-      myElnoDataMapper->Delete();
-    }
-
-
-    //----------------------------------------------------------------------------------------------
-    int
-    AddNextPointData( TDataType* theDataPtr )
-    {
-      vtkIdType aPos = myElemInfo[ 0 ] + myElemInfo[ 2 ] * myElemInfo[ 1 ];
-
-      TDataType* aDataPtr = myElnoDataArray->GetPointer( aPos );
-
-      for ( vtkIdType aCompId = 0; aCompId < myElemInfo[ 1 ]; aCompId++ )
-       *aDataPtr++ = *theDataPtr++;
-
-      return myElemInfo[ 2 ]++;
-    }
-
-
-    //----------------------------------------------------------------------------------------------
-    void
-    InsertNextCellData()
-    {
-      myElnoDataMapper->InsertNextTupleValue( myElemInfo );
-      myElemInfo[ 0 ] += myElemInfo[ 2 ] * myElemInfo[ 1 ];
-      myElemInfo[ 2 ] = 0;
-    }
-
-
-    //----------------------------------------------------------------------------------------------
-    void
-    AddData( vtkDataSetAttributes* theDataSetAttributes )
-    {
-      theDataSetAttributes->AddArray( myElnoDataArray );
-      theDataSetAttributes->AddArray( myElnoDataMapper );
-    }
-
-  protected:
-    TVTKDataArray *myElnoDataArray;
-    vtkIntArray *myElnoDataMapper;
-    int myElemInfo[ 3 ];
-  };
-
-
-  //---------------------------------------------------------------
-}
-
-#endif
diff --git a/src/CONVERTOR/VISU_TableReader.cxx b/src/CONVERTOR/VISU_TableReader.cxx
deleted file mode 100644 (file)
index 33676e2..0000000
+++ /dev/null
@@ -1,401 +0,0 @@
-//  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:
-//  Author:
-//  Module : VISU
-
-#include "VISU_TableReader.hxx"
-
-#include <QFileInfo>
-#include <QString>
-#include <QRegExp>
-#include <QFile>
-#include <QStringList>
-
-#include <fstream>
-#include <iostream>
-#include <strstream>
-
-#include <vtkPoints.h>
-#include <vtkDoubleArray.h>
-#include <vtkPointData.h>
-#include <vtkCellData.h>
-#include <vtkPolyData.h>
-
-#include <vtkStructuredGrid.h>
-#include <vtkStructuredGridGeometryFilter.h>
-
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
-
-//---------------------------------------------------------------
-int
-VISU::TTable2D
-::Check()
-{
-  if ( myRows.empty() ) 
-    return 0;
-
-  int iEnd = myRows[0].myValues.size();
-  if ( iEnd == 0 )
-    return 0;
-
-  if ( myColumnTitles.size() != iEnd ) 
-    myColumnTitles.resize( iEnd );
-
-  if ( myColumnUnits.size() != iEnd )
-    myColumnUnits.resize( iEnd );
-
-  int jEnd = myRows.size();
-  for ( int j = 0; j < jEnd; j++ )
-    if ( myRows[j].myValues.size() != iEnd )
-      return 0;
-
-  return 1;
-}
-
-
-//---------------------------------------------------------------
-void
-VISU::TTable2D
-::getColumns(VISU::TTable2D& theTable2D) const
-{
-  TRows& aRows = theTable2D.myRows;
-  aRows.clear();
-  if ( myRows.empty() )
-    return;
-
-  int jEnd = myRows.size();
-
-  //Define Titles & Units
-  theTable2D.myColumnTitles.resize(jEnd);
-  theTable2D.myColumnUnits.resize(jEnd);
-  for ( int j = 0; j < jEnd; j++ ) {
-    theTable2D.myColumnTitles[j] = myRows[j].myTitle;
-    theTable2D.myColumnUnits[j] = myRows[j].myUnit;
-  }
-
-  //Define Rows
-  int iEnd = myRows[0].myValues.size();
-  for ( int i = 0; i < iEnd; i++ ) {
-    TRow aNewRow;
-    aNewRow.myTitle = myColumnTitles[i];
-    aNewRow.myUnit = myColumnUnits[i];
-    aNewRow.myValues.resize(jEnd);
-    for ( int j = 0; j < jEnd; j++ ) {
-      aNewRow.myValues[j] = myRows[j].myValues[i];
-    }
-    aRows.push_back(aNewRow);
-  }
-}
-
-
-//---------------------------------------------------------------
-namespace
-{
-  int getLine( std::ifstream& theStmIn, QString& theString )
-  {
-    char tmp;
-    std::ostrstream aStrOut;
-
-    while ( theStmIn.get( tmp ) ) {
-      aStrOut<<tmp;
-      if ( tmp == '\n' ) 
-       break;
-    }
-
-    aStrOut<<std::ends;
-    theString = aStrOut.str();
-
-    return !theStmIn.eof();
-  }
-}
-
-
-//---------------------------------------------------------------
-void 
-VISU::ImportTables( const char* theFileName, TTableContainer& theContainer )
-{
-  std::ifstream aStmIn;
-  QFileInfo aFileInfo( theFileName );
-  if( !aFileInfo.isFile() || !aFileInfo.isReadable() || !aFileInfo.size() )
-    return;
-
-  aStmIn.open( theFileName );
-  QString aTmp;
-  do {
-    // find beginning of table (tables are separated by empty lines)
-    while( ::getLine( aStmIn, aTmp ) && aTmp.trimmed() == "");
-
-    PTableIDMapper aTableIDMapper( new TTableIDMapper() );
-    TTable2D& aTable2D = *aTableIDMapper;
-    if(MYDEBUG) std::cout << "New table is found" << std::endl;
-
-    while( !aStmIn.eof() && aTmp.trimmed() != "" ){
-      QString data = aTmp.trimmed();
-      QString cmt = "";
-      QString keyword = "";
-      // split string to data and comment (comment starts from '#' symbol)
-      int index = aTmp.indexOf( "#" );
-      if ( index >= 0 ) {
-       data = aTmp.left( index ).trimmed();
-       cmt = aTmp.mid( index+1 ).trimmed();
-      }
-      // if comment is not empty, try to get keyword from it (separated by ':' symbol)
-      if ( !cmt.isEmpty() ) {
-       int index1 = cmt.indexOf( ":" );
-       if ( index1 >= 0 ) {
-         QString tmpstr = cmt.left( index1 ).trimmed();
-         if ( tmpstr == QString( "TITLE" ) ||
-              tmpstr == QString( "COLUMN_TITLES" ) ||
-              tmpstr == QString( "COLUMN_UNITS" ) ||
-              tmpstr == QString( "COMMENT" ) ) {
-           keyword = tmpstr;
-           cmt = cmt.mid( index1+1 ).trimmed();
-         }
-       }
-      }
-      // if data is empty, process only comment
-      if ( data.isEmpty() ) {
-       // if keyword is found, try to process it
-       // elsewise it is a simple comment, just ignore it
-       if ( !keyword.isEmpty() ) {
-         if ( keyword == QString( "TITLE" ) ) {
-           QString title = cmt;
-           if ( aTable2D.myTitle != "" )
-             title = QString( aTable2D.myTitle.c_str() ) + QString( " " ) + title;
-           if(MYDEBUG) std::cout << "...Table TITLE is: " << title.toLatin1().constData() << std::endl;
-           aTable2D.myTitle = title.toLatin1().constData();
-         }
-         else if ( keyword == QString( "COLUMN_TITLES" ) ) {
-           // comment may contain column headers
-           QStringList aStrList = cmt.split( "|", QString::SkipEmptyParts );
-           if(MYDEBUG) std::cout << "...Column TITLES are: ";
-           for ( int i = 0; i < aStrList.count(); i++ ) {
-             QString tmpstr = aStrList[ i ].trimmed();
-             if(MYDEBUG) std::cout << tmpstr.toLatin1().constData() << " ";
-             aTable2D.myColumnTitles.push_back( tmpstr.toLatin1().constData() );
-           }
-           if(MYDEBUG) std::cout << std::endl;
-         }
-         else if ( keyword == QString( "COLUMN_UNITS" ) ) {
-           // comment may contain column units
-           QStringList aStrList = cmt.split( " ", QString::SkipEmptyParts );
-           if(MYDEBUG) std::cout << "...Column UNITS are: ";
-           for ( int i = 0; i < aStrList.count(); i++ ) {
-             QString tmpstr = aStrList[ i ].trimmed();
-             if(MYDEBUG) std::cout << tmpstr.toLatin1().constData() << " ";
-             aTable2D.myColumnUnits.push_back( tmpstr.toLatin1().constData() );
-           }
-           if(MYDEBUG) std::cout << std::endl;
-         }
-         else if ( keyword == QString( "COMMENT" ) ) {
-           // keyword 'COMMENT' processing can be here
-           // currently it is ignored
-           if(MYDEBUG) std::cout << "...COMMENT: " << cmt.toLatin1().constData() << std::endl;
-         }
-       }
-       else {
-         if(MYDEBUG) std::cout << "...comment: " << cmt.toLatin1().constData() << std::endl;
-         // simple comment processing can be here
-         // currently it is ignored
-       }
-      }
-      // if data is not empty, try to process it
-      else {
-       TTable2D::TRow aRow;
-       if(MYDEBUG) std::cout << "...New row is found: " << std::endl;
-       if ( !cmt.isEmpty() ) {
-         aRow.myTitle = cmt.toLatin1().constData();
-         if(MYDEBUG) std::cout << "......ROW TITLE is: " << cmt.toLatin1().constData() << std::endl;
-       }
-       QString datar1 = data.replace(QRegExp("\t"), " ");
-       QStringList aValList = datar1.split( " ", QString::SkipEmptyParts );
-       for ( int i = 0; i < aValList.count(); i++ ) {
-         if ( aValList[i].trimmed() != "" ) {
-           TTable2D::TValue aVal = aValList[i].trimmed().toLatin1().constData();
-           aRow.myValues.push_back( aVal );
-         }
-       }
-       if( aRow.myValues.size() > 0 )
-         aTable2D.myRows.push_back( aRow );
-       // ************** OLD CODE ******************
-       /*
-       TValue aVal;
-       istrstream aStream( data );
-       aStream.precision( STRPRECISION );
-       while( aStream >> aVal ) {
-         aRow.myValues.push_back( aVal );
-       }
-       if( aRow.myValues.size() > 0 )
-         aTable2D.myRows.push_back( aRow );
-       */
-       // ************** OLD CODE ******************
-      }
-      ::getLine( aStmIn, aTmp );
-    }
-    if( aTable2D.Check() ) {
-      if(MYDEBUG) std::cout << "aTable2D is checked OK " << aTable2D.myTitle << std::endl;
-      theContainer.push_back( aTableIDMapper );
-    }
-  } while ( !aStmIn.eof() );
-  aStmIn.close();
-
-  if(MYDEBUG) std::cout << "After close" << std::endl;
-}
-
-
-//---------------------------------------------------------------
-VISU::TTableIDMapper
-::TTableIDMapper():
-  myOutput( vtkPolyData::New() ),
-  myXAxisPosition( -1 )
-{}
-
-VISU::TTableIDMapper
-::~TTableIDMapper()
-{
-  myOutput->Delete();
-}
-
-vtkPolyData*
-VISU::TTableIDMapper
-::GetPolyDataOutput()
-{
-  if ( myXAxisPosition == -1 )
-    SetXAxisPosition( 0 );
-
-  return myOutput;
-}
-
-long unsigned int
-VISU::TTableIDMapper
-::GetMemorySize()
-{
-  return myOutput->GetActualMemorySize() * 1024;
-}
-
-void
-VISU::TTableIDMapper
-::SetXAxisPosition( vtkIdType theAxisPosition )
-{
-  if ( myXAxisPosition == theAxisPosition || !Check() )
-    return;
-
-  myOutput->Initialize();
-
-  if ( !Check() )
-    return;
-
-  TTable2D aTable2D;
-  getColumns( aTable2D );
-  
-  vtkIdType aXSize = aTable2D.myRows[0].myValues.size();
-
-  // It is necessary to decrease the size at 1 take intoa account X axis
-  vtkIdType anYSize = aTable2D.myRows.size() - 1; 
-
-  vtkIdType aNbPoints = aXSize * anYSize;
-
-  std::vector<double> anXAxis(aXSize);
-  const TTable2D::TValues& aValues = aTable2D.myRows[theAxisPosition].myValues;
-  for ( vtkIdType aX = 0; aX < aXSize; aX++ )
-    anXAxis[aX] = atof( aValues[aX].c_str() );
-
-  double aXRange = anXAxis[aXSize - 1] - anXAxis[0];
-  double anYDelta = aXRange / anYSize;
-  std::vector<double> anYAxis(anYSize);
-  for ( vtkIdType anY = 0; anY < anYSize; anY++ )
-    anYAxis[anY] = anY * anYDelta;
-
-  vtkPoints* aPoints = vtkPoints::New();
-  aPoints->SetNumberOfPoints( aNbPoints );
-
-  vtkIntArray *aPointsIDMapper = vtkIntArray::New();
-  aPointsIDMapper->SetName("VISU_POINTS_MAPPER");
-  aPointsIDMapper->SetNumberOfComponents(2);
-  aPointsIDMapper->SetNumberOfTuples(aNbPoints);
-  int *aPointsIDMapperPtr = aPointsIDMapper->GetPointer(0);
-
-  //vtkIntArray *aCellIDMapper = vtkIntArray::New();
-  //aCellIDMapper->SetName("VISU_POINTS_MAPPER");
-  //aCellIDMapper->SetNumberOfComponents(2);
-  //aCellIDMapper->SetNumberOfTuples(aNbPoints);
-  //int *aCellIDMapperPtr = aCellIDMapper->GetPointer(0);
-
-  for ( vtkIdType aY = 0, aPntId = 0; aY < anYSize; aY++ ) {
-    for ( vtkIdType aX = 0; aX < aXSize; aX++, aPntId++ ) {
-      aPoints->SetPoint( aPntId, anXAxis[aX], anYAxis[aY], 0.0 );
-
-      *aPointsIDMapperPtr++ = aPntId;
-      *aPointsIDMapperPtr++ = 0;
-
-      //*aCellIDMapperPtr++ = aPntId;
-      //*aCellIDMapperPtr++ = 0;
-    }
-  }
-
-  std::vector<TValues> anYData;
-  for ( vtkIdType anY = 0; anY < anYSize + 1; anY++ ) {
-    if ( anY == theAxisPosition )
-      continue;
-    anYData.push_back( aTable2D.myRows[anY].myValues );
-  }
-
-  vtkDoubleArray* aScalars = vtkDoubleArray::New();
-  aScalars->SetNumberOfComponents( 1 );
-  aScalars->SetNumberOfTuples( aNbPoints );
-  double *aScalarsPtr = aScalars->GetPointer(0);
-  for ( vtkIdType anY = 0; anY < anYSize; anY++ ) {
-    const TTable2D::TValues& aValues = anYData[anY];
-    for ( vtkIdType aX = 0; aX < aXSize; aX++ ) {
-      double aValue = atof( aValues[aX].c_str() );
-      *aScalarsPtr++ = aValue;
-    }
-  }
-
-  vtkStructuredGrid* aStructuredGrid = vtkStructuredGrid::New();
-  aStructuredGrid->SetPoints( aPoints );
-  aPoints->Delete();
-
-  aStructuredGrid->SetDimensions( aXSize, anYSize, 1 );
-
-  aStructuredGrid->GetPointData()->AddArray( aPointsIDMapper );
-  aPointsIDMapper->Delete();
-
-  //aStructuredGrid->GetCellData()->AddArray( aCellIDMapper );
-  //aCellIDMapper->Delete();
-
-  aStructuredGrid->GetPointData()->SetScalars( aScalars );
-  aScalars->Delete();
-
-  vtkStructuredGridGeometryFilter* aFilter = vtkStructuredGridGeometryFilter::New();
-  aFilter->SetInput( aStructuredGrid );
-  aFilter->Update();
-  myOutput->ShallowCopy( aFilter->GetOutput() );
-  aFilter->Delete();
-}
diff --git a/src/CONVERTOR/VISU_TableReader.hxx b/src/CONVERTOR/VISU_TableReader.hxx
deleted file mode 100644 (file)
index 17082a3..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-//  VISU CONVERTOR :
-//
-//  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_TableReader.hxx
-//  Author : Alexey PETROV
-//  Module : VISU
-
-#ifndef VISU_TableReader_HeaderFile
-#define VISU_TableReader_HeaderFile
-
-/*! 
-  \file VISU_TableReader.hxx
-  \brief The file contains definition of the Table reading functionlity
-*/
-
-#include "VISUConvertor.hxx"
-
-#include "VISU_IDMapper.hxx"
-
-#include <string>
-#include <vector>
-
-namespace VISU
-{
-  //---------------------------------------------------------------
-  struct VISU_CONVERTOR_EXPORT TTable2D 
-  {
-    typedef std::string TValue;
-    typedef std::vector<TValue> TValues;
-    
-    struct TRow
-    {
-      std::string myTitle;
-      std::string myUnit;
-      TValues myValues;
-    };
-    
-    std::string myTitle;
-    std::vector<std::string> myColumnUnits;
-    std::vector<std::string> myColumnTitles;
-    
-    typedef std::vector<TRow> TRows;
-    TRows myRows;
-    
-    int 
-    Check();
-
-    void
-    getColumns( TTable2D& theTable2D ) const;
-  };
-
-
-  //---------------------------------------------------------------
-  class VISU_CONVERTOR_EXPORT TTableIDMapper: 
-    public virtual TPolyDataIDMapper,
-    public virtual TTable2D
-  {
-  public:
-    TTableIDMapper();
-    ~TTableIDMapper();
-    
-    virtual
-    vtkPolyData*
-    GetPolyDataOutput();
-
-    virtual
-    long unsigned int
-    GetMemorySize();
-
-    void
-    SetXAxisPosition( vtkIdType theAxisPosition );
-
-    vtkIdType
-    GetXAxisPosition();
-
-  protected:
-    vtkIdType myXAxisPosition;
-    vtkPolyData* myOutput;
-  };
-  typedef MED::SharedPtr<TTableIDMapper> PTableIDMapper;
-  
-
-  //---------------------------------------------------------------
-  typedef std::vector<PTableIDMapper> TTableContainer;
-  VISU_CONVERTOR_EXPORT 
-    void ImportTables( const char* theFileName, TTableContainer& theContainer );
-
-
-  //---------------------------------------------------------------
-}
-
-#endif
diff --git a/src/CONVERTOR/VISU_VTKTypeList.hxx b/src/CONVERTOR/VISU_VTKTypeList.hxx
deleted file mode 100644 (file)
index f210f65..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-//  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_VTKTypeList.hxx
-//  Author : Oleg UVAROV
-//  Module : VISU
-
-#ifndef VISU_VTKTypeList_HeaderFile
-#define VISU_VTKTypeList_HeaderFile
-
-#include "VISU_TypeList.hxx"
-
-#include <vtkCharArray.h>
-#include <vtkUnsignedCharArray.h>
-#include <vtkShortArray.h>
-#include <vtkUnsignedShortArray.h>
-#include <vtkIntArray.h>
-#include <vtkUnsignedIntArray.h>
-#include <vtkLongArray.h>
-#include <vtkUnsignedLongArray.h> 
-#include <vtkFloatArray.h> 
-#include <vtkDoubleArray.h> 
-
-
-//----------------------------------------------------------------------------
-namespace VISU
-{
-  //----------------------------------------------------------------------------
-  namespace TL
-  {
-    //----------------------------------------------------------------------------
-    typedef TSequence< char, 
-                      unsigned char, 
-                      short, 
-                      unsigned short, 
-                      int, 
-                      unsigned int, 
-                      long, 
-                      unsigned long, 
-                      float, 
-                      double >::TResult TVTKBasicTypeList;
-
-
-    //----------------------------------------------------------------------------
-    typedef TSequence< vtkCharArray, 
-                      vtkUnsignedCharArray, 
-                      vtkShortArray, 
-                      vtkUnsignedShortArray, 
-                      vtkIntArray, 
-                      vtkUnsignedIntArray, 
-                      vtkLongArray, 
-                      vtkUnsignedLongArray, 
-                      vtkFloatArray, 
-                      vtkDoubleArray >::TResult TVTKArrayTypeList;
-
-
-    //----------------------------------------------------------------------------
-    typedef TSequence< TInt2Type< VTK_CHAR >, 
-                      TInt2Type< VTK_UNSIGNED_CHAR >, 
-                      TInt2Type< VTK_SHORT >, 
-                      TInt2Type< VTK_UNSIGNED_SHORT >, 
-                      TInt2Type< VTK_INT >, 
-                      TInt2Type< VTK_UNSIGNED_INT >, 
-                      TInt2Type< VTK_LONG >, 
-                      TInt2Type< VTK_UNSIGNED_LONG >, 
-                      TInt2Type< VTK_FLOAT >, 
-                      TInt2Type< VTK_DOUBLE > >::TResult TVTKBasicEnumList;
-    
-    
-    //----------------------------------------------------------------------------
-    template< unsigned int type_enum >
-    struct TEnum2VTKBasicType
-    {
-      typedef typename TTypeAt< TVTKBasicTypeList, TIndexOf< TVTKBasicEnumList, TInt2Type< type_enum > >::value >::TResult TResult;
-    };
-
-    
-    //----------------------------------------------------------------------------
-    template< unsigned int type_enum >
-    struct TEnum2VTKArrayType
-    {
-      typedef typename TTypeAt< TVTKArrayTypeList, TIndexOf< TVTKBasicEnumList, TInt2Type< type_enum > >::value >::TResult TResult;
-    };
-    
-
-    //----------------------------------------------------------------------------
-    template< class T >
-    struct TVTKBasicType2Enum
-    {
-      typedef typename TTypeAt< TVTKBasicEnumList, TIndexOf< TVTKBasicTypeList, T >::value >::TResult TResult;
-    };
-    
-
-    //----------------------------------------------------------------------------
-  }
-
-
-  //----------------------------------------------------------------------------
-}
-
-#endif
index 452ba6fe45626bf6216aa03efef9dfaa47c5b948..52f9ad77d4791f4630936c59a0e33d26065239db 100644 (file)
@@ -25,6 +25,9 @@
 include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
 lib_LTLIBRARIES= libVISUEngine.la
+
+salomeinclude_HEADERS= VISU_Engine_i.hh
+
 dist_libVISUEngine_la_SOURCES= VISU_Engine_i.cc
 
 libVISUEngine_la_CPPFLAGS= $(KERNEL_CXXFLAGS) $(MED_CXXFLAGS) $(CORBA_CXXFLAGS) $(CORBA_INCLUDES) \
index d857f64495f2cbb3c95d6243c7f6aa5adb4cfa66..2187cce8e7317592f887b1ad9cddce39fabbb576 100644 (file)
@@ -470,4 +470,50 @@ namespace VISU{
   {
     return myVisuGen->GetColoredPrs3dCache(theStudy);
   }
+
+
+
+  CORBA::Long VISU_Gen_i::CreateClippingPlane(CORBA::Double X,CORBA::Double  Y, CORBA::Double Z, 
+                                             CORBA::Double dX, CORBA::Double dY, CORBA::Double dZ, 
+                                             CORBA::Boolean isAuto, const char* name)
+  {
+    return myVisuGen->CreateClippingPlane(X, Y, Z, dX, dY, dZ, isAuto, name);
+  }
+  
+
+  void VISU_Gen_i::EditClippingPlane(CORBA::Long id, CORBA::Double X,CORBA::Double  Y, CORBA::Double Z, 
+                                             CORBA::Double dX, CORBA::Double dY, CORBA::Double dZ, 
+                                             CORBA::Boolean isAuto, const char* name)
+  {
+    myVisuGen->EditClippingPlane(id, X, Y, Z, dX, dY, dZ, isAuto, name);
+  }
+  
+  /* Returns clipping plane by its Id */
+  VISU::ClippingPlane* VISU_Gen_i::GetClippingPlane(CORBA::Long id)
+  {
+    return myVisuGen->GetClippingPlane(id);
+  }
+  
+  /* Deletes clipping plane by its Id */
+  CORBA::Boolean VISU_Gen_i::DeleteClippingPlane(CORBA::Long id)
+  {
+    return myVisuGen->DeleteClippingPlane(id);
+  }
+  
+  /* Applyes a clipping plane with Id to presentation thePrs */
+  CORBA::Boolean VISU_Gen_i::ApplyClippingPlane(Prs3d_ptr thePrs, CORBA::Long id)
+  {
+    return myVisuGen->ApplyClippingPlane(thePrs, id);
+  }
+  
+  CORBA::Boolean VISU_Gen_i::DetachClippingPlane(Prs3d_ptr thePrs, CORBA::Long id)
+  {
+    return myVisuGen->DetachClippingPlane(thePrs, id);
+  }
+  
+  /* Get number of clipping planes */
+  CORBA::Long VISU_Gen_i::GetClippingPlanesNb()
+  {
+    return myVisuGen->GetClippingPlanesNb();
+  }
 };
index 247a1074216ae35a3866a27fecc6738e6f1251f0..df49fb25c92ce477e0e271d88a93bf1848a4a693 100644 (file)
@@ -229,6 +229,31 @@ namespace VISU
     virtual
     VISU::ColoredPrs3dCache_ptr
     GetColoredPrs3dCache(SALOMEDS::Study_ptr theStudy);
+    
+
+
+    virtual CORBA::Long CreateClippingPlane(CORBA::Double X,CORBA::Double  Y, CORBA::Double Z, 
+                                           CORBA::Double dX, CORBA::Double dY, CORBA::Double dZ, 
+                                           CORBA::Boolean isAuto, const char* name);
+
+    virtual void EditClippingPlane(CORBA::Long id, CORBA::Double X,CORBA::Double  Y, CORBA::Double Z, 
+                                  CORBA::Double dX, CORBA::Double dY, CORBA::Double dZ, 
+                                  CORBA::Boolean isAuto, const char* name);
+
+    /* Returns clipping plane by its Id */
+    virtual VISU::ClippingPlane* GetClippingPlane(CORBA::Long id);
+    
+    /* Deletes clipping plane by its Id */
+    virtual CORBA::Boolean DeleteClippingPlane(CORBA::Long id);
+    
+    /* Applyes a clipping plane with Id to presentation thePrs */
+    virtual CORBA::Boolean ApplyClippingPlane(Prs3d_ptr thePrs, CORBA::Long id);
+    
+    /* Detaches a clipping plane with Id from presentation thePrs */
+    virtual CORBA::Boolean DetachClippingPlane(Prs3d_ptr thePrs, CORBA::Long id);
+    
+    /* Get number of clipping planes */
+    virtual CORBA::Long GetClippingPlanesNb();
   };
 };
 
index ff0a14715e03b4d63cdcfc2f68633b92b79ff77b..9c2ed5df6a1c1065053b3fa2b1ac8b3ead91d7fb 100644 (file)
@@ -31,8 +31,10 @@ lib_LTLIBRARIES= libVisuObject.la
 salomeinclude_HEADERS = \
        VISU_BoostSignals.h \
        VISU_ActorFactory.h \
+       VISU_PickingSettings.h \
        VISU_GaussPtsSettings.h \
        VISU_GaussPtsActorFactory.h \
+       VISU_GaussPtsDeviceActor.h \
        VISU_Event.h \
        VISU_Actor.h \
        VISU_DataSetActor.h \
@@ -49,6 +51,7 @@ dist_libVisuObject_la_SOURCES = \
        VISU_DataSetActor.cxx \
        VISU_MeshAct.cxx \
        VISU_ScalarMapAct.cxx \
+       VISU_PickingSettings.cxx \
        VISU_GaussPtsDeviceActor.cxx \
        VISU_GaussPtsSettings.cxx \
        VISU_GaussPtsAct.cxx \
index f4d26b4e3b2316e85f62ecde8e4123b2a56924c0..cb8245af0e25297f4ead1edd7b2d755bf6b3f0a8 100644 (file)
 //  $Header$
 
 #include "VISU_Actor.h"
+
+#include "VISU_PickingSettings.h"
+#include "VISU_GaussPtsDeviceActor.h"
+
 #include "VISU_PipeLine.hxx"
+
+#include "SVTK_Event.h"
+
 #include "VTKViewer_ShrinkFilter.h"
 #include "VTKViewer_GeometryFilter.h"
 #include "VISU_ActorFactory.h"
 #include <vtkPolyData.h>
 #include <vtkUnstructuredGrid.h>
 #include <vtkPassThroughFilter.h>
+#include <vtkFeatureEdges.h>
+#include <vtkActor2D.h>
+#include <vtkMaskPoints.h>
+#include <vtkLabeledDataMapper.h>
+#include <vtkSelectVisiblePoints.h>
+#include <vtkTextProperty.h>
+#include <vtkProperty2D.h>
 
 #include <vtkShrinkFilter.h>
 #include <vtkShrinkPolyData.h>
 #include <vtkGeometryFilter.h>
 #include <vtkObjectFactory.h>
 
+#include <vtkCallbackCommand.h>
+#include <vtkCamera.h>
+#include <vtkRenderWindowInteractor.h>
+
 #include <boost/bind.hpp>
 
 #include "utilities.h"
@@ -83,13 +101,21 @@ static int MYDEBUG = 0;
 //----------------------------------------------------------------------------
 VISU_Actor
 ::VISU_Actor():
+  myEventCallbackCommand(vtkCallbackCommand::New()),
+  myPriority(0.0),
   myIsVTKMapping(false),
   myPrs3d(NULL),
   myIsShrunk(false),
   myIsShrinkable(false),
   myShrinkFilter(VTKViewer_ShrinkFilter::New()),
   myAnnotationMapper(vtkTextMapper::New()),
-  myAnnotationActor(vtkTextActor::New())
+  myAnnotationActor(vtkTextActor::New()),
+  myTextActor(VISU_FramedTextActor::New()),
+  myIsFeatureEdgesAllowed(false),
+  myIsFeatureEdgesEnabled(false),
+  myFeatureEdges(vtkFeatureEdges::New()),
+  myLastSelectionMode(ActorSelection),
+  myIsSubElementsHighlighted(false)
 {
   if(MYDEBUG) MESSAGE("VISU_Actor::VISU_Actor - this = "<<this);
 
@@ -104,6 +130,59 @@ VISU_Actor
 
   myAnnotationActor->Delete();
   myAnnotationActor->SetVisibility(0);
+
+  myTextActor->Delete();
+  myTextActor->SetVisibility(false);
+  myTextActor->SetPickable(false);
+
+  myFeatureEdges->Delete();
+
+  myEventCallbackCommand->Delete();
+  myEventCallbackCommand->SetClientData(this); 
+  myEventCallbackCommand->SetCallback(VISU_Actor::ProcessEvents);
+
+  if( VISU_PickingSettings* aPickingSettings = VISU_PickingSettings::Get() )
+    aPickingSettings->AddObserver(VISU::UpdatePickingSettingsEvent, 
+                                 myEventCallbackCommand.GetPointer(), 
+                                 myPriority);
+                                 
+  //Definition of values labeling pipeline
+
+  myValLblDataSet = vtkUnstructuredGrid::New();
+
+  myValCellCenters = vtkCellCenters::New();
+  myValCellCenters->SetInput(myValLblDataSet);
+
+  myValMaskPoints = vtkMaskPoints::New();
+  myValMaskPoints->SetInput(myValCellCenters->GetOutput());
+  myValMaskPoints->SetOnRatio(1);
+    
+  myValSelectVisiblePoints = vtkSelectVisiblePoints::New();
+  myValSelectVisiblePoints->SetInput(myValMaskPoints->GetOutput());
+  myValSelectVisiblePoints->SelectInvisibleOff();
+  myValSelectVisiblePoints->SetTolerance(0.1);
+    
+  myValLabeledDataMapper = vtkLabeledDataMapper::New();
+  myValLabeledDataMapper->SetInput(myValSelectVisiblePoints->GetOutput());
+  myValLabeledDataMapper->SetLabelFormat("%g");
+  myValLabeledDataMapper->SetLabelModeToLabelScalars();
+    
+  vtkTextProperty* aClsTextProp = vtkTextProperty::New();
+  aClsTextProp->SetFontFamilyToTimes();
+  static int aCellsFontSize = 12;
+  aClsTextProp->SetFontSize(aCellsFontSize);
+  aClsTextProp->SetBold(1);
+  aClsTextProp->SetItalic(0);
+  aClsTextProp->SetShadow(0);
+  myValLabeledDataMapper->SetLabelTextProperty(aClsTextProp);
+  aClsTextProp->Delete();
+    
+  myIsValLabeled = false;
+
+  myValLabels = vtkActor2D::New();
+  myValLabels->SetMapper(myValLabeledDataMapper);
+  myValLabels->GetProperty()->SetColor(0,1,0);
+  myValLabels->SetVisibility( myIsValLabeled );
 }
 
 //----------------------------------------------------------------------------
@@ -119,6 +198,15 @@ VISU_Actor
     SetShrink();
   else
     UnShrink();
+
+  SetFeatureEdgesAllowed(theActor->IsFeatureEdgesAllowed());
+  SetFeatureEdgesEnabled(theActor->IsFeatureEdgesEnabled());
+  SetFeatureEdgesAngle(theActor->GetFeatureEdgesAngle());
+  bool aFeatureEdges = false, aBoundaryEdges = false, aManifoldEdges = false, aNonManifoldEdges = false;
+  theActor->GetFeatureEdgesFlags( aFeatureEdges, aBoundaryEdges, aManifoldEdges, aNonManifoldEdges );
+  SetFeatureEdgesFlags( aFeatureEdges, aBoundaryEdges, aManifoldEdges, aNonManifoldEdges );
+  SetFeatureEdgesColoring(theActor->GetFeatureEdgesColoring());
+
   SetOpacity(theActor->GetOpacity());
   SetLineWidth(theActor->GetLineWidth());
   SetPosition(theActor->GetPosition());
@@ -138,6 +226,15 @@ VISU_Actor
 VISU_Actor
 ::~VISU_Actor()
 {
+  // Deleting of values labeling pipeline
+  myValLblDataSet->Delete();
+  myValLabeledDataMapper->RemoveAllInputs();
+  myValLabeledDataMapper->Delete();
+  myValSelectVisiblePoints->Delete();
+  myValMaskPoints->Delete();
+  myValCellCenters->Delete();
+  myValLabels->Delete();
+
   if(MYDEBUG) MESSAGE("~VISU_Actor() - this = "<<this);
   Superclass::SetProperty(NULL);
   SetDebug(MYVTKDEBUG);
@@ -180,11 +277,12 @@ VISU_Actor
 ::SetPipeLine(VISU_PipeLine* thePipeLine) 
 {
   myPipeLine = thePipeLine;
-  if ( thePipeLine ) {
-    if ( vtkMapper *aMapper = myPipeLine->GetMapper() ) {
-      if ( vtkDataSet *aDataSet = aMapper->GetInput() ) {
-       SetShrinkable( thePipeLine->IsShrinkable() );
-       SetMapperInput( aDataSet );
+  if(thePipeLine){
+    if(vtkMapper *aMapper = myPipeLine->GetMapper()){
+      if(vtkDataSet *aDataSet = aMapper->GetInput()){
+       SetShrinkable(thePipeLine->IsShrinkable());
+       SetFeatureEdgesAllowed(thePipeLine->IsFeatureEdgesAllowed());
+       SetMapperInput(aDataSet);
       }
     }
   }
@@ -213,7 +311,10 @@ VISU_Actor
 { 
   Superclass::SetRepresentation(theMode);
   if(myRepresentation == VTK_POINTS)
+  {
     UnShrink();
+  }
+  SetFeatureEdgesEnabled( theMode == SVTK::Representation::FeatureEdges );
 }
 
 
@@ -282,6 +383,111 @@ VISU_Actor
 }
 
 
+//----------------------------------------------------------------------------
+bool
+VISU_Actor
+::IsFeatureEdgesAllowed() 
+{ 
+  return myIsFeatureEdgesAllowed;
+}
+
+void
+VISU_Actor
+::SetFeatureEdgesAllowed(bool theIsFeatureEdgesAllowed)
+{
+  myIsFeatureEdgesAllowed = theIsFeatureEdgesAllowed;
+}
+
+bool
+VISU_Actor
+::IsFeatureEdgesEnabled()
+{
+  return myIsFeatureEdgesEnabled;
+}
+
+void
+VISU_Actor
+::SetFeatureEdgesEnabled(bool theIsFeatureEdgesEnabled)
+{
+  if ( !myIsFeatureEdgesAllowed || myIsFeatureEdgesEnabled == theIsFeatureEdgesEnabled ) 
+    return;
+
+  if ( vtkPolyData* aPolyData = myPassFilter[ 2 ]->GetPolyDataOutput() )
+  {
+    if( theIsFeatureEdgesEnabled )
+    {
+      myFeatureEdges->SetInput( aPolyData );
+      myPassFilter[ 3 ]->SetInput( myFeatureEdges->GetOutput() );
+      myIsFeatureEdgesEnabled = true;
+    }
+    else
+    {
+      myPassFilter[3]->SetInput( aPolyData );
+      myPassFilter[3]->Modified();
+      myIsFeatureEdgesEnabled = false;
+      Modified();
+    }
+    myIsFeatureEdgesEnabled = theIsFeatureEdgesEnabled;
+  }
+}
+
+vtkFloatingPointType
+VISU_Actor
+::GetFeatureEdgesAngle()
+{
+  return myFeatureEdges->GetFeatureAngle();
+}
+
+void
+VISU_Actor
+::SetFeatureEdgesAngle(vtkFloatingPointType theValue)
+{
+  myFeatureEdges->SetFeatureAngle(theValue);
+  Modified();
+}
+
+void
+VISU_Actor
+::GetFeatureEdgesFlags(bool& theIsFeatureEdges,
+                      bool& theIsBoundaryEdges,
+                      bool& theIsManifoldEdges,
+                      bool& theIsNonManifoldEdges)
+{
+  theIsFeatureEdges = myFeatureEdges->GetFeatureEdges();
+  theIsBoundaryEdges = myFeatureEdges->GetBoundaryEdges();
+  theIsManifoldEdges = myFeatureEdges->GetManifoldEdges();
+  theIsNonManifoldEdges = myFeatureEdges->GetNonManifoldEdges();
+}
+
+void
+VISU_Actor
+::SetFeatureEdgesFlags(bool theIsFeatureEdges,
+                      bool theIsBoundaryEdges,
+                      bool theIsManifoldEdges,
+                      bool theIsNonManifoldEdges)
+{
+  myFeatureEdges->SetFeatureEdges(theIsFeatureEdges);
+  myFeatureEdges->SetBoundaryEdges(theIsBoundaryEdges);
+  myFeatureEdges->SetManifoldEdges(theIsManifoldEdges);
+  myFeatureEdges->SetNonManifoldEdges(theIsNonManifoldEdges);
+  Modified();
+}
+
+bool
+VISU_Actor
+::GetFeatureEdgesColoring()
+{
+  return myFeatureEdges->GetColoring();
+}
+
+void
+VISU_Actor
+::SetFeatureEdgesColoring(bool theIsColoring)
+{
+  myFeatureEdges->SetColoring(theIsColoring);
+  Modified();
+}
+
 //----------------------------------------------------------------------------
 void
 VISU_Actor
@@ -321,6 +527,11 @@ VISU_Actor
 {
   Superclass::AddToRender(theRenderer);
   theRenderer->AddActor(myAnnotationActor.GetPointer());
+  theRenderer->AddActor(myTextActor.GetPointer());
+
+  myValSelectVisiblePoints->SetRenderer( theRenderer );
+  theRenderer->AddActor2D( myValLabels );
+
 }
 
 //==================================================================
@@ -332,10 +543,21 @@ VISU_Actor
 ::RemoveFromRender(vtkRenderer* theRenderer)
 {
   theRenderer->RemoveActor(myAnnotationActor.GetPointer());
+  theRenderer->RemoveActor(myTextActor.GetPointer());
+  theRenderer->RemoveActor(myValLabels);
   Superclass::RemoveFromRender(theRenderer); 
   myDestroySignal(this);
 }
 
+//----------------------------------------------------------------------------
+void 
+VISU_Actor
+::SetVisibility(int theMode)
+{
+  Superclass::SetVisibility( theMode );
+  myValLabels->SetVisibility( myIsValLabeled && theMode );
+}
+
 //----------------------------------------------------------------------------
 void 
 VISU_Actor
@@ -379,6 +601,11 @@ VISU_Actor
     aSize += aDataSet->GetActualMemorySize() * 1024;
   }
 
+  if(IsFeatureEdgesEnabled()){
+    vtkPolyData* aPolyData = myFeatureEdges->GetOutput();
+    aSize += aPolyData->GetActualMemorySize() * 1024;
+  }
+
   return aSize;
 }
 
@@ -449,6 +676,84 @@ VISU_Actor
 //----------------------------------------------------------------------------
 bool
 VISU_Actor
+::isSubElementsHighlighted() 
+{ 
+  return myIsSubElementsHighlighted; 
+}
+
+
+//----------------------------------------------------------------------------
+inline
+void
+ChangeZoom(vtkFloatingPointType theZoomFactor,
+          vtkRenderer* theRenderer,
+          vtkIdType theInitialHasIndex,
+          vtkIdType theCurrentHasIndex)
+{
+  //printf( "VISU_Actor::ChangeZoom( %d, %d )", theInitialHasIndex, theCurrentHasIndex );
+  if(theInitialHasIndex + theCurrentHasIndex == 1){
+    vtkCamera *aCamera = theRenderer->GetActiveCamera();
+
+    double aScale = aCamera->GetParallelScale();
+    if ( !theInitialHasIndex && theCurrentHasIndex ) {
+      //printf( " : +%f", theZoomFactor );
+      aCamera->SetParallelScale( aScale / theZoomFactor );
+    }
+    else {
+      //printf( " : -%f", theZoomFactor );
+      aCamera->SetParallelScale( aScale * theZoomFactor );
+    }
+  }
+  //printf( "\n" );
+}
+
+/*!
+  Updates visibility of the highlight devices  
+*/
+void
+VISU_Actor
+::highlight(bool theIsHighlight)
+{
+  VISU_PickingSettings* aPickingSettings = VISU_PickingSettings::Get();
+
+  bool aShowTextActor = aPickingSettings->GetInfoWindowEnabled();
+  if( theIsHighlight && mySelectionMode != myLastSelectionMode )
+  {
+    if( mySelectionMode == ActorSelection )
+      ResetTextActor();
+    else
+      aShowTextActor = false;
+    myLastSelectionMode = mySelectionMode;
+  }
+
+  myTextActor->SetVisibility( GetVisibility() && theIsHighlight && aShowTextActor );
+
+  bool anInitialHasIndex = isHighlighted();
+  bool aCurrentHasIndex = theIsHighlight;
+
+  if( !theIsHighlight && mySelectionMode == ActorSelection && isSubElementsHighlighted() )
+  {
+    myIsSubElementsHighlighted = false;
+
+    // Zoom
+    if( GetVisibility() && aPickingSettings->GetCameraMovementEnabled() )
+    {
+      vtkFloatingPointType aZoomFactor = aPickingSettings->GetZoomFactor();
+      ChangeZoom(aZoomFactor,
+                GetRenderer(),
+                anInitialHasIndex,
+                aCurrentHasIndex);
+    }
+  }
+
+  Superclass::highlight(theIsHighlight);
+}
+
+/*!
+  To process prehighlight (called from SVTK_InteractorStyle)
+*/
+bool
+VISU_Actor
 ::PreHighlight(vtkInteractorStyle* theInteractorStyle, 
               SVTK_SelectionEvent* theSelectionEvent,
               bool theIsHighlight)
@@ -472,7 +777,7 @@ VISU_Actor
 
       if(myCellPicker->GetActor() != this)
        return false;
-      
+
       vtkIdType aVTKId = myCellPicker->GetCellId();
       if(aVTKId >= 0  && mySelector->IsValid(this,aVTKId,true) && hasIO()){
        vtkIdType anObjId = GetElemObjId(aVTKId);
@@ -513,7 +818,7 @@ VISU_Actor
                          theSelectionEvent->myY, 
                          0.0, 
                          aRenderer);
-      
+
       if(myPointPicker->GetActor() != this)
        return false;
 
@@ -550,3 +855,405 @@ VISU_Actor
 
   return aRet;
 }
+
+void VISU_Actor::RemoveAllClippingPlanes()
+{
+}
+
+vtkIdType VISU_Actor::GetNumberOfClippingPlanes()
+{
+  return 0;
+}
+
+bool VISU_Actor::AddClippingPlane(vtkPlane* thePlane)
+{
+  return false;
+}
+
+vtkPlane* VISU_Actor::GetClippingPlane(vtkIdType theID)
+{
+  return NULL;
+}
+
+vtkImplicitFunctionCollection* VISU_Actor::GetClippingPlanes()
+{
+  return NULL;
+}
+
+//----------------------------------------------------------------------------
+template<class TData> std::string getScalar(TData* theData, int theId)
+{
+  std::ostringstream aStr;
+  if (vtkDataArray *aScalar = theData->GetScalars()){
+    vtkFloatingPointType aVal = aScalar->GetTuple1(theId);
+    aStr << "\nScalar: " << aVal;
+  }
+  return aStr.str();
+}
+
+template<class TData> std::string getVector(TData* theData, int theId)
+{
+  std::ostringstream aStr;
+  if (vtkDataArray *aVector = theData->GetVectors()) {
+    vtkFloatingPointType *aVal = aVector->GetTuple3(theId);
+    aStr << "\nVector: " << "{" << aVal[0] << "; " << aVal[1] << "; " << aVal[2] << "}";
+  }
+  return aStr.str();
+}
+
+/*!
+  To process highlight (called from SVTK_InteractorStyle)
+*/
+bool
+VISU_Actor
+::Highlight(vtkInteractorStyle* theInteractorStyle, 
+           SVTK_SelectionEvent* theSelectionEvent,
+           bool theIsHighlight)
+{
+  return Superclass::Highlight(theInteractorStyle,
+                              theSelectionEvent,
+                              theIsHighlight);
+}
+
+//-------------------------------------------------------------------------
+void
+VISU_Actor
+::Highlight(bool theIsHighlight)
+{
+  Superclass::Highlight(theIsHighlight);
+
+  VISU_PickingSettings* aPickingSettings = VISU_PickingSettings::Get();
+
+  bool anInitialHasIndex = isSubElementsHighlighted() && mySelectionMode != ActorSelection;
+  
+  TColStd_IndexedMapOfInteger aMapIndex;
+  mySelector->GetIndex( getIO(), aMapIndex );
+  bool aCurrentHasIndex = aMapIndex.Extent() == 1;
+
+  myIsSubElementsHighlighted = aCurrentHasIndex;
+
+  bool aFlyTo = false;
+  vtkFloatingPointType aFlyToCoord[3] = { 0.0, 0.0, 0.0 };
+  vtkRenderer *aRenderer = GetRenderer();
+
+  if( theIsHighlight )
+  {
+    vtkDataSet* aDataSet = GetMapper()->GetInput();
+    switch(mySelectionMode)
+    {
+      case ActorSelection:
+      {
+       ResetTextActor();
+       break;
+      }
+      case CellSelection:
+      {
+       if( !aCurrentHasIndex )
+       {
+         myTextActor->SetVisibility(false);
+         break;
+       }
+
+       int anObjId = aMapIndex(1);
+       vtkCellData* aCellData = aDataSet->GetCellData();
+       if(vtkCell* aCell = GetElemCell(anObjId)){
+         vtkPoints* aPts = aCell->GetPoints();
+         if(int aNbPts = aCell->GetNumberOfPoints()){
+           vtkFloatingPointType aCoord[3] = {0.0, 0.0, 0.0};
+           for(int i = 0; i < aNbPts; i++){
+             vtkFloatingPointType *aPntCoord = aPts->GetPoint(i); 
+             aCoord[0] += aPntCoord[0];
+             aCoord[1] += aPntCoord[1];
+             aCoord[2] += aPntCoord[2];
+           }
+
+           aFlyTo = true;
+           aFlyToCoord[0] = aCoord[0] / aNbPts;
+           aFlyToCoord[1] = aCoord[1] / aNbPts;
+           aFlyToCoord[2] = aCoord[2] / aNbPts;
+
+           vtkFloatingPointType aWorldCoord[4] = {aCoord[0]/aNbPts, aCoord[1]/aNbPts, aCoord[2]/aNbPts, 1.0};
+           aRenderer->SetWorldPoint(aWorldCoord);
+           aRenderer->WorldToDisplay();
+           vtkFloatingPointType aSelectionPoint[3];
+           aRenderer->GetDisplayPoint(aSelectionPoint);
+           myTextActor->SetPosition(aSelectionPoint);
+           myTextActor->SetModePosition(aPickingSettings->GetInfoWindowPosition());
+           myTextActor->SetTransparency(aPickingSettings->GetInfoWindowTransparency());
+           myTextActor->SetWorldPoint(aWorldCoord);
+
+           std::ostringstream aStr;
+           aStr << "Cell ID: " << anObjId;
+
+           vtkCell* aCell = GetElemCell(anObjId);
+           int aVTKID = GetElemVTKID(anObjId);
+           if (aCell) {
+             int aNbOfPoints = aCell->GetNumberOfPoints();
+             if ( aNbOfPoints > 0 ) {
+               aStr << getScalar(aCellData, aVTKID);
+               aStr << getVector(aCellData, aVTKID);
+             }
+           }
+
+           std::string aString = aStr.str();
+           myTextActor->SetText(aString.c_str());
+         }
+       }
+       break;
+      }
+      case NodeSelection:
+      { 
+       if( !aCurrentHasIndex )
+       {
+         myTextActor->SetVisibility(false);
+         break;
+       }
+
+       int anObjId = aMapIndex(1);
+       vtkPointData* aPntData = aDataSet->GetPointData();
+       if(vtkFloatingPointType* aCoord = GetNodeCoord(anObjId)){
+         aFlyTo = true;
+         aFlyToCoord[0] = aCoord[0];
+         aFlyToCoord[1] = aCoord[1];
+         aFlyToCoord[2] = aCoord[2];
+
+         vtkFloatingPointType aWorldCoord[4] = {aCoord[0], aCoord[1], aCoord[2], 1.0};
+         aRenderer->SetWorldPoint(aWorldCoord);
+         aRenderer->WorldToDisplay();
+         vtkFloatingPointType aSelectionPoint[3];
+         aRenderer->GetDisplayPoint(aSelectionPoint);
+         myTextActor->SetPosition(aSelectionPoint);
+         myTextActor->SetModePosition(aPickingSettings->GetInfoWindowPosition());
+         myTextActor->SetTransparency(aPickingSettings->GetInfoWindowTransparency());
+         myTextActor->SetWorldPoint(aWorldCoord);
+
+         std::ostringstream aStr;
+         aStr << "Point ID: " << anObjId;
+
+         int aVTKID = GetNodeVTKID(anObjId);
+         if(aVTKID >= 0) {
+           aStr << getScalar(aPntData, aVTKID);
+           aStr << getVector(aPntData, aVTKID);
+         }
+
+         const VISU::PIDMapper& aMapper = GetPipeLine()->GetIDMapper();
+         //VISU::TIdTypeVector aVec = aMapper->GetIndexesOfNode(anObjId);
+         VISU::TStructuredId aVec = aMapper->GetIndexesOfNode(anObjId);
+
+         aStr << "\nCoordinates: " << "[";
+         aStr << aCoord[0];
+         //if( aVec.size() > 0 )
+         if (aVec[0] != -1)
+           aStr << " (" << aVec[0] << ")";
+         aStr << "; ";
+
+         aStr << aCoord[1];
+         //if( aVec.size() > 1 )
+         if (aVec[1] != -1)
+           aStr << " (" << aVec[1] << ")";
+         aStr << "; ";
+
+         aStr << aCoord[2];
+         //if( aVec.size() > 2 )
+         if (aVec[2] != -1)
+           aStr << " (" << aVec[2] << ")";
+         aStr << "]";
+
+         std::string aString = aStr.str();
+         myTextActor->SetText(aString.c_str());
+       }
+       break;
+      }
+      case EdgeOfCellSelection:
+       break;
+      default:
+       break;
+    }
+  }
+
+  // Zoom
+  if( GetVisibility() && aPickingSettings->GetCameraMovementEnabled() )
+  {
+    vtkFloatingPointType aZoomFactor = aPickingSettings->GetZoomFactor();
+    ChangeZoom(aZoomFactor,
+              GetRenderer(),
+              anInitialHasIndex,
+              aCurrentHasIndex);
+  }
+
+  // FlyTo
+  if( GetVisibility() && aPickingSettings->GetCameraMovementEnabled() && aFlyTo )
+  {
+    vtkRenderWindowInteractor* anInteractor = myInteractor;
+    vtkFloatingPointType aDollyWas = anInteractor->GetDolly();
+    int aNumberOfFlyFramesWas = anInteractor->GetNumberOfFlyFrames();
+  
+    anInteractor->SetDolly(0.0);
+    anInteractor->SetNumberOfFlyFrames(aPickingSettings->GetStepNumber());
+    anInteractor->FlyTo(aRenderer, aFlyToCoord);
+    aRenderer->ResetCameraClippingRange();
+    anInteractor->SetDolly(aDollyWas);
+    anInteractor->SetNumberOfFlyFrames(aNumberOfFlyFramesWas);
+    anInteractor->InvokeEvent(SVTK::ChangeRotationPoint, aFlyToCoord);
+  }
+}
+
+//-------------------------------------------------------------------------
+void
+VISU_Actor
+::ResetTextActor()
+{
+  VISU_PickingSettings* aPickingSettings = VISU_PickingSettings::Get();
+
+  vtkFloatingPointType aCoord[6];
+  GetBounds(aCoord);
+
+  vtkFloatingPointType aWorldCoord[4] = { ( aCoord[0] + aCoord[1] ) / 2,
+                                         ( aCoord[2] + aCoord[3] ) / 2,
+                                         ( aCoord[4] + aCoord[5] ) / 2, 1.0};
+  vtkRenderer* aRenderer = GetRenderer();
+  aRenderer->SetWorldPoint(aWorldCoord);
+  aRenderer->WorldToDisplay();
+  vtkFloatingPointType aSelectionPoint[3];
+  aRenderer->GetDisplayPoint(aSelectionPoint);
+  myTextActor->SetPosition(aSelectionPoint);
+  myTextActor->SetModePosition(aPickingSettings->GetInfoWindowPosition());
+  myTextActor->SetTransparency(aPickingSettings->GetInfoWindowTransparency());
+  myTextActor->SetWorldPoint(aWorldCoord);
+
+  std::ostringstream aStr;
+  /*
+  if( const char* aName = getName() )
+    aStr << aName << "\n";
+  */
+  aStr << "Position: " << "[" << aCoord[0] << "; " << aCoord[2] << "; " << aCoord[4] << "]";
+  aStr << "\nSize: " << "[" <<
+    fabs(aCoord[1]-aCoord[0]) << "; " <<
+    fabs(aCoord[3]-aCoord[2]) << "; " <<
+    fabs(aCoord[5]-aCoord[4]) << "]";
+
+  std::string aString = aStr.str();
+  myTextActor->SetText(aString.c_str());
+}
+
+//-------------------------------------------------------------------------
+void 
+VISU_Actor
+::ProcessEvents(vtkObject* vtkNotUsed(theObject), 
+               unsigned long theEvent,
+               void* theClientData, 
+               void* vtkNotUsed(theCallData))
+{
+  if(vtkObject* anObject = reinterpret_cast<vtkObject*>(theClientData))
+    if(VISU_Actor* self = dynamic_cast<VISU_Actor*>(anObject)) {
+      if(theEvent == VISU::UpdatePickingSettingsEvent)
+       self->UpdatePickingSettings();
+    }
+}
+
+//----------------------------------------------------------------------------
+void
+VISU_Actor
+::UpdatePickingSettings()
+{
+  //printf( "VISU_Actor::UpdatePickingSettings()\n" );
+  VISU_PickingSettings* aPickingSettings = VISU_PickingSettings::Get();
+  if( !aPickingSettings )
+    return;
+
+  myTextActor->SetModePosition(aPickingSettings->GetInfoWindowPosition());
+  myTextActor->SetTransparency(aPickingSettings->GetInfoWindowTransparency());
+
+  Highlight(isHighlighted());
+
+  Update();
+}
+
+// ---------------------------------------------------------------
+
+void VISU_Actor::SetValuesLabeled( const bool theIsValLabeled )
+{
+  vtkDataSet* aGrid = GetValLabelsInput();
+  if ( !aGrid )
+    return;
+  
+  bool isOnPnt = VISU::IsDataOnPoints( aGrid );
+  bool isOnCell = VISU::IsDataOnCells( aGrid );
+  if ( !isOnPnt && !isOnCell )
+  {
+    // try to specify location of scalars "manually"
+    vtkCellData* aCData = aGrid->GetCellData();
+    if ( aCData )
+    {
+      vtkDataArray* anArr = aCData->GetScalars();
+      if ( anArr && anArr->GetNumberOfTuples() )
+        isOnCell = true;
+    }
+
+    if ( !isOnCell )
+    {
+      vtkPointData* aPData = aGrid->GetPointData();
+      if ( aPData )
+      {
+        vtkDataArray* anArr = aPData->GetScalars();
+        if ( anArr && anArr->GetNumberOfTuples() )
+          isOnPnt = true;
+      }
+    }
+
+    if ( !isOnPnt && !isOnCell )
+    {
+      myValLabels->SetVisibility( false );
+      return;
+    }
+  }
+  
+  myIsValLabeled = theIsValLabeled;
+
+  if ( myIsValLabeled )
+  {
+    vtkDataSet* aDataSet = aGrid;
+
+    if ( isOnCell )
+    {
+      myValCellCenters->SetInput( aDataSet );
+      myValMaskPoints->SetInput( myValCellCenters->GetOutput() );
+    }
+    else if ( isOnPnt )
+      myValMaskPoints->SetInput( aDataSet );
+
+    myValLabels->SetVisibility( GetVisibility() );
+  }
+  else
+    myValLabels->SetVisibility( false );
+  
+  Modified();
+}
+
+//----------------------------------------------------------------------------
+
+bool VISU_Actor::GetValuesLabeled() const
+{
+  return myIsValLabeled;
+}
+
+//----------------------------------------------------------------------------
+
+vtkTextProperty* VISU_Actor::GetsValLabelsProps() const
+{
+  return myValLabeledDataMapper->GetLabelTextProperty();  
+}
+
+//----------------------------------------------------------------------------
+
+vtkDataSet* VISU_Actor::GetValLabelsInput()
+{
+  vtkDataSet* aDataSet = 0;
+  VISU_PipeLine* aPL = GetPipeLine();
+  if ( aPL )
+    aDataSet = aPL->GetOutput();
+  if ( !aDataSet )
+    aDataSet = GetInput();
+  return aDataSet;
+}
+
index d1c36b8c223e4d92422fe9d0c07c630d639dcb5a..69fcf141420a76d59cad98e4a2409a9ca69dd315 100644 (file)
@@ -43,8 +43,20 @@ class vtkProperty;
 class vtkTextMapper;
 class vtkTextActor;
 class vtkInteractorStyle;
+class vtkCallbackCommand;
 class VTKViewer_ShrinkFilter;
 class VISU_PipeLine;
+class vtkPlane;
+class vtkImplicitFunctionCollection;
+class vtkFeatureEdges;
+class vtkTextProperty;
+class vtkCellCenters;
+class vtkSelectVisiblePoints;
+class vtkLabeledDataMapper;
+class vtkMaskPoints;
+class vtkActor2D;
+
+class VISU_FramedTextActor;
 
 #ifdef _WIN32
 #define VTKOCC_EXPORT __declspec (dllexport)
@@ -57,6 +69,7 @@ namespace SVTK
   namespace Representation
   {
     const Type Surfaceframe = Insideframe + 1;
+    const Type FeatureEdges = Insideframe + 2;
   }
 }
 
@@ -100,6 +113,10 @@ class VTKOCC_EXPORT VISU_Actor : public VISU_ActorBase
   virtual
   void
   RemoveFromRender();
+  
+  virtual
+  void
+  SetVisibility(int theMode);
 
   //----------------------------------------------------------------------------
   virtual
@@ -144,6 +161,53 @@ class VTKOCC_EXPORT VISU_Actor : public VISU_ActorBase
   vtkFloatingPointType
   GetShrinkFactor();
 
+  //----------------------------------------------------------------------------
+  virtual
+  bool
+  IsFeatureEdgesAllowed();
+
+  virtual
+  void
+  SetFeatureEdgesAllowed(bool theIsFeatureEdgesAllowed);
+
+  virtual
+  bool
+  IsFeatureEdgesEnabled();
+
+  virtual
+  void
+  SetFeatureEdgesEnabled(bool theIsFeatureEdgesEnabled);
+
+  virtual
+  vtkFloatingPointType
+  GetFeatureEdgesAngle();
+
+  virtual
+  void
+  SetFeatureEdgesAngle(vtkFloatingPointType theAngle = 30.0); 
+
+  virtual
+  void
+  GetFeatureEdgesFlags(bool& theIsFeatureEdges,
+                      bool& theIsBoundaryEdges,
+                      bool& theIsManifoldEdges,
+                      bool& theIsNonManifoldEdges);
+
+  virtual
+  void
+  SetFeatureEdgesFlags(bool theIsFeatureEdges,
+                      bool theIsBoundaryEdges,
+                      bool theIsManifoldEdges,
+                      bool theIsNonManifoldEdges);
+
+  virtual
+  bool
+  GetFeatureEdgesColoring();
+
+  virtual
+  void
+  SetFeatureEdgesColoring(bool theIsColoring);
+
   //----------------------------------------------------------------------------
   virtual
   void
@@ -171,12 +235,30 @@ class VTKOCC_EXPORT VISU_Actor : public VISU_ActorBase
   RemoveFromRender( vtkRenderer* );
 
   //----------------------------------------------------------------------------
+  //! Just to update visibility of the highlight devices
+  virtual
+  void
+  highlight(bool theHighlight);  
+
+  //! To process prehighlight (called from #SVTK_InteractorStyle)
   virtual
   bool
   PreHighlight(vtkInteractorStyle* theInteractorStyle, 
               SVTK_SelectionEvent* theSelectionEvent,
               bool theIsHighlight);
 
+  //! To process highlight (called from #SVTK_InteractorStyle)
+  virtual
+  bool
+  Highlight(vtkInteractorStyle* theInteractorStyle, 
+           SVTK_SelectionEvent* theSelectionEvent,
+           bool theIsHighlight);
+
+  //! Internal highlight.
+  virtual
+  void
+  Highlight(bool theIsHighlight);
+
   virtual
   void 
   SetVTKMapping(bool theIsVTKMapping); 
@@ -220,6 +302,38 @@ class VTKOCC_EXPORT VISU_Actor : public VISU_ActorBase
   GetElemCell(vtkIdType theObjID);
 
   //----------------------------------------------------------------------------
+  virtual void RemoveAllClippingPlanes();
+
+  virtual vtkIdType GetNumberOfClippingPlanes();
+
+  virtual bool AddClippingPlane(vtkPlane* thePlane);
+
+  virtual vtkPlane* GetClippingPlane(vtkIdType theID);
+
+  virtual vtkImplicitFunctionCollection* GetClippingPlanes();
+
+  //----------------------------------------------------------------------------
+  //! Apply the picking settings on the actor.
+  void
+  UpdatePickingSettings();
+
+  //----------------------------------------------------------------------------
+  //! Methods for values labeling
+  virtual 
+  void 
+  SetValuesLabeled( const bool theIsValLabeled );
+
+  virtual 
+  bool 
+  GetValuesLabeled() const;
+
+  virtual
+  vtkDataSet*
+  GetValLabelsInput();
+
+  vtkTextProperty* 
+  GetsValLabelsProps() const;
+  
  protected:
   VISU_Actor();
 
@@ -235,6 +349,28 @@ class VTKOCC_EXPORT VISU_Actor : public VISU_ActorBase
   GetCurrentPL();
 
   //----------------------------------------------------------------------------
+  bool
+  isSubElementsHighlighted();
+
+  //----------------------------------------------------------------------------
+  vtkSmartPointer<vtkCallbackCommand> myEventCallbackCommand;
+
+  //! Main process VTK event method
+  static
+  void
+  ProcessEvents(vtkObject* theObject, 
+               unsigned long theEvent,
+               void* theClientData, 
+               void* theCallData);
+
+  //----------------------------------------------------------------------------
+ private:
+  void
+  ResetTextActor();
+
+  //----------------------------------------------------------------------------
+ protected:
+  vtkFloatingPointType myPriority;
   bool myIsVTKMapping;
   VISU::Prs3d_i* myPrs3d;
   vtkSmartPointer<VISU_PipeLine> myPipeLine;
@@ -245,6 +381,24 @@ class VTKOCC_EXPORT VISU_Actor : public VISU_ActorBase
 
   vtkSmartPointer<vtkTextMapper> myAnnotationMapper;
   vtkSmartPointer<vtkTextActor>  myAnnotationActor;
+
+  vtkSmartPointer<VISU_FramedTextActor> myTextActor;
+
+  vtkSmartPointer<vtkFeatureEdges> myFeatureEdges;
+  bool myIsFeatureEdgesAllowed;
+  bool myIsFeatureEdgesEnabled;
+
+  Selection_Mode myLastSelectionMode;
+  bool myIsSubElementsHighlighted;
+  
+  // fields for values labeling
+  bool                    myIsValLabeled;
+  vtkDataSet*             myValLblDataSet;
+  vtkActor2D*             myValLabels;
+  vtkMaskPoints*          myValMaskPoints;
+  vtkCellCenters*         myValCellCenters;
+  vtkLabeledDataMapper*   myValLabeledDataMapper;
+  vtkSelectVisiblePoints* myValSelectVisiblePoints;
 };
 
 #endif //VISU_ACTOR_H
diff --git a/src/OBJECT/VISU_ActorBase.cxx b/src/OBJECT/VISU_ActorBase.cxx
deleted file mode 100644 (file)
index c794a7d..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-//  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   : 
-//  Author : 
-//  Module : VISU
-//  $Header$
-
-#include "VISU_ActorBase.h"
-#include "VISU_ActorFactory.h"
-#include "VTKViewer_ShrinkFilter.h"
-
-#include <vtkObjectFactory.h>
-#include <vtkProperty.h>
-#include <vtkPassThroughFilter.h>
-#include <vtkShrinkFilter.h>
-#include <vtkDataSet.h>
-#include <vtkShrinkPolyData.h>
-#include <vtkUnstructuredGrid.h>
-
-#include "utilities.h"
-
-#include <boost/bind.hpp>
-
-VISU_ActorBase
-::VISU_ActorBase() :
-  myIsShrinkable(true),
-  myIsShrunk(false),
-  myShrinkFilter(VTKViewer_ShrinkFilter::New())
-{
-  myShrinkFilter->Delete();
-  
-  myStoreMapping = true;
-  
-  myShrinkFilter->SetStoreMapping(true);
-}
-
-VISU_ActorBase
-::~VISU_ActorBase()
-{
-
-}
-
-//----------------------------------------------------------------------------
-VISU::TActorFactory* 
-VISU_ActorBase
-::GetFactory()
-{ 
-  return myActorFactory;
-}
-
-void
-VISU_ActorBase
-::SetFactory(VISU::TActorFactory* theActorFactory)
-{ 
-  using namespace VISU;
-
-  if(myActorFactory == theActorFactory)
-    return;
-  
-  if(theActorFactory)
-     myDestroySignal.connect(boost::bind(&TActorFactory::RemoveActor,
-                                        theActorFactory,
-                                        _1));
-
-  myActorFactory = theActorFactory;
-}
-
-void
-VISU_ActorBase
-::UpdateFromFactory()
-{
-  if(myUpdateFromFactoryTime.GetMTime() < myActorFactory->GetMTime()){
-    myUpdateFromFactoryTime.Modified();
-    myActorFactory->UpdateActor(this);
-    Update();
-  }
-}
-
-//--------------------------------------------------------------------------
-
-void
-VISU_ActorBase
-::SetLineWidth(vtkFloatingPointType theLineWidth)
-{
-  GetProperty()->SetLineWidth(theLineWidth);
-}
-
-vtkFloatingPointType
-VISU_ActorBase
-::GetLineWidth()
-{
-  return GetProperty()->GetLineWidth();
-}
-
-//--------------------------------------------------------------------------
-void
-VISU_ActorBase
-::SetRepresentation(int theMode) 
-{ 
-  Superclass::SetRepresentation(theMode);
-  if(myRepresentation == VTK_POINTS)
-    UnShrink();
-}
-
-//----------------------------------------------------------------------------
-void VISU_ActorBase::SetShrink()
-{
-  if(!myIsShrinkable) 
-    return;
-  if(vtkDataSet* aDataSet = myPassFilter[0]->GetOutput()){
-    myShrinkFilter->SetInput(aDataSet);
-    myPassFilter[1]->SetInput(myShrinkFilter->GetOutput());
-    myIsShrunk = true;
-  }
-}
-
-void VISU_ActorBase::UnShrink()
-{
-  if(!myIsShrunk) 
-    return;
-  if(vtkDataSet* aDataSet = myPassFilter[0]->GetOutput()){
-    myPassFilter[1]->SetInput(aDataSet);
-    myPassFilter[1]->Modified();
-    myIsShrunk = false;
-    Modified();
-  }
-}
-
-bool VISU_ActorBase::IsShrunk()
-{
-  return myIsShrunk;
-}
-
-void VISU_ActorBase::SetShrinkable(bool theIsShrinkable)
-{
-  myIsShrinkable = theIsShrinkable;
-}
-
-bool VISU_ActorBase::IsShrunkable() 
-{ 
-  return myIsShrinkable;
-}
diff --git a/src/OBJECT/VISU_ActorBase.h b/src/OBJECT/VISU_ActorBase.h
deleted file mode 100644 (file)
index 2b9e414..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-//  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   : 
-//  Author : 
-//  Module : VISU
-//  $Header$
-
-#ifndef VISU_ACTOR_BASE_H
-#define VISU_ACTOR_BASE_H
-
-#include "SALOME_Actor.h"
-#include "VISU_BoostSignals.h"
-
-class VTKViewer_ShrinkFilter;
-
-#ifdef _WIN32
-#define VTKOCC_EXPORT __declspec (dllexport)
-#else
-#define VTKOCC_EXPORT VTK_EXPORT
-#endif
-
-
-//----------------------------------------------------------------------------
-namespace VISU 
-{ 
-  struct TActorFactory;
-}
-
-
-//! This class defines an abstaract interface to manage actors
-class VTKOCC_EXPORT VISU_ActorBase: public SALOME_Actor,
-                                    public boost::signalslib::trackable
-{
- public:
-  vtkTypeMacro(VISU_ActorBase, SALOME_Actor);
-
-  //----------------------------------------------------------------------------
-  VISU::TActorFactory* GetFactory();
-  virtual void SetFactory(VISU::TActorFactory* theActorFactory);
-  
-  //----------------------------------------------------------------------------
-  virtual void UpdateFromFactory();
-
-  //----------------------------------------------------------------------------
-
-  virtual void SetLineWidth(vtkFloatingPointType theLineWidth);
-  virtual vtkFloatingPointType GetLineWidth();
-
-  virtual void SetShrink();
-  virtual void UnShrink(); 
-  virtual bool IsShrunkable();
-  virtual bool IsShrunk();
-  virtual void SetShrinkable(bool theIsShrinkable);
-  
-  virtual void SetRepresentation(int theMode);
-
- protected:
-  VISU_ActorBase();
-  virtual  ~VISU_ActorBase();
-
-  VISU::TActorFactory*                 myActorFactory;
-  vtkTimeStamp                         myUpdateFromFactoryTime;
-  boost::signal1<void,VISU_ActorBase*> myDestroySignal;
-
-  vtkSmartPointer<VTKViewer_ShrinkFilter> myShrinkFilter;
-
-  bool myIsShrinkable;
-  bool myIsShrunk;
-};
-
-#endif //VISU_ACTOR_BASE_H
index 1b282c013ca792240c910e50a56103c980614bf3..dbdb25ec1ce8fb4e627013ffcdbb5b091286a7d4 100644 (file)
 
 #include <vtkDataSetMapper.h>
 #include <vtkObjectFactory.h>
+#include <vtkImplicitBoolean.h>
+#include <SALOME_ExtractGeometry.h>
+#include <SALOME_ExtractPolyDataGeometry.h>
+#include <vtkImplicitFunctionCollection.h>
+#include <vtkPlane.h>
 
 #include <boost/bind.hpp>
 
@@ -48,11 +53,24 @@ vtkStandardNewMacro(VISU_DataSetActor);
 //----------------------------------------------------------------------------
 VISU_DataSetActor
 ::VISU_DataSetActor():
-  myMapper(vtkDataSetMapper::New())
+  myMapper(vtkDataSetMapper::New()),
+  myExtractor(SALOME_ExtractGeometry::New()),
+  myPolyDataExtractor(SALOME_ExtractPolyDataGeometry::New()),
+  myFunction(vtkImplicitBoolean::New())
 {
   if(MYDEBUG) MESSAGE("VISU_DataSetActor::VISU_DataSetActor - this = "<<this);
 
+  myExtractor->SetImplicitFunction(myFunction);
+  myPolyDataExtractor->SetImplicitFunction(myFunction);
+  //myExtractor->ExtractBoundaryCellsOn();
+  //myPolyDataExtractor->ExtractBoundaryCellsOn();
+
+  myFunction->SetOperationTypeToIntersection();
+
   myMapper->Delete();
+  myExtractor->Delete();
+  myPolyDataExtractor->Delete();
+  myFunction->Delete();
 }
 
 //----------------------------------------------------------------------------
@@ -71,9 +89,8 @@ VISU_DataSetActor
 
   if(VISU_UnstructuredGridPL* aPipeLine = dynamic_cast<VISU_UnstructuredGridPL*>(thePipeLine)){
     vtkDataSetMapper* aTarget = GetDataSetMapper();
-    vtkDataSetMapper* aSource = aPipeLine->GetDataSetMapper();
+    vtkDataSetMapper* aSource = aPipeLine->GetDataSetMapper();    
     VISU::CopyDataSetMapper(aTarget, aSource, true);
-    aTarget->SetLookupTable(aSource->GetLookupTable());
   }
 }
 
@@ -82,14 +99,67 @@ void
 VISU_DataSetActor
 ::SetMapperInput(vtkDataSet* theDataSet) 
 {
-  myMapper->SetInput(theDataSet);
+  if (theDataSet->IsA("vtkPolyData")) {
+    myPolyDataExtractor->SetInput(theDataSet);
+    myMapper->SetInput(myPolyDataExtractor->GetOutput());
+  } else {
+    myExtractor->SetInput(theDataSet);
+    myMapper->SetInput(myExtractor->GetOutput());
+  }
+  //  myMapper->SetInput(theDataSet);
   SetMapper(myMapper.GetPointer());
 }
 
 //----------------------------------------------------------------------------
-vtkDataSetMapper* 
-VISU_DataSetActor
-::GetDataSetMapper()
+vtkDataSetMapper* VISU_DataSetActor::GetDataSetMapper()
 {
   return myMapper.GetPointer();
 }
+
+//----------------------------------------------------------------------------
+void VISU_DataSetActor::RemoveAllClippingPlanes()
+{
+  myFunction->GetFunction()->RemoveAllItems();
+  myFunction->Modified();
+}
+
+//----------------------------------------------------------------------------
+vtkIdType VISU_DataSetActor::GetNumberOfClippingPlanes()
+{
+  return myFunction->GetFunction()->GetNumberOfItems();
+}
+
+//----------------------------------------------------------------------------
+bool VISU_DataSetActor::AddClippingPlane(vtkPlane* thePlane)
+{
+  vtkImplicitFunctionCollection* aFunctions = GetClippingPlanes();
+  aFunctions->InitTraversal();
+  vtkImplicitFunction* aItem;
+  while ((aItem = aFunctions->GetNextItem())) {
+    if (thePlane == aItem)
+      return false;
+  }
+  myFunction->AddFunction(thePlane);
+  return true;
+}
+
+//----------------------------------------------------------------------------
+vtkPlane* VISU_DataSetActor::GetClippingPlane(vtkIdType theID)
+{
+  vtkPlane* aPlane = NULL;
+  if ((theID >= 0) && (theID < GetNumberOfClippingPlanes())) {
+    vtkImplicitFunctionCollection* aFunction = myFunction->GetFunction();
+    vtkImplicitFunction* aFun = NULL;
+    aFunction->InitTraversal();
+    for (vtkIdType i = 0; i <= theID; i++)
+      aFun = aFunction->GetNextItem();
+    aPlane = dynamic_cast<vtkPlane*>(aFun);
+  }
+  return aPlane;
+}
+  
+//----------------------------------------------------------------------------
+vtkImplicitFunctionCollection* VISU_DataSetActor::GetClippingPlanes()
+{
+  return myFunction->GetFunction();
+}
index 9e7ef4573faf65264405be47e04dbda4700dee58..4af55e3e71ce480e593ea93dcf967e373e25aaeb 100644 (file)
 #include "VISU_Actor.h"
 
 class vtkDataSetMapper;
+class SALOME_ExtractGeometry;
+class SALOME_ExtractPolyDataGeometry;
+class vtkImplicitBoolean;
+class vtkImplicitFunctionCollection;
 
 #ifdef _WIN_32
 #define VTKOCC_EXPORT __declspec (dllexport)
@@ -56,6 +60,17 @@ class VTKOCC_EXPORT VISU_DataSetActor : public VISU_Actor
   vtkDataSetMapper* 
   GetDataSetMapper();
 
+  //----------------------------------------------------------------------------
+  virtual void RemoveAllClippingPlanes();
+
+  virtual vtkIdType GetNumberOfClippingPlanes();
+
+  virtual bool AddClippingPlane(vtkPlane* thePlane);
+
+  virtual vtkPlane* GetClippingPlane(vtkIdType theID);
+
+  virtual vtkImplicitFunctionCollection* GetClippingPlanes();
+
   //----------------------------------------------------------------------------
  protected:
   VISU_DataSetActor();
@@ -69,6 +84,9 @@ class VTKOCC_EXPORT VISU_DataSetActor : public VISU_Actor
 
   //----------------------------------------------------------------------------
   vtkSmartPointer<vtkDataSetMapper> myMapper;
+  vtkSmartPointer<SALOME_ExtractGeometry> myExtractor;
+  vtkSmartPointer<SALOME_ExtractPolyDataGeometry> myPolyDataExtractor;
+  vtkSmartPointer<vtkImplicitBoolean> myFunction;
 };
 
 #endif //VISU_DATASETACTOR_H
index 04837dc4b4b9efc12905a57f6f5c5534632fafd2..e46d2a639341eeb9b357c27692c613ebb2f5922c 100644 (file)
@@ -30,6 +30,7 @@
 #include "VISU_GaussPointsPL.hxx"
 #include "VISU_GaussPtsSettings.h"
 #include "VISU_GaussPtsDeviceActor.h"
+#include "VISU_PickingSettings.h"
 #include "VISU_WidgetCtrl.hxx"
 #include "VISU_SphereWidget.hxx"
 #include "VISU_OpenGLPointSpriteMapper.hxx"
@@ -38,6 +39,7 @@
 
 #include "VISU_Event.h" 
 #include "SVTK_Actor.h"
+#include <SALOME_ExtractPolyDataGeometry.h>
 
 #include <vtkCamera.h>
 #include <vtkRenderer.h>
@@ -46,6 +48,9 @@
 #include <vtkScalarBarWidget.h>
 #include <vtkTextMapper.h>
 #include <vtkTextProperty.h>
+#include <vtkImplicitBoolean.h>
+#include <vtkImplicitFunctionCollection.h>
+#include <vtkPlane.h>
 
 #include <vtkPointData.h>
 #include <vtkDataArray.h>
@@ -124,23 +129,22 @@ VISU_GaussPtsAct
   myWidgetCtrl(NULL),
   myGaussPointsPL(NULL),
   myLastPreHighlightObjID(-1),
-  myTextActor(VISU_FramedTextActor::New()),
   myCursorPyramid(VISU_CursorPyramid::New()),
   myCursorPyramidSelected(VISU_CursorPyramid::New()),
   myCellSource(vtkUnstructuredGrid::New()),
   myCellActor(SVTK_Actor::New()),
   myScalarBarCtrl(VISU_ScalarBarCtrl::New()),
   myBarVisibility(true),
-  myPickingSettings(NULL),
   myInsideCursorSettings(NULL),
   myCurrentPL(NULL),
-  myMapper(vtkPolyDataMapper::New())
+  myMapper(vtkPolyDataMapper::New()),
+  myPolyDataExtractor(SALOME_ExtractPolyDataGeometry::New()),
+  myFunction(vtkImplicitBoolean::New())
 {
   if(MYDEBUG) MESSAGE("VISU_GaussPtsAct::VISU_GaussPtsAct - this = "<<this);
 
   myEventCallbackCommand->Delete();
   myDeviceActor->Delete();
-  myTextActor->Delete();
 
   myCursorPyramid->Delete();
   myCursorPyramid->SetPickable(0);
@@ -163,9 +167,6 @@ VISU_GaussPtsAct
   myDeviceActor->SetVisibility(true);
   myDeviceActor->SetPickable(false);
 
-  myTextActor->SetVisibility(false);
-  myTextActor->SetPickable(false);
-
   myCellSource->Allocate();
   myCellActor->Initialize();
   myCellActor->SetRepresentation(VTK_WIREFRAME);
@@ -180,6 +181,18 @@ VISU_GaussPtsAct
 
   myMapper->Delete();
   aMatrix->Delete();
+
+  myPolyDataExtractor->SetImplicitFunction(myFunction);
+  //myPolyDataExtractor->ExtractBoundaryCellsOn();
+
+  myFunction->SetOperationTypeToIntersection();
+  myPolyDataExtractor->Delete();
+  myFunction->Delete();
+
+  if( VISU_PickingSettings* aPickingSettings = VISU_PickingSettings::Get() )
+    aPickingSettings->AddObserver(VISU::UpdatePickingSettingsEvent, 
+                                 myEventCallbackCommand.GetPointer(), 
+                                 myPriority);
 }
 
 VISU_GaussPtsAct
@@ -188,7 +201,6 @@ VISU_GaussPtsAct
   if(MYDEBUG) MESSAGE("VISU_GaussPtsAct::~VISU_GaussPtsAct - this = "<<this);
   SetWidgetCtrl(NULL);
   SetInteractor(NULL);
-  SetPickingSettings(NULL);
   SetInsideCursorSettings(NULL);
 }
 
@@ -297,7 +309,6 @@ VISU_GaussPtsAct
 
   myDeviceActor->AddToRender(theRenderer);
 
-  theRenderer->AddActor(myTextActor.GetPointer());
   theRenderer->AddActor(myCellActor.GetPointer());
 
   myCursorPyramid->AddToRender(theRenderer);
@@ -313,7 +324,6 @@ VISU_GaussPtsAct
 
   myDeviceActor->RemoveFromRender(theRenderer);
   
-  theRenderer->RemoveActor(myTextActor.GetPointer());
   theRenderer->RemoveActor(myCellActor.GetPointer());
   
   myCursorPyramid->RemoveFromRender(theRenderer);
@@ -423,11 +433,14 @@ VISU_GaussPtsAct
 {
   if(MYDEBUG) MESSAGE("VISU_GaussPtsAct::SetMapperInput - this = "<<this);
 
+  myDeviceActor->SetExtractor(myPolyDataExtractor);
   myDeviceActor->SetPipeLine(GetGaussPointsPL());
   myCurrentPL = myDeviceActor->GetPipeLine();
 
   //SetMapper(myCurrentPL->GetPointSpriteMapper());
 
+  //  myPolyDataExtractor->SetInput(myCurrentPL->GetPickableDataSet());
+  //myMapper->SetInput(myPolyDataExtractor->GetOutput());
   myMapper->SetInput(myCurrentPL->GetPickableDataSet());
   SetMapper(myMapper.GetPointer());
 }
@@ -526,6 +539,7 @@ VISU_GaussPtsAct
 ::SetVisibility(int theMode)
 {
   Superclass::SetVisibility(theMode);
+  myDeviceActor->SetVisibility(GetVisibility()); // VSV
   myScalarBarCtrl->SetVisibility(theMode);
   Highlight(isHighlighted());
 }
@@ -723,6 +737,8 @@ VISU_GaussPtsAct
   bool anIsChanged = (mySelectionMode != aSelectionMode);
   bool anIsPreselected = myIsPreselected;
   myIsPreselected = false;
+
+  VISU_PickingSettings* aPickingSettings = VISU_PickingSettings::Get();
   
   if(aSelectionMode == GaussPointSelection && theIsHighlight){
     myPointPicker->Pick(theSelectionEvent->myX, 
@@ -761,25 +777,22 @@ VISU_GaussPtsAct
          vtkDataSet* aDataSet = GetInput();
          vtkPointData* aPointData = aDataSet->GetPointData();
          if(vtkDataArray *aScalarArray = aPointData->GetScalars()){
-           if ( myPickingSettings ){
-             vtkFloatingPointType aPyramidHeight = myPickingSettings->GetPyramidHeight();
-             aPyramidHeight = aPyramidHeight*myGaussPointsPL->GetMaxPointSize();
-             //vtkFloatingPointType aColor[3] = myPreHighlightActor->GetProperty()->GetColor();
-             vtkFloatingPointType aColor[3];
-             theInteractorStyle->GetCurrentRenderer()->GetBackground( aColor );
-             aColor[0] = 1. - aColor[0];
-             aColor[1] = 1. - aColor[1];
-             aColor[2] = 1. - aColor[2];
-
-             myCursorPyramid->Init(aPyramidHeight,
-                                   myPickingSettings->GetCursorSize(),
-                                   GetRadius(anObjId,aVtkId,aScalarArray),
-                                   GetMagnification(anObjId),
-                                   GetClamp(anObjId),
-                                   aLocalNodeCoord,
-                                   aColor);
-           }
-            
+           vtkFloatingPointType aPyramidHeight = aPickingSettings->GetPyramidHeight();
+           aPyramidHeight = aPyramidHeight*myGaussPointsPL->GetMaxPointSize();
+           //vtkFloatingPointType aColor[3] = myPreHighlightActor->GetProperty()->GetColor();
+           vtkFloatingPointType aColor[3];
+           theInteractorStyle->GetCurrentRenderer()->GetBackground( aColor );
+           aColor[0] = 1. - aColor[0];
+           aColor[1] = 1. - aColor[1];
+           aColor[2] = 1. - aColor[2];
+
+           myCursorPyramid->Init(aPyramidHeight,
+                                 aPickingSettings->GetCursorSize(),
+                                 GetRadius(anObjId,aVtkId,aScalarArray),
+                                 GetMagnification(anObjId),
+                                 GetClamp(anObjId),
+                                 aNodeCoord,
+                                 aColor);
          }
           this->Transform->Pop();
          myLastPreHighlightObjID = anObjId;
@@ -828,9 +841,9 @@ VISU_GaussPtsAct
   if ( !GetPickable() )
     return false;
 
-  //  int anInitialHasIndex = myIsHighlighted && mySelectionMode == GaussPointSelection;
+  //  int anInitialHasIndex = myIsSubElementsHighlighted && mySelectionMode == GaussPointSelection;
   Handle(SALOME_InteractiveObject) anIO = getIO();
-  //  myIsHighlighted = false;
+  //  myIsSubElementsHighlighted = false;
 
   Selection_Mode aSelectionMode = theSelectionEvent->mySelectionMode;
 
@@ -947,54 +960,65 @@ VISU_GaussPtsAct
   if(!mySelector.GetPointer())
     return;
 
-  if ( !myPickingSettings )
-  {
-    Superclass::Highlight(theIsHighlight);
-    return;
-  }
+  VISU_PickingSettings* aPickingSettings = VISU_PickingSettings::Get();
 
   Selection_Mode aSelectionMode = mySelector->SelectionMode();
   
-  bool anInitialHasIndex = isHighlighted() && mySelectionMode == GaussPointSelection;
+  bool anInitialHasIndex = isSubElementsHighlighted() && mySelectionMode == GaussPointSelection;
   
   TColStd_IndexedMapOfInteger aMapIndex;
   mySelector->GetIndex( getIO(), aMapIndex );
   bool aCurrentHasIndex = aMapIndex.Extent() == 1;
   bool anIsVisible = GetVisibility() && aCurrentHasIndex && theIsHighlight;
+  bool aShowTextActor = aPickingSettings->GetInfoWindowEnabled();
+  bool aShowCellActor = aPickingSettings->GetDisplayParentMesh();
 
   myOutlineActor->SetVisibility(false);
   myCursorPyramid->SetVisibility(false);
-  myTextActor->SetVisibility(false);
-  myCellActor->SetVisibility(false);
-  myCursorPyramidSelected->SetVisibility(false);
+  myTextActor->SetVisibility(anIsVisible && aShowTextActor);
+  myCellActor->SetVisibility(anIsVisible && aShowCellActor);
+  GetScalarBarCtrl()->SetIsMarked(anIsVisible);
+  myCursorPyramidSelected->SetVisibility(anIsVisible);
+  //GetScalarBarCtrl()->Update();
 
-  if(!theIsHighlight)
-    return;
+  myIsSubElementsHighlighted = aCurrentHasIndex;
+
+  // Zoom if necessary
+  if( GetVisibility() && aPickingSettings->GetCameraMovementEnabled() )
+  {
+    ChangeZoom(aPickingSettings,
+              GetRenderer(),
+              anInitialHasIndex,
+              aCurrentHasIndex);
+  }
 
   if( aSelectionMode == ActorSelection ) {
-    Superclass::highlight(theIsHighlight);
+    Superclass::Highlight(theIsHighlight);
     return;
   }
 
+  if(!theIsHighlight)
+    return;
+
   if( aSelectionMode != GaussPointSelection )
     return;
 
   if ( !aCurrentHasIndex || !myBarVisibility )
     return;
 
-  myTextActor->SetVisibility(anIsVisible);
-  myCellActor->SetVisibility(anIsVisible && myPickingSettings->GetDisplayParentMesh());
-  GetScalarBarCtrl()->SetIsMarked(anIsVisible);
-  myCursorPyramidSelected->SetVisibility(anIsVisible);
+  //  myTextActor->SetVisibility(anIsVisible);
+  //  myCellActor->SetVisibility(anIsVisible && myPickingSettings->GetDisplayParentMesh());
+  //  GetScalarBarCtrl()->SetIsMarked(anIsVisible);
+  //  myCursorPyramidSelected->SetVisibility(anIsVisible);
 //GetScalarBarCtrl()->Update();
 
-  myIsHighlighted = aCurrentHasIndex;
+//  myIsHighlighted = aCurrentHasIndex;
 
   // Zoom if necessary
-  ChangeZoom(myPickingSettings,
-            GetRenderer(),
-            anInitialHasIndex,
-            aCurrentHasIndex);
+//   ChangeZoom(myPickingSettings,
+//          GetRenderer(),
+//          anInitialHasIndex,
+//          aCurrentHasIndex);
 
   //  TColStd_IndexedMapOfInteger aMapIndex;
   mySelector->GetIndex( getIO(), aMapIndex );
@@ -1031,17 +1055,20 @@ VISU_GaussPtsAct
     return;
 
   // FlyTo
-  vtkRenderWindowInteractor* anInteractor = myInteractor;
-  vtkFloatingPointType aDollyWas = anInteractor->GetDolly();
-  int aNumberOfFlyFramesWas = anInteractor->GetNumberOfFlyFrames();
+  if( anIsVisible && aPickingSettings->GetCameraMovementEnabled() )
+  {
+    vtkRenderWindowInteractor* anInteractor = myInteractor;
+    vtkFloatingPointType aDollyWas = anInteractor->GetDolly();
+    int aNumberOfFlyFramesWas = anInteractor->GetNumberOfFlyFrames();
   
-  anInteractor->SetDolly(0.0);
-  anInteractor->SetNumberOfFlyFrames(myPickingSettings->GetStepNumber());
-  anInteractor->FlyTo(aRenderer, aLocalNodeCoord);
-  aRenderer->ResetCameraClippingRange();
-  anInteractor->SetDolly(aDollyWas);
-  anInteractor->SetNumberOfFlyFrames(aNumberOfFlyFramesWas);
-  anInteractor->InvokeEvent(SVTK::ChangeRotationPoint, aLocalNodeCoord);
+    anInteractor->SetDolly(0.0);
+    anInteractor->SetNumberOfFlyFrames(aPickingSettings->GetStepNumber());
+    anInteractor->FlyTo(aRenderer, aNodeCoord);
+    aRenderer->ResetCameraClippingRange();
+    anInteractor->SetDolly(aDollyWas);
+    anInteractor->SetNumberOfFlyFrames(aNumberOfFlyFramesWas);
+    anInteractor->InvokeEvent(SVTK::ChangeRotationPoint, aNodeCoord);
+  }
   //
   std::ostringstream aStr;
   //  int anObjId = aMapIndex(1);
@@ -1061,10 +1088,10 @@ VISU_GaussPtsAct
       GetScalarBarCtrl()->SetMarkValue(aVal);
       GetScalarBarCtrl()->Update();
       //
-      vtkFloatingPointType aPyramidHeight = myPickingSettings->GetPyramidHeight();
+      vtkFloatingPointType aPyramidHeight = aPickingSettings->GetPyramidHeight();
       aPyramidHeight = aPyramidHeight*myGaussPointsPL->GetMaxPointSize();
       myCursorPyramidSelected->Init(aPyramidHeight,
-                                   myPickingSettings->GetCursorSize(),
+                                   aPickingSettings->GetCursorSize(),
                                    GetRadius(anObjId,aVtkId,aScalarArray),
                                    GetMagnification(anObjId),
                                    GetClamp(anObjId),
@@ -1106,55 +1133,26 @@ VISU_GaussPtsAct
     //
     // myTextActor
     std::string aString = aStr.str();
-    myTextActor->SetModePosition(myPickingSettings->GetInfoWindowPosition());
-    myTextActor->SetTransparency(myPickingSettings->GetInfoWindowTransparency());
+    myTextActor->SetModePosition(aPickingSettings->GetInfoWindowPosition());
+    myTextActor->SetTransparency(aPickingSettings->GetInfoWindowTransparency());
     myTextActor->SetWorldPoint(aWorldCoord);
     myTextActor->SetText(aString.c_str());
-    myTextActor->SetVisibility(anIsVisible && theIsHighlight);
+    myTextActor->SetVisibility(anIsVisible && theIsHighlight && aShowTextActor);
     //
     // myCellActor
-    if(myPickingSettings->GetDisplayParentMesh()){
-      const VISU::PGaussPtsIDMapper& aGaussPtsIDMapper = 
-       myGaussPointsPL->GetGaussPtsIDMapper();
-      VISU::TNamedIDMapper* aParent = aGaussPtsIDMapper->GetParent();
-      
-      myCellSource->Reset();
-      myCellSource->Modified(); // a VTK bug
-      vtkUnstructuredGrid* aDataSet = aParent->GetUnstructuredGridOutput();
-      myCellSource->SetPoints(aDataSet->GetPoints());
-      
-      VISU::TGaussPointID aGaussPointID = aGaussPtsIDMapper->GetObjID(anObjId);
-      vtkIdType aCellID = aGaussPointID.first;
-      vtkCell* aCell = aParent->GetElemCell(aCellID);
-      myCellSource->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
-      myCellActor->SetVisibility(anIsVisible && theIsHighlight);
-      myCellActor->SetRepresentation(VTK_WIREFRAME);
-    }
-    else
-      myCellActor->SetVisibility(false);
-  }
-}
-
-
-//----------------------------------------------------------------
-void
-VISU_GaussPtsAct
-::SetPickingSettings(VISU_PickingSettings* thePickingSettings)
-{
-  if(myPickingSettings == thePickingSettings)
-    return;
-
-  if(myPickingSettings)
-    myPickingSettings->RemoveObserver(myEventCallbackCommand.GetPointer());
-
-  myPickingSettings = thePickingSettings;
-
-  if(thePickingSettings)
-  {
-    thePickingSettings->AddObserver(VISU::UpdatePickingSettingsEvent, 
-                                   myEventCallbackCommand.GetPointer(), 
-                                   myPriority);
-    this->UpdatePickingSettings();
+    const VISU::PGaussPtsIDMapper& aGaussPtsIDMapper = myGaussPointsPL->GetGaussPtsIDMapper();
+    VISU::TNamedIDMapper* aParent = aGaussPtsIDMapper->GetParent();
+    //
+    myCellSource->Reset();
+    myCellSource->Modified(); // a VTK bug
+    vtkUnstructuredGrid* aCellDataSet = aParent->GetUnstructuredGridOutput();
+    myCellSource->SetPoints(aCellDataSet->GetPoints());
+    //  
+    VISU::TGaussPointID aGaussPointID = aGaussPtsIDMapper->GetObjID(anObjId);
+    vtkIdType aCellID = aGaussPointID.first;
+    vtkCell* aCell = aParent->GetElemCell(aCellID);
+    myCellSource->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
+    myCellActor->SetVisibility(anIsVisible && theIsHighlight && aShowCellActor);
   }
 }
 
@@ -1162,19 +1160,21 @@ void
 VISU_GaussPtsAct
 ::UpdatePickingSettings()
 {
-  if(!myPickingSettings)
+  //printf( "VISU_GaussPtsAct::UpdatePickingSettings()\n" );
+  VISU_PickingSettings* aPickingSettings = VISU_PickingSettings::Get();
+  if(!aPickingSettings)
     return;
 
-  myTextActor->SetModePosition(myPickingSettings->GetInfoWindowPosition());
-  myTextActor->SetTransparency(myPickingSettings->GetInfoWindowTransparency());
+  myTextActor->SetModePosition(aPickingSettings->GetInfoWindowPosition());
+  myTextActor->SetTransparency(aPickingSettings->GetInfoWindowTransparency());
 
-  vtkFloatingPointType aHeight = myGaussPointsPL->GetMaxPointSize()*myPickingSettings->GetPyramidHeight();
-  vtkFloatingPointType aCursorSize = myPickingSettings->GetCursorSize();
+  vtkFloatingPointType aHeight = myGaussPointsPL->GetMaxPointSize()*aPickingSettings->GetPyramidHeight();
+  vtkFloatingPointType aCursorSize = aPickingSettings->GetCursorSize();
   myCursorPyramid->SetPreferences(aHeight,aCursorSize);
   myCursorPyramidSelected->SetPreferences(aHeight,aCursorSize);
 
-  myHighlightActor->GetProperty()->SetColor( myPickingSettings->GetColor() );
-  myPointPicker->SetTolerance( myPickingSettings->GetPointTolerance() );
+  myHighlightActor->GetProperty()->SetColor( aPickingSettings->GetColor() );
+  myPointPicker->SetTolerance( aPickingSettings->GetPointTolerance() );
 
   Highlight(isHighlighted());
 
@@ -1256,6 +1256,51 @@ VISU_GaussPtsAct
   return aTime;
 }
 
+void VISU_GaussPtsAct::RemoveAllClippingPlanes()
+{
+  myFunction->GetFunction()->RemoveAllItems();
+  myFunction->Modified();
+}
+
+vtkIdType VISU_GaussPtsAct::GetNumberOfClippingPlanes()
+{
+  return myFunction->GetFunction()->GetNumberOfItems();
+}
+
+bool VISU_GaussPtsAct::AddClippingPlane(vtkPlane* thePlane)
+{
+  vtkImplicitFunctionCollection* aFunctions = GetClippingPlanes();
+  aFunctions->InitTraversal();
+  vtkImplicitFunction* aItem;
+  while ((aItem = aFunctions->GetNextItem())) {
+    if (thePlane == aItem)
+      return false;
+  }
+  myFunction->AddFunction(thePlane);
+  return true;
+}
+
+vtkPlane* VISU_GaussPtsAct::GetClippingPlane(vtkIdType theID)
+{
+  vtkPlane* aPlane = NULL;
+  if ((theID >= 0) && (theID < GetNumberOfClippingPlanes())) {
+    vtkImplicitFunctionCollection* aFunction = myFunction->GetFunction();
+    vtkImplicitFunction* aFun = NULL;
+    aFunction->InitTraversal();
+    for (vtkIdType i = 0; i <= theID; i++)
+      aFun = aFunction->GetNextItem();
+    aPlane = dynamic_cast<vtkPlane*>(aFun);
+  }
+  return aPlane;
+}
+
+vtkImplicitFunctionCollection* VISU_GaussPtsAct::GetClippingPlanes()
+{
+  return myFunction->GetFunction();
+}
+
+
+
 //==============================================================================
 vtkStandardNewMacro(VISU_GaussPtsAct1);
 
@@ -1314,16 +1359,16 @@ VISU_GaussPtsAct1
 {
   Superclass::AddToRender(theRenderer);
 
-  myInsideDeviceActor->AddToRender(theRenderer);
-  myOutsideDeviceActor->AddToRender(theRenderer);
+  //myInsideDeviceActor->AddToRender(theRenderer);
+  //myOutsideDeviceActor->AddToRender(theRenderer);
 }
 
 void 
 VISU_GaussPtsAct1
 ::RemoveFromRender(vtkRenderer* theRenderer)
 {
-  myInsideDeviceActor->RemoveFromRender(theRenderer);
-  myOutsideDeviceActor->RemoveFromRender(theRenderer);
+  //myInsideDeviceActor->RemoveFromRender(theRenderer);
+  //myOutsideDeviceActor->RemoveFromRender(theRenderer);
 
   Superclass::RemoveFromRender(theRenderer);
 }
@@ -1401,18 +1446,18 @@ VISU_GaussPtsAct1
 
   Superclass::SetMapperInput(theDataSet);
 
-  if(VISU_GaussPointsPL* aPipeLine = CreatePipeLine(GetGaussPointsPL())){
-    myInsideDeviceActor->SetPipeLine(aPipeLine);
-    aPipeLine->Delete();
-  }
+//   if(VISU_GaussPointsPL* aPipeLine = CreatePipeLine(GetGaussPointsPL())){
+//     myInsideDeviceActor->SetPipeLine(aPipeLine);
+//     aPipeLine->Delete();
+//   }
 
-  if(VISU_GaussPointsPL* aPipeLine = CreatePipeLine(GetGaussPointsPL())){
-    myOutsideDeviceActor->SetPipeLine(aPipeLine);
-    aPipeLine->Delete();
+//   if(VISU_GaussPointsPL* aPipeLine = CreatePipeLine(GetGaussPointsPL())){
+//     myOutsideDeviceActor->SetPipeLine(aPipeLine);
+//     aPipeLine->Delete();
 
-    aPipeLine->SetExtractBoundaryCells(true);
-    aPipeLine->SetExtractInside(true);
-  }
+//     aPipeLine->SetExtractBoundaryCells(true);
+//     aPipeLine->SetExtractInside(true);
+//   }
 }
 
 
@@ -1492,7 +1537,7 @@ VISU_GaussPtsAct1
 
   bool aVisisbility = GetVisibility();
   bool anIsSegementation = IsSegmentationEnabled();
-  myDeviceActor->SetVisibility(aVisisbility && !anIsSegementation);
+  myDeviceActor->SetVisibility(aVisisbility/* && !anIsSegementation*/);
   myInsideDeviceActor->SetVisibility(aVisisbility && anIsSegementation);
   myOutsideDeviceActor->SetVisibility(aVisisbility && anIsSegementation);
 
@@ -1545,7 +1590,7 @@ VISU_GaussPtsAct1
 
   aPipeline->SetImplicitFunction(anImplicitFunction); // To restore
   aPipeline->SetExtractBoundaryCells(true);
-  aPipeline->SetExtractInside(true);
+  //aPipeline->SetExtractInside(true);
   aPipeline->SetMagnification( aMagnification );
 
   aPipeline->SetPrimitiveType( myOutsideCursorSettings->GetPrimitiveType() );
@@ -1615,7 +1660,7 @@ VISU_GaussPtsAct1
   case vtkCommand::EndInteractionEvent: {
     bool aVisisbility = GetVisibility();
     bool anIsSegementation = IsSegmentationEnabled();
-    myDeviceActor->SetVisibility(aVisisbility && !anIsSegementation);
+    myDeviceActor->SetVisibility(aVisisbility/* && !anIsSegementation*/);
     myInsideDeviceActor->SetVisibility(aVisisbility && anIsSegementation);
     myOutsideDeviceActor->SetVisibility(aVisisbility && anIsSegementation);
     break;
@@ -1684,15 +1729,15 @@ VISU_GaussPtsAct2
 ::SetMapperInput(vtkDataSet* theDataSet) 
 {
   if(MYDEBUG2) MESSAGE("VISU_GaussPtsAct2::SetMapperInput - this = "<<this);
-
-  if(VISU_GaussPointsPL* aPipeLine = CreatePipeLine(GetGaussPointsPL())){
-    myDeviceActor->SetPipeLine(aPipeLine);
-    myCurrentPL = aPipeLine;
-    aPipeLine->Delete();
-
-    myMapper->SetInput(myCurrentPL->GetPickableDataSet());
-    SetMapper(myMapper.GetPointer());
-  }
+  Superclass::SetMapperInput(theDataSet);
+//   if(VISU_GaussPointsPL* aPipeLine = CreatePipeLine(GetGaussPointsPL())){
+//     myDeviceActor->SetPipeLine(aPipeLine);
+//     myCurrentPL = aPipeLine;
+//     aPipeLine->Delete();
+
+//     myMapper->SetInput(myCurrentPL->GetPickableDataSet());
+//     SetMapper(myMapper.GetPointer());
+//   }
 }
 
 //----------------------------------------------------------------------------
index 4685f60dc9b00464913aa8d14879ba8e96369f3e..5c0b45ed3acbd50b709610b0a50398cfb2f101fb 100644 (file)
@@ -60,10 +60,11 @@ class vtkInteractorObserver;
 class vtkCallbackCommand;
 
 class VISU_ScalarBarCtrl;
-class VISU_PickingSettings;
 class VISU_InsideCursorSettings;
 class VISU_OutsideCursorSettings;
 
+class SALOME_ExtractPolyDataGeometry;
+class vtkImplicitBoolean;
 
 //============================================================================
 //! Base class for Gauss Points Actors.
@@ -236,9 +237,6 @@ class VTKOCC_EXPORT VISU_GaussPtsAct : public VISU_Actor
   UpdateInsideCursorSettings( PDeviceActor );
 
   //----------------------------------------------------------------------------
-  void
-  SetPickingSettings(VISU_PickingSettings* thePickingSettings);
-
   //! Apply the picking settings on the actor.
   void
   UpdatePickingSettings();
@@ -256,6 +254,17 @@ class VTKOCC_EXPORT VISU_GaussPtsAct : public VISU_Actor
   unsigned long int 
   GetMTime();
 
+  //----------------------------------------------------------------------------
+  virtual void RemoveAllClippingPlanes();
+
+  virtual vtkIdType GetNumberOfClippingPlanes();
+
+  virtual bool AddClippingPlane(vtkPlane* thePlane);
+
+  virtual vtkPlane* GetClippingPlane(vtkIdType theID);
+
+  virtual vtkImplicitFunctionCollection* GetClippingPlanes();
+
  protected:
   //----------------------------------------------------------------------------
   VISU_GaussPtsAct();
@@ -319,11 +328,11 @@ class VTKOCC_EXPORT VISU_GaussPtsAct : public VISU_Actor
   vtkSmartPointer<VISU_GaussPointsPL> myGaussPointsPL;
 
   vtkSmartPointer<vtkPolyDataMapper> myMapper;
+  vtkSmartPointer<SALOME_ExtractPolyDataGeometry> myPolyDataExtractor;
+  vtkSmartPointer<vtkImplicitBoolean> myFunction;
 
   vtkIdType myLastPreHighlightObjID;
 
-  vtkSmartPointer<VISU_FramedTextActor> myTextActor;
-
   vtkSmartPointer<VISU_CursorPyramid> myCursorPyramid;
   vtkSmartPointer<VISU_CursorPyramid> myCursorPyramidSelected;
   
@@ -334,7 +343,6 @@ class VTKOCC_EXPORT VISU_GaussPtsAct : public VISU_Actor
   vtkSmartPointer<VISU_ScalarBarCtrl> myScalarBarCtrl;
 
   VISU_InsideCursorSettings* myInsideCursorSettings;
-  VISU_PickingSettings* myPickingSettings;
 };
 
 
index c4b084daa489a8343fc7853a13d6a0f97bfddc14..654243d65e98f7ce008c8e9d47b285ce8544e116 100644 (file)
@@ -34,6 +34,7 @@
 
 #include "VTKViewer_Transform.h"
 #include "VTKViewer_TransformFilter.h"
+#include <SALOME_ExtractPolyDataGeometry.h>
 
 #include <vtkObjectFactory.h>
 #include <vtkPolyData.h>
@@ -136,7 +137,8 @@ vtkStandardNewMacro(VISU_GaussDeviceActorBase);
 
 VISU_GaussDeviceActorBase
 ::VISU_GaussDeviceActorBase():
-  myTransformFilter(VTKViewer_TransformFilter::New())
+  myTransformFilter(VTKViewer_TransformFilter::New()),
+  myPolyDataExtractor(0)
 {
   if(MYDEBUG) MESSAGE("VISU_GaussDeviceActorBase - "<<this);
 
@@ -214,9 +216,14 @@ VISU_GaussDeviceActorBase
   myMapper = theMapper;
 
   int anId = 0;
-  myPassFilter[ anId ]->SetInput( aDataSet ); 
+  if (myPolyDataExtractor) {
+    myPolyDataExtractor->SetInput(aDataSet);
+    myPassFilter[ anId ]->SetInput( myPolyDataExtractor->GetOutput() ); 
+  } else {
+    myPassFilter[ anId ]->SetInput( aDataSet ); 
+  }
   myPassFilter[ anId + 1 ]->SetInput( myPassFilter[ anId ]->GetOutput() );
-  
+
   anId++;
   myTransformFilter->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() );
   
@@ -586,7 +593,7 @@ VISU_FramedTextActor::VISU_FramedTextActor()
   myTextProperty->SetFontFamilyToArial();
   //
   myTextMapper=vtkTextMapper::New();
-  myTextMapper->SetInput("some text");
+  myTextMapper->SetInput("");
   myTextMapper->GetTextProperty()->ShallowCopy(myTextProperty);
   myTextActor=vtkActor2D::New();
   myTextActor->SetMapper(myTextMapper);
index 7ff5c369ea9e729b6e941d242b519ef9436161d4..5b25e78e15b8a3b4f12a5541834fad73ed389e9f 100644 (file)
@@ -43,6 +43,7 @@ class VISU_GaussPointsPL;
 
 class vtkPassThroughFilter;
 class vtkImageData;
+class SALOME_ExtractPolyDataGeometry;
 
 
 //============================================================================
@@ -92,6 +93,13 @@ class VISU_GaussDeviceActorBase: public vtkLODActor
   virtual
   unsigned long int
   GetMemorySize();
+
+  //----------------------------------------------------------------------------
+  void SetExtractor(SALOME_ExtractPolyDataGeometry* theExtractor) 
+    { myPolyDataExtractor = theExtractor; }
+
+  SALOME_ExtractPolyDataGeometry* GetExtractor() const
+    { return myPolyDataExtractor; }
  
  protected:
   //----------------------------------------------------------------------------
@@ -101,6 +109,8 @@ class VISU_GaussDeviceActorBase: public vtkLODActor
   typedef vtkSmartPointer<vtkPassThroughFilter> PPassThroughFilter;
   std::vector<PPassThroughFilter> myPassFilter;
 
+  SALOME_ExtractPolyDataGeometry* myPolyDataExtractor;
+
   VISU_GaussDeviceActorBase();
   ~VISU_GaussDeviceActorBase();
 
index 7c04a8f02434759b52fa2dc1df9b85ab35ac7350..db7bd70d699d7f7659f9c73b75a84f34803b62bc 100644 (file)
@@ -30,6 +30,9 @@
 #include <SUIT_ResourceMgr.h>
 #include <SUIT_Session.h>
 
+#include "SUIT_ResourceMgr.h"
+#include "SUIT_Session.h"
+
 #include <vtkObjectFactory.h>
 #include <vtkImageData.h>
 
@@ -39,7 +42,6 @@
 vtkStandardNewMacro( VISU_GaussPtsSettings );
 vtkStandardNewMacro( VISU_InsideCursorSettings );
 vtkStandardNewMacro( VISU_OutsideCursorSettings );
-vtkStandardNewMacro( VISU_PickingSettings );
 
 //----------------------------------------------------------------
 VISU_GaussPtsSettings::VISU_GaussPtsSettings()
@@ -86,44 +88,3 @@ VISU_OutsideCursorSettings::VISU_OutsideCursorSettings() :
 VISU_OutsideCursorSettings::~VISU_OutsideCursorSettings()
 {
 }
-
-//----------------------------------------------------------------
-VISU_PickingSettings::VISU_PickingSettings()
-{
-  float aCursorSize = 0.5;
-  float aPyramidHeight = 10.0;
-  float aPointTolerance = 0.1;
-  QColor aColor = Qt::yellow;
-  int anInfoWindowTransparency = 50;
-  int anInfoWindowPosition = VISU_PickingSettings::BelowPoint;
-  float aZoomFactor = 1.5;
-  int aStepNumber = 10;
-  bool aDisplayParentMesh = false;
-  
-  SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
-
-  this->CursorSize = aResourceMgr->doubleValue( "VISU", "picking_cursor_size", aCursorSize );
-
-  this->PyramidHeight = aResourceMgr->doubleValue( "VISU", "picking_pyramid_height", aPyramidHeight );
-
-  this->PointTolerance = aResourceMgr->doubleValue( "VISU", "picking_point_tolerance", aPointTolerance );
-
-  aColor = aResourceMgr->colorValue( "VISU", "picking_selection_color", aColor );
-  this->Color[0] = aColor.red() / 255.0;
-  this->Color[1] = aColor.green() / 255.0;
-  this->Color[2] = aColor.blue() / 255.0;
-
-  this->InfoWindowTransparency = aResourceMgr->integerValue( "VISU", "picking_transparency", anInfoWindowTransparency ) / 100.0;
-
-  this->InfoWindowPosition = aResourceMgr->integerValue( "VISU", "picking_position", anInfoWindowPosition );
-
-  this->ZoomFactor = aResourceMgr->doubleValue( "VISU", "picking_zoom_factor", aZoomFactor );
-  
-  this->StepNumber = aResourceMgr->integerValue( "VISU", "picking_step_number", aStepNumber );
-
-  this->DisplayParentMesh = aResourceMgr->booleanValue( "VISU", "picking_display_parent_mesh", aDisplayParentMesh );
-}
-
-VISU_PickingSettings::~VISU_PickingSettings()
-{
-}
index a34dbca6cfeb72a67c2382c845305b608e9efd63..11435aebee5317196c40578c1c2860e9bcc7f556 100644 (file)
@@ -44,7 +44,6 @@ namespace VISU
   const vtkIdType UpdateFromSettingsEvent        = vtkCommand::UserEvent + 100; 
   const vtkIdType UpdateInsideSettingsEvent      = vtkCommand::UserEvent + 101; 
   const vtkIdType UpdateOutsideSettingsEvent     = vtkCommand::UserEvent + 102; 
-  const vtkIdType UpdatePickingSettingsEvent     = vtkCommand::UserEvent + 103; 
 }
 
 
@@ -162,68 +161,4 @@ class VTKOCC_EXPORT VISU_OutsideCursorSettings : public VISU_GaussPtsSettings
   vtkFloatingPointType Color[3];
 };
 
-
-//! Class of Picking settings.
-/*!
- * Contains information about the following parameters:
- * Cursor Pyramid height, Info Window transparency,
- * Info Window position, Zoom factor on first selected point,
- * Camera movement steps number and Display parent mesh.
- * Used by Gauss Points Actor.
- */
-class VTKOCC_EXPORT VISU_PickingSettings : public vtkObject
-{
- public:
-  enum { BelowPoint = 0, TopLeftCorner };
-
- public:
-  vtkTypeMacro( VISU_PickingSettings, vtkObject );
-
-  VISU_PickingSettings();
-  virtual ~VISU_PickingSettings();
-
-  static
-  VISU_PickingSettings*
-  New();
-
-  vtkSetMacro( PyramidHeight, vtkFloatingPointType );
-  vtkGetMacro( PyramidHeight, vtkFloatingPointType );
-
-  vtkSetMacro( CursorSize, vtkFloatingPointType );
-  vtkGetMacro( CursorSize, vtkFloatingPointType );
-
-  vtkSetVector3Macro( Color, vtkFloatingPointType );
-  vtkGetVector3Macro( Color, vtkFloatingPointType );
-
-  vtkSetMacro( PointTolerance, vtkFloatingPointType );
-  vtkGetMacro( PointTolerance, vtkFloatingPointType );
-
-  vtkSetMacro( InfoWindowTransparency, vtkFloatingPointType );
-  vtkGetMacro( InfoWindowTransparency, vtkFloatingPointType );
-
-  vtkSetMacro( InfoWindowPosition, int );
-  vtkGetMacro( InfoWindowPosition, int );
-
-  vtkSetMacro( ZoomFactor, vtkFloatingPointType );
-  vtkGetMacro( ZoomFactor, vtkFloatingPointType );
-
-  vtkSetMacro( StepNumber, int );
-  vtkGetMacro( StepNumber, int );
-
-  vtkSetMacro( DisplayParentMesh, bool );
-  vtkGetMacro( DisplayParentMesh, bool );
-
-private:
-  vtkFloatingPointType PyramidHeight;
-  vtkFloatingPointType CursorSize;
-  vtkFloatingPointType PointTolerance;
-  vtkFloatingPointType Color[3];
-  vtkFloatingPointType InfoWindowTransparency;
-  int                 InfoWindowPosition;
-  vtkFloatingPointType ZoomFactor;
-  int                 StepNumber;
-  bool                DisplayParentMesh;
-};
-
-
 #endif
diff --git a/src/OBJECT/VISU_IsoSurfActor.cxx b/src/OBJECT/VISU_IsoSurfActor.cxx
deleted file mode 100644 (file)
index 3c58fc4..0000000
+++ /dev/null
@@ -1,165 +0,0 @@
-//  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_IsoSurfActor.cxx
-//  Author : Vitaly Smetannikov
-//  Module : VISU
-
-
-#include "VISU_IsoSurfActor.h"
-#include "VISU_PipeLine.hxx"
-#include "VISU_LabelPointsFilter.hxx"
-
-
-#include <vtkObjectFactory.h>
-#include <vtkUnstructuredGrid.h>
-#include <vtkPolyData.h>
-#include <vtkActor2D.h>
-//#include <vtkMaskPoints.h>
-#include <vtkLabeledDataMapper.h>
-#include <vtkProperty2D.h>
-#include <vtkRenderer.h>
-#include <vtkCellArray.h>
-#include <vtkPointData.h>
-
-
-
-//----------------------------------------------------------------------------
-vtkStandardNewMacro(VISU_IsoSurfActor);
-
-
-//----------------------------------------------------------------------------
-VISU_IsoSurfActor::VISU_IsoSurfActor():
-  VISU_ScalarMapAct(),
-  myIsLinesLabeled(true)
-{
-  myLabelsDataSet = vtkPolyData::New();
-
-//   myMaskPoints = vtkMaskPoints::New();
-//   myMaskPoints->SetInput(myLabelsDataSet);
-//   myMaskPoints->SetOnRatio(100);
-
-  myMaskPoints = VISU_LabelPointsFilter::New();
-  myMaskPoints->SetInput(myLabelsDataSet);
-
-  myLabeledDataMapper = vtkLabeledDataMapper::New();
-  myLabeledDataMapper->SetInput(myMaskPoints->GetOutput());
-  //myLabeledDataMapper->SetLabelFormat("%e");
-  myLabeledDataMapper->SetLabelModeToLabelScalars();
-    
-  myLabels = vtkActor2D::New();
-  myLabels->SetMapper(myLabeledDataMapper);
-  myLabels->GetProperty()->SetColor(1,1,1);
-  myLabels->SetVisibility(myIsLinesLabeled);
-}
-
-
-//----------------------------------------------------------------------------
-VISU_IsoSurfActor::~VISU_IsoSurfActor()
-{
-  myLabelsDataSet->Delete();
-  myMaskPoints->Delete();
-  myLabeledDataMapper->Delete();
-  myLabels->Delete();
-}
-
-//----------------------------------------------------------------------------
-void VISU_IsoSurfActor::SetLinesLabeled(bool theIsLinesLabeled, int theNbLbl)
-{
-  myIsLinesLabeled = theIsLinesLabeled;
-  myMaskPoints->SetPointsNb(theNbLbl);
-  Modified();
-}
-//----------------------------------------------------------------------------
-int VISU_IsoSurfActor::GetNbLabels() const 
-{ 
-  return myMaskPoints->GetPointsNb(); 
-}
-
-
-//----------------------------------------------------------------------------
-void VISU_IsoSurfActor::UpdateLabels()
-{
-  if (myIsLinesLabeled) {
-    vtkDataSet* aDataSet = GetPipeLine()->GetOutput();
-    if (aDataSet != NULL) {
-      unsigned long aTime = myLabelsDataSet->GetMTime();
-      unsigned long anObjTime = GetMTime();
-      if (aTime < anObjTime) {
-       myLabelsDataSet->ShallowCopy(aDataSet);
-       myLabelsDataSet->Modified();
-      }
-    }
-  }
-  myLabels->SetVisibility(myIsLinesLabeled);
-}
-
-
-//----------------------------------------------------------------------------
-void VISU_IsoSurfActor::AddToRender(vtkRenderer* theRenderer)
-{
-  VISU_ScalarMapAct::AddToRender(theRenderer);
-  theRenderer->AddActor2D(myLabels);
-}
-
-//----------------------------------------------------------------------------
-void VISU_IsoSurfActor::RemoveFromRender(vtkRenderer* theRenderer)
-{
-  VISU_ScalarMapAct::RemoveFromRender(theRenderer);
-  theRenderer->RemoveActor(myLabels);
-}
-
-//From vtkFollower
-int VISU_IsoSurfActor::RenderOpaqueGeometry(vtkViewport *vp)
-{
-  UpdateLabels();
-  return VISU_ScalarMapAct::RenderOpaqueGeometry(vp);
-}
-
-
-int VISU_IsoSurfActor::RenderTranslucentGeometry(vtkViewport *vp)
-{
-  UpdateLabels();
-  return VISU_ScalarMapAct::RenderTranslucentGeometry(vp);
-}
-
-void VISU_IsoSurfActor::SetVisibility(int theMode){
-  VISU_ScalarMapAct::SetVisibility(theMode);
-  if(GetVisibility())
-    myLabels->VisibilityOn();
-  else
-    myLabels->VisibilityOff();
-  Modified();
-}
-
-
-///!!!! For test purposes only
-// void VISU_IsoSurfActor::SetMapperInput(vtkDataSet* theDataSet)
-// {
-//   VISU_ScalarMapAct::SetMapperInput(theDataSet);
-
-//   vtkFeatureEdges* aFilter = vtkFeatureEdges::New();
-//   aFilter->SetInput(VISU_ScalarMapAct::GetInput());
-//   SetInput(aFilter->GetOutput());
-// }
diff --git a/src/OBJECT/VISU_IsoSurfActor.h b/src/OBJECT/VISU_IsoSurfActor.h
deleted file mode 100644 (file)
index 0377ae6..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-//  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_IsoSurfActor.h
-//  Author : Vitaly Smetannikov
-//  Module : VISU
-
-
-#ifndef VISU_VectorsAct_HeaderFile
-#define VISU_VectorsAct_HeaderFile
-
-#include "VISU_ScalarMapAct.h"
-
-class vtkActor2D;
-//class vtkMaskPoints;
-class vtkLabeledDataMapper;
-class vtkPolyData;
-class VISU_LabelPointsFilter;
-
-
-class VTKOCC_EXPORT VISU_IsoSurfActor : public VISU_ScalarMapAct 
-{
- public:
-  vtkTypeMacro(VISU_IsoSurfActor, VISU_ScalarMapAct);
-  
-  static VISU_IsoSurfActor* New();
-  
-  
-  //----------------------------------------------------------------------------
-  virtual void AddToRender( vtkRenderer* ); 
-  
-  virtual void RemoveFromRender( vtkRenderer* );
-
-  virtual int RenderOpaqueGeometry(vtkViewport *viewport);
-  virtual int RenderTranslucentGeometry(vtkViewport *viewport);
-  
-  //virtual void SetPipeLine(VISU_PipeLine* thePipeLine);
-
-  void SetLinesLabeled(bool theIsLinesLabeled, int theNbLbl);
-  bool GetLinesLabeled() const { return myIsLinesLabeled;}
-   
-  int GetNbLabels() const;
-
-
-  //----------------------------------------------------------------------------
-  //! Visibility management
-  virtual void SetVisibility( int );
-
-
- protected:
-
-  VISU_IsoSurfActor();
-  ~VISU_IsoSurfActor();
-
-  void UpdateLabels();
-
-  vtkActor2D *myLabels;
-  vtkLabeledDataMapper* myLabeledDataMapper;
-  //vtkMaskPoints* myMaskPoints;
-  VISU_LabelPointsFilter* myMaskPoints;
-  vtkPolyData* myLabelsDataSet;
-
-  bool myIsLinesLabeled;
-  //int myNbLabels;
-};
-
-
-#endif
index cf2e7cfc0a3a7c06339bd6af7f8aaa631c19d20c..486498dabe2278f4a96cb73d2c612c6bf8321259 100644 (file)
@@ -212,6 +212,64 @@ VISU_MeshAct
   myEdgeActor->UnShrink();
 }
 
+//----------------------------------------------------------------------------
+void
+VISU_MeshAct
+::SetFeatureEdgesAllowed(bool theIsFeatureEdgesAllowed)
+{
+  Superclass::SetFeatureEdgesAllowed(theIsFeatureEdgesAllowed);
+
+  mySurfaceActor->SetFeatureEdgesAllowed(theIsFeatureEdgesAllowed);
+}
+
+void
+VISU_MeshAct
+::SetFeatureEdgesAngle(vtkFloatingPointType theValue)
+{
+  Superclass::SetFeatureEdgesAngle(theValue);
+
+  mySurfaceActor->SetFeatureEdgesAngle(theValue);
+}
+
+void
+VISU_MeshAct
+::SetFeatureEdgesFlags(bool theIsFeatureEdges,
+                      bool theIsBoundaryEdges,
+                      bool theIsManifoldEdges,
+                      bool theIsNonManifoldEdges)
+{
+  Superclass::SetFeatureEdgesFlags(theIsFeatureEdges,
+                                  theIsBoundaryEdges,
+                                  theIsManifoldEdges,
+                                  theIsNonManifoldEdges);
+
+  mySurfaceActor->SetFeatureEdgesFlags(theIsFeatureEdges,
+                                      theIsBoundaryEdges,
+                                      theIsManifoldEdges,
+                                      theIsNonManifoldEdges);
+}
+
+void
+VISU_MeshAct
+::SetFeatureEdgesColoring(bool theIsColoring)
+{
+  Superclass::SetFeatureEdgesColoring(theIsColoring);
+
+  mySurfaceActor->SetFeatureEdgesColoring(theIsColoring);
+}
+
+//----------------------------------------------------------------------------
+void
+VISU_MeshAct
+::SetFeatureEdgesEnabled(bool theIsFeatureEdgesEnabled)
+{
+  if(theIsFeatureEdgesEnabled && myRepresentation == VTK_POINTS)
+    return;
+
+  Superclass::SetFeatureEdgesEnabled(theIsFeatureEdgesEnabled);
+
+  mySurfaceActor->SetFeatureEdgesEnabled(theIsFeatureEdgesEnabled);
+}
 
 //----------------------------------------------------------------------------
 void 
@@ -288,6 +346,10 @@ VISU_MeshAct
     myEdgeActor->SetAllocatedRenderTime(this->AllocatedRenderTime/2.0,ren);
     myEdgeActor->RenderOpaqueGeometry(ren);
     break;
+  case FeatureEdges :
+    mySurfaceActor->SetAllocatedRenderTime(this->AllocatedRenderTime,ren);
+    mySurfaceActor->RenderOpaqueGeometry(ren);
+    break;
   }
   return 1;
 }
@@ -322,6 +384,10 @@ VISU_MeshAct
     myEdgeActor->SetAllocatedRenderTime(this->AllocatedRenderTime/2.0,ren);
     myEdgeActor->RenderTranslucentGeometry(ren);
     break;
+  case FeatureEdges :
+    mySurfaceActor->SetAllocatedRenderTime(this->AllocatedRenderTime,ren);
+    mySurfaceActor->RenderTranslucentGeometry(ren);
+    break;
   }
   return 1;
 }
index 5a5778d3832d7897ae4aeeed84e873ac551cb5a6..86ea730899b041a92156c21abdee505d4ce2fde1 100644 (file)
@@ -99,6 +99,29 @@ class VTKOCC_EXPORT VISU_MeshAct : public VISU_DataSetActor
   void
   UnShrink(); 
 
+  virtual
+  void
+  SetFeatureEdgesAllowed(bool theIsFeatureEdgesAllowed);
+
+  virtual
+  void
+  SetFeatureEdgesEnabled(bool theIsFeatureEdgesEnabled);
+
+  virtual
+  void
+  SetFeatureEdgesAngle(vtkFloatingPointType theAngle = 30.0); 
+
+  virtual
+  void
+  SetFeatureEdgesFlags(bool theIsFeatureEdges,
+                      bool theIsBoundaryEdges,
+                      bool theIsManifoldEdges,
+                      bool theIsNonManifoldEdges);
+
+  virtual
+  void
+  SetFeatureEdgesColoring(bool theIsColoring);
+
   //! Gets memory size used by the instance (bytes).
   virtual
   unsigned long int
diff --git a/src/OBJECT/VISU_PointMap3dActor.cxx b/src/OBJECT/VISU_PointMap3dActor.cxx
deleted file mode 100644 (file)
index 933cf60..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-//  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   : 
-//  Author : 
-//  Module : VISU
-//  $Header$
-
-#include "VISU_PointMap3dActor.h"
-#include "VISU_PipeLine.hxx"
-#include "VISU_ScalarBarActor.hxx"
-#include "VISU_DeformedGridPL.hxx"
-
-#include <SALOME_InteractiveObject.hxx>
-
-#include "utilities.h"
-#include <vtkRenderer.h>
-#include <vtkObjectFactory.h>
-
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
-vtkStandardNewMacro(VISU_PointMap3dActor);
-
-//==================================================================
-// function: Constructor
-// purpose :
-//==================================================================
-
-VISU_PointMap3dActor
-::VISU_PointMap3dActor()
-{
-  if(MYDEBUG) MESSAGE("VISU_PointMap3dActor::VISU_PointMap3dActor - this = "<<this);
-  myScalarBar = VISU_ScalarBarActor::New();
-}
-
-//==================================================================
-// function: Destructor
-// purpose :
-//==================================================================
-
-VISU_PointMap3dActor
-::~VISU_PointMap3dActor()
-{
-  if(MYDEBUG) MESSAGE("VISU_PointMap3dActor::~VISU_PointMap3dActor - this = "<<this);
-  myScalarBar->Delete();
-}
-
-//==================================================================
-// function: AddToRender
-// purpose :
-//==================================================================
-void
-VISU_PointMap3dActor
-::AddToRender(vtkRenderer* theRenderer)
-{
-  Superclass::AddToRender(theRenderer);
-  theRenderer->AddActor2D(myScalarBar);
-}
-
-void
-VISU_PointMap3dActor
-::RemoveFromRender(vtkRenderer* theRenderer)
-{
-  if(myScalarBar)
-    theRenderer->RemoveActor(myScalarBar);
-
-  Superclass::RemoveFromRender(theRenderer);
-}
-
-//==================================================================
-// function: Set & Get PipeLine
-// purpose :
-//==================================================================
-void
-VISU_PointMap3dActor
-::SetPipeLine(VISU_DeformedGridPL* thePipeLine)
-{
-  myPipeLine = thePipeLine;
-  SetMapper(thePipeLine->GetMapper());
-  myScalarBar->SetLookupTable(thePipeLine->GetBarTable());
-}
-
-VISU_DeformedGridPL*
-VISU_PointMap3dActor
-::GetPipeLine()
-{
-  return myPipeLine.GetPointer();
-}
-
-//==================================================================
-// function: Visibility
-// purpose :
-//==================================================================
-
-void
-VISU_PointMap3dActor
-::SetVisibility(int theMode)
-{
-  Superclass::SetVisibility( theMode );
-
-  //  myPointsActor->SetVisibility( theMode );
-
-  if(myScalarBar)
-    myScalarBar->SetVisibility(theMode);
-}
-
-VISU_ScalarBarActor*
-VISU_PointMap3dActor
-::GetScalarBar()
-{
-  return myScalarBar;
-}
-
-//==================================================================
-// function: SetIO
-// purpose :
-//==================================================================
-
-void 
-VISU_PointMap3dActor
-::setIO(const Handle(SALOME_InteractiveObject)& theIO)
-{
-  Superclass::setIO(theIO); 
-  myName = theIO->getName(); 
-}
diff --git a/src/OBJECT/VISU_PointMap3dActor.h b/src/OBJECT/VISU_PointMap3dActor.h
deleted file mode 100644 (file)
index 4b960fa..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-//  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_PointMap3dActor.h
-//  Author : Dmitry MATVEICHEV with help of Alexey PETROV
-//  Module : VISU
-//  $Header$
-
-#ifndef VISU_PointMap3dActor_HeaderFile
-#define VISU_PointMap3dActor_HeaderFile
-
-#include "SALOME_Actor.h"
-#include "VISU_DataSetActor.h"
-#include "VISU_BoostSignals.h"
-
-class VISU_ScalarBarActor;
-
-#ifdef _WIN32
-#define VTKOCC_EXPORT __declspec (dllexport)
-#else
-#define VTKOCC_EXPORT VTK_EXPORT
-#endif
-
-class VISU_DeformedGridPL;
-
-class VTKOCC_EXPORT VISU_PointMap3dActor : public VISU_ActorBase
-{
- public:
-  vtkTypeMacro(VISU_PointMap3dActor,SALOME_Actor);
-
-  static
-  VISU_PointMap3dActor* 
-  New();
-
-  ~VISU_PointMap3dActor();
-  
-//----------------------------------------------------------------------------
-  virtual
-    void
-    AddToRender( vtkRenderer* ); 
-  
-  virtual
-    void
-    RemoveFromRender( vtkRenderer* );
-  
-  virtual
-    void
-    SetVisibility(int theMode);
-  
-  virtual
-    VISU_ScalarBarActor* 
-    GetScalarBar();
-
-//----------------------------------------------------------------------------
-  virtual
-  void
-  setIO(const Handle(SALOME_InteractiveObject)& theIO);
-
-//----------------------------------------------------------------------------
-  virtual
-  VISU_DeformedGridPL* 
-  GetPipeLine();
-
-  virtual 
-  void
-  SetPipeLine(VISU_DeformedGridPL* thePipeLine);
-  
- protected:
-  VISU_PointMap3dActor();
-  vtkSmartPointer<VISU_DeformedGridPL> myPipeLine;
-
-  VISU_ScalarBarActor* myScalarBar;
-};
-
-#endif
index 908165049a5b59754e0f9898a5ec74905c6b22aa..790bc9fc5d8213b5548f2479b2e52c74bcdee7a0 100644 (file)
@@ -36,6 +36,9 @@
 #include "VISU_DeformedShapePL.hxx"
 #include "VISU_PipeLineUtils.hxx"
 
+#include <SALOME_ExtractGeometry.h>
+#include <SALOME_ExtractPolyDataGeometry.h>
+
 #include <vtkObjectFactory.h>
 #include <vtkRenderer.h>
 #include <vtkProperty.h>
@@ -258,7 +261,7 @@ void
 VISU_ScalarMapAct
 ::ShallowCopyPL(VISU_PipeLine* thePipeLine)
 {
-  VISU_Actor::ShallowCopyPL( thePipeLine );
+  VISU_DataSetActor::ShallowCopyPL( thePipeLine );
 
   myEdgeActor->GetMapper()->ScalarVisibilityOff();
 
@@ -274,10 +277,19 @@ VISU_ScalarMapAct
 {
   Superclass::SetMapperInput( theDataSet );
 
-  myPointsActor->SetInput( theDataSet );
+//    myPointsActor->SetInput( theDataSet );
+//    mySurfaceActor->SetInput( theDataSet );
+//    myEdgeActor->SetInput( theDataSet );
 
-  mySurfaceActor->SetInput( theDataSet );
-  myEdgeActor->SetInput( theDataSet );
+  if (theDataSet->IsA("vtkPolyData")) {
+    myPointsActor->SetInput( myPolyDataExtractor->GetOutput() );
+    mySurfaceActor->SetInput( myPolyDataExtractor->GetOutput() );
+    myEdgeActor->SetInput( myPolyDataExtractor->GetOutput() );
+  } else {
+    myPointsActor->SetInput( myExtractor->GetOutput() );
+    mySurfaceActor->SetInput( myExtractor->GetOutput() );
+    myEdgeActor->SetInput( myExtractor->GetOutput() );
+  }
 }
 
 //----------------------------------------------------------------------------
@@ -334,6 +346,65 @@ VISU_ScalarMapAct
   mySurfaceActor->UnShrink();
 }
 
+//----------------------------------------------------------------------------
+void
+VISU_ScalarMapAct
+::SetFeatureEdgesAllowed(bool theIsFeatureEdgesAllowed)
+{
+  Superclass::SetFeatureEdgesAllowed(theIsFeatureEdgesAllowed);
+
+  mySurfaceActor->SetFeatureEdgesAllowed(theIsFeatureEdgesAllowed);
+}
+
+void
+VISU_ScalarMapAct
+::SetFeatureEdgesAngle(vtkFloatingPointType theValue)
+{
+  Superclass::SetFeatureEdgesAngle(theValue);
+
+  mySurfaceActor->SetFeatureEdgesAngle(theValue);
+}
+
+void
+VISU_ScalarMapAct
+::SetFeatureEdgesFlags(bool theIsFeatureEdges,
+                      bool theIsBoundaryEdges,
+                      bool theIsManifoldEdges,
+                      bool theIsNonManifoldEdges)
+{
+  Superclass::SetFeatureEdgesFlags(theIsFeatureEdges,
+                                  theIsBoundaryEdges,
+                                  theIsManifoldEdges,
+                                  theIsNonManifoldEdges);
+
+  mySurfaceActor->SetFeatureEdgesFlags(theIsFeatureEdges,
+                                      theIsBoundaryEdges,
+                                      theIsManifoldEdges,
+                                      theIsNonManifoldEdges);
+}
+
+void
+VISU_ScalarMapAct
+::SetFeatureEdgesColoring(bool theIsColoring)
+{
+  Superclass::SetFeatureEdgesColoring(theIsColoring);
+
+  mySurfaceActor->SetFeatureEdgesColoring(theIsColoring);
+}
+
+//----------------------------------------------------------------------------
+void
+VISU_ScalarMapAct
+::SetFeatureEdgesEnabled(bool theIsFeatureEdgesEnabled)
+{
+  if(theIsFeatureEdgesEnabled && myRepresentation == VTK_POINTS)
+    return;
+
+  Superclass::SetFeatureEdgesEnabled(theIsFeatureEdgesEnabled);
+
+  mySurfaceActor->SetFeatureEdgesEnabled(theIsFeatureEdgesEnabled);
+}
+
 //----------------------------------------------------------------------------
 void
 VISU_ScalarMapAct
index 8589d05df5c3f9dc2349268526b409b874c8d594..d67cfa5f000bb6510dd9be90bb0c721b29b784c2 100644 (file)
@@ -77,6 +77,29 @@ class VTKOCC_EXPORT VISU_ScalarMapAct : public VISU_DataSetActor
   void
   UnShrink(); 
   
+  virtual
+  void
+  SetFeatureEdgesAllowed(bool theIsFeatureEdgesAllowed);
+
+  virtual
+  void
+  SetFeatureEdgesEnabled(bool theIsFeatureEdgesEnabled);
+
+  virtual
+  void
+  SetFeatureEdgesAngle(vtkFloatingPointType theAngle = 30.0); 
+
+  virtual
+  void
+  SetFeatureEdgesFlags(bool theIsFeatureEdges,
+                      bool theIsBoundaryEdges,
+                      bool theIsManifoldEdges,
+                      bool theIsNonManifoldEdges);
+
+  virtual
+  void
+  SetFeatureEdgesColoring(bool theIsColoring);
+
   virtual
   void
   SetOpacity(vtkFloatingPointType theValue);
index 7a157e232ad164694686f4be779f217a9533c8f2..f878dcf9cf5f5cfc7d7bc9539664b3b0214ee17c 100644 (file)
@@ -36,6 +36,9 @@
 #include <vtkPolyDataMapper.h>
 #include <vtkPolyData.h>
 #include <vtkPassThroughFilter.h>
+#include <VISU_UsedPointsFilter.hxx>
+#include <vtkUnstructuredGrid.h>
+#include <VISU_MergeFilter.hxx>
 
 //----------------------------------------------------------------------------
 vtkStandardNewMacro(VISU_VectorsAct);
@@ -120,3 +123,24 @@ VISU_VectorsAct
 
   return aSize;
 }
+
+//----------------------------------------------------------------------------
+vtkDataSet*
+VISU_VectorsAct
+::GetValLabelsInput()
+{
+  VISU_VectorsPL* aPL = dynamic_cast<VISU_VectorsPL*>( GetPipeLine() );
+  if ( aPL )
+  {
+    return aPL->GetMergedInput();
+    /*VISU_UsedPointsFilter* aFilter = aPL->GetUsedPointsFilter();
+    vtkSmartPointer< VISU_MergeFilter > aFilter = aPL->myMergeFilter;
+    if ( aFilter )
+    {
+      aFilter->Update();
+      return aFilter->GetOutput();
+    }*/
+  }
+
+  return Superclass::GetValLabelsInput();
+}
index cc76ce4867ac088aca2d862266239c82b518f31d..5c409c5781de7365996f3177aae700f2c4684d9b 100644 (file)
@@ -65,6 +65,10 @@ class VTKOCC_EXPORT VISU_VectorsAct : public VISU_ScalarMapAct
   virtual
   unsigned long int
   GetMemorySize();
+  
+  virtual
+  vtkDataSet*
+  GetValLabelsInput();
  
  protected:
   VISU_VectorsAct();
index 425f955cf39f64d55aed1e00d963912dde6c0b37..8c488c75f81363141ab5777379375b2466503ad6 100644 (file)
@@ -69,7 +69,8 @@ salomeinclude_HEADERS= \
        VISU_ElnoDisassembleFilter.hxx \
        VISU_ElnoAssembleFilter.hxx \
        VISU_DeformationPL.hxx \
-       VISU_OptionalDeformationPL.hxx 
+       VISU_OptionalDeformationPL.hxx \
+       VISU_XYPlotActor.hxx
 
 dist_libVisuPipeLine_la_SOURCES= \
        VISU_MapperHolder.cxx \
@@ -111,7 +112,8 @@ dist_libVisuPipeLine_la_SOURCES= \
        VISU_ElnoDisassembleFilter.cxx \
        VISU_ElnoAssembleFilter.cxx \
        VISU_DeformationPL.cxx \
-       VISU_OptionalDeformationPL.cxx
+       VISU_OptionalDeformationPL.cxx\
+       VISU_XYPlotActor.cxx
 
 libVisuPipeLine_la_CPPFLAGS= \
        $(VTK_INCLUDES) \
index ed9c0749e948f8f8f98712142c8955bbff074d1a..8fbf41f6063433295a2439659debe9f719279318 100755 (executable)
@@ -20,6 +20,8 @@
 #ifndef SALOME_ExtractGeometry_H
 #define SALOME_ExtractGeometry_H
 
+#include "VISUPipeline.hxx"
+
 #include <vtkExtractGeometry.h>
 #include <vtkSmartPointer.h>
 
@@ -27,7 +29,7 @@
 
 class vtkImplicitBoolean;
 
-class SALOME_ExtractGeometry : public vtkExtractGeometry
+class VISU_PIPELINE_EXPORT SALOME_ExtractGeometry : public vtkExtractGeometry
 {
 public:
   vtkTypeMacro(SALOME_ExtractGeometry, vtkExtractGeometry);
index 05b039182416d3acab965f7a02a9a8f54c21a53b..1b3bf43691e720be629ec9dc0fddc88266e2c98d 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef SALOME_ExtractPolyDataGeometry_H
 #define SALOME_ExtractPolyDataGeometry_H
 
+#include "VISUPipeline.hxx"
+
 #include <vtkExtractPolyDataGeometry.h>
 #include <vtkSmartPointer.h>
 
@@ -27,7 +29,7 @@
 
 class vtkImplicitBoolean;
 
-class SALOME_ExtractPolyDataGeometry : public vtkExtractPolyDataGeometry
+class VISU_PIPELINE_EXPORT SALOME_ExtractPolyDataGeometry : public vtkExtractPolyDataGeometry
 {
 public:
   vtkTypeMacro(SALOME_ExtractPolyDataGeometry, vtkExtractPolyDataGeometry);
index 291c457a1a936c9278dd1fa12baf3ec5adb58d01..0881f71a0a0acc278a208125acad000c2e0f2862 100644 (file)
@@ -34,6 +34,7 @@
 #include "VISU_IsoSurfacesPL.hxx"
 #include "VISU_CutPlanesPL.hxx"
 #include "VISU_CutLinesPL.hxx"
+#include "VISU_ColoredPL.hxx"
 #include "VISU_DeformedShapePL.hxx"
 #include "VISU_VectorsPL.hxx"
 #include "VISU_StreamLinesPL.hxx"
@@ -48,7 +49,9 @@
 #include "VISU_ElnoDisassembleFilter.hxx"
 #include "VISU_ElnoAssembleFilter.hxx"
 
-typedef VISU_ScalarMapPL TPresent;
+//typedef VISU_CutPlanesPL TPresent;
+//typedef VISU_ScalarMapPL TPresent;
+typedef VISU_CutLinesPL TPresent;
 
 // VTK includes
 #include <vtkShrinkFilter.h>
@@ -73,8 +76,42 @@ typedef VISU_ScalarMapPL TPresent;
 #include <vtk3DWidget.h>
 #include <vtkProperty.h>
 
+//RKV:Begin
+#include <vtkLookupTable.h>
+#include <vtkIntArray.h>
+#include <vtkPointData.h>
+#include <vtkCellData.h>
+#include <vtkPointSet.h>
+#include <vtkPolyData.h>
+#include <vtkXYPlotActor.h>
+#include <vtkProperty2D.h>
+#include <vtkTextProperty.h>
+
+#include <vtkXYPlotWidget.h>
+#include <vtkScalarBarWidget.h>
+#include <vtkScalarBarActor.h>
+#include <vtkMatrix4x4.h>
+
+/*#include <vtkBarChartActor.h>
+#include <vtkFloatArray.h>
+#include <vtkDataObject.h>
+#include <vtkFieldData.h>
+#include <vtkMath.h>
+#include <vtkTextProperty.h>
+#include <vtkPolyData.h>
+#include <vtkPoints.h>
+#include <vtkIdList.h>
+#include <vtkProperty2D.h>
+#include <vtkLegendBoxActor.h>
+#include <vtkTestUtilities.h>
+#include <vtkRegressionTestImage.h>
+*/
+//RKV:End
+
 #include "utilities.h"
 
+static int isOnlyMesh = false;
+
 void PrintMissing(){
   MESSAGE(std::endl << "VISUPipeLine : missing operand after `VISUPipeLine'" <<
           std::endl << "VISUPipeLine : Try `VISUPipeLine -h' for more information.");
@@ -95,6 +132,159 @@ void PrintHelp(){
 void PrintErr(){
   MESSAGE("***************************ERROR*****************************************");
 }
+//#define _DEBUG_ID_MAPPING_
+
+//RKV:Begin
+/*
+vtkActor* barChartActor()
+{
+  int numTuples = 6;
+
+  vtkFloatArray *bitter = vtkFloatArray::New();
+  bitter->SetNumberOfTuples(numTuples);
+  
+  for (int i=0; i<numTuples; i++)
+    {
+    bitter->SetTuple1(i, vtkMath::Random(7,100));
+    }
+
+  vtkDataObject *dobj = vtkDataObject::New();
+  dobj->GetFieldData()->AddArray(bitter);
+  
+  vtkBarChartActor *actor = vtkBarChartActor::New();
+  actor->SetInput(dobj);
+  actor->SetTitle("Bar Chart");
+  actor->GetPositionCoordinate()->SetValue(0.05,0.05,0.0);
+  actor->GetPosition2Coordinate()->SetValue(0.95,0.85,0.0);
+  actor->GetProperty()->SetColor(1,1,1);
+  actor->GetLegendActor()->SetNumberOfEntries(numTuples);
+  for (int i=0; i<numTuples; i++)
+    {
+    double red=vtkMath::Random(0,1);
+    double green=vtkMath::Random(0,1);
+    double blue=vtkMath::Random(0,1);
+    actor->SetBarColor(i,red,green,blue);
+    }
+  actor->SetBarLabel(0,"oil");
+  actor->SetBarLabel(1,"gas");
+  actor->SetBarLabel(2,"water");
+  actor->SetBarLabel(3,"snake oil");
+  actor->SetBarLabel(4,"tequila");
+  actor->SetBarLabel(5,"beer");
+  actor->LegendVisibilityOn();
+
+  // Set text colors (same as actor for backward compat with test)
+  actor->GetTitleTextProperty()->SetColor(1,1,0);
+  actor->GetLabelTextProperty()->SetColor(1,0,0);
+  return actor;
+}
+*/
+//RKV:End
+//----------------------------------------------------------------------------
+template<class TPipeLine>
+VISU_ColoredPL*
+CreateColoredPL(VISU_Convertor* theConvertor,
+               const std::string& theMeshName,
+               const VISU::TEntity& theEntity,
+               const std::string& theFieldName,
+               int theTimeStampNumber);
+
+
+//----------------------------------------------------------------------------
+template<>
+VISU_ColoredPL*
+CreateColoredPL<VISU_GaussPointsPL>(VISU_Convertor* theConvertor,
+                                   const std::string& theMeshName,
+                                   const VISU::TEntity& theEntity,
+                                   const std::string& theFieldName,
+                                   int theTimeStampNumber)
+{
+  VISU_GaussPointsPL* aPresent = VISU_GaussPointsPL::New();
+  VISU::PGaussPtsIDMapper aGaussPtsIDMapper = 
+    theConvertor->GetTimeStampOnGaussPts(theMeshName,
+                                        theEntity,
+                                        theFieldName,
+                                        theTimeStampNumber);
+  aPresent->SetGaussPtsIDMapper(aGaussPtsIDMapper);
+
+  char aMainTexture[80];
+  strcpy( aMainTexture, getenv( "VISU_ROOT_DIR" ) );
+  strcat( aMainTexture, "/share/salome/resources/visu/sprite_texture.bmp" );
+  
+  char anAlphaTexture[80];
+  strcpy( anAlphaTexture, getenv( "VISU_ROOT_DIR" ) );
+  strcat( anAlphaTexture, "/share/salome/resources/visu/sprite_alpha.bmp" );
+  
+  vtkSmartPointer<vtkImageData> aTextureValue = 
+    VISU_GaussPointsPL::MakeTexture( aMainTexture, anAlphaTexture );
+  aPresent->SetImageData( aTextureValue.GetPointer() );
+
+  aPresent->Update();
+
+#ifdef _DEBUG_ID_MAPPING_
+  vtkDataSet* aDataSet = aPresent->GetOutput();
+  aDataSet->Update();
+  int aNbCells = aDataSet->GetNumberOfCells();
+  cout<<"aNbCells = "<<aNbCells<<endl;
+  for(int anCellId = 0; anCellId < aNbCells; anCellId++){
+    vtkIdType anObjID = aPresent->GetNodeObjID(anCellId);
+    vtkIdType aVtkID = aPresent->GetNodeVTKID(anObjID);
+    cout<<anObjID<<"; "<<aVtkID<<"; - ";
+    vtkFloatingPointType* aCoord = aPresent->GetNodeCoord(anObjID);
+    cout<<aCoord[0]<<"; "<<aCoord[1]<<"; "<<aCoord[2]<<endl;
+  }
+#endif
+  return aPresent;
+}
+
+//----------------------------------------------------------------------------
+template<class TPipeLine>
+VISU_ColoredPL*
+CreateColoredPL(VISU_Convertor* theConvertor,
+               const std::string& theMeshName,
+               const VISU::TEntity& theEntity,
+               const std::string& theFieldName,
+               int theTimeStampNumber)
+{
+  TPipeLine* aPresent = TPipeLine::New();
+  VISU::PUnstructuredGridIDMapper anUnstructuredGridIDMapper = 
+    theConvertor->GetTimeStampOnMesh(theMeshName,
+                                    theEntity,
+                                    theFieldName,
+                                    theTimeStampNumber);
+  aPresent->SetUnstructuredGridIDMapper(anUnstructuredGridIDMapper);
+
+  vtkFloatingPointType aRange[] = { 4, 5 };
+cout << "before filter limits set" << endl;
+      vtkObject::GlobalWarningDisplayOn();
+      aPresent->DebugOn();
+  aPresent->SetScalarFilterRange( aRange );
+  aPresent->UseScalarFiltering( true );
+cout << "after filter set" << endl;
+
+  //aPresent->ClearGeometry();
+  //{
+  //  VISU::PUnstructuredGridIDMapper anIDMapper = 
+  //    theConvertor->GetMeshOnGroup(theMeshName,
+  //                              "groupe1");
+  //  aPresent->AddGeometry(anIDMapper->GetOutput());
+  //}
+  //{
+  //  VISU::PUnstructuredGridIDMapper anIDMapper = 
+  //    theConvertor->GetMeshOnGroup(theMeshName,
+  //                              "TUBEH                                                                           ");
+  //  aPresent->AddGeometry(anIDMapper->GetOutput());
+  //}
+  //{
+  //  VISU::PUnstructuredGridIDMapper anIDMapper = 
+  //    theConvertor->GetMeshOnGroup(theMeshName,
+  //                              "STRI                                                                            ");
+  //  aPresent->AddGeometry(anIDMapper->GetOutput());
+  //}
+  aPresent->Update();
+cout << "after update" << endl;
+  return aPresent;
+}
 
 
 //----------------------------------------------------------------------------
@@ -187,106 +377,260 @@ main(int argc, char** argv)
       const VISU::TMeshMap& aMeshMap = aConvertor->GetMeshMap();
       VISU::TMeshMap::const_iterator aMeshMapIter = aMeshMap.begin();
       if(aMeshMapIter == aMeshMap.end()) return 0;
-      //Iterate by meshes
-      for (;aMeshMapIter != aMeshMap.end();aMeshMapIter++) {
-        
-        const std::string& theMeshName = aMeshMapIter->first;
-        if( strcmp(aMeshName, theMeshName.c_str()) )
-          continue;
-        else
-          isMeshOk = true;
-
-        const VISU::PMesh aMesh = aMeshMapIter->second;
-        const VISU::TMeshOnEntityMap& aMeshOnEntityMap = aMesh->myMeshOnEntityMap;
-        VISU::TMeshOnEntityMap::const_iterator aMeshOnEntityMapIter;
-
-        aMeshOnEntityMapIter = aMeshOnEntityMap.begin();
-        //Iterate by meshes on entity
-        for(; aMeshOnEntityMapIter != aMeshOnEntityMap.end(); aMeshOnEntityMapIter++) {
-          const VISU::TEntity& anEntity = aMeshOnEntityMapIter->first;
-          const VISU::PMeshOnEntity aMeshOnEntity = aMeshOnEntityMapIter->second;
-
-          const VISU::TFieldMap& aFieldMap = aMeshOnEntity->myFieldMap;
-          VISU::TFieldMap::const_iterator aFieldMapIter = aFieldMap.begin();
-
-          //Iterate by field
-          for(; aFieldMapIter != aFieldMap.end(); aFieldMapIter++){
-            const VISU::PField aField = aFieldMapIter->second;
-            const std::string& theFieldName = aFieldMapIter->first;
-            
-            if( strcmp(aFieldName, theFieldName.c_str()) )
-              continue;
-            else
-              isFieldOk = true;
-            
-            if(aComponentNumber > aField->myNbComp)
-              continue;
-            else
-              isComponentOk = true;
-            
-            const VISU::TValField& aValField = aField->myValField;
-            VISU::TValField::const_iterator aValFieldIter = aValField.find(aTimeStampNumber);
-            if(aValFieldIter == aValField.end())
-              continue;
-            else
-              isTimeStampOk = true;
-            
-            int aTimeStamp = aValFieldIter->first;
-          
-            vtkActor* anActor = vtkActor::New();
-
-            if(anEntity != VISU::NODE_ENTITY){
-              VISU::PUnstructuredGridIDMapper anUnstructuredGridIDMapper = 
-                aConvertor->GetTimeStampOnMesh(theMeshName,
-                                               anEntity,
-                                               theFieldName,
-                                               aTimeStamp);
-
-             vtkUnstructuredGrid* anUnstructuredGrid = anUnstructuredGridIDMapper->GetUnstructuredGridOutput();
-             VISU::WriteToFile( anUnstructuredGrid, "/data/apo/elno_from_id_mapper.vtk" );
-             
-             VISU_ElnoDisassembleFilter* aDisassembleFilter = VISU_ElnoDisassembleFilter::New();
-             aDisassembleFilter->SetInput( anUnstructuredGrid );
-             aDisassembleFilter->SetShrinkFactor( 0.999 );
-             VISU::WriteToFile( aDisassembleFilter->GetOutput(), "/data/apo/elno_from_disassemble.vtk" );
-
-             vtkCutter *aCutter = vtkCutter::New();
-
-             vtkPointLocator* aPointLocator = vtkPointLocator::New();
-             aCutter->SetLocator( aPointLocator );
-             aPointLocator->Delete();
-             
-             TPresent* aPresent = TPresent::New();
-             aPresent->SetUnstructuredGridIDMapper( anUnstructuredGridIDMapper );
-             //aPresent->SetOrientation( VISU_CutPlanesPL::ZX, 0.0, 0.0, 0 );
-             aPresent->Update();
-
-             aPresent->GetMapper()->InterpolateScalarsBeforeMappingOn();
-             anActor->SetMapper( aPresent->GetMapper() );
-             
-              vtkScalarBarActor* aScalarBar = vtkScalarBarActor::New();
-              //aScalarBar->SetLookupTable( aMapperTable );
-              aScalarBar->SetLookupTable( aPresent->GetBarTable() );
-
-
-             vtkScalarBarWidget* aWidget = vtkScalarBarWidget::New();
-             aWidget->SetScalarBarActor( aScalarBar );
-             aWidget->SetInteractor( anInteractor );
-             aWidget->SetEnabled( true );
-
-              aRenderer->AddActor(anActor);
-              aRenderer->AddActor2D(aScalarBar);
-            }else{
-              continue;
-            }
-
-            aWindow->Render();
-            aRenderer->ResetCamera();
-            
-            anInteractor->Start();
-            return 0;
-          }
-        }
+      const std::string& aMeshName = aMeshMapIter->first;
+      const VISU::PMesh aMesh = aMeshMapIter->second;
+      const VISU::TMeshOnEntityMap& aMeshOnEntityMap = aMesh->myMeshOnEntityMap;
+      VISU::TMeshOnEntityMap::const_iterator aMeshOnEntityMapIter;
+      if(isOnlyMesh){
+       const VISU::TEntity& anEntity = VISU::CELL_ENTITY;
+       aMeshOnEntityMapIter = aMeshOnEntityMap.find(anEntity);
+
+       VISU::PNamedIDMapper anIDMapper = 
+         aConvertor->GetMeshOnEntity(aMeshName,anEntity);
+
+       VISU_MeshPL* aPresent = VISU_MeshPL::New();
+       aPresent->SetUnstructuredGridIDMapper(anIDMapper);
+
+       vtkActor* aActor = vtkActor::New();
+       aActor->SetMapper(aPresent->GetMapper());
+       aActor->GetProperty()->SetRepresentation(VTK_WIREFRAME);
+       //aRenderer->ResetCameraClippingRange();
+
+       aRenderer->AddActor(aActor);
+
+       aWindow->Render();
+       anInteractor->Start();
+       return 0;
+      }
+      //Import fields
+      aMeshOnEntityMapIter = aMeshOnEntityMap.begin();
+      for(; aMeshOnEntityMapIter != aMeshOnEntityMap.end(); aMeshOnEntityMapIter++) {
+       const VISU::TEntity& anEntity = aMeshOnEntityMapIter->first;
+       const VISU::PMeshOnEntity aMeshOnEntity = aMeshOnEntityMapIter->second;
+       const VISU::TFieldMap& aFieldMap = aMeshOnEntity->myFieldMap;
+       VISU::TFieldMap::const_iterator aFieldMapIter = aFieldMap.begin();
+       for(; aFieldMapIter != aFieldMap.end(); aFieldMapIter++){
+         const VISU::PField aField = aFieldMapIter->second;
+//       if(aField->myNbComp == 1) 
+//         continue;
+         const std::string& aFieldName = aFieldMapIter->first;
+         const VISU::TValField& aValField = aField->myValField;
+         VISU::TValField::const_reverse_iterator aValFieldIter = aValField.rbegin();
+         if(aValFieldIter == aValField.rend()) return 0;
+         int aTimeStamp = aValFieldIter->first;
+
+         vtkActor* anActor = vtkActor::New();
+         VISU_ColoredPL* aPresent = NULL;
+         if(anEntity == VISU::NODE_ENTITY){
+           aPresent = CreateColoredPL<TPresent>(aConvertor,
+                                                aMeshName,
+                                                anEntity,
+                                                aFieldName,
+                                                aTimeStamp);
+
+           anActor->SetMapper(aPresent->GetMapper());
+         }else{
+           continue;
+           aPresent = CreateColoredPL<TPresent>(aConvertor,
+                                                aMeshName,
+                                                anEntity,
+                                                aFieldName,
+                                                aTimeStamp);
+
+           VTKViewer_GeometryFilter* aGeometryFilter = VTKViewer_GeometryFilter::New();
+           aGeometryFilter->SetInput(aPresent->GetOutput());
+           aGeometryFilter->SetInside(true);
+
+           vtkMaskPoints* aMaskPoints = vtkMaskPoints::New();
+           aMaskPoints->SetInput(aGeometryFilter->GetOutput());
+           aMaskPoints->SetGenerateVertices(true);
+           aMaskPoints->SetOnRatio(1);
+
+           VISU_OpenGLPointSpriteMapper* aMapper = VISU_OpenGLPointSpriteMapper::New();
+           aMapper->SetAverageCellSize( VISU_DeformedShapePL::GetScaleFactor( aPresent->GetOutput() ) );
+  
+           char aMainTexture[80];
+           strcpy( aMainTexture, getenv( "VISU_ROOT_DIR" ) );
+           strcat( aMainTexture, "/share/salome/resources/visu/sprite_texture.vti" );
+           
+           char anAlphaTexture[80];
+           strcpy( anAlphaTexture, getenv( "VISU_ROOT_DIR" ) );
+           strcat( anAlphaTexture, "/share/salome/resources/visu/sprite_alpha.vti" );
+           
+           vtkSmartPointer<vtkImageData> aTextureValue = 
+             VISU_GaussPointsPL::MakeTexture( aMainTexture, anAlphaTexture );
+           aMapper->SetImageData( aTextureValue.GetPointer() );
+
+           //vtkPolyDataMapper* aMapper = vtkPolyDataMapper::New();
+           aMapper->SetLookupTable(aPresent->GetMapperTable());
+           aMapper->SetUseLookupTableScalarRange(true);
+           aMapper->SetColorModeToMapScalars();
+           aMapper->SetScalarVisibility(true);
+
+           aMapper->SetInput(aMaskPoints->GetOutput());
+           aGeometryFilter->Delete();
+
+           anActor->SetMapper(aMapper);
+           aMapper->Delete();
+         }
+
+
+
+
+
+//RKV:Begin
+  vtkLookupTable* lut = vtkLookupTable::New();
+  int nbColors = aPresent->GetNbColors();
+  lut->SetNumberOfTableValues(nbColors);
+  vtkDataArray* dataArr;
+    if(VISU::IsDataOnCells(aPresent->GetInput())) {
+       dataArr = aPresent->GetInput()->GetCellData()->GetScalars();
+    } else {
+       dataArr = aPresent->GetInput()->GetPointData()->GetScalars();
+    }
+  vtkFloatingPointType aRange[2];
+  dataArr->GetRange(aRange);
+  MSG(true, "Range[0]: "<<aRange[0]);
+  MSG(true, "Range[1]: "<<aRange[1]);
+
+  lut->SetTableRange(aRange);
+  lut->Build();
+    MSG(true, "1\n");
+  vtkIntArray* distr = vtkIntArray::New();
+  distr->SetNumberOfValues(nbColors);
+    MSG(true, "Number of colors: "<<nbColors);
+  distr->FillComponent(0, 0.);
+    MSG(true, "2\n");
+  int aNbVals = dataArr->GetNumberOfTuples();
+  int idx = 0, cnt = 0;
+  
+    MSG(true, "3\n");
+  for(vtkIdType aValId = 0; aValId < aNbVals; aValId++){
+//    MSG(true, "Value: "<< *(dataArr->GetTuple(aValId)));
+       idx = lut->GetIndex(*(dataArr->GetTuple(aValId)));
+//    MSG(true, "Value index "<<idx);
+       cnt = distr->GetValue(idx);
+       distr->SetValue(idx, cnt + 1);
+  }
+    MSG(true, "4\n");
+  distr->Modified();
+  double range[2];
+  distr->GetRange(range);
+  MSG(true, "DistrRange[0]: " << range[0]);
+  MSG(true, "DistrRange[1]: " << range[1]);
+    MSG(true, "5\n");
+//  vtkPoints* points = vtkPoints::New();
+//  aNbVals = distr->GetNumberOfTuples();
+//  points->Allocate(aNbVals);
+//  double x[3] = {0., 0., 0.};
+/*  for(vtkIdType aValId = 0; aValId < aNbVals; aValId++){
+       x[0] = aValId;
+       points->InsertPoint(aValId, x);
+*///    MSG(true, "Inserted point "<<aValId);
+//    MSG(true, ": "<<distr->GetValue(aValId));
+//  }
+//  points->SetData(distr);
+  
+/*  vtkPointSet* pset = vtkPolyData::New();
+  pset->SetPoints(points);
+  pset->GetPointData()->SetScalars(distr);
+*/    
+  vtkDataObject *dobj = vtkDataObject::New();
+  dobj->GetFieldData()->AddArray(distr);
+  
+  vtkXYPlotActor* xyplot = vtkXYPlotActor::New();
+//  xyplot->AddInput(pset);
+  xyplot->AddDataObjectInput(dobj);
+  xyplot->GetPositionCoordinate()->SetValue(0.0, 0.67, 0);
+  xyplot->GetPosition2Coordinate()->SetValue(1.0, 0.33, 0); // #relative to Position
+  xyplot->SetXValuesToIndex();
+//  xyplot->SetXValuesToNormalizedArcLength();
+//  xyplot->SetXValuesToArcLength();
+//  xyplot->SetNumberOfXLabels(0);
+  xyplot->SetTitle("");
+  xyplot->SetXTitle("");
+  xyplot->SetYTitle("Distribution");
+//  xyplot->ReverseYAxisOn();
+//  xyplot->SetDataObjectPlotModeToRows();
+  xyplot->SetLabelFormat("%.0f");
+  xyplot->SetXRange(0, nbColors-1);
+  xyplot->SetYRange(range[0], range[1]);
+/*  int ny = floor(fabs(range[1] - range[0]));
+    MSG(true, "ny = "<<ny);
+    MSG(true, "nbYLabels = "<<xyplot->GetNumberOfYLabels());
+  if (ny < xyplot->GetNumberOfYLabels()) {
+    MSG(true, "5.1");
+       xyplot->SetNumberOfYLabels(ny);
+    MSG(true, "nbYLabels = "<<xyplot->GetNumberOfYLabels());
+  }
+*/  xyplot->GetProperty()->SetColor(1, 1, 1);
+  xyplot->GetProperty()->SetLineWidth(2);
+  xyplot->GetProperty()->SetDisplayLocationToForeground();
+/*  vtkMatrix4x4 *m = vtkMatrix4x4::New();
+    MSG(true, "5.1\n");
+  m->Zero();
+    MSG(true, "5.2\n");
+  m->SetElement(0, 1, 1);
+  m->SetElement(1, 0, -1);
+  m->SetElement(2, 2, 1);
+  m->SetElement(3, 3, 1);
+    MSG(true, "5.3\n");
+  xyplot->PokeMatrix(m);
+*/  //# Set text prop color (same color for backward compat with test)
+  //# Assign same object to all text props
+  vtkTextProperty* tprop;
+  tprop = xyplot->GetTitleTextProperty();
+  tprop->SetColor(xyplot->GetProperty()->GetColor());
+  xyplot->SetAxisTitleTextProperty(tprop);
+  xyplot->SetAxisLabelTextProperty(tprop);
+  
+//RKV:End  
+  
+
+    MSG(true, "6\n");
+
+/*{
+  vtkXYPlotWidget* aWidget = vtkXYPlotWidget::New();
+  aWidget->SetInteractor( anInteractor );
+  aWidget->SetXYPlotActor( xyplot );
+  aWidget->SetEnabled( 1 );
+}*/
+
+
+      vtkObject::GlobalWarningDisplayOn();
+
+         VISU_ScalarBarActor * aScalarBar = VISU_ScalarBarActor::New();
+         //vtkScalarBarActor * aScalarBar = vtkScalarBarActor::New();
+         aPresent->SetNbColors(5);
+         aPresent->DebugOn();
+         aPresent->Update();
+         aScalarBar->SetLookupTable(aPresent->GetBarTable());
+         aScalarBar->DebugOn();
+         aScalarBar->SetDistribution(aPresent->GetDistribution());
+         aScalarBar->DistributionVisibilityOn();
+//       aScalarBar->SetOrientationToHorizontal();
+//       aScalarBar->GetPositionCoordinate()->SetValue(.1, .6, 0);
+//       aScalarBar->GetPosition2Coordinate()->SetValue(.8, .3, 0);
+
+/*{
+  vtkScalarBarWidget* aWidget = vtkScalarBarWidget::New();
+  aWidget->SetInteractor( anInteractor );
+  aWidget->SetScalarBarActor( aScalarBar );
+  aWidget->SetEnabled( 1 );
+}
+*/
+         aRenderer->AddActor(anActor);
+//       aRenderer->AddActor2D(xyplot); //RKV
+         aRenderer->AddActor2D(aScalarBar);
+         
+         //aRenderer->AddActor2D(barChartActor()); //RKV
+
+         aWindow->Render();
+         aRenderer->ResetCamera();
+
+         anInteractor->Start();
+         return 0;
+       }
       }
     }
     else{
index 0792a90c42647da0c40c169a57369f4aaa1a4a4a..decfeff2e6381995191423cbacef0921828d109a 100644 (file)
 
 #include "VISU_PipeLineUtils.hxx"
 
+#include <vtkThreshold.h>
+#include <vtkPassThroughFilter.h>
+#include <vtkDoubleArray.h>
+
 
 //----------------------------------------------------------------------------
 VISU_ColoredPL
 ::VISU_ColoredPL():
-  myMapperTable(VISU_LookupTable::New()),
-  myBarTable(VISU_LookupTable::New()),
-  myExtractor(VISU_Extractor::New()),
-  myFieldTransform(VISU_FieldTransform::New())
+  myMapperTable( VISU_LookupTable::New() ),
+  myBarTable( VISU_LookupTable::New() ),
+  myExtractor( VISU_Extractor::New() ),
+  myFieldTransform( VISU_FieldTransform::New() ),
+  myThreshold ( vtkThreshold::New() ),
+  myPassFilter( vtkPassThroughFilter::New() ),
+  myDistribution( vtkDoubleArray::New() )
 {
   myMapperTable->Delete();
   myMapperTable->SetScale(VTK_SCALE_LINEAR);
@@ -54,6 +61,11 @@ VISU_ColoredPL
   myExtractor->Delete();
 
   myFieldTransform->Delete();
+
+  myThreshold->AllScalarsOn(); 
+  myThreshold->Delete();
+  myPassFilter->Delete();
+  myDistribution->Delete();
 }
 
 
@@ -74,6 +86,9 @@ VISU_ColoredPL
   aTime = std::max(aTime, myBarTable->GetMTime());
   aTime = std::max(aTime, myExtractor->GetMTime());
   aTime = std::max(aTime, myFieldTransform->GetMTime());
+  aTime = std::max(aTime, myThreshold->GetMTime());
+  aTime = std::max(aTime, myPassFilter->GetMTime());
+  aTime = std::max(aTime, myDistribution->GetMTime());
 
   return aTime;
 }
@@ -88,8 +103,12 @@ VISU_ColoredPL
   Superclass::DoShallowCopy(thePipeLine, theIsCopyInput);
 
   if(VISU_ColoredPL *aPipeLine = dynamic_cast<VISU_ColoredPL*>(thePipeLine)){
-    if(theIsCopyInput)
-      SetScalarRange(aPipeLine->GetScalarRange());
+    if ( theIsCopyInput ) {
+      SetScalarRange( aPipeLine->GetScalarRange() );
+      if ( this->IsScalarFilterUsed() )
+       SetScalarFilterRange( aPipeLine->GetScalarFilterRange() );
+    }
+
     SetScalarMode(aPipeLine->GetScalarMode());
     SetNbColors(aPipeLine->GetNbColors());
     SetScaling(aPipeLine->GetScaling());
@@ -135,7 +154,6 @@ VISU_ColoredPL
   theExtractor->SetScalarMode(theScalarMode);
 }
 
-
 //----------------------------------------------------------------------------
 void
 VISU_ColoredPL
@@ -148,18 +166,144 @@ VISU_ColoredPL
 //----------------------------------------------------------------------------
 void
 VISU_ColoredPL
-::SetScalarRange(vtkFloatingPointType theRange[2])
+::SetScalarRange( vtkFloatingPointType theRange[2] )
 {
-  if(theRange[0] > theRange[1]
+  if ( theRange[0] > theRange[1] 
     return;
   
-  if(VISU::CheckIsSameRange(GetScalarRange(), theRange))
+  if (VISU::CheckIsSameRange( GetScalarRange(), theRange) )
+    return;
+
+  myFieldTransform->SetScalarRange( theRange );
+  myBarTable->SetRange( theRange );
+}
+
+
+//----------------------------------------------------------------------------
+void
+VISU_ColoredPL
+::SetScalarFilterRange( vtkFloatingPointType theRange[2] )
+{
+  vtkFloatingPointType aRange[ 2 ];
+  this->GetScalarFilterRange( aRange );
+
+  if ( VISU::CheckIsSameRange( aRange, theRange) )
     return;
 
-  myFieldTransform->SetScalarRange(theRange);
-  myBarTable->SetRange(theRange);
+  myThreshold->ThresholdBetween( theRange[0], theRange[1] );
+}
+
+
+//----------------------------------------------------------------------------
+void
+VISU_ColoredPL
+::GetScalarFilterRange( vtkFloatingPointType theRange[2] )
+{
+  theRange[ 0 ] = myThreshold->GetLowerThreshold();
+  theRange[ 1 ] = myThreshold->GetUpperThreshold();
+}
+
+
+//----------------------------------------------------------------------------
+vtkFloatingPointType*
+VISU_ColoredPL
+::GetScalarFilterRange()
+{
+  static vtkFloatingPointType aRange[ 2 ];
+
+  this->GetScalarFilterRange( aRange );
+
+  return aRange;
 }
 
+
+//----------------------------------------------------------------------------
+void
+VISU_ColoredPL
+::UseScalarFiltering( bool theUseScalarFilter )
+{
+  if ( theUseScalarFilter ) {
+    // Include threshold filter between the transform and the pass filters. 
+    myPassFilter->SetInput( myThreshold->GetOutput() );
+  } else {
+    // Exclude threshold filter before the pass filter. 
+    myPassFilter->SetInput( myFieldTransform->GetOutput() );
+  }
+}
+
+
+//----------------------------------------------------------------------------
+bool
+VISU_ColoredPL
+::IsScalarFilterUsed()
+{
+  return myThreshold->GetOutput() == myPassFilter->GetInput();
+}
+
+
+//----------------------------------------------------------------------------
+vtkDoubleArray* 
+VISU_ColoredPL
+::GetDistribution() 
+{
+  unsigned long int aTime = this->GetMTime();
+  // If modified then update the distribution array
+  if (aTime > myDistribution->GetMTime()) {
+       // Set number of colors for the distribution
+    int nbColors = this->GetNbColors();
+       this->myDistribution->SetNumberOfValues(nbColors);
+       // Initialize numbers of colored cells with zero
+       this->myDistribution->FillComponent(0, 0);
+       // Create a lookup table to compute a color of a cell
+    VISU_LookupTable* lut = GetMapperTable();
+    vtkFloatingPointType aMapScale = lut->GetMapScale();
+    // Get scalar values from the input data to calculate their distribution within cells
+    vtkDataArray* dataArr;
+    // Dtermine where we have to take scalars from: cells data or points data. 
+    if(VISU::IsDataOnCells(this->GetOutput())) {
+       dataArr = this->GetOutput()->GetCellData()->GetScalars();
+    } else {
+       dataArr = this->GetOutput()->GetPointData()->GetScalars();
+    }
+    // If scalars data array is not defined then create an empty one to avoid exceptions
+    if (dataArr == NULL) {
+       dataArr = vtkDoubleArray::New();
+    }
+    
+    // Get range of scalars values
+//    vtkFloatingPointType aRange[2];
+//    dataArr->GetRange(aRange);
+
+    // Build the lookup table with the found range
+    // Get number of scalar values
+    int aNbVals = dataArr->GetNumberOfTuples();
+    if (aNbVals > 0) {
+      // Count the number of scalar values for each color in the input data
+      int idx = 0;
+      double cnt = 0;
+      // For each scalar value
+      for(vtkIdType aValId = 0; aValId < aNbVals; aValId++){
+        // Find the color index for this scalar value
+        idx = lut->GetIndex(*(dataArr->GetTuple(aValId)) * aMapScale);
+        // Increment the distribution value for this color index
+        cnt = this->myDistribution->GetValue(idx);
+        this->myDistribution->SetValue(idx, cnt + 1);
+      }
+      // Compute relative values when 1 is according to the total number of scalar values
+      for(vtkIdType aValId = 0; aValId < nbColors; aValId++){
+        cnt = this->myDistribution->GetValue(aValId);
+        this->myDistribution->SetValue(aValId, cnt / aNbVals);
+      }
+    }
+    this->myDistribution->Modified();
+       
+  }
+  
+  return myDistribution;
+}
+//----------------------------------------------------------------------------
+  // RKV : End
+
 //----------------------------------------------------------------------------
 vtkFloatingPointType* 
 VISU_ColoredPL
@@ -215,7 +359,12 @@ VISU_ColoredPL
 ::Init()
 {
   SetScalarMode(0);
-  SetSourceRange();
+
+  vtkFloatingPointType aRange[2];
+  GetSourceRange( aRange );
+
+  SetScalarRange( aRange );
+  SetScalarFilterRange( aRange );
 }
 
 //----------------------------------------------------------------------------
@@ -223,9 +372,9 @@ vtkPointSet*
 VISU_ColoredPL
 ::GetClippedInput()
 {
-  if(GetFieldTransformFilter()->GetInput())
-    GetFieldTransformFilter()->Update();
-  return GetFieldTransformFilter()->GetUnstructuredGridOutput();
+  if(myPassFilter->GetInput())
+    myPassFilter->Update();
+  return myPassFilter->GetUnstructuredGridOutput();
 }
 
 
@@ -234,9 +383,14 @@ void
 VISU_ColoredPL
 ::Build() 
 {
-  myExtractor->SetInput(Superclass::GetClippedInput());
+  myExtractor->SetInput( Superclass::GetClippedInput() );
   myFieldTransform->SetInput(myExtractor->GetOutput());
 
+  myThreshold->SetInput( myFieldTransform->GetOutput() );
+  // The pass filter is used here for possibility to include/exclude 
+  // threshold filter before it.
+  myPassFilter->SetInput( myFieldTransform->GetOutput() );
+
   GetMapperHolder()->SetLookupTable(GetMapperTable());
   //GetMapper()->InterpolateScalarsBeforeMappingOn();
   GetMapper()->SetUseLookupTableScalarRange( true );
@@ -343,7 +497,7 @@ VISU_ColoredPL
 ::GetSourceRange(vtkFloatingPointType theRange[2])
 {
   myExtractor->Update();
-  myExtractor->GetOutput()->GetScalarRange(theRange);
+  myExtractor->GetOutput()->GetScalarRange( theRange );
 }
 
 void
@@ -351,6 +505,6 @@ VISU_ColoredPL
 ::SetSourceRange()
 {
   vtkFloatingPointType aRange[2];
-  GetSourceRange(aRange);
-  SetScalarRange(aRange);
+  GetSourceRange( aRange );
+  SetScalarRange( aRange );
 }
index e507f140d36c9d671c8236ca9d5c97893a49b015..ada174b81981aab07de1e5178b28afebce33654f 100644 (file)
@@ -36,9 +36,13 @@ class VISU_Extractor;
 class VISU_FieldTransform;
 class VISU_LookupTable;
 
+class vtkPassThroughFilter;
+class vtkDoubleArray;
+class vtkThreshold;
+
 
 //----------------------------------------------------------------------------
-class VISU_ColoredPL : public VISU_PipeLine
+class VISU_PIPELINE_EXPORT VISU_ColoredPL : public VISU_PipeLine
 {
 public:
   vtkTypeMacro(VISU_ColoredPL, VISU_PipeLine);
@@ -62,7 +66,22 @@ public:
 
   virtual
   void
-  SetScalarRange(vtkFloatingPointType theRange[2]);
+  SetScalarRange( vtkFloatingPointType theRange[2] );
+
+  void
+  SetScalarFilterRange( vtkFloatingPointType theRange[2] );
+
+  void
+  GetScalarFilterRange( vtkFloatingPointType theRange[2] );
+
+  vtkFloatingPointType* 
+  GetScalarFilterRange();
+
+  bool
+  IsScalarFilterUsed();
+
+  void
+  UseScalarFiltering( bool theUseScalarFilter );
 
   virtual
   void
@@ -80,8 +99,11 @@ public:
   int
   GetNbColors();
   
-  //----------------------------------------------------------------------------
+  vtkDoubleArray* GetDistribution();
+
+
 public:
+  //----------------------------------------------------------------------------
   virtual
   void
   Init();
@@ -157,11 +179,13 @@ protected:
                VISU_Extractor* theExtractor);
 
 private:
-  vtkSmartPointer<VISU_LookupTable> myMapperTable;
-  vtkSmartPointer<VISU_LookupTable> myBarTable;
-  vtkSmartPointer<VISU_Extractor> myExtractor;
-  vtkSmartPointer<VISU_FieldTransform> myFieldTransform;
-  
+  vtkSmartPointer< VISU_LookupTable > myMapperTable;
+  vtkSmartPointer< VISU_LookupTable > myBarTable;
+  vtkSmartPointer< VISU_Extractor > myExtractor;
+  vtkSmartPointer< VISU_FieldTransform > myFieldTransform;
+  vtkSmartPointer< vtkThreshold > myThreshold;
+  vtkSmartPointer< vtkPassThroughFilter > myPassFilter;
+  vtkSmartPointer< vtkDoubleArray > myDistribution;
 };
   
 #endif
index dbd2243a9d6c187fcc665eccde8f4a881e5857d5..89b00b0269d0f108f500021eb02c763429f7a383 100644 (file)
@@ -41,6 +41,7 @@ VISU_CutLinesPL
 ::VISU_CutLinesPL()
 {
   SetIsShrinkable(false);
+  SetIsFeatureEdgesAllowed(false);
 
   myCondition = 1;
   myPosition = 0;
index a8776eaf28dad097d9eb8041506c5f60c652d5cb..5888942e4536d8b972828d12b54c3e54fd532c47 100644 (file)
@@ -59,6 +59,7 @@ VISU_CutPlanesPL
   if(MYDEBUG) MESSAGE("VISU_CutPlanesPL()::VISU_CutPlanesPL() - "<<this);
   
   SetIsShrinkable(false);
+  SetIsFeatureEdgesAllowed(false);
 
   SetElnoDisassembleState( true );
 
index 4a9adf0a8fe2a620628bc330ee340ee8b36d2aef..8a0a547b38411dc449977f9c0e0eaeae18c2b171 100644 (file)
@@ -98,6 +98,7 @@ VISU_DataSetMapperHolder
     VISU::CopyDataSetMapper(GetDataSetMapper(), 
                            aMapperHolder->GetDataSetMapper(), 
                            theIsCopyInput);
+    myExtractGeometry->SetImplicitFunction(aMapperHolder->GetImplicitFunction());
   }
 }
 
@@ -317,6 +318,7 @@ VISU_DataSetMapperHolder
     if (vtkImplicitBoolean* aBoolean = myExtractGeometry->GetImplicitBoolean()) {
       vtkImplicitFunctionCollection* aFunction = aBoolean->GetFunction();
       aFunction->AddItem(thePlane);
+      aBoolean->Modified();
       // Check, that at least one cell present after clipping.
       // This check was introduced because of bug IPAL8849.
       vtkDataSet* aClippedDataSet = GetClippedInput();
@@ -346,6 +348,19 @@ VISU_DataSetMapperHolder
   return aPlane;
 }
 
+//----------------------------------------------------------------------------
+void VISU_DataSetMapperHolder::RemoveClippingPlane(vtkIdType theID)
+{
+  if(theID >= 0 && theID < GetNumberOfClippingPlanes()){
+    if(vtkImplicitBoolean* aBoolean = myExtractGeometry->GetImplicitBoolean()){
+      vtkImplicitFunctionCollection* aFunctions = aBoolean->GetFunction();
+      aFunctions->RemoveItem(theID);
+      aBoolean->Modified();
+    }
+  }
+}
+
+
 //----------------------------------------------------------------------------
 void
 VISU_DataSetMapperHolder
index 6588abd9b14b6987d3508b66d91fe7ba1ffb1924..23f056e669e8940e0557fbb174885b6b378cd774 100644 (file)
@@ -134,6 +134,8 @@ public:
   vtkPlane* 
   GetClippingPlane(vtkIdType theID);
 
+  virtual void RemoveClippingPlane(vtkIdType theID);
+
 protected:
   //----------------------------------------------------------------------------
   VISU_DataSetMapperHolder();
diff --git a/src/PIPELINE/VISU_DeformationPL.cxx b/src/PIPELINE/VISU_DeformationPL.cxx
deleted file mode 100755 (executable)
index 88e2986..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-//  Copyright (C) 2008  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_ScalarMapPL.cxx
-// Author:  Roman NIKOLAEV
-// Module : VISU
-
-//Salome includes
-#include "VISU_DeformationPL.hxx"
-#include "VISU_MergeFilter.hxx"
-#include "VISU_DeformedShapePL.hxx"
-#include "VISU_PipeLineUtils.hxx"
-
-//VTK includes
-#include <vtkDataSet.h>
-#include <vtkPassThroughFilter.h>
-#include <vtkWarpVector.h>
-#include <vtkCellDataToPointData.h>
-#include <vtkUnstructuredGrid.h>
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
-
-//----------------------------------------------------------------------------
-VISU_DeformationPL::VISU_DeformationPL():
-  myScaleFactor(1.0),
-  myMapScaleFactor(1.0)
-{
-  if(MYDEBUG) MESSAGE("VISU_DeformationPL()::VISU_DeformationPL() - "<<this);
-  myWarpVector = vtkWarpVector::New();
-  myWarpVector->SetScaleFactor(myScaleFactor);
-  
-  myVectorMergeFilter = VISU_MergeFilter::New();
-  myVectorMergeFilter->SetMergingInputs(true);
-  myInputPassFilter = vtkPassThroughFilter::New();
-  myOutputPassFiler = vtkPassThroughFilter::New();
-  myCellDataToPointData = vtkCellDataToPointData::New();
-  myCellDataToPointData->PassCellDataOn();
-
-  myInputPassFilter->SetInput(vtkUnstructuredGrid::New());
-
-  myCellDataToPointData->SetInput(myInputPassFilter->GetOutput());
-
-  myWarpVector->SetInput(myCellDataToPointData->GetOutput());
-  
-  myOutputPassFiler->SetInput(myWarpVector->GetOutput());
-}
-
-//----------------------------------------------------------------------------
-VISU_DeformationPL::~VISU_DeformationPL()
-{
-  if(MYDEBUG) MESSAGE("VISU_DeformationPL()::~VISU_DeformationPL() - "<<this);
-  myWarpVector->Delete();
-  myVectorMergeFilter->Delete();
-  myInputPassFilter->Delete();
-  myOutputPassFiler->Delete();
-  myCellDataToPointData->Delete();
-}
-
-
-//----------------------------------------------------------------------------
-unsigned long int 
-VISU_DeformationPL::GetMTime(){
-  unsigned long int aTime = std::max(myWarpVector->GetMTime(), 
-                                     myVectorMergeFilter->GetMTime());
-
-  aTime = std::max(aTime,myInputPassFilter->GetMTime());
-  aTime = std::max(aTime,myOutputPassFiler->GetMTime());
-  aTime = std::max(aTime,myCellDataToPointData->GetMTime());
-  return 0;
-}
-
-//----------------------------------------------------------------------------
-void VISU_DeformationPL::SetScale(vtkFloatingPointType theScaleFactor)
-{
-  if(myScaleFactor == theScaleFactor)
-    return;
-  myScaleFactor = theScaleFactor;
-  myWarpVector->SetScaleFactor(myScaleFactor*myMapScaleFactor);
-}
-
-void VISU_DeformationPL::SetMapScale(vtkFloatingPointType theMapScaleFactor)
-{
-  if(myMapScaleFactor == theMapScaleFactor)
-    return;
-  myMapScaleFactor = theMapScaleFactor;
-  
-  myWarpVector->SetScaleFactor(myScaleFactor*myMapScaleFactor);
-}
-
-
-vtkFloatingPointType VISU_DeformationPL::GetScale()
-{
-  return myScaleFactor;
-}
-
-//----------------------------------------------------------------------------
-void VISU_DeformationPL::SetWarpVectorInput(vtkDataSet *theInput)
-{
-  myInputPassFilter->SetInput(theInput);
-}
-
-//----------------------------------------------------------------------------
-vtkDataSet* VISU_DeformationPL::GetWarpVectorOutput()
-{
-  return myOutputPassFiler->GetOutput();
-}
-
-//----------------------------------------------------------------------------
-void VISU_DeformationPL::SetMergeFilterInput(vtkDataSet* ScalarInput,
-                         vtkDataSet* VectorialInput)
-{
-  myVectorMergeFilter->SetScalars(ScalarInput);
-  myVectorMergeFilter->AddField("VISU_CELLS_MAPPER",ScalarInput);
-  myVectorMergeFilter->AddField("VISU_POINTS_MAPPER",ScalarInput);
-  
-  myVectorMergeFilter->SetGeometry(VectorialInput);
-  myVectorMergeFilter->SetVectors(VectorialInput);
-}
-
-//----------------------------------------------------------------------------
-vtkDataSet* VISU_DeformationPL::GetMergeFilterOutput(){
- return myVectorMergeFilter->GetOutput();
-}
-
-//----------------------------------------------------------------------------
-vtkFloatingPointType VISU_DeformationPL::GetDefaultScaleFactor(VISU_DeformationPL *thePipeLine)
-{
-  if(!thePipeLine || !thePipeLine->GetMergeFilterOutput())
-    return 0.0;
-  
-  vtkFloatingPointType aSourceRange[2];
-  thePipeLine->GetMergeFilterOutput()->GetScalarRange(aSourceRange);
-  
-  static vtkFloatingPointType EPS = 1.0 / VTK_LARGE_FLOAT;
-  if(fabs(aSourceRange[1]) > EPS){
-    vtkDataSet* aDataSet = thePipeLine->GetMergeFilterOutput();
-    vtkFloatingPointType aScaleFactor = VISU_DeformedShapePL::GetScaleFactor(aDataSet);
-    return aScaleFactor / aSourceRange[1];
-  }
-  return 0.0;
-}
-
diff --git a/src/PIPELINE/VISU_DeformationPL.hxx b/src/PIPELINE/VISU_DeformationPL.hxx
deleted file mode 100755 (executable)
index e18f43e..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-//  Copyright (C) 2008  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_DeformationPL.hxx
-//  Author : 
-//  Module : SALOME
-
-#ifndef VISU_DeformationPL_HeaderFile
-#define VISU_DeformationPL_HeaderFile
-
-#include "VISUPipeline.hxx"
-#include "VISU_MapperHolder.hxx"
-#include <vtkSmartPointer.h>
-
-class vtkDataSet;
-class VISU_MergeFilter;
-class vtkPassThroughFilter;
-class vtkWarpVector;
-class vtkCellDataToPointData;
-
-class VISU_PIPELINE_EXPORT VISU_DeformationPL {
-  
-public:
-  VISU_DeformationPL();
-  virtual ~VISU_DeformationPL();
-
-  //-----------------------------------------------------------
-  virtual void SetScale(vtkFloatingPointType theScaleFactor);
-  virtual void SetMapScale(vtkFloatingPointType theMapScaleFactor);
-  virtual vtkFloatingPointType GetScale();
-
-  //-----------------------------------------------------------
-  virtual void SetVectorialField(VISU::PUnstructuredGridIDMapper theIdMapper) = 0;
-  virtual VISU::PUnstructuredGridIDMapper getVectorialField() = 0;
-
-
-  //-----------------------------------------------------------
-  virtual 
-  unsigned 
-  long int
-  GetMTime();
-
-  static vtkFloatingPointType GetDefaultScaleFactor(VISU_DeformationPL *thePipeLine);
-
-  void SetWarpVectorInput(vtkDataSet *theInput);
-  vtkDataSet* GetWarpVectorOutput();
-
-  //-----------------------------------------------------------
-  void SetMergeFilterInput(vtkDataSet* ScalarInput,
-                           vtkDataSet* VectorialInput);
-
-  vtkDataSet* GetMergeFilterOutput();
-
-protected:
-
-  VISU::PUnstructuredGridIDMapper myVectorialField;
-  vtkWarpVector *myWarpVector;
-  vtkSmartPointer<VISU_MergeFilter> myVectorMergeFilter;
-  vtkPassThroughFilter *myInputPassFilter;
-  vtkPassThroughFilter *myOutputPassFiler;
-  vtkCellDataToPointData *myCellDataToPointData;
-
-private:
-  vtkFloatingPointType myScaleFactor;
-  vtkFloatingPointType myMapScaleFactor;
-
-};
-
-#endif
diff --git a/src/PIPELINE/VISU_DeformedGridPL.cxx b/src/PIPELINE/VISU_DeformedGridPL.cxx
deleted file mode 100644 (file)
index 72f40c5..0000000
+++ /dev/null
@@ -1,238 +0,0 @@
-//  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_DeformedGridPL.cxx
-// Author:  Alexey PETROV
-// Module : VISU
-
-
-#include "VISU_DeformedGridPL.hxx"
-#include "VISU_FieldTransform.hxx"
-#include "VISU_Plot3DPL.hxx"
-
-#include "VISU_PipeLineUtils.hxx"
-
-#include <vtkPolyDataMapper.h>
-#include <vtkContourFilter.h>
-#include <vtkWarpScalar.h>
-
-
-//----------------------------------------------------------------------------
-vtkStandardNewMacro(VISU_DeformedGridPL);
-
-
-//----------------------------------------------------------------------------
-VISU_DeformedGridPL
-::VISU_DeformedGridPL():
-  myContourFilter(vtkContourFilter::New()),
-  myWarpScalar(vtkWarpScalar::New()),
-  myIsContour(false),
-  myScaleFactor(1.0),
-  myMapScaleFactor(1.0)
-{
-  SetIsShrinkable(false);
-  SetNumberOfContours(32);
-}
-
-
-//----------------------------------------------------------------------------
-VISU_DeformedGridPL
-::~VISU_DeformedGridPL()
-{}
-
-
-//----------------------------------------------------------------------------
-unsigned long int 
-VISU_DeformedGridPL
-::GetMTime()
-{
-  unsigned long int aTime = Superclass::GetMTime();
-
-  aTime = std::max(aTime, myContourFilter->GetMTime());
-  aTime = std::max(aTime, myWarpScalar->GetMTime());
-
-  return aTime;
-}
-
-
-//----------------------------------------------------------------------------
-unsigned long int
-VISU_DeformedGridPL
-::GetMemorySize()
-{
-  unsigned long int aSize = Superclass::GetMemorySize();
-
-  if(vtkDataObject* aDataObject = myContourFilter->GetInput())
-    aSize += aDataObject->GetActualMemorySize() * 1024;
-
-  if(vtkDataObject* aDataObject = myWarpScalar->GetInput())
-    aSize += aDataObject->GetActualMemorySize() * 1024;
-
-  return aSize;
-}
-
-
-//----------------------------------------------------------------------------
-void
-VISU_DeformedGridPL
-::DoShallowCopy(VISU_PipeLine *thePipeLine,
-               bool theIsCopyInput)
-{
-  Superclass::DoShallowCopy(thePipeLine, theIsCopyInput);
-
-  if(VISU_DeformedGridPL *aPipeLine = dynamic_cast<VISU_DeformedGridPL*>(thePipeLine)){
-    SetScaleFactor( aPipeLine->GetScaleFactor() );
-    SetContourPrs( aPipeLine->GetIsContourPrs() );
-    SetNumberOfContours( aPipeLine->GetNumberOfContours() );
-  }
-}
-
-
-//----------------------------------------------------------------------------
-void
-VISU_DeformedGridPL
-::Init()
-{
-  Superclass::Init();
-
-  vtkPointSet* aPointSet = GetFieldTransformFilter()->GetPolyDataOutput();
-  SetScaleFactor( VISU_Plot3DPL::GetScaleFactor( this, aPointSet ) );
-}
-
-
-//----------------------------------------------------------------------------
-void
-VISU_DeformedGridPL
-::Build()
-{
-  Superclass::Build();
-
-  myWarpScalar->SetInput( GetFieldTransformFilter()->GetPolyDataOutput() );
-  GetPolyDataMapper()->SetInput( myWarpScalar->GetPolyDataOutput() );
-}
-
-
-//----------------------------------------------------------------------------
-void
-VISU_DeformedGridPL
-::Update()
-{
-  vtkPointSet* aPointSet = GetFieldTransformFilter()->GetPolyDataOutput();
-  if ( !myIsContour ) // surface prs
-  {
-    myWarpScalar->SetInput( aPointSet );
-  }
-  else // contour prs
-  {
-    myContourFilter->SetInput( aPointSet );
-
-    vtkFloatingPointType aScalarRange[2];
-    GetSourceRange( aScalarRange );
-
-    myContourFilter->GenerateValues( GetNumberOfContours(), aScalarRange );
-    myWarpScalar->SetInput( myContourFilter->GetOutput() );
-  }
-
-  Superclass::Update();
-}
-
-
-//----------------------------------------------------------------------------
-void
-VISU_DeformedGridPL
-::SetNumberOfContours(int theNumber)
-{
-  myContourFilter->SetNumberOfContours(theNumber);
-}
-
-
-//----------------------------------------------------------------------------
-int
-VISU_DeformedGridPL
-::GetNumberOfContours()
-{
-  return myContourFilter->GetNumberOfContours();
-}
-
-
-//----------------------------------------------------------------------------
-void
-VISU_DeformedGridPL
-::SetScaleFactor(vtkFloatingPointType theScaleFactor)
-{
-  if ( VISU::CheckIsSameValue( myWarpScalar->GetScaleFactor(), theScaleFactor ) )
-    return;
-
-  myScaleFactor = theScaleFactor;
-  myWarpScalar->SetScaleFactor(theScaleFactor*myMapScaleFactor);
-}
-
-
-//----------------------------------------------------------------------------
-vtkFloatingPointType
-VISU_DeformedGridPL
-::GetScaleFactor()
-{
-  return myScaleFactor;
-}
-
-
-//----------------------------------------------------------------------------
-void
-VISU_DeformedGridPL
-::SetContourPrs(bool theIsContourPrs )
-{
-  if(myIsContour == theIsContourPrs)
-    return;
-
-  myIsContour = theIsContourPrs;
-  Modified();
-}
-
-
-//----------------------------------------------------------------------------
-bool
-VISU_DeformedGridPL
-::GetIsContourPrs()
-{
-  return myIsContour;
-}
-
-
-//----------------------------------------------------------------------------
-void 
-VISU_DeformedGridPL
-::SetMapScale(vtkFloatingPointType theMapScale)
-{
-  Superclass::SetMapScale(theMapScale);
-  myMapScaleFactor = theMapScale;
-
-  if ( myIsContour ) {
-    vtkFloatingPointType aSourceRange[2];
-    GetSourceRange( aSourceRange );
-    vtkFloatingPointType aDeltaRange = aSourceRange[1] - aSourceRange[0];
-    vtkFloatingPointType aNewRange[2] = { aSourceRange[1] - theMapScale*aDeltaRange, aSourceRange[1] };
-    myContourFilter->GenerateValues( GetNumberOfContours(), aNewRange );
-  }
-
-  myWarpScalar->SetScaleFactor( myScaleFactor * theMapScale );
-}
diff --git a/src/PIPELINE/VISU_DeformedGridPL.hxx b/src/PIPELINE/VISU_DeformedGridPL.hxx
deleted file mode 100644 (file)
index 4f32594..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-//  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_ScalarMapPL.hxx
-// Author:  Alexey PETROV
-// Module : VISU
-
-#ifndef VISU_DeformedGridPL_HeaderFile
-#define VISU_DeformedGridPL_HeaderFile
-
-#include "VISUPipeline.hxx"
-#include "VISU_PolyDataPL.hxx"
-
-class vtkWarpScalar;
-class vtkContourFilter;
-
-
-//----------------------------------------------------------------------------
-class VISU_PIPELINE_EXPORT VISU_DeformedGridPL : public VISU_PolyDataPL
-{
-public:
-  vtkTypeMacro(VISU_DeformedGridPL, VISU_PolyDataPL);
-
-  static 
-  VISU_DeformedGridPL* 
-  New();
-
-  //----------------------------------------------------------------------------
-  virtual
-  unsigned long int 
-  GetMTime();
-
-  //! Gets memory size used by the instance (bytes).
-  virtual
-  unsigned long int
-  GetMemorySize();
-
-  //----------------------------------------------------------------------------
-  void
-  SetScaleFactor( vtkFloatingPointType theScaleFactor );
-
-  vtkFloatingPointType
-  GetScaleFactor();
-
-  void
-  SetContourPrs( bool theIsContourPrs );
-
-  bool
-  GetIsContourPrs();
-
-  void
-  SetNumberOfContours( int theNumber );
-
-  int
-  GetNumberOfContours();
-
-  virtual
-  void
-  SetMapScale(vtkFloatingPointType theMapScale = 1.0);
-
-  //----------------------------------------------------------------------------
-  virtual
-  void
-  Init();
-
-  virtual
-  void
-  Update();
-
-protected:
-  //----------------------------------------------------------------------------
-  VISU_DeformedGridPL();
-  
-  virtual
-  ~VISU_DeformedGridPL();
-
-  virtual
-  void
-  Build();
-
-  virtual
-  void
-  DoShallowCopy(VISU_PipeLine *thePipeLine,
-               bool theIsCopyInput);
-
-private:
-  VISU_DeformedGridPL(const VISU_DeformedGridPL&);  // Not implemented.
-  void operator=(const VISU_DeformedGridPL&);  // Not implemented.
-
-  vtkFloatingPointType myScaleFactor;
-  vtkFloatingPointType myMapScaleFactor;
-  vtkContourFilter* myContourFilter;
-  vtkWarpScalar *myWarpScalar;
-  bool myIsContour;
-};
-  
-#endif
diff --git a/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx b/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx
deleted file mode 100644 (file)
index b807671..0000000
+++ /dev/null
@@ -1,372 +0,0 @@
-//  VISU DeformedShapeAndScalarMapPL
-//
-//  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_DeformedShapeAndScalarMapPL.cxx
-// Author:  Eugeny Nikolaev
-// Module : VISU
-
-#include "VISU_DeformedShapeAndScalarMapPL.hxx"
-#include "VISU_FieldTransform.hxx"
-#include "VISU_Extractor.hxx"
-#include "VISU_LookupTable.hxx"
-#include "VISU_DeformedShapePL.hxx"
-#include "VTKViewer_TransformFilter.h"
-#include "VTKViewer_Transform.h"
-#include "VISU_MergeFilter.hxx"
-#include "VISU_ElnoDisassembleFilter.hxx"
-#include "VISU_PipeLineUtils.hxx"
-
-#include <vtkWarpVector.h>
-#include <vtkUnstructuredGrid.h>
-#include <vtkCellDataToPointData.h>
-#include <vtkPointDataToCellData.h>
-
-
-//----------------------------------------------------------------------------
-vtkStandardNewMacro(VISU_DeformedShapeAndScalarMapPL)
-
-//----------------------------------------------------------------------------
-/*!
- * Constructor. Creating new instances of vtkWarpVector,vtkMergeFilter,vtkUnstructuredGrid
- * Where:
- * \li myDeformVectors is vtkWarpVector  - deformation vectors data
- * \li myScalarsMergeFilter   is vtkMergeFilter - merge filter.
- * Merge filter which unify the deformation and scalars
- * \li myScalars is vtk shared pointer to vtkUnstructuredGrid - scalars data
-*/
-VISU_DeformedShapeAndScalarMapPL
-::VISU_DeformedShapeAndScalarMapPL():
-  myScaleFactor(1.0),
-  myMapScaleFactor(1.0)
-{
-  myWarpVector = vtkWarpVector::New();
-
-  myScalarsMergeFilter = VISU_MergeFilter::New();
-  myScalarsMergeFilter->SetMergingInputs(true);
-
-  myScalarsExtractor = VISU_Extractor::New();
-
-  myScalarsFieldTransform = VISU_FieldTransform::New();
-
-  myCellDataToPointData = vtkCellDataToPointData::New();
-  myScalarsElnoDisassembleFilter = VISU_ElnoDisassembleFilter::New();
-}
-
-//----------------------------------------------------------------------------
-/*!
- * Destructor.
- * Delete all fields.
-*/
-VISU_DeformedShapeAndScalarMapPL
-::~VISU_DeformedShapeAndScalarMapPL()
-{
-  myWarpVector->Delete();
-
-  myScalarsMergeFilter->Delete();
-  
-  myScalarsExtractor->Delete();
-
-  myScalarsFieldTransform->Delete();
-
-  myCellDataToPointData->Delete();
-}
-
-//----------------------------------------------------------------------------
-/*!
- * Initial method
- */
-void
-VISU_DeformedShapeAndScalarMapPL
-::Init()
-{
-  Superclass::Init();
-  
-  SetScale(VISU_DeformedShapePL::GetDefaultScale(this));
-}
-
-//----------------------------------------------------------------------------
-/*!
- * Build method
- * Building of deformation and puts result to merge filter.
- */
-void
-VISU_DeformedShapeAndScalarMapPL
-::Build()
-{
-  Superclass::Build();
-}
-
-
-//----------------------------------------------------------------------------
-vtkDataSet* 
-VISU_DeformedShapeAndScalarMapPL
-::InsertCustomPL()
-{
-  GetMapper()->SetColorModeToMapScalars();
-  GetMapper()->ScalarVisibilityOn();
-
-  VISU::CellDataToPoint(myWarpVector,
-                       myCellDataToPointData,
-                       GetMergedInput());
-  
-  myScalars = GetMergedInput();
-
-  UpdateScalars();
-
-  myScalarsFieldTransform->SetInput(myScalarsExtractor->GetOutput());
-
-  // Sets geometry for merge filter
-  myScalarsMergeFilter->SetGeometry(myWarpVector->GetUnstructuredGridOutput());
-
-  vtkDataSet* aScalarsDataSet = myScalarsFieldTransform->GetOutput();
-  myScalarsMergeFilter->SetScalars(aScalarsDataSet);
-  myScalarsMergeFilter->AddField("VISU_CELLS_MAPPER", aScalarsDataSet);
-  myScalarsMergeFilter->AddField("VISU_POINTS_MAPPER", aScalarsDataSet);
-
-  return myScalarsMergeFilter->GetOutput();
-}
-
-
-//----------------------------------------------------------------------------
-/*!
- *  Update method
- */
-void
-VISU_DeformedShapeAndScalarMapPL
-::Update()
-{
-  Superclass::Update();
-  //{
-  //  std::string aFileName = std::string(getenv("HOME"))+"/"+getenv("USER")+"-myScalarsExtractor.vtk";
-  //  VISU::WriteToFile(myScalarsExtractor->GetUnstructuredGridOutput(), aFileName);
-  //}
-  //{
-  //  std::string aFileName = std::string(getenv("HOME"))+"/"+getenv("USER")+"-myWarpVector.vtk";
-  //  VISU::WriteToFile(myWarpVector->GetUnstructuredGridOutput(), aFileName);
-  //}
-  //{
-  //  std::string aFileName = std::string(getenv("HOME"))+"/"+getenv("USER")+"-myScalarsMergeFilter.vtk";
-  //  VISU::WriteToFile(myScalarsMergeFilter->GetUnstructuredGridOutput(), aFileName);
-  //}
-}
-
-//----------------------------------------------------------------------------
-unsigned long int
-VISU_DeformedShapeAndScalarMapPL
-::GetMemorySize()
-{
-  unsigned long int aSize = Superclass::GetMemorySize();
-
-  if(vtkDataSet* aDataSet = myWarpVector->GetOutput())
-    aSize += aDataSet->GetActualMemorySize() * 1024;
-  
-  if(vtkDataSet* aDataSet = myScalarsExtractor->GetOutput())
-    aSize += aDataSet->GetActualMemorySize() * 1024;
-
-  if(vtkDataSet* aDataSet = myScalarsMergeFilter->GetOutput())
-    aSize += aDataSet->GetActualMemorySize() * 1024;
-
-  if(myCellDataToPointData->GetInput())
-    if(vtkDataSet* aDataSet = myCellDataToPointData->GetOutput())
-      aSize += aDataSet->GetActualMemorySize() * 1024;
-
-  return aSize;
-}
-
-//----------------------------------------------------------------------------
-/*!
- * Update scalars method.
- * Put scalars to merge filter.
- */
-void
-VISU_DeformedShapeAndScalarMapPL
-::UpdateScalars()
-{
-  vtkDataSet* aScalars = GetScalars();
-  myScalarsElnoDisassembleFilter->SetInput(aScalars);
-  myScalarsExtractor->SetInput(myScalarsElnoDisassembleFilter->GetOutput());
-
-  if(VISU::IsDataOnCells(myScalarsElnoDisassembleFilter->GetOutput()))
-    GetMapper()->SetScalarModeToUseCellData();
-  else
-    GetMapper()->SetScalarModeToUsePointData();
-}
-
-//----------------------------------------------------------------------------
-/*!
- * Copy information about pipline.
- * Copy scale and scalars.
- */
-void
-VISU_DeformedShapeAndScalarMapPL
-::DoShallowCopy(VISU_PipeLine *thePipeLine,
-               bool theIsCopyInput)
-{
-  Superclass::DoShallowCopy(thePipeLine, theIsCopyInput);
-
-  if(VISU_DeformedShapeAndScalarMapPL *aPipeLine = dynamic_cast<VISU_DeformedShapeAndScalarMapPL*>(thePipeLine)){
-     SetScale(aPipeLine->GetScale());
-     SetScalars(aPipeLine->GetScalars());
-  }
-}
-
-//----------------------------------------------------------------------------
-/*!
- * Set scalars.
- * Sets vtkDataSet with scalars values to VISU_Extractor filter for scalars extraction.
- */
-void
-VISU_DeformedShapeAndScalarMapPL
-::SetScalars(vtkDataSet *theScalars)
-{
-  if(GetScalars() == theScalars)
-    return;
-  
-  myScalars = theScalars;
-  UpdateScalars();
-}
-
-//----------------------------------------------------------------------------
-/*!
- * Get pointer to input scalars.
- */
-vtkDataSet* 
-VISU_DeformedShapeAndScalarMapPL
-::GetScalars()
-{
-  return myScalars.GetPointer();
-}
-
-//----------------------------------------------------------------------------
-/*!
- * Sets scale for deformed shape
- */
-void
-VISU_DeformedShapeAndScalarMapPL
-::SetScale(vtkFloatingPointType theScale) 
-{
-  if(VISU::CheckIsSameValue(myScaleFactor, theScale))
-    return;
-
-  myScaleFactor = theScale;
-  myWarpVector->SetScaleFactor(theScale*myMapScaleFactor);
-}
-
-//----------------------------------------------------------------------------
-/*!
- * Gets scale of deformed shape.
- */
-vtkFloatingPointType
-VISU_DeformedShapeAndScalarMapPL
-::GetScale() 
-{
-  return myScaleFactor;
-}
-
-//----------------------------------------------------------------------------
-/*!
- * Set scale factor of deformation.
- */
-void
-VISU_DeformedShapeAndScalarMapPL
-::SetMapScale(vtkFloatingPointType theMapScale)
-{
-  myMapScaleFactor = theMapScale;
-  Superclass::SetMapScale(theMapScale);
-  myWarpVector->SetScaleFactor(myScaleFactor*theMapScale);
-}
-
-//----------------------------------------------------------------------------
-/*!
- * Gets scalar mode.
- */
-int
-VISU_DeformedShapeAndScalarMapPL
-::GetScalarMode()
-{
-  return myScalarsExtractor->GetScalarMode();
-}
-
-//----------------------------------------------------------------------------
-/*!
- * Sets scalar mode.
- */
-void
-VISU_DeformedShapeAndScalarMapPL
-::SetScalarMode(int theScalarMode)
-{
-  VISU_ScalarMapPL::SetScalarMode(theScalarMode, GetScalars(), myScalarsExtractor);
-}
-
-//----------------------------------------------------------------------------
-void
-VISU_DeformedShapeAndScalarMapPL
-::SetScaling(int theScaling) 
-{
-  if(GetScaling() == theScaling)
-    return;
-
-  GetBarTable()->SetScale(theScaling);
-
-  if(theScaling == VTK_SCALE_LOG10)
-    myScalarsFieldTransform->SetScalarTransform(&(VISU_FieldTransform::Log10));
-  else
-    myScalarsFieldTransform->SetScalarTransform(&(VISU_FieldTransform::Ident));
-}
-
-
-//----------------------------------------------------------------------------
-void
-VISU_DeformedShapeAndScalarMapPL
-::SetScalarRange(vtkFloatingPointType theRange[2])
-{
-  if(VISU::CheckIsSameRange(theRange, GetScalarRange()))
-    return;
-
-  myScalarsFieldTransform->SetScalarRange(theRange);
-  GetBarTable()->SetRange(theRange);
-}
-
-
-//----------------------------------------------------------------------------
-vtkFloatingPointType* 
-VISU_DeformedShapeAndScalarMapPL
-::GetScalarRange() 
-{
-  return myScalarsFieldTransform->GetScalarRange();
-}
-
-
-//----------------------------------------------------------------------------
-/*!
- * Gets ranges of extracted scalars
- * \param theRange[2] - output values
- * \li theRange[0] - minimum value
- * \li theRange[1] - maximum value
- */
-void 
-VISU_DeformedShapeAndScalarMapPL
-::GetSourceRange(vtkFloatingPointType theRange[2])
-{
-  myScalarsExtractor->Update();
-  myScalarsExtractor->GetUnstructuredGridOutput()->GetScalarRange(theRange);
-}
diff --git a/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.hxx b/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.hxx
deleted file mode 100644 (file)
index b3d454a..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-//  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_DeformedShapeAndScalarMapPL.hxx
-// Author:  Eugeny Nikolaev
-// Module : VISU
-
-#ifndef VISU_DeformedShapeAndScalarMapPL_HeaderFile
-#define VISU_DeformedShapeAndScalarMapPL_HeaderFile
-
-#include "VISUPipeline.hxx"
-#include "VISU_ScalarMapPL.hxx"
-
-class VISU_MergeFilter;
-class vtkWarpVector;
-class vtkUnstructuredGrid;
-class vtkCellDataToPointData;
-class vtkPointDataToCellData;
-class VISU_ElnoDisassembleFilter;
-
-
-//----------------------------------------------------------------------------
-class VISU_PIPELINE_EXPORT VISU_DeformedShapeAndScalarMapPL : public VISU_ScalarMapPL
-{
-public:
-  vtkTypeMacro(VISU_DeformedShapeAndScalarMapPL, VISU_ScalarMapPL);
-
-  static 
-  VISU_DeformedShapeAndScalarMapPL* 
-  New();
-
-  virtual
-  void
-  SetScale(vtkFloatingPointType theScale);
-
-  virtual
-  vtkFloatingPointType
-  GetScale();
-
-  virtual
-  int
-  GetScalarMode();
-
-  virtual
-  void
-  SetScalarMode(int theScalarMode = 0);
-
-  virtual
-  void
-  SetScaling(int theScaling);
-  
-  virtual
-  void
-  SetScalarRange(vtkFloatingPointType theRange[2]);
-
-  virtual
-  vtkFloatingPointType* 
-  GetScalarRange();
-
-  virtual
-  void
-  GetSourceRange(vtkFloatingPointType theRange[2]);
-
-  virtual
-  void
-  SetScalars(vtkDataSet *theScalars);
-
-  virtual
-  vtkDataSet* 
-  GetScalars();
-
-public:
-  //! Redefined method for initialization of the pipeline.
-  virtual
-  void
-  Init();
-
-  //! Redefined method for building the pipeline.
-  virtual
-  void
-  Build();
-
-  //! Redefined method for updating the pipeline.
-  virtual
-  void
-  Update();
-
-  //! Gets memory size used by the instance (bytes).
-  virtual
-  unsigned long int
-  GetMemorySize();
-
-  //! Update scalars.
-  void
-  UpdateScalars();
-  
-  virtual
-  void
-  SetMapScale(vtkFloatingPointType theMapScale = 1.0);
-  
-protected:
-  VISU_DeformedShapeAndScalarMapPL();
-  
-  virtual
-  ~VISU_DeformedShapeAndScalarMapPL();
-  
-  virtual
-  vtkDataSet* 
-  InsertCustomPL();
-
-  virtual
-  void
-  DoShallowCopy(VISU_PipeLine *thePipeLine,
-               bool theIsCopyInput);
-
-private:
-  VISU_DeformedShapeAndScalarMapPL(const VISU_DeformedShapeAndScalarMapPL&);
-
-  vtkFloatingPointType myScaleFactor;
-  vtkFloatingPointType myMapScaleFactor;
-  vtkWarpVector  *myWarpVector;
-  VISU_MergeFilter *myScalarsMergeFilter;
-  vtkSmartPointer<vtkUnstructuredGrid> myScalars;
-  vtkCellDataToPointData* myCellDataToPointData;
-  VISU_FieldTransform* myScalarsFieldTransform;
-  VISU_Extractor* myScalarsExtractor;
-  VISU_ElnoDisassembleFilter* myScalarsElnoDisassembleFilter;
-};
-
-#endif
index 2a7f2c6a8d58ca1896766755b0f2716a48499701..b17f86b867c926f44520bd0c9fba9ffad768a301 100644 (file)
@@ -43,6 +43,7 @@ VISU_DeformedShapePL
   myMapScaleFactor(1.0)
 {
   SetIsShrinkable(true);
+  SetIsFeatureEdgesAllowed(true);
 
   myWarpVector = vtkWarpVector::New();
   myCellDataToPointData = vtkCellDataToPointData::New();
@@ -110,6 +111,8 @@ VISU_DeformedShapePL
       aVolume *= aVol;
     }
   }
+  if( aNbElem == 0 || fabs(idim) < 1.0 / VTK_LARGE_FLOAT )
+    return 0.0; // to avoid division by zero
   aVolume /= aNbElem;
   return pow(aVolume, vtkFloatingPointType(1.0/idim));
 }
diff --git a/src/PIPELINE/VISU_ElnoAssembleFilter.cxx b/src/PIPELINE/VISU_ElnoAssembleFilter.cxx
deleted file mode 100644 (file)
index be843ed..0000000
+++ /dev/null
@@ -1,171 +0,0 @@
-//  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
-
-#include "VISU_ElnoAssembleFilter.hxx"
-#include "VISU_PipeLineUtils.hxx"
-#include "VISU_ElnoMeshValue.hxx"
-
-#include <vtkCellData.h>
-#include <vtkInformation.h>
-#include <vtkInformationVector.h>
-#include <vtkObjectFactory.h>
-#include <vtkPointData.h>
-#include <vtkUnstructuredGrid.h>
-#include <vtkPoints.h>
-#include <vtkCellArray.h>
-
-
-//----------------------------------------------------------------------------
-vtkStandardNewMacro( VISU_ElnoAssembleFilter );
-
-
-//----------------------------------------------------------------------------
-VISU_ElnoAssembleFilter::VISU_ElnoAssembleFilter()
-{
-  this->SetInputArrayToProcess( 0, // idx
-                               0, // port
-                               0, // connection
-                               vtkDataObject::FIELD_ASSOCIATION_POINTS, // field association
-                               "ELNO_POINT_COORDS" ); // name
-
-  this->myIsRestorePoints = false;
-}
-
-
-//----------------------------------------------------------------------------
-VISU_ElnoAssembleFilter::~VISU_ElnoAssembleFilter()
-{}
-
-
-//----------------------------------------------------------------------------
-void VISU_ElnoAssembleFilter::SetElnoAssembleState( bool theIsRestorePoints )
-{
-  if ( myIsRestorePoints == theIsRestorePoints )
-    return;
-    
-  myIsRestorePoints = theIsRestorePoints;
-  this->Modified();
-}
-
-//----------------------------------------------------------------------------
-namespace
-{
-  //----------------------------------------------------------------------------
-  template < int points_type, int elno_type >
-  int Execute2( vtkPointSet *theInput, 
-               vtkPointSet *theOutput,
-               vtkDataArray *theElnoPointCoords )
-  {
-    theOutput->CopyStructure( theInput );
-    
-    vtkCellData *aCellData = theOutput->GetCellData();
-    aCellData->PassData( theInput->GetCellData() );
-
-    vtkPointData *aPointData = theOutput->GetPointData();
-    aPointData->PassData( theInput->GetPointData() );
-
-    vtkPoints *anInputPoints = theInput->GetPoints();
-    vtkPoints *aPoints = anInputPoints->New( elno_type );
-    vtkIdType aNbPoints = theInput->GetNumberOfPoints();
-    aPoints->SetNumberOfPoints( aNbPoints );
-    
-    typedef typename VISU::TL::TEnum2VTKArrayType< elno_type >::TResult TPointsDataArray;
-    typedef typename VISU::TL::TEnum2VTKBasicType< elno_type >::TResult TPointsDataType;
-    TPointsDataArray* anOutputPointsArray = TPointsDataArray::SafeDownCast( aPoints->GetData() );
-
-    TPointsDataArray* anElnoPointCoords = TPointsDataArray::SafeDownCast( theElnoPointCoords );
-    
-    for ( vtkIdType aPointId = 0; aPointId < aNbPoints; aPointId++ ) {
-      TPointsDataType aCoords[ 3 ];
-      anElnoPointCoords->GetTupleValue( aPointId, aCoords );
-      anOutputPointsArray->SetTupleValue( aPointId, aCoords );
-    }
-    
-    theOutput->SetPoints( aPoints );
-
-    return 1;
-  } 
-
-
-  //----------------------------------------------------------------------------
-  template < int points_type >
-  int Execute( vtkPointSet *theInput, 
-              vtkPointSet *theOutput,
-              vtkDataArray *theElnoPointCoords )
-  {
-    switch( theElnoPointCoords->GetDataType() ){
-    case VTK_DOUBLE:
-      return Execute2< points_type, VTK_DOUBLE >( theInput, theOutput, theElnoPointCoords );
-    case VTK_FLOAT:
-      return Execute2< points_type, VTK_FLOAT >( theInput, theOutput, theElnoPointCoords );
-    case VTK_INT:
-      return Execute2< points_type, VTK_INT >( theInput, theOutput, theElnoPointCoords );
-    case VTK_LONG:
-      return Execute2< points_type, VTK_LONG >( theInput, theOutput, theElnoPointCoords );
-    default:
-      break;
-    }
-    
-    return 0;
-  } 
-
-
-  //----------------------------------------------------------------------------
-}
-
-
-//----------------------------------------------------------------------------
-int VISU_ElnoAssembleFilter::RequestData( vtkInformation *vtkNotUsed(request),
-                                         vtkInformationVector **inputVector,
-                                         vtkInformationVector *outputVector )
-{
-  // get the info objects
-  vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
-  vtkInformation *outInfo = outputVector->GetInformationObject(0);
-
-  // get the input and ouptut
-  vtkPointSet *anInput = vtkPointSet::SafeDownCast( inInfo->Get( vtkDataObject::DATA_OBJECT() ) );
-  vtkPointSet *anOutput = vtkPointSet::SafeDownCast( outInfo->Get( vtkDataObject::DATA_OBJECT() ) );
-
-  vtkDataArray *anElnoPointCoords = this->GetInputArrayToProcess( 0, inputVector );
-
-  if ( !myIsRestorePoints || !anElnoPointCoords ) {
-    anOutput->ShallowCopy( anInput );
-    return 1;
-  }
-
-  vtkPoints *aPoints = anInput->GetPoints();
-  switch( aPoints->GetDataType() ){
-  case VTK_DOUBLE:
-    return ::Execute< VTK_DOUBLE >( anInput, anOutput, anElnoPointCoords );
-  case VTK_FLOAT:
-    return ::Execute< VTK_FLOAT >( anInput, anOutput, anElnoPointCoords );
-  case VTK_INT:
-    return ::Execute< VTK_INT >( anInput, anOutput, anElnoPointCoords );
-  case VTK_LONG:
-    return ::Execute< VTK_LONG >( anInput, anOutput, anElnoPointCoords );
-  default:
-    break;
-  }  
-  
-  return 0;
-}
-
-
-//----------------------------------------------------------------------------
diff --git a/src/PIPELINE/VISU_ElnoAssembleFilter.hxx b/src/PIPELINE/VISU_ElnoAssembleFilter.hxx
deleted file mode 100644 (file)
index 8f586c6..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-//  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
-
-#ifndef VISU_ElnoAssembleFilter_H
-#define VISU_ElnoAssembleFilter_H
-
-#include <vtkPointSetAlgorithm.h>
-
-class VISU_ElnoAssembleFilter : public vtkPointSetAlgorithm
-{
-public:
-  typedef vtkPointSetAlgorithm Superclass;
-
-  static VISU_ElnoAssembleFilter *New();
-
-  void SetElnoAssembleState( bool theIsRestorePoints );
-
-protected:
-  VISU_ElnoAssembleFilter();
-  ~VISU_ElnoAssembleFilter();
-
-  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
-
-  bool myIsRestorePoints;
-
-private:
-  VISU_ElnoAssembleFilter(const VISU_ElnoAssembleFilter&);  // Not implemented.
-  void operator=(const VISU_ElnoAssembleFilter&);  // Not implemented.
-};
-
-#endif
diff --git a/src/PIPELINE/VISU_ElnoDisassembleFilter.cxx b/src/PIPELINE/VISU_ElnoDisassembleFilter.cxx
deleted file mode 100644 (file)
index eb84ca4..0000000
+++ /dev/null
@@ -1,400 +0,0 @@
-//  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
-
-#include "VISU_ElnoDisassembleFilter.hxx"
-#include "VISU_PipeLineUtils.hxx"
-#include "VISU_ElnoMeshValue.hxx"
-
-#include <vtkCellData.h>
-#include <vtkInformation.h>
-#include <vtkInformationVector.h>
-#include <vtkObjectFactory.h>
-#include <vtkPointData.h>
-#include <vtkUnstructuredGrid.h>
-#include <vtkPoints.h>
-#include <vtkCellArray.h>
-
-
-//----------------------------------------------------------------------------
-vtkStandardNewMacro( VISU_ElnoDisassembleFilter );
-
-
-//----------------------------------------------------------------------------
-VISU_ElnoDisassembleFilter::VISU_ElnoDisassembleFilter()
-{
-  this->SetInputArrayToProcess( 0, // idx
-                               0, // port
-                               0, // connection
-                               vtkDataObject::FIELD_ASSOCIATION_CELLS, // field association
-                               "ELNO_FIELD" ); // name
-
-  this->SetInputArrayToProcess( 1, // idx
-                               0, // port
-                               0, // connection
-                               vtkDataObject::FIELD_ASSOCIATION_CELLS, // field association
-                               "ELNO_COMPONENT_MAPPER" ); // name
-
-  this->myShrinkFactor = -0.999;
-}
-
-
-//----------------------------------------------------------------------------
-VISU_ElnoDisassembleFilter::~VISU_ElnoDisassembleFilter()
-{}
-
-
-//----------------------------------------------------------------------------
-void VISU_ElnoDisassembleFilter::SetShrinkFactor( vtkFloatingPointType theValue )
-{
-  if ( VISU::CheckIsSameValue( theValue, myShrinkFactor ) )
-    return;
-
-  myShrinkFactor = theValue;
-  this->Modified();
-}
-
-
-//----------------------------------------------------------------------------
-vtkFloatingPointType VISU_ElnoDisassembleFilter::GetShrinkFactor()
-{
-  return myShrinkFactor;
-}
-
-
-//----------------------------------------------------------------------------
-namespace
-{
-  //----------------------------------------------------------------------------
-  template < int points_type, int elno_type >
-  struct TExecute2
-  {
-    vtkUnstructuredGrid *myInput;
-    vtkUnstructuredGrid *myOutput;
-    vtkDataArray *myElnoDataArray;
-    vtkDataArray *myElnoDataMapper;
-    vtkFloatingPointType myShrinkFactor;
-
-    typedef typename VISU::TL::TEnum2VTKArrayType< points_type >::TResult TPointsDataArray;
-    typedef typename VISU::TL::TEnum2VTKBasicType< points_type >::TResult TPointsDataType;
-
-    typedef typename VISU::TL::TEnum2VTKArrayType< elno_type >::TResult TElnoDataArray;
-    typedef typename VISU::TL::TEnum2VTKBasicType< elno_type >::TResult TElnoDataType;
-
-    VISU::TGetElnoNodeData< elno_type > myGetElnoNodeData;
-    vtkCellArray *myConnectivity;
-    vtkPointData *myInputPointData;
-    vtkPointData *myOutputPointData;
-    TPointsDataArray *myInputPointsArray;
-    TPointsDataArray *myOutputPointsArray;
-    TElnoDataArray* myElnoFullDataArray;
-    TElnoDataArray* myElnoPartialDataArray;
-    TPointsDataArray *myElnoPointCoords;
-    vtkIntArray* myInputPointsMapper;
-    vtkIntArray* myOutputPointsMapper;
-
-    //----------------------------------------------------------------------------
-    TExecute2( vtkUnstructuredGrid *theInput, 
-              vtkUnstructuredGrid *theOutput, 
-              vtkDataArray *theElnoDataArray,
-              vtkDataArray *theElnoDataMapper,
-              vtkFloatingPointType theShrinkFactor )
-      : myGetElnoNodeData( theElnoDataArray, theElnoDataMapper )
-      , myInput( theInput )
-      , myOutput( theOutput )
-      , myElnoDataArray( theElnoDataArray )
-      , myElnoDataMapper( theElnoDataMapper )
-      , myShrinkFactor( theShrinkFactor )
-    {
-      myConnectivity = vtkCellArray::New();
-      myConnectivity->DeepCopy( theInput->GetCells() );
-    
-      vtkPoints *anInputPoints = theInput->GetPoints();
-      vtkPoints *aPoints = anInputPoints->New( anInputPoints->GetDataType() );
-      vtkIdType aNbCells = myConnectivity->GetNumberOfCells();
-      vtkIdType aNbPoints = myConnectivity->GetNumberOfConnectivityEntries() - aNbCells;
-      aPoints->Allocate( aNbPoints );
-    
-      myInputPointsArray = TPointsDataArray::SafeDownCast( anInputPoints->GetData() );
-      myOutputPointsArray = TPointsDataArray::SafeDownCast( aPoints->GetData() );
-    
-      myInputPointData = theInput->GetPointData();
-      myOutputPointData = theOutput->GetPointData();
-      myOutputPointData->Allocate( aNbPoints );
-    
-      vtkCellData *anInputCellData = theInput->GetCellData();
-
-      // To create a new copy of initial data for output
-      myElnoFullDataArray = TElnoDataArray::New();
-      myElnoFullDataArray->SetName( "VISU_FIELD" );
-      myElnoFullDataArray->SetNumberOfComponents( myGetElnoNodeData.getNbComp() );
-      myElnoFullDataArray->SetNumberOfTuples( aNbPoints );
-
-      // To create a new copy of partial initial data for output
-      myElnoPartialDataArray = TElnoDataArray::New();
-      // This partial data can be represented as in terms of vectors as scalars
-      if ( anInputCellData->GetVectors() != NULL ) 
-       myElnoPartialDataArray->SetNumberOfComponents( 3 );
-      else
-       myElnoPartialDataArray->SetNumberOfComponents( 1 );
-      myElnoPartialDataArray->SetNumberOfTuples( aNbPoints );
-
-      myElnoPointCoords = TPointsDataArray::New();
-      myElnoPointCoords->SetName( "ELNO_POINT_COORDS" );
-      myElnoPointCoords->SetNumberOfComponents( 3 );
-      myElnoPointCoords->SetNumberOfTuples( aNbPoints );
-
-      vtkDataArray* anArray = myInputPointData->GetArray( "VISU_POINTS_MAPPER" );
-      myInputPointsMapper = vtkIntArray::SafeDownCast( anArray );
-      
-      myOutputPointsMapper = vtkIntArray::New();
-      myOutputPointsMapper->SetName( myInputPointsMapper->GetName() );
-      myOutputPointsMapper->SetNumberOfComponents( myInputPointsMapper->GetNumberOfComponents() );
-      myOutputPointsMapper->SetNumberOfTuples( aNbPoints );
-
-      if ( theShrinkFactor > 0.0 )
-       this->ShrinkExecute();
-      else
-       this->SimpleExecute();
-
-      theOutput->SetPoints( aPoints );
-      
-      theOutput->SetCells( theInput->GetCellTypesArray(), 
-                          theInput->GetCellLocationsArray(),
-                          myConnectivity );
-
-      myConnectivity->Delete();
-      
-      vtkCellData *anOutputCellData = theOutput->GetCellData();
-      anOutputCellData->PassData( anInputCellData );
-      
-      anOutputCellData->RemoveArray( "ELNO_COMPONENT_MAPPER" );
-      anOutputCellData->RemoveArray( "ELNO_FIELD" );
-      anOutputCellData->RemoveArray( "VISU_FIELD" );
-      anOutputCellData->SetVectors( NULL );
-      
-      //anOutputPointData->PassData( anInputPointData );
-      
-      myOutputPointData->AddArray( myElnoFullDataArray );
-      myElnoFullDataArray->Delete();
-      
-      if ( anInputCellData->GetVectors() != NULL ) 
-       myOutputPointData->SetVectors( myElnoPartialDataArray );
-      else
-       myOutputPointData->SetScalars( myElnoPartialDataArray );
-      myElnoPartialDataArray->Delete();
-      
-      myOutputPointData->AddArray( myElnoPointCoords );
-      myElnoPointCoords->Delete();
-      
-      myOutputPointData->AddArray( myOutputPointsMapper );
-      myOutputPointsMapper->Delete();
-    }
-
-    //----------------------------------------------------------------------------
-    void SimpleExecute()
-    {
-      // To reserve a temproary value holder
-      vtkIdType aNbComp = std::max( 3, myGetElnoNodeData.getNbComp() );
-      std::vector< TElnoDataType > anElnoDataValues( aNbComp ); 
-
-      std::vector< int > anPointsMapperValues( myInputPointsMapper->GetNumberOfComponents() ); 
-   
-      myConnectivity->InitTraversal();
-      vtkIdType aNbPts = 0, *aPts = 0;
-      for ( vtkIdType aCellId = 0; myConnectivity->GetNextCell( aNbPts, aPts ); aCellId++ ) {
-        for ( vtkIdType aPntId = 0; aPntId < aNbPts; aPntId++ ) {
-         TPointsDataType aCoords[ 3 ];
-         vtkIdType aCurrentPntId = aPts[ aPntId ];
-         myInputPointsArray->GetTupleValue( aCurrentPntId, aCoords );
-         
-         aPts[ aPntId ] = myOutputPointsArray->InsertNextTupleValue( aCoords );
-         vtkIdType aNewPntId = aPts[ aPntId ];
-         
-         myElnoPointCoords->SetTupleValue( aNewPntId, aCoords );
-         
-         myOutputPointData->CopyData( myInputPointData, aCurrentPntId, aNewPntId );
-         
-         TElnoDataType* anElnoData = myGetElnoNodeData( aCellId, aPntId );
-         myElnoFullDataArray->SetTupleValue( aNewPntId,  anElnoData );
-         
-         myElnoFullDataArray->GetTupleValue( aNewPntId, &anElnoDataValues[ 0 ] );
-         myElnoPartialDataArray->SetTupleValue( aNewPntId, &anElnoDataValues[ 0 ] );
-
-         myInputPointsMapper->GetTupleValue( aCurrentPntId, &anPointsMapperValues[ 0 ] );
-         myOutputPointsMapper->SetTupleValue( aNewPntId, &anPointsMapperValues[ 0 ] );
-        }
-      }
-    }
-
-    //----------------------------------------------------------------------------
-    void ShrinkExecute()
-    {
-      // To reserve a temproary value holder
-      vtkIdType aNbComp = std::max( 3, myGetElnoNodeData.getNbComp() );
-      std::vector< TElnoDataType > anElnoDataValues( aNbComp ); 
-      
-      std::vector< int > anPointsMapperValues( myInputPointsMapper->GetNumberOfComponents() ); 
-   
-      myConnectivity->InitTraversal();
-      vtkIdType aNbPts = 0, *aPts = 0;
-      for ( vtkIdType aCellId = 0; myConnectivity->GetNextCell( aNbPts, aPts ); aCellId++ ) {
-       
-       TPointsDataType aCenter[ 3 ] = { TPointsDataType(), TPointsDataType(), TPointsDataType() };
-       
-       for ( vtkIdType aPntId = 0; aPntId < aNbPts; aPntId++ ) {
-         TPointsDataType aCoords[ 3 ];
-         myInputPointsArray->GetTupleValue( aPts[ aPntId ], aCoords );
-         
-         aCenter[ 0 ] += aCoords[ 0 ];
-         aCenter[ 1 ] += aCoords[ 1 ];
-         aCenter[ 2 ] += aCoords[ 2 ];
-       }
-       
-       aCenter[ 0 ] /= aNbPts;
-       aCenter[ 1 ] /= aNbPts;
-       aCenter[ 2 ] /= aNbPts;
-       
-       for ( vtkIdType aPntId = 0; aPntId < aNbPts; aPntId++ ) {
-         TPointsDataType aCoords[ 3 ];
-         vtkIdType aCurrentPntId = aPts[ aPntId ];
-         myInputPointsArray->GetTupleValue( aCurrentPntId, aCoords );
-         
-         TPointsDataType aNewCoords[ 3 ];
-         
-         aNewCoords[ 0 ] = aCenter[ 0 ]  + 
-           TPointsDataType( myShrinkFactor * ( aCoords[ 0 ] - aCenter[ 0 ] ) );
-         aNewCoords[ 1 ] = aCenter[ 1 ]  + 
-           TPointsDataType( myShrinkFactor * ( aCoords[ 1 ] - aCenter[ 1 ] ) );
-         aNewCoords[ 2 ] = aCenter[ 2 ]  + 
-           TPointsDataType( myShrinkFactor * ( aCoords[ 2 ] - aCenter[ 2 ] ) );
-         
-         aPts[ aPntId ] = myOutputPointsArray->InsertNextTupleValue( aNewCoords );
-         vtkIdType aNewPntId = aPts[ aPntId ];
-         
-         myElnoPointCoords->SetTupleValue( aNewPntId, aCoords );
-         
-         myOutputPointData->CopyData( myInputPointData, aCurrentPntId, aNewPntId );
-         
-         TElnoDataType* anElnoData = myGetElnoNodeData( aCellId, aPntId );
-         myElnoFullDataArray->SetTupleValue( aNewPntId, anElnoData );
-         
-         myElnoFullDataArray->GetTupleValue( aNewPntId, &anElnoDataValues[ 0 ] );
-         myElnoPartialDataArray->SetTupleValue( aNewPntId, &anElnoDataValues[ 0 ] );
-
-         myInputPointsMapper->GetTupleValue( aCurrentPntId, &anPointsMapperValues[ 0 ] );
-         myOutputPointsMapper->SetTupleValue( aNewPntId, &anPointsMapperValues[ 0 ] );
-       }
-      }
-    }
-  };
-
-
-  //----------------------------------------------------------------------------
-  template < int points_type, int elno_type >
-  int Execute2( vtkUnstructuredGrid *theInput, 
-               vtkUnstructuredGrid *theOutput, 
-               vtkDataArray *theElnoDataArray,
-               vtkDataArray *theElnoDataMapper,
-               vtkFloatingPointType theShrinkFactor )
-  {
-    TExecute2< points_type, elno_type >( theInput, 
-                                        theOutput, 
-                                        theElnoDataArray, 
-                                        theElnoDataMapper, 
-                                        theShrinkFactor );
-        
-    return 1;
-  }
-          
-
-  //----------------------------------------------------------------------------
-  template < int points_type >
-  int Execute( vtkUnstructuredGrid *theInput, 
-              vtkUnstructuredGrid *theOutput, 
-              vtkDataArray *theElnoDataArray,
-              vtkDataArray *theElnoDataMapper,
-              vtkFloatingPointType theShrinkFactor )
-  {
-    switch( theElnoDataArray->GetDataType() ){
-    case VTK_DOUBLE:
-      return Execute2< points_type, VTK_DOUBLE >
-       ( theInput, theOutput, theElnoDataArray, theElnoDataMapper, theShrinkFactor );
-    case VTK_FLOAT:
-      return Execute2< points_type, VTK_FLOAT >
-       ( theInput, theOutput, theElnoDataArray, theElnoDataMapper, theShrinkFactor );
-    case VTK_INT:
-      return Execute2< points_type, VTK_INT >
-       ( theInput, theOutput, theElnoDataArray, theElnoDataMapper, theShrinkFactor );
-    case VTK_LONG:
-      return Execute2< points_type, VTK_LONG >
-       ( theInput, theOutput, theElnoDataArray, theElnoDataMapper, theShrinkFactor );
-    default:
-      break;
-    }
-    
-    return 0;
-  } 
-
-
-  //----------------------------------------------------------------------------
-}
-
-
-//----------------------------------------------------------------------------
-int VISU_ElnoDisassembleFilter::RequestData( vtkInformation *vtkNotUsed(request),
-                                            vtkInformationVector **inputVector,
-                                            vtkInformationVector *outputVector )
-{
-  // get the info objects
-  vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
-  vtkInformation *outInfo = outputVector->GetInformationObject(0);
-
-  // get the input and ouptut
-  vtkUnstructuredGrid *anInput =
-    vtkUnstructuredGrid::SafeDownCast( inInfo->Get( vtkDataObject::DATA_OBJECT() ) );
-  vtkUnstructuredGrid *anOutput = 
-    vtkUnstructuredGrid::SafeDownCast( outInfo->Get( vtkDataObject::DATA_OBJECT() ) );
-
-  vtkDataArray *anElnoDataArray = this->GetInputArrayToProcess( 0, inputVector );
-  vtkDataArray *anElnoDataMapper = this->GetInputArrayToProcess( 1, inputVector );
-
-  if ( !anElnoDataArray ) {
-    anOutput->ShallowCopy( anInput );
-    return 1;
-  }
-
-  vtkPoints *aPoints = anInput->GetPoints();
-  switch( aPoints->GetDataType() ){
-  case VTK_DOUBLE:
-    return ::Execute< VTK_DOUBLE >( anInput, anOutput, anElnoDataArray, anElnoDataMapper, myShrinkFactor );
-  case VTK_FLOAT:
-    return ::Execute< VTK_FLOAT >( anInput, anOutput, anElnoDataArray, anElnoDataMapper, myShrinkFactor );
-  case VTK_INT:
-    return ::Execute< VTK_INT >( anInput, anOutput, anElnoDataArray, anElnoDataMapper, myShrinkFactor );
-  case VTK_LONG:
-    return ::Execute< VTK_LONG >( anInput, anOutput, anElnoDataArray, anElnoDataMapper, myShrinkFactor );
-  default:
-    break;
-  }  
-  
-  return 0;
-}
-
-
-//----------------------------------------------------------------------------
diff --git a/src/PIPELINE/VISU_ElnoDisassembleFilter.hxx b/src/PIPELINE/VISU_ElnoDisassembleFilter.hxx
deleted file mode 100644 (file)
index 40f41d3..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-//  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
-
-#ifndef VISU_ElnoDisassembleFilter_H
-#define VISU_ElnoDisassembleFilter_H
-
-#include "VISUPipeline.hxx"
-
-#include <vtkUnstructuredGridAlgorithm.h>
-
-class VISU_PIPELINE_EXPORT VISU_ElnoDisassembleFilter : public vtkUnstructuredGridAlgorithm
-{
-public:
-  typedef vtkUnstructuredGridAlgorithm Superclass;
-
-  static VISU_ElnoDisassembleFilter *New();
-
-  void SetShrinkFactor( vtkFloatingPointType theValue );
-  vtkFloatingPointType GetShrinkFactor();
-
-protected:
-  VISU_ElnoDisassembleFilter();
-  ~VISU_ElnoDisassembleFilter();
-
-  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
-
-  vtkFloatingPointType myShrinkFactor;
-
-private:
-  VISU_ElnoDisassembleFilter(const VISU_ElnoDisassembleFilter&);  // Not implemented.
-  void operator=(const VISU_ElnoDisassembleFilter&);  // Not implemented.
-};
-
-#endif
index c59d0d19b0d8608d03bf9900947308015b98158d..a0c7a8d8fa8199ac7172790ccb28c825853b16bb 100644 (file)
@@ -60,6 +60,7 @@ VISU_GaussPointsPL
   myMergeFilter(VISU_GaussMergeFilter::New())
 {
   SetIsShrinkable(false);
+  SetIsFeatureEdgesAllowed(false);
 
   myWarpVector = vtkWarpVector::New();
 
@@ -245,7 +246,7 @@ VISU_GaussPointsPL
 {
   Superclass::Init();
 
-  SetExtractInside(false);
+  //SetExtractInside(false);
 
   vtkDataSet* aDataSet = GetParentMesh();
   vtkFloatingPointType aScaleFactor = VISU_DeformedShapePL::GetScaleFactor( aDataSet );
index 883599632739e4a33ca372a82a7c116e3bcd7c43..125d5a21abf6f6473439de18780dece983272b33 100644 (file)
@@ -45,6 +45,7 @@ VISU_IsoSurfacesPL
 ::VISU_IsoSurfacesPL()
 {
   SetIsShrinkable(false);
+  SetIsFeatureEdgesAllowed(false);
 
   SetElnoDisassembleState( true );
 
@@ -125,9 +126,9 @@ VISU_IsoSurfacesPL
 //----------------------------------------------------------------------------
 void
 VISU_IsoSurfacesPL
-::SetScalarRange(vtkFloatingPointType theRange[2]
+::SetScalarRange( vtkFloatingPointType theRange[2] 
 {
-  Superclass::SetScalarRange(theRange);
+  Superclass::SetScalarRange( theRange );
   SetRange(myRange);
 }
 
index 73aec61ed465368085d9d0c93e00ba64aeffe771..b6cb79711dfd2e892bee01dba07822f6317115e3 100644 (file)
@@ -61,7 +61,7 @@ public:
 
   virtual
   void
-  SetScalarRange(vtkFloatingPointType theRange[2]);
+  SetScalarRange( vtkFloatingPointType theRange[2] );
 
   virtual
   void
diff --git a/src/PIPELINE/VISU_LabelPointsFilter.cxx b/src/PIPELINE/VISU_LabelPointsFilter.cxx
deleted file mode 100644 (file)
index 040d6a2..0000000
+++ /dev/null
@@ -1,296 +0,0 @@
-//  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_LabelPointsFilter.cxx
-// Author:  Vitaly Smetannikov
-// Module : VISU
-
-
-
-#include "VISU_LabelPointsFilter.hxx"
-
-#include <vtkPolyData.h>
-#include <vtkObjectFactory.h>
-#include <vtkInformation.h>
-#include <vtkInformationVector.h>
-#include <vtkFeatureEdges.h>
-#include <vtkCellArray.h>
-#include <vtkPointData.h>
-#include <vtkCellData.h>
-#include <vtkDataArray.h>
-#include <vtkDoubleArray.h>
-#include <vtkGeometryFilter.h>
-#include <vtkPolyDataConnectivityFilter.h>
-#include <vtkMath.h>
-
-#include <set>
-#include <vector>
-
-
-#define CONTAINS(SET, PT) (SET.find(PT) != SET.end())
-
-struct ltIdType 
-{
-  bool operator()(const vtkIdType a1, const vtkIdType a2) const
-  {
-    return a1 < a2;
-  }
-};
-
-
-
-//----------------------------------------------------------------------------
-vtkStandardNewMacro(VISU_LabelPointsFilter);
-
-
-//----------------------------------------------------------------------------
-void VISU_LabelPointsFilter::SetPointsNb(int theNb)
-{
-  if (myPointsNb == theNb) return;
-  myPointsNb = (theNb < 1)? 1:theNb;
-  Modified();
-}
-
-//----------------------------------------------------------------------------
-VISU_LabelPointsFilter::VISU_LabelPointsFilter():
-  vtkPolyDataAlgorithm(),
-  myPointsNb(3)
-{
-}
-
-//----------------------------------------------------------------------------
-VISU_LabelPointsFilter::~VISU_LabelPointsFilter()
-{}
-
-
-
-//----------------------------------------------------------------------------
-int VISU_LabelPointsFilter::RequestData(vtkInformation* vtkNotUsed(request),
-                                       vtkInformationVector** inputVector,
-                                       vtkInformationVector* outputVector)
-{
-  // get the info objects
-  vtkInformation* inInfo = inputVector[0]->GetInformationObject(0);
-  vtkInformation* outInfo = outputVector->GetInformationObject(0);
-
-  // get the input and ouptut
-  vtkPolyData* input = vtkPolyData::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT()));
-  vtkPolyData* output = vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));
-
-  GetRegions(input, output);
-
-  return 1;
-}
-
-int VISU_LabelPointsFilter::RequestUpdateExtent(vtkInformation* vtkNotUsed(request),
-                                               vtkInformationVector** inputVector,
-                                               vtkInformationVector* outputVector)
-{
-  // get the info objects
-  vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
-  vtkInformation *outInfo = outputVector->GetInformationObject(0);
-
-  vtkPolyData* input = vtkPolyData::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT()));
-  vtkPolyData* output = vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));
-
-  GetRegions(input, output);
-  return 1;
-}
-
-
-
-int VISU_LabelPointsFilter::GetRegions(vtkPolyData* theInput, 
-                                      vtkPolyData* theOutput)
-{
-  vtkIdType cellId, i;
-  vtkIdType numPts, numCells;
-  vtkPoints *inPts;
-
-  vtkPointData *aInpPD=theInput->GetPointData(), *aOutPD=theOutput->GetPointData();
-  vtkCellData *aInpCD=theInput->GetCellData(), *aOutCD=theOutput->GetCellData();
-  
-  //  Check input/allocate storage
-  //
-  inPts = theInput->GetPoints();
-
-  if (inPts == NULL)
-    return 1;
-
-  numPts = inPts->GetNumberOfPoints();
-  numCells = theInput->GetNumberOfCells();
-
-  if ( numPts < 1 || numCells < 1 )
-    return 1;
-
-  // Build cell structure
-  //
-  vtkPolyData* aMesh = vtkPolyData::New();
-  aMesh->CopyStructure(theInput);
-  aMesh->BuildLinks();
-
-  // Initialize.  Keep track of points and cells visited.
-  //
-  vtkIdTypeArray* aRegionSizes = vtkIdTypeArray::New();
-  int* aVisited = new int[numCells];
-  for ( i=0; i < numCells; i++ )
-     aVisited[i] = -1;
-
-  vtkIdType* aPointMap = new vtkIdType[numPts];  
-  for ( i=0; i < numPts; i++ )
-    aPointMap[i] = -1;
-
-  vtkPoints* newPts = vtkPoints::New();
-  newPts->Allocate(numPts);
-
-  // Traverse all cells marking those visited.  Each new search
-  // starts a new connected region. Connected region grows 
-  // using a connected wave propagation.
-  //
-  vtkIdList* aWave = vtkIdList::New();
-  aWave->Allocate(numPts/4+1,numPts);
-  vtkIdList* aWave2 = vtkIdList::New();
-  aWave2->Allocate(numPts/4+1,numPts);
-
-  vtkIdType aPointNumber = 0;
-  int aRegionNumber = 0;
-
-  vtkIdList* aCellIds = vtkIdList::New(); 
-  aCellIds->Allocate(8, VTK_CELL_SIZE);
-  vtkIdList* aPointIds = vtkIdList::New(); 
-  aPointIds->Allocate(8, VTK_CELL_SIZE);
-
-  //  vtkIdType aNumCellsInRegion;
-
-  aOutPD->CopyAllocate(aInpPD);
-  aOutCD->CopyAllocate(aInpCD);
-
-  //visit all cells marking with region number
-  for (cellId=0; cellId < numCells; cellId++) {
-    if ( aVisited[cellId] < 0 ) {
-      aWave->InsertNextId(cellId);
-      aPointNumber = 0;
-      TraverseAndMark(aWave, aWave2, aVisited, aPointMap, 
-                     aRegionNumber, aPointNumber, aMesh);
-      
-      if (aPointNumber >= myPointsNb) {
-       std::set<vtkIdType, ltIdType> aIdxSet;
-       for (i=0; i < numPts; i++) {
-         if ( aPointMap[i] > -1 ) {
-           aIdxSet.insert(i);
-           aPointMap[i] = -1;
-         }
-       }
-       std::vector<vtkIdType> aIdx(aIdxSet.begin(), aIdxSet.end());
-       int aActualPts = aIdx.size();
-       int aNewId;
-       if (myPointsNb > 2) {
-         int k = aActualPts/(myPointsNb - 1);
-         int count;
-         for (i=0, count = 0; i < aActualPts; i+=k, count++) {
-           aNewId = newPts->InsertNextPoint(inPts->GetPoint(aIdx[i]));
-           aOutPD->CopyData(aInpPD, aIdx[i], aNewId);
-         }
-         if (count < myPointsNb) {
-           aNewId = newPts->InsertNextPoint(inPts->GetPoint(aIdx[aActualPts - 1]));
-           aOutPD->CopyData(aInpPD, aIdx[aActualPts - 1], aNewId);
-         }
-       } else {          
-         aNewId = newPts->InsertNextPoint(inPts->GetPoint(aIdx[0]));
-         aOutPD->CopyData(aInpPD, aIdx[0], aNewId);
-         if (myPointsNb == 2) {
-           aNewId = newPts->InsertNextPoint(inPts->GetPoint(aIdx[aActualPts - 1]));
-           aOutPD->CopyData(aInpPD, aIdx[aActualPts - 1], aNewId);
-         }
-       }
-      }
-      aWave->Reset();
-      aWave2->Reset(); 
-    }
-  }
-
-  aWave->Delete();
-  aWave2->Delete();
-
-  theOutput->SetPoints(newPts);
-  newPts->Delete();
-
-
-  delete [] aVisited;
-  delete [] aPointMap;
-  aMesh->Delete();
-  theOutput->Squeeze();
-  aCellIds->Delete();
-  aPointIds->Delete();
-
-  return aRegionSizes->GetMaxId() + 1;
-}
-
-
-// Mark current cell as visited and assign region number.  Note:
-// traversal occurs across shared vertices.
-//
-void VISU_LabelPointsFilter::TraverseAndMark (vtkIdList* theWave, 
-                                             vtkIdList* theWave2, 
-                                             int* theVisited,
-                                             vtkIdType* thePointMap,
-                                             int& theRegionNumber,
-                                             vtkIdType& thePointNumber,
-                                             vtkPolyData* theMesh)
-{
-  vtkIdType cellId, ptId, numIds, i;
-  int j, k;
-  vtkIdType *pts, *cells, npts;
-  vtkIdList *tmpWave;
-  unsigned short ncells;
-  vtkIdList* aNeighborCellPointIds = vtkIdList::New();
-
-
-  while ( (numIds=theWave->GetNumberOfIds()) > 0 ) {
-    for ( i=0; i < numIds; i++ ) {
-      cellId = theWave->GetId(i);
-      if ( theVisited[cellId] < 0 ) {
-        theVisited[cellId] = theRegionNumber;
-        theMesh->GetCellPoints(cellId, npts, pts);
-       
-        for (j=0; j < npts; j++) {
-          if ( thePointMap[ptId=pts[j]] < 0 ) {
-            thePointMap[ptId] = thePointNumber++;
-         }       
-          theMesh->GetPointCells(ptId,ncells,cells);
-         
-          // check connectivity criterion (geometric + scalar)
-          for (k=0; k < ncells; k++) {
-            cellId = cells[k];
-           theWave2->InsertNextId(cellId);
-           //              }
-         }//for all cells using this point
-       }//for all points of this cell
-      }//if cell not yet visited
-    }//for all cells in this wave
-    
-    tmpWave = theWave;
-    theWave = theWave2;
-    theWave2 = tmpWave;
-    tmpWave->Reset();
-  } //while wave is not empty
-}
diff --git a/src/PIPELINE/VISU_LabelPointsFilter.hxx b/src/PIPELINE/VISU_LabelPointsFilter.hxx
deleted file mode 100644 (file)
index 46fa1c4..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-//  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_LabelPointsFilter.hxx
-// Author:  Vitaly Smetannikov
-// Module : VISU
-
-#ifndef VISU_LabelPointsFilter_HeaderFile
-#define VISU_LabelPointsFilter_HeaderFile
-
-#include "VISUPipeline.hxx"
-#include <vtkPolyDataAlgorithm.h>
-
-class vtkPolyData;
-
-class VISU_PIPELINE_EXPORT VISU_LabelPointsFilter : public vtkPolyDataAlgorithm
-{
-public:
-  vtkTypeMacro(VISU_LabelPointsFilter, vtkPolyDataAlgorithm);
-
-  static VISU_LabelPointsFilter* New();
-
-  void SetPointsNb(int theNb);
-
-  int GetPointsNb() const { return myPointsNb; }
-
-protected:
-  VISU_LabelPointsFilter();
-
-  virtual ~VISU_LabelPointsFilter();
-
-  virtual int RequestData(vtkInformation* request,
-                          vtkInformationVector** inputVector,
-                          vtkInformationVector* outputVector);
-
-  virtual int RequestUpdateExtent(vtkInformation*,
-                                  vtkInformationVector**,
-                                  vtkInformationVector*);
-
-
-  void TraverseAndMark (vtkIdList* theWave, 
-                       vtkIdList* theWave2, 
-                       int* theVisited,
-                       vtkIdType* thePointMap,
-                       int& theRegionNumber,
-                       vtkIdType& thePointNumber,
-                       vtkPolyData* theMesh);
-  
-  int GetRegions(vtkPolyData* theInput, 
-                vtkPolyData* theOutput);
-
-  int myPointsNb;
-
-};
-
-
-#endif
index 8c4dfc9008c49672de178fd7c26a7c4163186b56..c325fa0656e0f397e6548af9ea58cf26a36a59a5 100644 (file)
 
 using namespace std;
 
+
+//----------------------------------------------------------------------------
 vtkStandardNewMacro(VISU_LookupTable);
 
+
+//----------------------------------------------------------------------------
 VISU_LookupTable
 ::VISU_LookupTable(int sze, int ext):
   vtkLookupTable(sze, ext), 
@@ -41,6 +45,73 @@ VISU_LookupTable
   myBicolor(false) 
 {}
 
+//----------------------------------------------------------------------------
+namespace
+{
+  inline
+  void
+  CopyColor( unsigned char* theTaget, const unsigned char* theSource )
+  {
+    theTaget[0] = theSource[0];
+    theTaget[1] = theSource[1];
+    theTaget[2] = theSource[2];
+  }
+}
+
+
+//----------------------------------------------------------------------------
+void
+VISU_LookupTable
+::MarkValueByColor( vtkFloatingPointType theValue,
+                   unsigned char* theColor )
+{ 
+  vtkIdType anIndex = this->GetIndex( theValue );
+  unsigned char *aTablePtr = this->GetPointer( anIndex );
+  CopyColor( aTablePtr, theColor );
+}
+
+
+//----------------------------------------------------------------------------
+void
+VISU_LookupTable
+::FillByColor( unsigned char* theColor )
+{
+  vtkIdType aNbColors = this->GetNumberOfColors();
+  for(int i = 0; i < aNbColors; i++){
+    unsigned char *aTablePtr = this->GetPointer(i);
+    CopyColor( aTablePtr, theColor );
+  }
+}
+
+
+//----------------------------------------------------------------------------
+void
+VISU_LookupTable
+::MakeBiColor()
+{
+  unsigned char aRedPtr[3] = {255, 0, 0};
+  unsigned char aBluePtr[3] = {0, 0, 255};
+  
+  vtkFloatingPointType aRange[2];
+  this->GetTableRange(aRange);
+  vtkIdType aNbColors = this->GetNumberOfColors();
+  
+  vtkFloatingPointType aDelta = (aRange[1]-aRange[0])/aNbColors;
+  vtkFloatingPointType aValue = aRange[0]+0.5*aDelta;
+  for(int i = 0; i < aNbColors; i++){
+    vtkIdType anIndex = this->GetIndex(aValue);
+    unsigned char* aTablePtr = this->GetPointer(anIndex);
+    if(aValue > 0.0){
+      CopyColor(aTablePtr,aRedPtr);
+    }else{
+      CopyColor(aTablePtr,aBluePtr);
+    }
+    aValue += aDelta;
+  }
+}
+
+
+//----------------------------------------------------------------------------
 void 
 VISU_LookupTable
 ::SetMapScale(vtkFloatingPointType theScale)
index 93fc7a47b137c19cadbe062c5ac3158baa7d93bd..c7e29c6cd8da23677e4229c3dce6f9be1f695669 100644 (file)
 #ifndef VISU_LookupTable_H
 #define VISU_LookupTable_H
 
+#include "VISUPipeline.hxx"
+
 #include <vtkLookupTable.h>
 
 #include "VTKViewer.h"
 
-class VISU_LookupTable: public vtkLookupTable 
+class VISU_PIPELINE_EXPORT VISU_LookupTable: public vtkLookupTable 
 {
  public:
    vtkTypeMacro(VISU_LookupTable,vtkLookupTable);
@@ -44,8 +46,17 @@ class VISU_LookupTable: public vtkLookupTable
   bool GetBicolor() { return myBicolor; }
   void SetBicolor( bool theBicolor );
 
-   static int ComputeLogRange(vtkFloatingPointType inRange[2], vtkFloatingPointType outRange[2]);
-   unsigned char *MapValue(vtkFloatingPointType v);
+  static int ComputeLogRange( vtkFloatingPointType inRange[2], 
+                             vtkFloatingPointType outRange[2] );
+  
+  unsigned char *MapValue(vtkFloatingPointType v);
+
+  void MarkValueByColor( vtkFloatingPointType theValue,
+                        unsigned char* theColor );
+
+  void FillByColor( unsigned char* theColor );
+
+  void MakeBiColor();
 
  protected:
    VISU_LookupTable(int sze=256, int ext=256);
index 756abdeed99bba7a2990864f94bf774978cab4da..3a87d47cd2b84dadb5a4124319488bd57e21c7dd 100644 (file)
@@ -139,6 +139,8 @@ public:
   vtkPlane* 
   GetClippingPlane(vtkIdType theID) = 0;
 
+  virtual void RemoveClippingPlane(vtkIdType theID) = 0;
+
   //----------------------------------------------------------------------------
   virtual
   void
diff --git a/src/PIPELINE/VISU_MergedPL.cxx b/src/PIPELINE/VISU_MergedPL.cxx
deleted file mode 100644 (file)
index 4aa24b8..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-//  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_MergedPL.cxx
-// Author:  Alexey PETROV
-// Module : VISU
-
-
-#include "VISU_MergedPL.hxx"
-#include "VISU_PipeLine.hxx"
-
-
-//----------------------------------------------------------------------------
-void
-VISU_MergedPL
-::DoShallowCopy(VISU_PipeLine *thePipeLine,
-               bool theIsCopyInput)
-{
-  if(VISU_MergedPL *aPipeLine = dynamic_cast<VISU_MergedPL*>(thePipeLine)){
-    if ( this == aPipeLine ) 
-      return;
-
-    if ( aPipeLine->IsExternalGeometryUsed() ) {
-      ClearGeometry();
-      int aNbOfGeometry = aPipeLine->GetNumberOfGeometry();
-      for ( int aGeomNumber = 0; aGeomNumber < aNbOfGeometry; aGeomNumber++ )
-       AddGeometry( aPipeLine->GetGeometry( aGeomNumber ) );
-    }else
-      SetSourceGeometry();
-  }
-}
diff --git a/src/PIPELINE/VISU_MergedPL.hxx b/src/PIPELINE/VISU_MergedPL.hxx
deleted file mode 100644 (file)
index 9c8e9b9..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-//  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_MergedPL.hxx
-// Author:  Alexey PETROV
-// Module : VISU
-
-#ifndef VISU_MergedPL_HeaderFile
-#define VISU_MergedPL_HeaderFile
-
-#include "VISUPipeline.hxx"
-
-class vtkDataSet;
-class vtkPointSet;
-class VISU_PipeLine;
-
-//----------------------------------------------------------------------------
-struct VISU_PIPELINE_EXPORT VISU_MergedPL
-{
-  virtual  
-  void  
-  SetSourceGeometry() = 0;
-
-  virtual
-  int
-  AddGeometry( vtkDataSet* theGeometry ) = 0;
-
-  virtual
-  vtkDataSet*
-  GetGeometry( int theGeomNumber ) = 0;
-
-  virtual
-  int
-  GetNumberOfGeometry() = 0;
-
-  virtual
-  bool 
-  IsExternalGeometryUsed() = 0;
-
-  virtual
-  void
-  ClearGeometry() = 0;
-
-  virtual 
-  vtkPointSet* 
-  GetMergedInput() = 0;
-
-  virtual
-  void
-  DoShallowCopy(VISU_PipeLine *thePipeLine,
-               bool theIsCopyInput);
-};
-  
-#endif
index 9e5dd5d712e68a3f17c4daf77a214c2ba392857b..cfcc21169c4348a862cc327eb2063c435de98100 100644 (file)
@@ -44,6 +44,7 @@ VISU_MeshPL
   VISU_UnstructuredGridPL(this)
 {
   SetIsShrinkable(true);
+  SetIsFeatureEdgesAllowed(true);
 }
 
 
diff --git a/src/PIPELINE/VISU_OptionalDeformationPL.cxx b/src/PIPELINE/VISU_OptionalDeformationPL.cxx
deleted file mode 100755 (executable)
index a4bc455..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-//  Copyright (C) 2008  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_ScalarMapPL.cxx
-// Author:  Roman NIKOLAEV
-// Module : VISU
-
-//Salome includes
-#include "VISU_OptionalDeformationPL.hxx"
-#include "VISU_PipeLineUtils.hxx"
-
-//VTK includes
-#include <vtkDataSet.h>
-#include <vtkPassThroughFilter.h>
-#include <vtkWarpVector.h>
-#include <vtkCellDataToPointData.h>
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
-//----------------------------------------------------------------------------
-VISU_OptionalDeformationPL::VISU_OptionalDeformationPL():
-  VISU_DeformationPL(),
-  myIsDeformed(true)
-{
-    if(MYDEBUG) MESSAGE("VISU_OptionalDeformationPL()::VISU_OptionalDeformationPL() - "<<this);
-}
-
-//----------------------------------------------------------------------------
-VISU_OptionalDeformationPL::~VISU_OptionalDeformationPL()
-{
-  if(MYDEBUG) MESSAGE("VISU_OptionalDeformationPL()::~VISU_OptionalDeformationPL() - "<<this);
-}
-
-//----------------------------------------------------------------------------
-unsigned long int
-VISU_OptionalDeformationPL::GetMTime(){
-  return Superclass::GetMTime();
-}
-
-//----------------------------------------------------------------------------
-void VISU_OptionalDeformationPL::UseDeformation(bool flag){
-  if(myIsDeformed == flag)
-    return;
-
-  myIsDeformed = flag;
-  if(myIsDeformed)
-    OnDeformation();
-  else
-    OffDeformation();
-}
-
-//----------------------------------------------------------------------------
-bool VISU_OptionalDeformationPL::IsDeformed(){
-  return myIsDeformed;
-}
-
-//----------------------------------------------------------------------------
-void VISU_OptionalDeformationPL::OnDeformation(){
-
-  myCellDataToPointData->SetInput(myInputPassFilter->GetOutput());
-  myWarpVector->SetInput(myCellDataToPointData->GetOutput());
-  myOutputPassFiler->SetInput(myWarpVector->GetOutput());
-}
-
-//----------------------------------------------------------------------------
-void VISU_OptionalDeformationPL::OffDeformation(){
-  myOutputPassFiler->SetInput(myInputPassFilter->GetOutput());
-}
-
-
-
-bool VISU_OptionalDeformationPL::CheckCanDeformate(vtkDataSet* theInput){
-  if(theInput) {
-    if(VISU::IsDataOnCells(theInput))
-      return theInput->GetCellData()->GetVectors() != NULL;
-    else if(VISU::IsDataOnPoints(theInput))
-      return theInput->GetPointData()->GetVectors() != NULL;
-  }
-  return false;
-}
diff --git a/src/PIPELINE/VISU_OptionalDeformationPL.hxx b/src/PIPELINE/VISU_OptionalDeformationPL.hxx
deleted file mode 100755 (executable)
index 333da0c..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-//  Copyright (C) 2008  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_OptionalDeformationPL.hxx
-//  Author : 
-//  Module : SALOME
-
-#ifndef VISU_OptionalDeformationPL_HeaderFile
-#define VISU_OptionalDeformationPL_HeaderFile
-
-#include "VISUPipeline.hxx"
-#include "VISU_DeformationPL.hxx"
-
-class VISU_PIPELINE_EXPORT VISU_OptionalDeformationPL: public VISU_DeformationPL
-{
-public:
-  VISU_OptionalDeformationPL();
-  virtual ~VISU_OptionalDeformationPL();
-
-  typedef VISU_DeformationPL Superclass;
-
-  void UseDeformation(bool flag);
-  bool IsDeformed();
-
-  virtual 
-  unsigned 
-  long int
-  GetMTime();
-
-protected:
-  bool CheckCanDeformate(vtkDataSet* theInput);
-
-private:
-  void OnDeformation();
-  void OffDeformation();
-
-private:
-  bool myIsDeformed;
-};
-
-#endif
index ea165bc078c1c073b603e35d5ab35e7f35cf4f2e..0761bbd5e73cb0810fd1c67064db561b13f431c4 100644 (file)
@@ -47,7 +47,8 @@ static int MYDEBUG = 0;
 //----------------------------------------------------------------------------
 VISU_PipeLine
 ::VISU_PipeLine():
-  myIsShrinkable(true)
+  myIsShrinkable(true),
+  myIsFeatureEdgesAllowed(true)
 {
   if(MYDEBUG) MESSAGE("VISU_PipeLine::VISU_PipeLine - "<<this);
 }
@@ -282,6 +283,26 @@ VISU_PipeLine
 }
 
 
+//----------------------------------------------------------------------------
+bool 
+VISU_PipeLine
+::IsFeatureEdgesAllowed()
+{
+  return myIsFeatureEdgesAllowed;
+}
+
+void 
+VISU_PipeLine
+::SetIsFeatureEdgesAllowed(bool theIsFeatureEdgesAllowed)
+{
+  if(myIsFeatureEdgesAllowed == theIsFeatureEdgesAllowed)
+    return;
+
+  myIsFeatureEdgesAllowed = theIsFeatureEdgesAllowed;
+  Modified();
+}
+
+
 //----------------------------------------------------------------------------
 void
 VISU_PipeLine
@@ -347,6 +368,12 @@ VISU_PipeLine
   return GetMapperHolder()->GetClippingPlane(theID);
 }
 
+//----------------------------------------------------------------------------
+void VISU_PipeLine::RemoveClippingPlane(vtkIdType theID)
+{
+  return GetMapperHolder()->RemoveClippingPlane(theID);
+}
+
 //----------------------------------------------------------------------------
 vtkDataSet* 
 VISU_PipeLine
index 5301593714de39a4d3468f01f40db3f3edee2cbd..72ee74d2beebf520adfd368e0991f9309733d1b6 100644 (file)
@@ -132,6 +132,9 @@ public:
   bool 
   IsShrinkable();
 
+  bool 
+  IsFeatureEdgesAllowed();
+
   //----------------------------------------------------------------------------
   void
   SetImplicitFunction(vtkImplicitFunction *theFunction);
@@ -159,6 +162,8 @@ public:
   vtkPlane* 
   GetClippingPlane(vtkIdType theID);
 
+  virtual void RemoveClippingPlane(vtkIdType theID);
+
   virtual
   void
   SetPlaneParam(vtkFloatingPointType theDir[3], 
@@ -209,10 +214,14 @@ protected:
   void 
   SetIsShrinkable(bool theIsShrinkable);
 
+  void 
+  SetIsFeatureEdgesAllowed(bool theIsFeatureEdgesAllowed);
+
 private:
   //----------------------------------------------------------------------------
   vtkSmartPointer<VISU_MapperHolder> myMapperHolder;
   bool myIsShrinkable;
+  bool myIsFeatureEdgesAllowed;
 };
 
 #endif
index ed3750fc98da5e99604968c15c69e0d7ccc60fbe..a3465a37097c28fa3c3acf7e007ab499e85fc090 100644 (file)
@@ -60,6 +60,7 @@ VISU_Plot3DPL
   myMapScaleFactor(1.0)
 {
   SetIsShrinkable(false);
+  SetIsFeatureEdgesAllowed(false);
 
   myCellDataToPointData->Delete();
   myAppendPolyData->Delete();
index 69c9be266c204dedd9873c979b750f77cd7664af..6497e48986a440e1fec693313ce88812b85354b1 100644 (file)
@@ -30,6 +30,7 @@
 #include "VISU_OpenGLPointSpriteMapper.hxx"
 
 #include "VISU_PipeLineUtils.hxx"
+#include "SALOME_ExtractPolyDataGeometry.h"
 
 #ifdef _DEBUG_
 static int MYDEBUG = 0;
@@ -73,6 +74,7 @@ VISU_PointSpriteMapperHolder
     VISU::CopyPointSpriteDataMapper(GetPointSpriteMapper(), 
                                    aMapperHolder->GetPointSpriteMapper(), 
                                    theIsCopyInput);
+    myExtractPolyDataGeometry->SetImplicitFunction(aMapperHolder->GetImplicitFunction());
   }
 }
 
index 0b9cd22766a47430e96165a29f0e401554023c34..43ece1713636d8a59bd546173070a85045bd2f58 100644 (file)
@@ -40,6 +40,7 @@
 #include <vtkImplicitFunction.h>
 #include <vtkImplicitFunctionCollection.h>
 #include <vtkMath.h>
+//#include <vtkExtractPolyDataGeometry.h>
 
 #ifdef _DEBUG_
 static int MYDEBUG = 0;
@@ -67,6 +68,7 @@ VISU_PolyDataMapperHolder
   myExtractPolyDataGeometry->SetImplicitFunction(anImplicitBoolean);
   anImplicitBoolean->SetOperationTypeToIntersection();
   anImplicitBoolean->Delete();
+  //myExtractPolyDataGeometry->ExtractInsideOn();
 }
 
 
@@ -92,6 +94,7 @@ VISU_PolyDataMapperHolder
     VISU::CopyPolyDataMapper(GetPolyDataMapper(), 
                             aMapperHolder->GetPolyDataMapper(), 
                             theIsCopyInput);
+    myExtractPolyDataGeometry->SetImplicitFunction(aMapperHolder->GetImplicitFunction());
   }
 }
 
@@ -257,6 +260,7 @@ VISU_PolyDataMapperHolder
     if (vtkImplicitBoolean* aBoolean = myExtractPolyDataGeometry->GetImplicitBoolean()) {
       vtkImplicitFunctionCollection* aFunction = aBoolean->GetFunction();
       aFunction->AddItem(thePlane);
+      aBoolean->Modified();
       // Check, that at least one cell present after clipping.
       // This check was introduced because of bug IPAL8849.
       vtkDataSet* aClippedDataSet = GetClippedInput();
@@ -286,6 +290,18 @@ VISU_PolyDataMapperHolder
   return aPlane;
 }
 
+//----------------------------------------------------------------------------
+void VISU_PolyDataMapperHolder::RemoveClippingPlane(vtkIdType theID)
+{
+  if(theID >= 0 && theID < GetNumberOfClippingPlanes()){
+    if(vtkImplicitBoolean* aBoolean = myExtractPolyDataGeometry->GetImplicitBoolean()){
+      vtkImplicitFunctionCollection* aFunctions = aBoolean->GetFunction();
+      aFunctions->RemoveItem(theID);
+      aBoolean->Modified();  
+    }
+  }
+}
+
 //----------------------------------------------------------------------------
 void
 VISU_PolyDataMapperHolder
index dc9848eccc1ebfbd02123f08b4312d89b1f68482..ece41f4d11827092b3b94f94dfffdae20284e7e1 100644 (file)
@@ -129,6 +129,8 @@ public:
   virtual
   vtkPlane* 
   GetClippingPlane(vtkIdType theID);
+  
+  void RemoveClippingPlane(vtkIdType theID);
 
 protected:
   //----------------------------------------------------------------------------
@@ -159,6 +161,8 @@ private:
   //----------------------------------------------------------------------------
   VISU::PPolyDataIDMapper myPolyDataIDMapper;
   vtkSmartPointer<vtkPolyDataMapper> myPolyDataMapper;
+
+protected:
   vtkSmartPointer<SALOME_ExtractPolyDataGeometry> myExtractPolyDataGeometry; //!< Clipping
 };
 
index 9adbc3877e5f8cba524fe862b11418d55967292c..08dbfdd3ee35281f257f9cde9de67a2a83373bd5 100644 (file)
@@ -38,6 +38,8 @@
 #include <vtkViewport.h>
 #include <vtkWindow.h>
 #include <vtkLogLookupTable.h>
+#include <vtkProperty2D.h> // RKV
+#include <vtkAxisActor2D.h> // RKV
 
 using namespace std;
 
@@ -103,12 +105,36 @@ VISU_ScalarBarActor::VISU_ScalarBarActor()
   this->LastSize[0] = 0;
   this->LastSize[1] = 0;
 
-  this->TitleRatioWidth = 0;
+  this->TitleRatioSize = 0;
   this->LabelRatioWidth = 0;
   this->BarRatioWidth = 0;
-  this->TitleRatioHeight = 0;
-  this->LabelRatioHeight = 0;
   this->BarRatioHeight = 0;
+  
+  // RKV : Begin
+  this->Distribution = vtkDoubleArray::New();
+  this->DistributionObj = vtkDataObject::New();
+  this->DistributionActor = VISU_XYPlotActor::New();
+  this->DistributionActor->SetTitle("");
+  this->DistributionActor->SetXTitle("");
+  this->DistributionActor->SetYTitle("");
+  this->DistributionActor->GetXAxisActor2D()->LabelVisibilityOff();
+  this->DistributionActor->GetXAxisActor2D()->TitleVisibilityOff();
+  this->DistributionActor->GetXAxisActor2D()->TickVisibilityOff();
+//  this->DistributionActor->GetXAxisActor2D()->SetFontFactor(0.);
+  this->DistributionActor->SetNumberOfYLabels(1);
+//  this->DistributionActor->SetNumberOfXLabels(2);
+  this->DistributionActor->GetXAxisActor2D()->AdjustLabelsOff();
+  this->DistributionActor->GetYAxisActor2D()->AdjustLabelsOff();
+  this->DistributionActor->LegendOff();
+  this->DistributionActor->SetLabelFormat("%4.3f");
+  this->DistributionActor->SetXValuesToIndex();
+//  this->DistributionActor->GetPositionCoordinate()->SetValue(0.0, 0.67, 0);
+//  this->DistributionActor->GetPosition2Coordinate()->SetValue(1.0, 0.33, 0); // #relative to Position
+  this->DistributionActor->GetPositionCoordinate()->
+    SetReferenceCoordinate(this->PositionCoordinate);
+  this->DistributionVisibilityOff(); // Don't show the distribution curve by default
+  
+  // RKV : End
 }
 
 void VISU_ScalarBarActor::ReleaseGraphicsResources(vtkWindow *win)
@@ -122,6 +148,7 @@ void VISU_ScalarBarActor::ReleaseGraphicsResources(vtkWindow *win)
       }
     }
   this->ScalarBarActor->ReleaseGraphicsResources(win);
+  this->DistributionActor->ReleaseGraphicsResources(win); // RKV
 }
 
 VISU_ScalarBarActor::~VISU_ScalarBarActor()
@@ -146,10 +173,16 @@ VISU_ScalarBarActor::~VISU_ScalarBarActor()
     delete [] this->TextActors;
     }
 
+  // RKV : Begin
+  this->DistributionActor->Delete();
+  this->DistributionObj->Delete();
+  this->SetDistribution(NULL);
+  // RKV : End
+
   this->ScalarBar->Delete();
   this->ScalarBarMapper->Delete();
   this->ScalarBarActor->Delete();
-
+  
   if (this->Title)
     {
     delete [] this->Title;
@@ -172,6 +205,10 @@ int VISU_ScalarBarActor::RenderOverlay(vtkViewport *viewport)
     renderedSomething += this->TitleActor->RenderOverlay(viewport);
     }
   this->ScalarBarActor->RenderOverlay(viewport);
+  // RKV : Begin
+  if (this->DistributionVisibility)
+    this->DistributionActor->RenderOverlay(viewport);
+  // RKV : End
   if( this->TextActors == NULL)
     {
      vtkWarningMacro(<<"Need a mapper to render a scalar bar");
@@ -238,11 +275,19 @@ int VISU_ScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport)
     }
   
   // Check to see whether we have to rebuild everything
+  // RKV : Begin
   if (positionsHaveChanged ||
       this->GetMTime() > this->BuildTime || 
       this->LookupTable->GetMTime() > this->BuildTime ||
       this->LabelTextProperty->GetMTime() > this->BuildTime ||
-      this->TitleTextProperty->GetMTime() > this->BuildTime)
+      this->TitleTextProperty->GetMTime() > this->BuildTime ||
+      this->Distribution->GetMTime() > this->BuildTime)
+  // RKV : End
+/* RKV  if (positionsHaveChanged ||
+      this->GetMTime() > this->BuildTime || 
+      this->LookupTable->GetMTime() > this->BuildTime ||
+      this->LabelTextProperty->GetMTime() > this->BuildTime ||
+      this->TitleTextProperty->GetMTime() > this->BuildTime)*/
     {
 
     // Delete previously constructed objects
@@ -276,6 +321,32 @@ int VISU_ScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport)
     colors->SetNumberOfComponents(3);
     colors->SetNumberOfTuples(numColors);
 
+// RKV : Begin
+    // If the distribution is changed then recalculate the total
+    if (this->Distribution->GetMTime() > this->BuildTime) {
+         int aNbVals = this->Distribution->GetNumberOfTuples();
+      double range[2];
+      this->Distribution->GetRange(range);
+      this->DistributionActor->SetYRange(0, range[1]);
+/*       int total = 0;
+         for(vtkIdType aValId = 0; aValId < aNbVals; aValId++){
+               total += this->Distribution->GetValue(aValId);
+         }
+         this->DistributionActor->SetYRange(0, total);
+*/
+      }
+  
+    this->DistributionActor->SetProperty(this->GetProperty());
+    this->DistributionActor->GetProperty()->SetColor(1, 1, 1);
+    this->DistributionActor->GetProperty()->SetLineWidth(2);
+    this->DistributionActor->GetProperty()->SetDisplayLocationToForeground();
+    vtkTextProperty* tprop;
+    tprop = this->DistributionActor->GetTitleTextProperty();
+    tprop->SetColor(this->DistributionActor->GetProperty()->GetColor());
+//  this->DistributionActor->SetAxisTitleTextProperty(tprop);
+//  this->DistributionActor->SetAxisLabelTextProperty(tprop);
+    
+// RKV : End
     this->ScalarBarActor->SetProperty(this->GetProperty());
     this->ScalarBar->Initialize();
     this->ScalarBar->SetPoints(pts);
@@ -394,6 +465,7 @@ int VISU_ScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport)
         this->TextActors[i]->SetPosition(barWidth+3,
                                          val - sizeTextData[1]/2);
         }
+        
       }
     else
       {
@@ -405,7 +477,11 @@ int VISU_ScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport)
         val = (vtkFloatingPointType)i/(this->NumberOfLabels-1) * barWidth;
         this->TextActors[i]->SetPosition(val, barHeight + 0.05*size[1]);
         }
+        
       }
+      
+    // Compute the position of the distribution curve
+    this->PlaceDistribution(viewport, barWidth, barHeight); // RKV
 
     this->BuildTime.Modified();
     }
@@ -416,6 +492,10 @@ int VISU_ScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport)
     renderedSomething += this->TitleActor->RenderOpaqueGeometry(viewport);
     }
   this->ScalarBarActor->RenderOpaqueGeometry(viewport);
+  // RKV : Begin
+  if (this->DistributionVisibility)
+    this->DistributionActor->RenderOpaqueGeometry(viewport);
+  // RKV : End
   for (i=0; i<this->NumberOfLabels; i++)
     {
     renderedSomething += this->TextActors[i]->RenderOpaqueGeometry(viewport);
@@ -571,13 +651,10 @@ void VISU_ScalarBarActor::AllocateAndSizeLabels(int *labelSize, int *size,
     else
       targetWidth = (int)(0.01*LabelRatioWidth*size[0]);
 
-    if(LabelRatioHeight == 0)
-      if ( this->Orientation == VTK_ORIENT_VERTICAL )
-       targetHeight = (int)(0.86*size[1]/this->NumberOfLabels);
-      else
-       targetHeight = (int)(0.25*size[1]);
+    if ( this->Orientation == VTK_ORIENT_VERTICAL )
+      targetHeight = (int)(0.86*size[1]/this->NumberOfLabels);
     else
-      targetHeight = (int)(0.01*LabelRatioHeight*size[1]);
+      targetHeight = (int)(0.25*size[1]);
 
     vtkTextMapper::SetMultipleConstrainedFontSize(viewport, 
                                                   targetWidth, 
@@ -600,18 +677,15 @@ void VISU_ScalarBarActor::SizeTitle(int *titleSize, int *size,
 
   int targetWidth, targetHeight;
   
-  if(TitleRatioWidth == 0)
+  if(TitleRatioSize == 0)
     targetWidth = size[0];
   else
-    targetWidth = (int)(0.01*TitleRatioWidth*size[0]);
+    targetWidth = (int)(0.01*TitleRatioSize*size[0]);
 
-  if(TitleRatioHeight == 0)
-    if ( this->Orientation == VTK_ORIENT_VERTICAL )
-      targetHeight = (int)(0.1*size[1]);
-    else
-      targetHeight = (int)(0.25*size[1]);
+  if ( this->Orientation == VTK_ORIENT_VERTICAL )
+    targetHeight = (int)(0.1*size[1]);
   else
-    targetHeight = (int)(0.01*TitleRatioHeight*size[1]);
+    targetHeight = (int)(0.25*size[1]);
 
   this->TitleMapper->SetConstrainedFontSize(
     viewport, targetWidth, targetHeight);
@@ -619,21 +693,66 @@ void VISU_ScalarBarActor::SizeTitle(int *titleSize, int *size,
   this->TitleMapper->GetSize(viewport, titleSize);
 }
 
-void VISU_ScalarBarActor::SetRatios(int titleRatioWidth, int titleRatioHeight,
-                                   int labelRatioWidth, int labelRatioHeight,
+// RKV : Begin
+void VISU_ScalarBarActor::SetDistributionVisibility(int v) 
+{
+  this->DistributionVisibility = v;
+  if (v) {
+       this->DistributionActor->VisibilityOn();
+  } else {
+       this->DistributionActor->VisibilityOff();
+  }
+}
+
+void VISU_ScalarBarActor::SetDistribution(vtkDoubleArray *distr) 
+{
+  this->Distribution = distr;
+  if (distr == NULL) return;
+  
+  this->DistributionObj->Initialize();
+  this->DistributionObj->GetFieldData()->AddArray(this->Distribution);
+  this->DistributionActor->AddDataObjectInput(this->DistributionObj);
+  // Set ranges of axes for the distribution curve
+  this->DistributionActor->SetXRange(0, this->Distribution->GetNumberOfTuples()-1);
+  double range[2];
+  this->Distribution->GetRange(range);
+  int aNbVals = this->Distribution->GetNumberOfTuples();
+//  int total = 0;
+  if (this->GetDebug()) {
+  for(vtkIdType aValId = 0; aValId < aNbVals; aValId++){
+//     if (this->GetDebug()) {
+               if (this->Distribution->GetValue(aValId) > 0)
+             vtkDebugMacro(<< "D(" << aValId << ") = " << this->Distribution->GetValue(aValId));
+//     }
+//     total += this->Distribution->GetValue(aValId);
+  }
+  }
+//  this->DistributionActor->SetYRange(0, total);
+  this->DistributionActor->SetYRange(0, range[1]);
+  vtkDebugMacro(<< "max X = " << this->Distribution->GetNumberOfTuples());
+  vtkDebugMacro(<< "Y = (" << range[0] << ", " << range[1] << ")");
+//  vtkDebugMacro(<< "total = " << total);
+}
+
+void VISU_ScalarBarActor::DebugOn() {
+       this->DistributionActor->DebugOn();
+       Superclass::DebugOn();
+} 
+
+void VISU_ScalarBarActor::DebugOff() {
+       this->DistributionActor->DebugOff();
+       Superclass::DebugOff();
+} 
+// RKV : End
+
+void VISU_ScalarBarActor::SetRatios(int titleRatioSize, int labelRatioWidth, 
                                    int barRatioWidth, int barRatioHeight)
 {
-  TitleRatioWidth=titleRatioWidth;
-  if(TitleRatioWidth>100)
-    TitleRatioWidth=100;
-  else if(TitleRatioWidth<0)
-    TitleRatioWidth=0;
-
-  TitleRatioHeight=titleRatioHeight;
-  if(TitleRatioHeight>100)
-    TitleRatioHeight=100;
-  else if(TitleRatioHeight<0)
-    TitleRatioHeight=0;
+  TitleRatioSize=titleRatioSize;
+  if(TitleRatioSize>100)
+    TitleRatioSize=100;
+  else if(TitleRatioSize<0)
+    TitleRatioSize=0;
 
   LabelRatioWidth=labelRatioWidth;
   if(LabelRatioWidth>100)
@@ -641,12 +760,6 @@ void VISU_ScalarBarActor::SetRatios(int titleRatioWidth, int titleRatioHeight,
   else if(LabelRatioWidth<0)
     LabelRatioWidth=0;
 
-  LabelRatioHeight=labelRatioHeight;
-  if(LabelRatioHeight>100)
-    LabelRatioHeight=100;
-  else if(LabelRatioHeight<0)
-    LabelRatioHeight=0;
-
   BarRatioWidth=barRatioWidth;
   if(BarRatioWidth>100)
     BarRatioWidth=100;
@@ -660,14 +773,11 @@ void VISU_ScalarBarActor::SetRatios(int titleRatioWidth, int titleRatioHeight,
     BarRatioHeight=0;
 }
 
-void VISU_ScalarBarActor::GetRatios(int& titleRatioWidth, int& titleRatioHeight,
-                                   int& labelRatioWidth, int& labelRatioHeight,
-                                   int& barRatioWidth, int& barRatioHeight)
+void VISU_ScalarBarActor::GetRatios(int& titleRatioSize, int& labelRatioWidth, 
+                                    int& barRatioWidth, int& barRatioHeight)
 {
-  titleRatioWidth=TitleRatioWidth;
-  titleRatioHeight=TitleRatioHeight;
+  titleRatioSize=TitleRatioSize;
   labelRatioWidth=LabelRatioWidth;
-  labelRatioHeight=LabelRatioHeight;
   barRatioWidth=BarRatioWidth;
   barRatioHeight=BarRatioHeight;
 }
@@ -694,3 +804,91 @@ void VISU_ScalarBarActor::SizeBar(int& barSizeWidth, int& barSizeHeight, int *si
   else
     barSizeHeight = (int)(0.01*BarRatioHeight*size[1]);
 }
+// RKV : Begin
+//------------------------------------------------------------------------------
+/** Place the distribution plot actor in the viewport according to the 
+ * scalar bar location and orientation */
+void VISU_ScalarBarActor::PlaceDistribution(vtkViewport *viewport, const int barWidth, const int barHeight) {
+    vtkDebugMacro(<< "barOrigin[0]=" << this->LastOrigin[0] << "; barOrigin[1]=" << this->LastOrigin[1]);
+    // Detect the side of the viewport where the curve should be placed by the bar origin.
+    double u = (double)(this->LastOrigin[0]), v = (double)(this->LastOrigin[1]), z=0;
+    viewport->ViewportToNormalizedViewport(u, v);
+    
+    if ( this->Orientation == VTK_ORIENT_VERTICAL ) {
+      // Position the distribution curve vertically
+      if (u > 0.5) {
+       // X - UP, Y - TO THE LEFT
+       this->DistributionActor->SetPlotLocation(VISU_XYPLOT_RIGHT);
+       // Curve to be placed on the left side of the bar
+        vtkDebugMacro(<< "Curve to be placed on the left side of the bar");
+        // relative to the bar origin
+       u = 0;
+       v = 0;
+        viewport->ViewportToNormalizedViewport(u, v);
+        vtkDebugMacro(<< "u=" << u << "; v=" << v);
+        this->DistributionActor->GetPositionCoordinate()->SetValue(u, v, 0);
+        // relative to Position
+        u = - barWidth;
+        v = barHeight;
+        viewport->ViewportToNormalizedViewport(u, v);
+        vtkDebugMacro("u2=" << u << "; v2=" << v);
+        this->DistributionActor->GetPosition2Coordinate()->SetValue(u, v, 0);
+      } else {
+       // X - UP, Y - TO THE RIGHT
+       this->DistributionActor->SetPlotLocation(VISU_XYPLOT_LEFT);
+       // Curve to be placed on the right side of the bar
+        vtkDebugMacro(<< "Curve to be placed on the right side of the bar");
+        // relative to the bar origin
+        u = barWidth;
+       v = 0;
+        viewport->ViewportToNormalizedViewport(u, v);
+        vtkDebugMacro(<< "u=" << u << "; v=" << v);
+        this->DistributionActor->GetPositionCoordinate()->SetValue(u, v, 0);
+        // relative to Position
+        u = barWidth;
+        v = barHeight;
+        viewport->ViewportToNormalizedViewport(u, v);
+        vtkDebugMacro("u2=" << u << "; v2=" << v);
+        this->DistributionActor->GetPosition2Coordinate()->SetValue(u, v, 0);
+      }
+    } else {
+      // Position the distribution curve horizontally
+      if (v > 0.5) {
+       // X - TO THE LEFT, Y - DOWN
+       this->DistributionActor->SetPlotLocation(VISU_XYPLOT_TOP);
+       // Curve to be placed below the bar
+        vtkDebugMacro(<< "Curve to be placed below the bar");
+        // relative to the bar origin
+               u = 0;
+       v = 0;
+        viewport->ViewportToNormalizedViewport(u, v);
+        vtkDebugMacro(<< "u=" << u << "; v=" << v);
+        this->DistributionActor->GetPositionCoordinate()->SetValue(u, v, 0);
+        // relative to Position
+        u = barWidth;
+        v = - barHeight;
+        viewport->ViewportToNormalizedViewport(u, v);
+        vtkDebugMacro("u2=" << u << "; v2=" << v);
+        this->DistributionActor->GetPosition2Coordinate()->SetValue(u, v, 0);
+      } else {
+       // X - TO THE RIGHT, Y - UP
+       this->DistributionActor->SetPlotLocation(VISU_XYPLOT_BOTTOM);
+       // Curve to be placed on the top of the bar
+        vtkDebugMacro(<< "Curve to be placed on the top of the bar");
+        // relative to the bar origin
+               u = 0;
+       v = barHeight;
+        viewport->ViewportToNormalizedViewport(u, v);
+        vtkDebugMacro(<< "u=" << u << "; v=" << v);
+        this->DistributionActor->GetPositionCoordinate()->SetValue(u, v, 0);
+        // relative to Position
+        u = barWidth;
+        v = barHeight;
+        viewport->ViewportToNormalizedViewport(u, v);
+        vtkDebugMacro("u2=" << u << "; v2=" << v);
+        this->DistributionActor->GetPosition2Coordinate()->SetValue(u, v, 0);
+      }
+    }
+}
+// RKV : End
+
index 3252e6e82de664eaeaf09c58e639e2de172c5fb8..24c1e8621646dfb68e257232ffa8e98c4315657c 100644 (file)
 
 #include "VISUPipeline.hxx"
 #include "VISU_LookupTable.hxx"
+#include "VISU_XYPlotActor.hxx"
 
 #include <vtkActor2D.h>
+#include <vtkDoubleArray.h> // RKV
 
 class vtkPolyData;
 class vtkPolyDataMapper2D;
@@ -106,15 +108,31 @@ public:
   // Set/Get the labels text property.
   virtual void SetLabelTextProperty(vtkTextProperty *p);
   vtkGetObjectMacro(LabelTextProperty,vtkTextProperty);
+
+// RKV : Begin
+  // Description:
+  // Set/Get the values distribution array
+  virtual void SetDistribution(vtkDoubleArray *d);
+  vtkGetObjectMacro(Distribution,vtkDoubleArray);
+  
+  // Description:
+  // Set/Get the flag of distribution plot visibility
+  void SetDistributionVisibility(int v);
+  vtkGetMacro(DistributionVisibility, int);
+  void DistributionVisibilityOn()
+       {this->SetDistributionVisibility(1);};
+  void DistributionVisibilityOff() {this->SetDistributionVisibility(0);};
+
+  void DebugOn();
+  void DebugOff();
+// RKV : End
     
   // Description:
   // Set/Get the scalar bar dimention properties in persents.
   // 0 <= ration <= 100
-  void SetRatios(int titleRatioWidth, int titleRatioHeight,
-                int labelRatioWidth, int labelRatioHeight,
+  void SetRatios(int titleRatioSize,int labelRatioWidth,
                 int barRatioWidth, int barRatioHeight);
-  void GetRatios(int& titleRatioWidth, int& titleRatioHeight,
-                int& labelRatioWidth, int& labelRatioHeight,
+  void GetRatios(int& titleRatioSize, int& labelRatioWidth,
                 int& barRatioWidth, int& barRatioHeight);
 
   // Description:
@@ -139,6 +157,13 @@ protected:
   VISU_LookupTable *LookupTable;
   vtkTextProperty *TitleTextProperty;
   vtkTextProperty *LabelTextProperty;
+  
+  /** Array for keeping the distribution of colors within cells.
+   * For each color index the appropriate element of the array contains 
+   * a number of cells for this color.*/ 
+  vtkDoubleArray     *Distribution; // RKV
+  /** Visibility flag for the distribution plot */
+  int             DistributionVisibility; // RKV
 
   int   MaximumNumberOfColors;
   int   NumberOfLabels;
@@ -146,11 +171,9 @@ protected:
   int   Orientation;
   char  *Title;
   char  *LabelFormat;
-  int   TitleRatioWidth;
+  int   TitleRatioSize;
   int   LabelRatioWidth;
   int   BarRatioWidth;
-  int   TitleRatioHeight;
-  int   LabelRatioHeight;
   int   BarRatioHeight;
 
   vtkTextMapper **TextMappers;
@@ -167,6 +190,9 @@ private:
   vtkPolyDataMapper2D *ScalarBarMapper;
   vtkActor2D          *ScalarBarActor;
 
+  vtkDataObject       *DistributionObj; // RKV
+  VISU_XYPlotActor    *DistributionActor; // RKV
+
   vtkTimeStamp  BuildTime;
   int LastSize[2];
   int LastOrigin[2];
@@ -175,6 +201,10 @@ private:
 
   void SizeBar(int& barSizeWidth, int& barSizeHeight, int *size,
               vtkViewport *viewport, vtkFloatingPointType *range);
+              
+  /** Place the distribution plot actor in the viewport according to the 
+   * scalar bar location and orientation */
+  void PlaceDistribution(vtkViewport *viewport, const int barWidth, const int barHeight);
 
 private:
   VISU_ScalarBarActor(const VISU_ScalarBarActor&);  // Not implemented.
index 5dbf6e47845fbcb471eba2af6b5a238ca41bbe15..3003295d07d3eaabeec5d03db689c3d8805522e1 100644 (file)
 #include <string.h>
 
 
-//----------------------------------------------------------------------------
-namespace
-{
-  inline
-  void
-  MarkValueByColor(VISU_LookupTable* theTable,
-                  vtkFloatingPointType theValue,
-                  unsigned char* theColor)
-  { 
-    vtkIdType anIndex = theTable->GetIndex(theValue);
-    unsigned char *aTablePtr = theTable->GetPointer(anIndex);
-    aTablePtr[0] = theColor[0];
-    aTablePtr[1] = theColor[1];
-    aTablePtr[2] = theColor[2];
-  }
-
-  inline
-  void
-  CopyColor(unsigned char* theTaget, const unsigned char* theSource)
-  {
-    theTaget[0] = theSource[0];
-    theTaget[1] = theSource[1];
-    theTaget[2] = theSource[2];
-  }
-
-  void
-  FillByColor(VISU_LookupTable* theTable,
-             unsigned char* theColor)
-  {
-    vtkIdType aNbColors = theTable->GetNumberOfColors();
-    for(int i = 0; i < aNbColors; i++){
-      unsigned char *aTablePtr = theTable->GetPointer(i);
-      CopyColor(aTablePtr,theColor);
-    }
-  }
-
-  void
-  MakeBiColor(VISU_LookupTable* theTable)
-  {
-    unsigned char aRedPtr[3] = {255, 0, 0};
-    unsigned char aBluePtr[3] = {0, 0, 255};
-
-    vtkFloatingPointType aRange[2];
-    theTable->GetTableRange(aRange);
-    vtkIdType aNbColors = theTable->GetNumberOfColors();
-
-    vtkFloatingPointType aDelta = (aRange[1]-aRange[0])/aNbColors;
-    vtkFloatingPointType aValue = aRange[0]+0.5*aDelta;
-    for(int i = 0; i < aNbColors; i++){
-      vtkIdType anIndex = theTable->GetIndex(aValue);
-      unsigned char* aTablePtr = theTable->GetPointer(anIndex);
-      if(aValue > 0.0){
-       CopyColor(aTablePtr,aRedPtr);
-      }else{
-       CopyColor(aTablePtr,aBluePtr);
-      }
-      aValue += aDelta;
-    }
-  }
-}
-
-
 //----------------------------------------------------------------------------
 vtkStandardNewMacro(VISU_ScalarBarCtrl);
 
@@ -435,16 +373,16 @@ VISU_ScalarBarCtrl
 {
   if(myMarked){
     if(myMode == eGlobal){
-      MarkValueByColor(myGlobalLookupTable, myMarkedValue, myBlack);
+      myGlobalLookupTable->MarkValueByColor( myMarkedValue, myBlack );
     }else{
-      MarkValueByColor(myLocalLookupTable, myMarkedValue, myBlack);
+      myLocalLookupTable->MarkValueByColor( myMarkedValue, myBlack );
     }
   }
   if(myGlobalRangeIsDefined){
     vtkFloatingPointType aLocalRange[2];
     myLocalLookupTable->GetTableRange(aLocalRange);
-    MarkValueByColor(myGlobalLookupTable, aLocalRange[0], myBlack);
-    MarkValueByColor(myGlobalLookupTable, aLocalRange[1], myBlack);
+    myGlobalLookupTable->MarkValueByColor( aLocalRange[0], myBlack );
+    myGlobalLookupTable->MarkValueByColor( aLocalRange[1], myBlack );
   }
 }
 
@@ -490,9 +428,9 @@ VISU_ScalarBarCtrl
 ::UpdateForColor()
 {
   if(myMode == eGlobal){ 
-    FillByColor(myLocalLookupTable,myGrey);
+    myLocalLookupTable->FillByColor( myGrey );
   }else if(myMode == eLocal){
-    FillByColor(myGlobalLookupTable,myGrey);
+    myGlobalLookupTable->FillByColor( myGrey );
   }
 }
 
@@ -506,15 +444,15 @@ VISU_ScalarBarCtrl
   myLocalLookupTable->Build();
 
   if(myMode == eSimple){
-    MakeBiColor(myLocalLookupTable);
+    myLocalLookupTable->MakeBiColor();
     return;
   }
 
   if(myMode == eGlobal){
-    MakeBiColor(myGlobalLookupTable);
-    FillByColor(myLocalLookupTable,myGrey);
+    myGlobalLookupTable->MakeBiColor();
+    myLocalLookupTable->FillByColor( myGrey );
   }else if(myMode == eLocal){
-    MakeBiColor(myLocalLookupTable);
-    FillByColor(myGlobalLookupTable,myGrey);
+    myLocalLookupTable->MakeBiColor();
+    myGlobalLookupTable->FillByColor( myGrey );
   }
 }
diff --git a/src/PIPELINE/VISU_ScalarMapOnDeformedShapePL.cxx b/src/PIPELINE/VISU_ScalarMapOnDeformedShapePL.cxx
new file mode 100644 (file)
index 0000000..54ff4f8
--- /dev/null
@@ -0,0 +1,368 @@
+//  VISU ScalarMapOnDeformedShapePL
+//
+//  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_ScalarMapOnDeformedShapePL.cxx
+// Author:  Eugeny Nikolaev
+// Module : VISU
+
+#include "VISU_ScalarMapOnDeformedShapePL.hxx"
+#include "VISU_FieldTransform.hxx"
+#include "VISU_Extractor.hxx"
+#include "VISU_LookupTable.hxx"
+#include "VISU_DeformedShapePL.hxx"
+#include "VTKViewer_TransformFilter.h"
+#include "VTKViewer_Transform.h"
+#include "VISU_MergeFilter.hxx"
+
+#include "VISU_PipeLineUtils.hxx"
+
+#include <vtkWarpVector.h>
+#include <vtkUnstructuredGrid.h>
+#include <vtkCellDataToPointData.h>
+#include <vtkPointDataToCellData.h>
+
+
+//----------------------------------------------------------------------------
+vtkStandardNewMacro(VISU_ScalarMapOnDeformedShapePL)
+
+//----------------------------------------------------------------------------
+/*!
+ * Constructor. Creating new instances of vtkWarpVector,vtkMergeFilter,vtkUnstructuredGrid
+ * Where:
+ * \li myDeformVectors is vtkWarpVector  - deformation vectors data
+ * \li myScalarsMergeFilter   is vtkMergeFilter - merge filter.
+ * Merge filter which unify the deformation and scalars
+ * \li myScalars is vtk shared pointer to vtkUnstructuredGrid - scalars data
+*/
+VISU_ScalarMapOnDeformedShapePL
+::VISU_ScalarMapOnDeformedShapePL():
+  myScaleFactor(0.0)
+{
+  myWarpVector = vtkWarpVector::New();
+
+  myScalarsMergeFilter = VISU_MergeFilter::New();
+  myScalarsMergeFilter->SetMergingInputs(true);
+
+  myScalarsExtractor = VISU_Extractor::New();
+
+  myScalarsFieldTransform = VISU_FieldTransform::New();
+
+  myCellDataToPointData = vtkCellDataToPointData::New();
+}
+
+//----------------------------------------------------------------------------
+/*!
+ * Destructor.
+ * Delete all fields.
+*/
+VISU_ScalarMapOnDeformedShapePL
+::~VISU_ScalarMapOnDeformedShapePL()
+{
+  myWarpVector->Delete();
+
+  myScalarsMergeFilter->Delete();
+  
+  myScalarsExtractor->Delete();
+
+  myScalarsFieldTransform->Delete();
+
+  myCellDataToPointData->Delete();
+}
+
+//----------------------------------------------------------------------------
+/*!
+ * Initial method
+ */
+void
+VISU_ScalarMapOnDeformedShapePL
+::Init()
+{
+  Superclass::Init();
+  
+  SetScale(VISU_DeformedShapePL::GetDefaultScale(this));
+}
+
+//----------------------------------------------------------------------------
+/*!
+ * Build method
+ * Building of deformation and puts result to merge filter.
+ */
+void
+VISU_ScalarMapOnDeformedShapePL
+::Build()
+{
+  Superclass::Build();
+}
+
+
+//----------------------------------------------------------------------------
+vtkDataSet* 
+VISU_ScalarMapOnDeformedShapePL
+::InsertCustomPL()
+{
+  GetMapper()->SetColorModeToMapScalars();
+  GetMapper()->ScalarVisibilityOn();
+
+  VISU::CellDataToPoint(myWarpVector,
+                       myCellDataToPointData,
+                       GetMergedInput());
+  
+  myScalars = GetMergedInput();
+
+  UpdateScalars();
+
+  myScalarsFieldTransform->SetInput(myScalarsExtractor->GetOutput());
+
+  // Sets geometry for merge filter
+  myScalarsMergeFilter->SetGeometry(myWarpVector->GetUnstructuredGridOutput());
+
+  vtkDataSet* aScalarsDataSet = myScalarsFieldTransform->GetOutput();
+  myScalarsMergeFilter->SetScalars(aScalarsDataSet);
+  myScalarsMergeFilter->AddField("VISU_CELLS_MAPPER", aScalarsDataSet);
+  myScalarsMergeFilter->AddField("VISU_POINTS_MAPPER", aScalarsDataSet);
+
+  return myScalarsMergeFilter->GetOutput();
+}
+
+
+//----------------------------------------------------------------------------
+/*!
+ *  Update method
+ */
+void
+VISU_ScalarMapOnDeformedShapePL
+::Update()
+{
+  Superclass::Update();
+  //{
+  //  std::string aFileName = std::string(getenv("HOME"))+"/"+getenv("USER")+"-myScalarsExtractor.vtk";
+  //  VISU::WriteToFile(myScalarsExtractor->GetUnstructuredGridOutput(), aFileName);
+  //}
+  //{
+  //  std::string aFileName = std::string(getenv("HOME"))+"/"+getenv("USER")+"-myWarpVector.vtk";
+  //  VISU::WriteToFile(myWarpVector->GetUnstructuredGridOutput(), aFileName);
+  //}
+  //{
+  //  std::string aFileName = std::string(getenv("HOME"))+"/"+getenv("USER")+"-myScalarsMergeFilter.vtk";
+  //  VISU::WriteToFile(myScalarsMergeFilter->GetUnstructuredGridOutput(), aFileName);
+  //}
+}
+
+//----------------------------------------------------------------------------
+unsigned long int
+VISU_ScalarMapOnDeformedShapePL
+::GetMemorySize()
+{
+  unsigned long int aSize = Superclass::GetMemorySize();
+
+  if(vtkDataSet* aDataSet = myWarpVector->GetOutput())
+    aSize += aDataSet->GetActualMemorySize() * 1024;
+  
+  if(vtkDataSet* aDataSet = myScalarsExtractor->GetOutput())
+    aSize += aDataSet->GetActualMemorySize() * 1024;
+
+  if(vtkDataSet* aDataSet = myScalarsMergeFilter->GetOutput())
+    aSize += aDataSet->GetActualMemorySize() * 1024;
+
+  if(myCellDataToPointData->GetInput())
+    if(vtkDataSet* aDataSet = myCellDataToPointData->GetOutput())
+      aSize += aDataSet->GetActualMemorySize() * 1024;
+
+  return aSize;
+}
+
+//----------------------------------------------------------------------------
+/*!
+ * Update scalars method.
+ * Put scalars to merge filter.
+ */
+void
+VISU_ScalarMapOnDeformedShapePL
+::UpdateScalars()
+{
+  vtkDataSet* aScalars = GetScalars();
+  myScalarsExtractor->SetInput(aScalars);
+
+  if(VISU::IsDataOnCells(aScalars))
+    GetMapper()->SetScalarModeToUseCellData();
+  else
+    GetMapper()->SetScalarModeToUsePointData();
+}
+
+//----------------------------------------------------------------------------
+/*!
+ * Copy information about pipline.
+ * Copy scale and scalars.
+ */
+void
+VISU_ScalarMapOnDeformedShapePL
+::DoShallowCopy(VISU_PipeLine *thePipeLine,
+               bool theIsCopyInput)
+{
+  Superclass::DoShallowCopy(thePipeLine, theIsCopyInput);
+
+  if(VISU_ScalarMapOnDeformedShapePL *aPipeLine = dynamic_cast<VISU_ScalarMapOnDeformedShapePL*>(thePipeLine)){
+     SetScale(aPipeLine->GetScale());
+     SetScalars(aPipeLine->GetScalars());
+  }
+}
+
+//----------------------------------------------------------------------------
+/*!
+ * Set scalars.
+ * Sets vtkDataSet with scalars values to VISU_Extractor filter for scalars extraction.
+ */
+void
+VISU_ScalarMapOnDeformedShapePL
+::SetScalars(vtkDataSet *theScalars)
+{
+  if(GetScalars() == theScalars)
+    return;
+
+  myScalars = theScalars;
+  UpdateScalars();
+}
+
+//----------------------------------------------------------------------------
+/*!
+ * Get pointer to input scalars.
+ */
+vtkDataSet* 
+VISU_ScalarMapOnDeformedShapePL
+::GetScalars()
+{
+  return myScalars.GetPointer();
+}
+
+//----------------------------------------------------------------------------
+/*!
+ * Sets scale for deformed shape
+ */
+void
+VISU_ScalarMapOnDeformedShapePL
+::SetScale(vtkFloatingPointType theScale) 
+{
+  if(VISU::CheckIsSameValue(myScaleFactor, theScale))
+    return;
+
+  myWarpVector->SetScaleFactor(theScale);
+  myScaleFactor = theScale;
+}
+
+//----------------------------------------------------------------------------
+/*!
+ * Gets scale of deformed shape.
+ */
+vtkFloatingPointType
+VISU_ScalarMapOnDeformedShapePL
+::GetScale() 
+{
+  return myWarpVector->GetScaleFactor();
+}
+
+//----------------------------------------------------------------------------
+/*!
+ * Set scale factor of deformation.
+ */
+void
+VISU_ScalarMapOnDeformedShapePL
+::SetMapScale(vtkFloatingPointType theMapScale)
+{
+  Superclass::SetMapScale(theMapScale);
+  myWarpVector->SetScaleFactor(myScaleFactor*theMapScale);
+}
+
+//----------------------------------------------------------------------------
+/*!
+ * Gets scalar mode.
+ */
+int
+VISU_ScalarMapOnDeformedShapePL
+::GetScalarMode()
+{
+  return myScalarsExtractor->GetScalarMode();
+}
+
+//----------------------------------------------------------------------------
+/*!
+ * Sets scalar mode.
+ */
+void
+VISU_ScalarMapOnDeformedShapePL
+::SetScalarMode(int theScalarMode)
+{
+  VISU_ScalarMapPL::SetScalarMode(theScalarMode, GetScalars(), myScalarsExtractor);
+}
+
+//----------------------------------------------------------------------------
+void
+VISU_ScalarMapOnDeformedShapePL
+::SetScaling(int theScaling) 
+{
+  if(GetScaling() == theScaling)
+    return;
+
+  GetBarTable()->SetScale(theScaling);
+
+  if(theScaling == VTK_SCALE_LOG10)
+    myScalarsFieldTransform->SetScalarTransform(&(VISU_FieldTransform::Log10));
+  else
+    myScalarsFieldTransform->SetScalarTransform(&(VISU_FieldTransform::Ident));
+}
+
+
+//----------------------------------------------------------------------------
+void
+VISU_ScalarMapOnDeformedShapePL
+::SetScalarRange(vtkFloatingPointType theRange[2])
+{
+  if(VISU::CheckIsSameRange(theRange, GetScalarRange()))
+    return;
+
+  myScalarsFieldTransform->SetScalarRange(theRange);
+  GetBarTable()->SetRange(theRange);
+}
+
+
+//----------------------------------------------------------------------------
+vtkFloatingPointType* 
+VISU_ScalarMapOnDeformedShapePL
+::GetScalarRange() 
+{
+  return myScalarsFieldTransform->GetScalarRange();
+}
+
+
+//----------------------------------------------------------------------------
+/*!
+ * Gets ranges of extracted scalars
+ * \param theRange[2] - output values
+ * \li theRange[0] - minimum value
+ * \li theRange[1] - maximum value
+ */
+void 
+VISU_ScalarMapOnDeformedShapePL
+::GetSourceRange(vtkFloatingPointType theRange[2])
+{
+  myScalarsExtractor->Update();
+  myScalarsExtractor->GetUnstructuredGridOutput()->GetScalarRange(theRange);
+}
diff --git a/src/PIPELINE/VISU_ScalarMapOnDeformedShapePL.hxx b/src/PIPELINE/VISU_ScalarMapOnDeformedShapePL.hxx
new file mode 100644 (file)
index 0000000..041a37d
--- /dev/null
@@ -0,0 +1,146 @@
+//  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_ScalarMapOnDeformedShapePL.hxx
+// Author:  Eugeny Nikolaev
+// Module : VISU
+
+#ifndef VISU_ScalarMapOnDeformedShapePL_HeaderFile
+#define VISU_ScalarMapOnDeformedShapePL_HeaderFile
+
+#include "VISUPipeline.hxx"
+#include "VISU_ScalarMapPL.hxx"
+
+class VISU_MergeFilter;
+class vtkWarpVector;
+class vtkUnstructuredGrid;
+class vtkCellDataToPointData;
+class vtkPointDataToCellData;
+
+
+//----------------------------------------------------------------------------
+class VISU_PIPELINE_EXPORT VISU_ScalarMapOnDeformedShapePL : public VISU_ScalarMapPL
+{
+public:
+  vtkTypeMacro(VISU_ScalarMapOnDeformedShapePL, VISU_ScalarMapPL);
+
+  static 
+  VISU_ScalarMapOnDeformedShapePL* 
+  New();
+
+  virtual
+  void
+  SetScale(vtkFloatingPointType theScale);
+
+  virtual
+  vtkFloatingPointType
+  GetScale();
+
+  virtual
+  int
+  GetScalarMode();
+
+  virtual
+  void
+  SetScalarMode(int theScalarMode = 0);
+
+  virtual
+  void
+  SetScaling(int theScaling);
+  
+  virtual
+  void
+  SetScalarRange(vtkFloatingPointType theRange[2]);
+
+  virtual
+  vtkFloatingPointType* 
+  GetScalarRange();
+
+  virtual
+  void
+  GetSourceRange(vtkFloatingPointType theRange[2]);
+
+  virtual
+  void
+  SetScalars(vtkDataSet *theScalars);
+
+  virtual
+  vtkDataSet* 
+  GetScalars();
+
+public:
+  //! Redefined method for initialization of the pipeline.
+  virtual
+  void
+  Init();
+
+  //! Redefined method for building the pipeline.
+  virtual
+  void
+  Build();
+
+  //! Redefined method for updating the pipeline.
+  virtual
+  void
+  Update();
+
+  //! Gets memory size used by the instance (bytes).
+  virtual
+  unsigned long int
+  GetMemorySize();
+
+  //! Update scalars.
+  void
+  UpdateScalars();
+  
+  virtual
+  void
+  SetMapScale(vtkFloatingPointType theMapScale = 1.0);
+  
+protected:
+  VISU_ScalarMapOnDeformedShapePL();
+  
+  virtual
+  ~VISU_ScalarMapOnDeformedShapePL();
+  
+  virtual
+  vtkDataSet* 
+  InsertCustomPL();
+
+  virtual
+  void
+  DoShallowCopy(VISU_PipeLine *thePipeLine,
+               bool theIsCopyInput);
+
+private:
+  VISU_ScalarMapOnDeformedShapePL(const VISU_ScalarMapOnDeformedShapePL&);
+
+  vtkFloatingPointType myScaleFactor;
+  vtkWarpVector  *myWarpVector;
+  VISU_MergeFilter *myScalarsMergeFilter;
+  vtkSmartPointer<vtkUnstructuredGrid> myScalars;
+  vtkCellDataToPointData* myCellDataToPointData;
+  VISU_FieldTransform* myScalarsFieldTransform;
+  VISU_Extractor* myScalarsExtractor;
+};
+
+#endif
index ad7397733e0e64f0038668b2f26e0b8d80e957d6..e252334bcaee0890281a3fb8ed6377065b6cafca 100644 (file)
@@ -56,6 +56,7 @@ VISU_ScalarMapPL
   myMergeFilter(VISU_MergeFilter::New())
 {
   SetIsShrinkable(true);
+  SetIsFeatureEdgesAllowed(true);
 
   SetElnoDisassembleState( false );
 
index b596155ea19ace0fa2ba5c57a50bf5a0647b4f16..82c050096fdc8757cc26cab3d224b757d35cdcd2 100644 (file)
@@ -62,6 +62,7 @@ VISU_StreamLinesPL
 ::VISU_StreamLinesPL()
 {
   SetIsShrinkable(false);
+  SetIsFeatureEdgesAllowed(false);
 
   myStream = vtkStreamLine::New();
   myCenters = vtkCellCenters::New();
index 1c3257b929ff9345031121c9c93693a28c4d26de..e397649451e3465add16ff6c8b426c497726afd1 100644 (file)
@@ -63,7 +63,8 @@ void ToCellCenters( TOutputFilter *theOutputFilter,
 VISU_VectorsPL
 ::VISU_VectorsPL()
 {
-  SetIsShrinkable( false );
+  SetIsShrinkable(false);
+  SetIsFeatureEdgesAllowed(false);
 
   myGlyph = vtkGlyph3D::New();
 
index e3a8633633632edfa5bb4093e8ee77d372581320..959e972e5ffe135e39df4a4d0466341963d6f2a2 100644 (file)
@@ -30,20 +30,65 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
 lib_LTLIBRARIES= libVISU.la
 
-salomeinclude_HEADERS= VisuGUI_Tools.h
-
 # .po files to transform in .qm
 nodist_salomeres_DATA= \
        VISU_msg_en.qm VISU_images.qm
 
+salomeinclude_HEADERS= \
+       VisuGUI_Tools.h \
+       VisuGUI_Prs3dTools.h \
+       VisuGUI_ActionsDef.h \
+       VisuGUI.h \
+       VisuGUI_Module.h \
+       VisuGUI_Selection.h \
+       VisuGUI_Tools.h \
+       VisuGUI_ViewTools.h \
+       VisuGUI_PopupTools.h \
+       VisuGUI_NameDlg.h \
+       VisuGUI_FileDlg.h \
+       VisuGUI_CursorDlg.h \
+       VisuGUI_TimeAnimation.h \
+       VisuGUI_EditContainerDlg.h \
+       VisuGUI_ClippingDlg.h \
+       VisuGUI_DialogRunner.h \
+       VisuGUI_OffsetDlg.h \
+       VisuGUI_Prs3dDlg.h \
+       VisuGUI_ScalarBarDlg.h \
+       VisuGUI_Plot3DDlg.h \
+       VisuGUI_GaussPointsDlg.h \
+       VisuGUI_DeformedShapeDlg.h \
+       VisuGUI_IsoSurfacesDlg.h \
+       VisuGUI_CutLinesDlg.h \
+       VisuGUI_CutPlanesDlg.h \
+       VisuGUI_StreamLinesDlg.h \
+       VisuGUI_VectorsDlg.h \
+       VisuGUI_Displayer.h \
+       VisuGUI_DeformedShapeAndScalarMapDlg.h \
+       VisuGUI_SetupPlot2dDlg.h \
+       VisuGUI_BuildProgressDlg.h \
+       VisuGUI_TransparencyDlg.h \
+       VisuGUI_Timer.h \
+       VisuGUI_Slider.h \
+       VisuGUI_InputPane.h \
+       VisuGUI_CacheDlg.h \
+       VisuGUI_FieldFilter.h \
+       VisuGUI_ValuesLabelingDlg.h
+
 dist_libVISU_la_SOURCES= \
        VisuGUI.cxx \
        VisuGUI_Factory.cxx \
        VisuGUI_Module.cxx \
-       VisuGUI_Selection.cxx \
+       VisuGUI_InputPanel.cxx \
+       VisuGUI_BasePanel.cxx \
+       VisuGUI_Panel.cxx \
+       VisuGUI_SelectionPanel.cxx \
+       VisuGUI_SelectionPrefDlg.cxx \
+       VisuGUI_GaussPointsSelectionPane.cxx \
+       VisuGUI_FindPane.cxx \
+       VisuGUI_FeatureEdgesPanel.cxx \
        VisuGUI_Tools.cxx \
        VisuGUI_ViewTools.cxx \
-       VisuGUI_PopupTools.cxx \
+       VisuGUI_Selection.cxx \
        VisuGUI_NameDlg.cxx \
        VisuGUI_FileDlg.cxx \
        VisuGUI_CursorDlg.cxx \
@@ -70,15 +115,27 @@ dist_libVISU_la_SOURCES= \
        VisuGUI_TransparencyDlg.cxx \
        VisuGUI_Timer.cxx \
        VisuGUI_Slider.cxx \
+       VisuGUI_Sweep.cxx \
        VisuGUI_InputPane.cxx \
        VisuGUI_CacheDlg.cxx \
+       VisuGUI_FileInfoDlg.cxx \
        VisuGUI_FieldFilter.cxx \
-       VisuGUI_FileInfoDlg.cxx
+       VisuGUI_ClippingPanel.cxx \
+       VisuGUI_ClippingPlaneDlg.cxx \
+       VisuGUI_FilterScalarsDlg.cxx \
+       VisuGUI_ValuesLabelingDlg.cxx
 
 MOC_FILES= \
        VisuGUI_moc.cxx \
        VisuGUI_Module_moc.cxx \
-       VisuGUI_Selection_moc.cxx \
+       VisuGUI_InputPanel_moc.cxx \
+       VisuGUI_BasePanel_moc.cxx \
+       VisuGUI_Panel_moc.cxx \
+       VisuGUI_SelectionPanel_moc.cxx \
+       VisuGUI_SelectionPrefDlg_moc.cxx \
+       VisuGUI_GaussPointsSelectionPane_moc.cxx \
+       VisuGUI_FindPane_moc.cxx \
+       VisuGUI_FeatureEdgesPanel_moc.cxx \
        VisuGUI_NameDlg_moc.cxx \
        VisuGUI_FileDlg_moc.cxx \
        VisuGUI_CursorDlg_moc.cxx \
@@ -103,9 +160,15 @@ MOC_FILES= \
        VisuGUI_Table3dDlg_moc.cxx \
        VisuGUI_TransparencyDlg_moc.cxx \
        VisuGUI_Slider_moc.cxx \
+       VisuGUI_Sweep_moc.cxx \
        VisuGUI_InputPane_moc.cxx \
        VisuGUI_CacheDlg_moc.cxx \
-       VisuGUI_FileInfoDlg_moc.cxx
+       VisuGUI_FileInfoDlg_moc.cxx \
+       VisuGUI_ClippingPanel_moc.cxx \
+       VisuGUI_ClippingPlaneDlg_moc.cxx \
+       VisuGUI_FilterScalarsDlg_moc.cxx \
+       VisuGUI_ValuesLabelingDlg_moc.cxx
+
 
 nodist_libVISU_la_SOURCES=$(MOC_FILES)
 
diff --git a/src/VISUGUI/VISU_images.ts b/src/VISUGUI/VISU_images.ts
deleted file mode 100644 (file)
index dd7a9d4..0000000
+++ /dev/null
@@ -1,294 +0,0 @@
-<!DOCTYPE TS>
-<TS version="1.1" >
-    <context>
-        <name>@default</name>
-        <message>
-            <source>ICON_ADD</source>
-            <translation>Visu_add.png</translation>
-        </message>
-        <message>
-            <source>ICON_CUBE_AXES</source>
-            <translation>Visu_graduated_axes.png</translation>
-        </message>
-        <message>
-            <source>ICON_CUT_LINES</source>
-            <translation>Visu_cutlines.png</translation>
-        </message>
-        <message>
-            <source>ICON_CUT_PLANES</source>
-            <translation>Visu_cutplanes.png</translation>
-        </message>
-        <message>
-            <source>ICON_DEFORMED_SHAPE</source>
-            <translation>Visu_deformed.png</translation>
-        </message>
-        <message>
-            <source>ICON_ERASE_ALL</source>
-            <translation>Visu_eraseall.png</translation>
-        </message>
-        <message>
-            <source>ICON_GAUSS_NEW_VIEWER</source>
-            <translation>Visu_points.png</translation>
-        </message>
-        <message>
-            <source>ICON_GAUSS_POINTS</source>
-            <translation>Visu_gauss_points.png</translation>
-        </message>
-        <message>
-            <source>ICON_GLOBAL_SELECTION</source>
-            <translation>Visu_selectall.png</translation>
-        </message>
-        <message>
-            <source>ICON_HOLO_RENDER</source>
-            <translation>Visu_holo_render.png</translation>
-        </message>
-        <message>
-            <source>ICON_IMPORT_MED</source>
-            <translation>Visu_import_med.png</translation>
-        </message>
-        <message>
-            <source>ICON_ISO_SURFACES</source>
-            <translation>Visu_isosurfaces.png</translation>
-        </message>
-        <message>
-            <source>ICON_LOAD_TEXTURE</source>
-            <translation>Visu_load_texture.png</translation>
-        </message>
-        <message>
-            <source>ICON_MULTIPR_VIEW_FULL</source>
-            <translation>Visu_tree_multipr_full.png</translation>
-        </message>
-        <message>
-            <source>ICON_MULTIPR_VIEW_HIDE</source>
-            <translation>Visu_tree_multipr_hide.png</translation>
-        </message>
-        <message>
-            <source>ICON_MULTIPR_VIEW_LOW</source>
-            <translation>Visu_tree_multipr_low.png</translation>
-        </message>
-        <message>
-            <source>ICON_MULTIPR_VIEW_MEDIUM</source>
-            <translation>Visu_tree_multipr_medium.png</translation>
-        </message>
-        <message>
-            <source>ICON_OBJBROWSER_Visu</source>
-            <translation>Visu_tree_visu.png</translation>
-        </message>
-        <message>
-            <source>ICON_PARTIAL_SELECTION</source>
-            <translation>Visu_selectonly.png</translation>
-        </message>
-        <message>
-            <source>ICON_PLOT2D</source>
-            <translation>Visu_plot2d.png</translation>
-        </message>
-        <message>
-            <source>ICON_PLOT_3D</source>
-            <translation>Visu_plot3d.png</translation>
-        </message>
-        <message>
-            <source>ICON_POINTS</source>
-            <translation>Visu_points.png</translation>
-        </message>
-        <message>
-            <source>ICON_REMOVE</source>
-            <translation>Visu_remove.png</translation>
-        </message>
-        <message>
-            <source>ICON_SCALAR_MAP</source>
-            <translation>Visu_scalars.png</translation>
-        </message>
-        <message>
-            <source>ICON_SCALAR_MAP_ON_DEFORMED_SHAPE</source>
-            <translation>Visu_scalarmapondeformedshape.png</translation>
-        </message>
-        <message>
-            <source>ICON_SCALING</source>
-            <translation>Visu_scaling.png</translation>
-        </message>
-        <message>
-            <source>ICON_SLIDER_AVI</source>
-            <translation>Visu_slider_avi.png</translation>
-        </message>
-        <message>
-            <source>ICON_SLIDER_FIRST</source>
-            <translation>Visu_slider_first.png</translation>
-        </message>
-        <message>
-            <source>ICON_SLIDER_LAST</source>
-            <translation>Visu_slider_last.png</translation>
-        </message>
-        <message>
-            <source>ICON_SLIDER_MORE</source>
-            <translation>Visu_slider_more.png</translation>
-        </message>
-        <message>
-            <source>ICON_SLIDER_NEXT</source>
-            <translation>Visu_slider_next.png</translation>
-        </message>
-        <message>
-            <source>ICON_SLIDER_PAUSE</source>
-            <translation>Visu_slider_pause.png</translation>
-        </message>
-        <message>
-            <source>ICON_SLIDER_PLAY</source>
-            <translation>Visu_slider_play.png</translation>
-        </message>
-        <message>
-            <source>ICON_SLIDER_PREVIOUS</source>
-            <translation>Visu_slider_previous.png</translation>
-        </message>
-        <message>
-            <source>ICON_STREAM_LINES</source>
-            <translation>Visu_streamlines.png</translation>
-        </message>
-        <message>
-            <source>ICON_SURFACE</source>
-            <translation>Visu_surface.png</translation>
-        </message>
-        <message>
-            <source>ICON_SWEEP</source>
-            <translation>Visu_scalars_anim.png</translation>
-        </message>
-        <message>
-            <source>ICON_TIMEANIMATION</source>
-            <translation>Visu_anim.png</translation>
-        </message>
-        <message>
-            <source>ICON_TREE_CONTAINER</source>
-            <translation>Visu_tree_container.png</translation>
-        </message>
-        <message>
-            <source>ICON_TREE_CURVE</source>
-            <translation>Visu_tree_curve.png</translation>
-        </message>
-        <message>
-            <source>ICON_TREE_CUT_LINES</source>
-            <translation>Visu_tree_cutlines.png</translation>
-        </message>
-        <message>
-            <source>ICON_TREE_CUT_LINES_GROUPS</source>
-            <translation>Visu_tree_cutlines_gr.png</translation>
-        </message>
-        <message>
-            <source>ICON_TREE_CUT_PLANES</source>
-            <translation>Visu_tree_cutplanes.png</translation>
-        </message>
-        <message>
-            <source>ICON_TREE_CUT_PLANES_GROUPS</source>
-            <translation>Visu_tree_cutplanes_gr.png</translation>
-        </message>
-        <message>
-            <source>ICON_TREE_DEFORMED_SHAPE</source>
-            <translation>Visu_tree_deformed.png</translation>
-        </message>
-        <message>
-            <source>ICON_TREE_DEFORMED_SHAPE_GROUPS</source>
-            <translation>Visu_tree_deformed_gr.png</translation>
-        </message>
-        <message>
-            <source>ICON_TREE_GAUSS_POINTS</source>
-            <translation>Visu_tree_gauss_points.png</translation>
-        </message>
-        <message>
-            <source>ICON_TREE_ISO_SURFACES</source>
-            <translation>Visu_tree_isosurfaces.png</translation>
-        </message>
-        <message>
-            <source>ICON_TREE_ISO_SURFACES_GROUPS</source>
-            <translation>Visu_tree_isosurfaces_gr.png</translation>
-        </message>
-        <message>
-            <source>ICON_TREE_MESH</source>
-            <translation>Visu_tree_mesh.png</translation>
-        </message>
-        <message>
-            <source>ICON_TREE_PLOT_3D</source>
-            <translation>Visu_tree_plot3d.png</translation>
-        </message>
-        <message>
-            <source>ICON_TREE_PLOT_3D_GROUPS</source>
-            <translation>Visu_tree_plot3d_gr.png</translation>
-        </message>
-        <message>
-            <source>ICON_TREE_RESULT</source>
-            <translation>Visu_tree_result.png</translation>
-        </message>
-        <message>
-            <source>ICON_TREE_SCALAR_MAP</source>
-            <translation>Visu_tree_scalars.png</translation>
-        </message>
-        <message>
-            <source>ICON_TREE_SCALAR_MAP_GROUPS</source>
-            <translation>Visu_tree_scalars_gr.png</translation>
-        </message>
-        <message>
-            <source>ICON_TREE_SCALAR_MAP_ON_DEFORMED_SHAPE</source>
-            <translation>Visu_tree_scalarmapondeformedshape.png</translation>
-        </message>
-        <message>
-            <source>ICON_TREE_SCALAR_MAP_ON_DEFORMED_SHAPE_GROUPS</source>
-            <translation>Visu_tree_scalarmapondeformedshape_gr.png</translation>
-        </message>
-        <message>
-            <source>ICON_TREE_STREAM_LINES</source>
-            <translation>Visu_tree_streamlines.png</translation>
-        </message>
-        <message>
-            <source>ICON_TREE_STREAM_LINES_GROUPS</source>
-            <translation>Visu_tree_streamlines_gr.png</translation>
-        </message>
-        <message>
-            <source>ICON_TREE_TABLE</source>
-            <translation>Visu_tree_table.png</translation>
-        </message>
-        <message>
-            <source>ICON_TREE_VECTORS</source>
-            <translation>Visu_tree_vectors.png</translation>
-        </message>
-        <message>
-            <source>ICON_TREE_VECTORS_GROUPS</source>
-            <translation>Visu_tree_vectors_gr.png</translation>
-        </message>
-        <message>
-            <source>ICON_VECTORS</source>
-            <translation>Visu_vectors.png</translation>
-        </message>
-        <message>
-            <source>ICON_VVTK_INTERACTOR_STYLE_SWITCH</source>
-            <translation>Visu_vvtk_switch.png</translation>
-        </message>
-        <message>
-            <source>ICON_VVTK_PLANE_SEGMENTATION_SWITCH</source>
-            <translation>Visu_PlaneSegmentation.png</translation>
-        </message>
-        <message>
-            <source>ICON_VVTK_RECORDING_PAUSE</source>
-            <translation>Visu_recording_pause.png</translation>
-        </message>
-        <message>
-            <source>ICON_VVTK_RECORDING_PLAY</source>
-            <translation>Visu_recording_play.png</translation>
-        </message>
-        <message>
-            <source>ICON_VVTK_RECORDING_START</source>
-            <translation>Visu_recording_start.png</translation>
-        </message>
-        <message>
-            <source>ICON_VVTK_RECORDING_STOP</source>
-            <translation>Visu_recording_stop.png</translation>
-        </message>
-        <message>
-            <source>ICON_VVTK_SELECTION_MODE_SWITCH</source>
-            <translation>Visu_points.png</translation>
-        </message>
-        <message>
-            <source>ICON_VVTK_SPHERE_SEGMENTATION_SWITCH</source>
-            <translation>Visu_SphereSegmentation.png</translation>
-        </message>
-        <message>
-            <source>ICON_WIREFRAME</source>
-            <translation>Visu_wireframe.png</translation>
-        </message>
-    </context>
-</TS>
diff --git a/src/VISUGUI/VISU_msg_en.ts b/src/VISUGUI/VISU_msg_en.ts
deleted file mode 100644 (file)
index b24996d..0000000
+++ /dev/null
@@ -1,3431 +0,0 @@
-<!DOCTYPE TS>
-<TS version="1.1" >
-    <context>
-        <name>@default</name>
-        <message>
-            <source>ASSIGNED</source>
-            <translation>Assigned</translation>
-        </message>
-        <message>
-            <source>ATTRIBUTES_LBL</source>
-            <translation>Attributes</translation>
-        </message>
-        <message>
-            <source>AXIS_LBL</source>
-            <translation>Axis</translation>
-        </message>
-        <message>
-            <source>BTN_RESET</source>
-            <translation>Reset</translation>
-        </message>
-        <message>
-            <source>DATA_LBL</source>
-            <translation>Data</translation>
-        </message>
-        <message>
-            <source>ERR_CANT_BUILD_PRESENTATION</source>
-            <translation>The object can't be built</translation>
-        </message>
-        <message>
-            <source>ERR_CANT_CREATE_ACTOR</source>
-            <translation>Can't create actor for this presentation</translation>
-        </message>
-        <message>
-            <source>ERR_CANT_CREATE_ANIMATION</source>
-            <translation>Can't create animation for these fields:
-number of time stamps or number of components is not the same!</translation>
-        </message>
-        <message>
-            <source>ERR_CANT_FIND_MED_COMPONENT</source>
-            <translation>Failed to activate MED engine!</translation>
-        </message>
-        <message>
-            <source>ERR_CANT_FIND_VISU_COMPONENT</source>
-            <translation>Failed to activate VISU engine!</translation>
-        </message>
-        <message>
-            <source>ERR_NO_MEMORY_TO_BUILD</source>
-            <translation>Please, free %1 Mb to make the cache enlarging possible
-(for example, try to delete some holders)</translation>
-        </message>
-        <message>
-            <source>IMPORT_DONE</source>
-            <translation>Importing is done</translation>
-        </message>
-        <message>
-            <source>INF_DONE</source>
-            <translation> done</translation>
-        </message>
-        <message>
-            <source>INF_VISU</source>
-            <translation>Post-Pro Info</translation>
-        </message>
-        <message>
-            <source>NO_GROUPS</source>
-            <translation>No groups in the mesh</translation>
-        </message>
-        <message>
-            <source>PARALLEL_ANIMATION</source>
-            <translation>Parallel Animation</translation>
-        </message>
-        <message>
-            <source>PERIOD_2PI</source>
-            <translation>From -PI to PI</translation>
-        </message>
-        <message>
-            <source>PERIOD_PI</source>
-            <translation>From 0 to PI</translation>
-        </message>
-        <message>
-            <source>PRS_ON_GROUPS</source>
-            <translation>Use Only Groups</translation>
-        </message>
-        <message>
-            <source>SUCCESSIVE_ANIMATION</source>
-            <translation>Successive Animation</translation>
-        </message>
-        <message>
-            <source>TIT_OFFSETDLG</source>
-            <translation>Translate Presentation</translation>
-        </message>
-        <message>
-            <source>TLT_SETUP_PLOT2D</source>
-            <translation>Setup Plot 2d</translation>
-        </message>
-        <message>
-            <source>UNITS_LBL</source>
-            <translation>Units</translation>
-        </message>
-        <message>
-            <source>VISU_3DCACHE_PROPS</source>
-            <translation>3D Cache properties</translation>
-        </message>
-        <message>
-            <source>VISU_COLORS_AND_LABELS</source>
-            <translation>Colors &amp;&amp; Labels</translation>
-        </message>
-        <message>
-            <source>VISU_COMPONENT</source>
-            <translation>Component</translation>
-        </message>
-        <message>
-            <source>VISU_COS_SWEEP</source>
-            <translation>Cosinusoidal ( (1 - cos(t))/2 )</translation>
-        </message>
-        <message>
-            <source>VISU_CUTLINE_PREF</source>
-            <translation>CutLine preferences</translation>
-        </message>
-        <message>
-            <source>VISU_CUT_LINES</source>
-            <translation>Cut Lines</translation>
-        </message>
-        <message>
-            <source>VISU_CUT_PLANES</source>
-            <translation>Cut Planes</translation>
-        </message>
-        <message>
-            <source>VISU_DEFORMED_SHAPE</source>
-            <translation>Deformed Shape</translation>
-        </message>
-        <message>
-            <source>VISU_DISP_ONLY</source>
-            <translation>Display only on creation</translation>
-        </message>
-        <message>
-            <source>VISU_FIELD_RANGE</source>
-            <translation>Field range</translation>
-        </message>
-        <message>
-            <source>VISU_FONT</source>
-            <translation>Font</translation>
-        </message>
-        <message>
-            <source>VISU_FONT_ARIAL</source>
-            <translation>Arial</translation>
-        </message>
-        <message>
-            <source>VISU_FONT_COURIER</source>
-            <translation>Courier</translation>
-        </message>
-        <message>
-            <source>VISU_FONT_TIMES</source>
-            <translation>Times</translation>
-        </message>
-        <message>
-            <source>VISU_HEIGHT</source>
-            <translation>Height:</translation>
-        </message>
-        <message>
-            <source>VISU_HORIZONTAL</source>
-            <translation>Horizontal</translation>
-        </message>
-        <message>
-            <source>VISU_IMPOSED_RANGE</source>
-            <translation>Imposed range</translation>
-        </message>
-        <message>
-            <source>VISU_IS2PI</source>
-            <translation>Parameter varies:</translation>
-        </message>
-        <message>
-            <source>VISU_ISO_SURFACES</source>
-            <translation>Iso Surfaces</translation>
-        </message>
-        <message>
-            <source>VISU_LABELS</source>
-            <translation>Labels</translation>
-        </message>
-        <message>
-            <source>VISU_LIMITED</source>
-            <translation>Limited</translation>
-        </message>
-        <message>
-            <source>VISU_LINEAR_SWEEP</source>
-            <translation>Linear</translation>
-        </message>
-        <message>
-            <source>VISU_LOGARITHMIC_SCALING</source>
-            <translation>Logarithmic scaling</translation>
-        </message>
-        <message>
-            <source>VISU_MAX</source>
-            <translation>Max:</translation>
-        </message>
-        <message>
-            <source>VISU_MEMORY_LIMIT</source>
-            <translation>Memory limit (Mb)</translation>
-        </message>
-        <message>
-            <source>VISU_MEMORY_MODE</source>
-            <translation>Memory mode</translation>
-        </message>
-        <message>
-            <source>VISU_MESH</source>
-            <translation>Mesh</translation>
-        </message>
-        <message>
-            <source>VISU_MIN</source>
-            <translation>Min:</translation>
-        </message>
-        <message>
-            <source>VISU_MINIMAL</source>
-            <translation>Minimal</translation>
-        </message>
-        <message>
-            <source>VISU_MINMAX_IMPOSED_RANGE</source>
-            <translation>Min and max for imposed range</translation>
-        </message>
-        <message>
-            <source>VISU_MODULUS</source>
-            <translation>Modulus</translation>
-        </message>
-        <message>
-            <source>VISU_NB_COLORS</source>
-            <translation>Nb. of colors</translation>
-        </message>
-        <message>
-            <source>VISU_NB_CYCLES</source>
-            <translation>Number of cycles</translation>
-        </message>
-        <message>
-            <source>VISU_NB_LABELS</source>
-            <translation>Nb. of labels</translation>
-        </message>
-        <message>
-            <source>VISU_NB_STEPS</source>
-            <translation>Number of steps</translation>
-        </message>
-        <message>
-            <source>VISU_ORIENTATION</source>
-            <translation>Orientation</translation>
-        </message>
-        <message>
-            <source>VISU_ORIGIN_AND_SIZE</source>
-            <translation>Origin &amp;&amp; Size</translation>
-        </message>
-        <message>
-            <source>VISU_PLOT3D</source>
-            <translation>Plot3D</translation>
-        </message>
-        <message>
-            <source>VISU_PREF_MED_FULL_LOAD</source>
-            <translation>Full MED loading</translation>
-        </message>
-        <message>
-            <source>VISU_PREF_MED_IMPORT</source>
-            <translation>MED files import</translation>
-        </message>
-        <message>
-            <source>VISU_PREF_SECOND_TAB</source>
-            <translation>Scalar range, Sweep, MED import, Shading</translation>
-        </message>
-        <message>
-            <source>VISU_RANGE_TO_USE</source>
-            <translation>Range to use</translation>
-        </message>
-        <message>
-            <source>VISU_REPRESENT_PROPS</source>
-            <translation>Representation properties</translation>
-        </message>
-        <message>
-            <source>VISU_SCALAR_BAR</source>
-            <translation>Scalar Bar</translation>
-        </message>
-        <message>
-            <source>VISU_SCALAR_MAP</source>
-            <translation>Scalar Map</translation>
-        </message>
-        <message>
-            <source>VISU_SCALAR_MAP_ON_DEFORMED_SHAPE</source>
-            <translation>Scalar Map on Def. Shape</translation>
-        </message>
-        <message>
-            <source>VISU_SCALAR_MODE</source>
-            <translation>Scalar mode</translation>
-        </message>
-        <message>
-            <source>VISU_SCALAR_RANGE</source>
-            <translation>Scalar range</translation>
-        </message>
-        <message>
-            <source>VISU_SHRINK</source>
-            <translation>Shrink</translation>
-        </message>
-        <message>
-            <source>VISU_SIN_SWEEP</source>
-            <translation>Sinusoidal ( sin( t - PI/2 ) )</translation>
-        </message>
-        <message>
-            <source>VISU_STREAM_LINES</source>
-            <translation>Stream Lines</translation>
-        </message>
-        <message>
-            <source>VISU_SWEEPING_MODES</source>
-            <translation>Mode of the sweeping </translation>
-        </message>
-        <message>
-            <source>VISU_SWEEPING_PREF</source>
-            <translation>Sweeping preferences</translation>
-        </message>
-        <message>
-            <source>VISU_TIME_STEP</source>
-            <translation>Time step(second)</translation>
-        </message>
-        <message>
-            <source>VISU_TITLE</source>
-            <translation>Title</translation>
-        </message>
-        <message>
-            <source>VISU_USE_SHADING</source>
-            <translation>Use Shading</translation>
-        </message>
-        <message>
-            <source>VISU_VECTORS</source>
-            <translation>Vectors</translation>
-        </message>
-        <message>
-            <source>VISU_VERTICAL</source>
-            <translation>Vertical</translation>
-        </message>
-        <message>
-            <source>VISU_WIDTH</source>
-            <translation>Width:</translation>
-        </message>
-        <message>
-            <source>VISU_X</source>
-            <translation>X:</translation>
-        </message>
-        <message>
-            <source>VISU_Y</source>
-            <translation>Y:</translation>
-        </message>
-        <message>
-            <source>WRN_EXTRA_MEMORY_REQUIRED</source>
-            <translation>Cache need more memory to build the presentation (%1 Mb).
-Do you want to enlarge the cache?</translation>
-        </message>
-        <message>
-            <source>WRN_NO_AVAILABLE_DATA</source>
-            <translation>No Available data in selection</translation>
-        </message>
-        <message>
-            <source>WRN_STUDY_LOCKED</source>
-            <translation>Current Study is locked</translation>
-        </message>
-        <message>
-            <source>WRN_VISU</source>
-            <translation>Post-Pro Warning</translation>
-        </message>
-        <message>
-            <source>WRN_VISU_WARNING</source>
-            <translation>Warning</translation>
-        </message>
-        <message>
-            <source>INF_FAILED</source>
-            <translation> failed!</translation>
-        </message>
-        <message>
-            <source>VISU_IS_UNITS</source>
-            <translation>Display units in title</translation>
-        </message>
-        <message>
-            <source>VISU_LABELS_FORMAT</source>
-            <translation>Labels format</translation>
-        </message>
-        <message>
-            <source>VISU_TITLE_WIDTH</source>
-            <translation>Title width (%):</translation>
-        </message>
-        <message>
-            <source>VISU_TITLE_HEIGHT</source>
-            <translation>Title height (%):</translation>
-        </message>
-        <message>
-            <source>VISU_LABEL_WIDTH</source>
-            <translation>Label width (%):</translation>
-        </message>
-        <message>
-            <source>VISU_LABEL_HEIGHT</source>
-            <translation>Label height (%):</translation>
-        </message>
-        <message>
-            <source>VISU_BAR_WIDTH</source>
-            <translation>Bar width (%):</translation>
-        </message>
-        <message>
-            <source>VISU_BAR_HEIGHT</source>
-            <translation>Bar height (%):</translation>
-        </message>
-        <message>
-            <source>VISU_AUTOMATIC_FIT_ALL</source>
-            <translation>Automatic Fit All</translation>
-        </message>
-        <message>
-            <source>VISU_DEFORMED_SHAPE_AND_SCALAR_MAP</source>
-            <translation>Def. Shape and Scalar Map</translation>
-        </message>
-        <message>
-            <source>VISU_FLOATING_POINT_PRECISION</source>
-            <translation>Floating Point Precision</translation>
-        </message>
-        <message>
-            <source>VISU_REALLY_DELETE</source>
-            <translation>Do you really want to delete this %1 object(s): %2</translation>
-        </message>
-        <message>
-            <source>WRN_NO_APPROPRIATE_SELECTION</source>
-            <translation>No appropriate objects selected</translation>
-        </message>
-    </context>
-    <context>
-        <name>VVTK_MainWindow</name>
-        <message>
-            <source>DSC_VVTK_RECORDING_PAUSE</source>
-            <translation>Pause recording</translation>
-        </message>
-        <message>
-            <source>DSC_VVTK_RECORDING_PLAY</source>
-            <translation>Play recording</translation>
-        </message>
-        <message>
-            <source>DSC_VVTK_RECORDING_START</source>
-            <translation>Start recording</translation>
-        </message>
-        <message>
-            <source>DSC_VVTK_RECORDING_STOP</source>
-            <translation>Stop recording</translation>
-        </message>
-        <message>
-            <source>LBL_TOOLBAR_RECORD_LABEL</source>
-            <translation>Recording Operations</translation>
-        </message>
-        <message>
-            <source>MNU_VVTK_RECORDING_PAUSE</source>
-            <translation>Pause recording</translation>
-        </message>
-        <message>
-            <source>MNU_VVTK_RECORDING_PLAY</source>
-            <translation>Play recording</translation>
-        </message>
-        <message>
-            <source>MNU_VVTK_RECORDING_START</source>
-            <translation>Start recording</translation>
-        </message>
-        <message>
-            <source>MNU_VVTK_RECORDING_STOP</source>
-            <translation>Stop recording</translation>
-        </message>
-        <message>
-            <source>MSG_NO_AVI_MAKER</source>
-            <translation>Tool jpeg2yuv, necessary for AVI recording, is not available.
-Please, refer to the documentation.</translation>
-        </message>
-    </context>
-    <context>
-        <name>VVTK_MainWindow1</name>
-        <message>
-            <source>DSC_VVTK_INTERACTOR_STYLE_SWITCH</source>
-            <translation>Interaction Style Switch</translation>
-        </message>
-        <message>
-            <source>DSC_VVTK_PLANE_SEGMENTATION_SWITCH</source>
-            <translation>Plane Segmentation</translation>
-        </message>
-        <message>
-            <source>DSC_VVTK_SELECTION_MODE_SWITCH</source>
-            <translation>Selection Mode Switch</translation>
-        </message>
-        <message>
-            <source>DSC_VVTK_SPHERE_SEGMENTATION_SWITCH</source>
-            <translation>Sphere Segmentation</translation>
-        </message>
-        <message>
-            <source>LBL_TOOLBAR_GAUSS_LABEL</source>
-            <translation>Gauss Viewer Tools</translation>
-        </message>
-        <message>
-            <source>MNU_VVTK_INTERACTOR_STYLE_SWITCH</source>
-            <translation>Interaction Style Switch</translation>
-        </message>
-        <message>
-            <source>MNU_VVTK_PLANE_SEGMENTATION_SWITCH</source>
-            <translation>Plane Segmentation</translation>
-        </message>
-        <message>
-            <source>MNU_VVTK_SELECTION_MODE_SWITCH</source>
-            <translation>Selection Mode Switch</translation>
-        </message>
-        <message>
-            <source>MNU_VVTK_SPHERE_SEGMENTATION_SWITCH</source>
-            <translation>Sphere Segmentation</translation>
-        </message>
-    </context>
-    <context>
-        <name>VVTK_PickingDlg</name>
-        <message>
-            <source>BELOW_POINT</source>
-            <translation>Centered below the point</translation>
-        </message>
-        <message>
-            <source>CAMERA_TITLE</source>
-            <translation>Movement of the camera</translation>
-        </message>
-        <message>
-            <source>CURSOR_SIZE</source>
-            <translation>Size of the cursor :</translation>
-        </message>
-        <message>
-            <source>CURSOR_TITLE</source>
-            <translation>Cursor</translation>
-        </message>
-        <message>
-            <source>DISPLAY_PARENT_MESH</source>
-            <translation>Display parent mesh element</translation>
-        </message>
-        <message>
-            <source>INFO_WINDOW_TITLE</source>
-            <translation>Information window</translation>
-        </message>
-        <message>
-            <source>PARENT_MESH_TITLE</source>
-            <translation>Parent mesh element</translation>
-        </message>
-        <message>
-            <source>PICKING_DLG_TITLE</source>
-            <translation>Picking</translation>
-        </message>
-        <message>
-            <source>POINT_TOLERANCE</source>
-            <translation>Point tolerance :</translation>
-        </message>
-        <message>
-            <source>POSITION</source>
-            <translation>Position :</translation>
-        </message>
-        <message>
-            <source>PYRAMID_HEIGHT</source>
-            <translation>Height of the pyramids :</translation>
-        </message>
-        <message>
-            <source>SELECTION_COLOR</source>
-            <translation>Selection cursor color :</translation>
-        </message>
-        <message>
-            <source>STEP_NUMBER</source>
-            <translation>Number of steps between two positions :</translation>
-        </message>
-        <message>
-            <source>TOLERANCE_TITLE</source>
-            <translation>Tolerance</translation>
-        </message>
-        <message>
-            <source>TOP_LEFT_CORNER</source>
-            <translation>Top-left corner of the 3D view</translation>
-        </message>
-        <message>
-            <source>TRANSPARENCY</source>
-            <translation>Transparency :</translation>
-        </message>
-        <message>
-            <source>ZOOM_FACTOR</source>
-            <translation>Zoom at first selected point (ratio) :</translation>
-        </message>
-        <message>
-            <source>DATA_POSITION</source>
-            <translation>Position</translation>
-        </message>
-        <message>
-            <source>PARENT_ELEMENT</source>
-            <translation>Parent mesh element ID:</translation>
-        </message>
-        <message>
-            <source>LOCAL_POINT</source>
-            <translation>Local Gauss Point ID:</translation>
-        </message>
-    </context>
-    <context>
-        <name>VVTK_PrimitiveBox</name>
-        <message>
-            <source>ALPHA_TEXTURE</source>
-            <translation>Alpha Channel Texture (16x16) : </translation>
-        </message>
-        <message>
-            <source>ALPHA_THRESHOLD</source>
-            <translation>Alpha Channel Threshold : </translation>
-        </message>
-        <message>
-            <source>CLAMP</source>
-            <translation>Maximum Size (Clamp) : </translation>
-        </message>
-        <message>
-            <source>FACE_LIMIT</source>
-            <translation>Notify when number of faces exceeds : </translation>
-        </message>
-        <message>
-            <source>FACE_NUMBER</source>
-            <translation>Number of faces : </translation>
-        </message>
-        <message>
-            <source>GEOMETRICAL_SPHERE</source>
-            <translation>Geometrical Sphere</translation>
-        </message>
-        <message>
-            <source>MAIN_TEXTURE</source>
-            <translation>Main Texture (16x16) : </translation>
-        </message>
-        <message>
-            <source>OPENGL_POINT</source>
-            <translation>OpenGL Point</translation>
-        </message>
-        <message>
-            <source>POINT_SPRITE</source>
-            <translation>Point Sprite</translation>
-        </message>
-        <message>
-            <source>PRIMITIVE_TITLE</source>
-            <translation>Primitive</translation>
-        </message>
-        <message>
-            <source>RESOLUTION</source>
-            <translation>Resolution : </translation>
-        </message>
-    </context>
-    <context>
-        <name>VVTK_RecorderDlg</name>
-        <message>
-            <source>ALL_DISLPAYED_FRAMES</source>
-            <translation>Recording all displayed frames</translation>
-        </message>
-        <message>
-            <source>CLOSE</source>
-            <translation>Close</translation>
-        </message>
-        <message>
-            <source>DLG_RECORDER_TITLE</source>
-            <translation>Recorder</translation>
-        </message>
-        <message>
-            <source>FILE_NAME</source>
-            <translation>Save to file : </translation>
-        </message>
-        <message>
-            <source>FLT_ALL_FILES</source>
-            <translation>All Files (*.*)</translation>
-        </message>
-        <message>
-            <source>FLT_AVI_FILES</source>
-            <translation>AVI Files (*.avi)</translation>
-        </message>
-        <message>
-            <source>FPS</source>
-            <translation>FPS : </translation>
-        </message>
-        <message>
-            <source>PROGRESSIVE</source>
-            <translation>Progressive</translation>
-        </message>
-        <message>
-            <source>QUALITY</source>
-            <translation>Quality : </translation>
-        </message>
-        <message>
-            <source>RECORDING_MODE</source>
-            <translation>Mode : </translation>
-        </message>
-        <message>
-            <source>SETTINGS</source>
-            <translation>Settings</translation>
-        </message>
-        <message>
-            <source>SKIPPED_FRAMES</source>
-            <translation>Recording at a given FPS</translation>
-        </message>
-        <message>
-            <source>START</source>
-            <translation>Start</translation>
-        </message>
-    </context>
-    <context>
-        <name>VVTK_SegmentationCursorDlg</name>
-        <message>
-            <source>DEPTH</source>
-            <translation>Depth of the cursor: </translation>
-        </message>
-        <message>
-            <source>DEPTH_TITLE</source>
-            <translation>Depth</translation>
-        </message>
-        <message>
-            <source>DIRECTION_DX</source>
-            <translation>DX: </translation>
-        </message>
-        <message>
-            <source>DIRECTION_DY</source>
-            <translation>DY: </translation>
-        </message>
-        <message>
-            <source>DIRECTION_DZ</source>
-            <translation>DZ: </translation>
-        </message>
-        <message>
-            <source>DIRECTION_TITLE</source>
-            <translation>Direction</translation>
-        </message>
-        <message>
-            <source>GAUSS_POINTS_TAB</source>
-            <translation>Gauss Points</translation>
-        </message>
-        <message>
-            <source>INCREMENT</source>
-            <translation>+/- Ratio : </translation>
-        </message>
-        <message>
-            <source>INSIDE_GAUSS_POINTS</source>
-            <translation>Inside Cursor Gauss Points Presentation</translation>
-        </message>
-        <message>
-            <source>MAGNIFICATION</source>
-            <translation>Magnification (%) : </translation>
-        </message>
-        <message>
-            <source>MAGNIFICATION_TITLE</source>
-            <translation>Magnification</translation>
-        </message>
-        <message>
-            <source>ORIGIN_TITLE</source>
-            <translation>Origin</translation>
-        </message>
-        <message>
-            <source>ORIGIN_X</source>
-            <translation>X: </translation>
-        </message>
-        <message>
-            <source>ORIGIN_Y</source>
-            <translation>Y: </translation>
-        </message>
-        <message>
-            <source>ORIGIN_Z</source>
-            <translation>Z: </translation>
-        </message>
-        <message>
-            <source>OUTSIDE_GAUSS_POINTS</source>
-            <translation>Outside Cursor Gauss Points Presentation</translation>
-        </message>
-        <message>
-            <source>RADIUS</source>
-            <translation>Radius of the cursor :</translation>
-        </message>
-        <message>
-            <source>RADIUS_TITLE</source>
-            <translation>Radius</translation>
-        </message>
-        <message>
-            <source>RATIO</source>
-            <translation>+/- Ratio :</translation>
-        </message>
-        <message>
-            <source>SEGMENTATION_CURSOR_DLG_TITLE</source>
-            <translation>Segmentation Cursor</translation>
-        </message>
-        <message>
-            <source>SEGMENTATION_CURSOR_TAB</source>
-            <translation>Segmentation Cursor</translation>
-        </message>
-    </context>
-    <context>
-        <name>VVTK_SizeBox</name>
-        <message>
-            <source>COLOR</source>
-            <translation>Color : </translation>
-        </message>
-        <message>
-            <source>COLOR_TITLE</source>
-            <translation>Color</translation>
-        </message>
-        <message>
-            <source>GEOM_SIZE</source>
-            <translation>Size of points (%) : </translation>
-        </message>
-        <message>
-            <source>INCREMENT</source>
-            <translation>+/- Ratio : </translation>
-        </message>
-        <message>
-            <source>MAGNIFICATION</source>
-            <translation>Magnification (%) : </translation>
-        </message>
-        <message>
-            <source>MAX_SIZE</source>
-            <translation>max size (%) : </translation>
-        </message>
-        <message>
-            <source>MIN_SIZE</source>
-            <translation>Range values for min size (%) : </translation>
-        </message>
-        <message>
-            <source>OUTSIDE_SIZE</source>
-            <translation>Percentage of normal size(%) : </translation>
-        </message>
-        <message>
-            <source>SIZE_TITLE</source>
-            <translation>Size</translation>
-        </message>
-        <message>
-            <source>UNIFORM_COLOR</source>
-            <translation>Uniform Color</translation>
-        </message>
-    </context>
-    <context>
-        <name>VVTK_ViewManager</name>
-        <message>
-            <source>VTK_VIEW_TITLE</source>
-            <translation>Gauss scene:%1 - viewer:%2</translation>
-        </message>
-    </context>
-    <context>
-        <name>VVTK_ViewWindow</name>
-        <message>
-            <source>LBL_TOOLBAR_LABEL</source>
-            <translation>GAUSS viewer tools</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI</name>
-        <message>
-            <source>DLG_LINEWIDTH_CMT1</source>
-            <translation>Set value between</translation>
-        </message>
-        <message>
-            <source>DLG_LINEWIDTH_CMT2</source>
-            <translation>1 (thin) and 10 (thick)</translation>
-        </message>
-        <message>
-            <source>DLG_LINEWIDTH_TITLE</source>
-            <translation>Line Width</translation>
-        </message>
-        <message>
-            <source>DLG_OPACITY_CMT1</source>
-            <translation>Set value between</translation>
-        </message>
-        <message>
-            <source>DLG_OPACITY_CMT2</source>
-            <translation>0 (transparent) and 100 (opaque)</translation>
-        </message>
-        <message>
-            <source>DLG_OPACITY_TITLE</source>
-            <translation>Opacity</translation>
-        </message>
-        <message>
-            <source>ERR_ACTIVATE_VIEW3D</source>
-            <translation>Please activate 3D view before</translation>
-        </message>
-        <message>
-            <source>ERR_ERROR_DURING_EXPORT</source>
-            <translation>Error has been occured during exporting to file</translation>
-        </message>
-        <message>
-            <source>ERR_SCALARBAR_PARAMS</source>
-            <translation>Warning! The parameters is incorrect</translation>
-        </message>
-        <message>
-            <source>FLT_ALL_FILES</source>
-            <translation>All Files (*.*)</translation>
-        </message>
-        <message>
-            <source>FLT_MED_FILES</source>
-            <translation>MED Files (*.med)</translation>
-        </message>
-        <message>
-            <source>FLT_TABLE_FILES</source>
-            <translation>Tables (*.xls *.txt *.tab)</translation>
-        </message>
-        <message>
-            <source>IMPORT_FROM_FILE</source>
-            <translation>Import from File</translation>
-        </message>
-        <message>
-            <source>MEN_ARRANGE_ACTORS</source>
-            <translation>Arrange Actors</translation>
-        </message>
-        <message>
-            <source>MEN_CACHE_PROPERTIES</source>
-            <translation>Properties</translation>
-        </message>
-        <message>
-            <source>MEN_CELL_COLOR</source>
-            <translation>Cell color</translation>
-        </message>
-        <message>
-            <source>MEN_CLEAR_CONTAINER</source>
-            <translation>Clear</translation>
-        </message>
-        <message>
-            <source>MEN_CLIPPING</source>
-            <translation>Clipping planes</translation>
-        </message>
-        <message>
-            <source>MEN_COLOR</source>
-            <translation>Color...</translation>
-        </message>
-        <message>
-            <source>MEN_COPY_PRS</source>
-            <translation>Copy</translation>
-        </message>
-        <message>
-            <source>MEN_CREATE_CURVES</source>
-            <translation>Create Curves</translation>
-        </message>
-        <message>
-            <source>MEN_CREATE_MANY_PRS</source>
-            <translation>Create Presentations</translation>
-        </message>
-        <message>
-            <source>MEN_CREATE_PLOT2D</source>
-            <translation>Create Plot2d View</translation>
-        </message>
-        <message>
-            <source>MEN_CREATE_PRS</source>
-            <translation>Create Presentation</translation>
-        </message>
-        <message>
-            <source>MEN_CREATE_TABLE</source>
-            <translation>Create Table</translation>
-        </message>
-        <message>
-            <source>MEN_CUBE_AXES</source>
-            <translation>Graduated axes</translation>
-        </message>
-        <message>
-            <source>MEN_CURVE_PROPS</source>
-            <translation>Properties...</translation>
-        </message>
-        <message>
-            <source>MEN_CUT_LINES</source>
-            <translation>Cut Lines</translation>
-        </message>
-        <message>
-            <source>MEN_CUT_PLANES</source>
-            <translation>Cut Planes</translation>
-        </message>
-        <message>
-            <source>MEN_DEFORMED_SHAPE</source>
-            <translation>Deformed Shape</translation>
-        </message>
-        <message>
-            <source>MEN_DELETE_OBJS</source>
-            <translation>Delete</translation>
-        </message>
-        <message>
-            <source>MEN_DELETE_VIEWPARAMS</source>
-            <translation>Delete view parameters</translation>
-        </message>
-        <message>
-            <source>MEN_SHOW</source>
-            <translation>Show</translation>
-        </message>
-        <message>
-            <source>MEN_DISPLAY_ONLY</source>
-            <translation>Show Only</translation>
-        </message>
-        <message>
-            <source>MEN_DISPLAY_SELECTION</source>
-            <translation>Display Selection</translation>
-        </message>
-        <message>
-            <source>MEN_EDGE_COLOR</source>
-            <translation>Edge Color</translation>
-        </message>
-        <message>
-            <source>MEN_EDIT_CONTAINER</source>
-            <translation>Edit...</translation>
-        </message>
-        <message>
-            <source>MEN_EDIT_PRS</source>
-            <translation>Edit...</translation>
-        </message>
-        <message>
-            <source>MEN_HIDE</source>
-            <translation>Hide</translation>
-        </message>
-        <message>
-            <source>MEN_ERASE_ALL</source>
-            <translation>Hide All</translation>
-        </message>
-        <message>
-            <source>MEN_EXPORT_TABLE</source>
-            <translation>Export Table</translation>
-        </message>
-        <message>
-            <source>MEN_FREE_SCALAR_BARS</source>
-            <translation>Use Field Range</translation>
-        </message>
-        <message>
-            <source>MEN_GLOBAL_SELECTION</source>
-            <translation>Global Selection</translation>
-        </message>
-        <message>
-            <source>MEN_HOLO_RENDER</source>
-            <translation>Holo render</translation>
-        </message>
-        <message>
-            <source>MEN_IMPORT</source>
-            <translation>Import</translation>
-        </message>
-        <message>
-            <source>MEN_IMPORT_FROM_FILE</source>
-            <translation>MED file</translation>
-        </message>
-        <message>
-            <source>MEN_IMPORT_MED_FIELD</source>
-            <translation>Import Field</translation>
-        </message>
-        <message>
-            <source>MEN_IMPORT_MED_STRUCTURE</source>
-            <translation>Import Structure</translation>
-        </message>
-        <message>
-            <source>MEN_IMPORT_MED_TIMESTAMP</source>
-            <translation>Import TimeStamp</translation>
-        </message>
-        <message>
-            <source>MEN_IMPORT_TABLE</source>
-            <translation>Table from file</translation>
-        </message>
-        <message>
-            <source>MEN_INSIDEFRAME</source>
-            <translation>Insideframe</translation>
-        </message>
-        <message>
-            <source>MEN_ISO_SURFACES</source>
-            <translation>Iso Surfaces</translation>
-        </message>
-        <message>
-            <source>MEN_LINE_WIDTH</source>
-            <translation>Line Width</translation>
-        </message>
-        <message>
-            <source>MEN_MERGE_SCALAR_BARS</source>
-            <translation>Merge Scalar Range</translation>
-        </message>
-        <message>
-            <source>MEN_MULTIPR_VIEW_FULL_RES</source>
-            <translation>Display at full resolution</translation>
-        </message>
-        <message>
-            <source>MEN_MULTIPR_VIEW_HIDE</source>
-            <translation>Hide</translation>
-        </message>
-        <message>
-            <source>MEN_MULTIPR_VIEW_LOW_RES</source>
-            <translation>Display at low resolution</translation>
-        </message>
-        <message>
-            <source>MEN_MULTIPR_VIEW_MEDIUM_RES</source>
-            <translation>Display at medium resolution</translation>
-        </message>
-        <message>
-            <source>MEN_NOSHADING</source>
-            <translation>Shading Off</translation>
-        </message>
-        <message>
-            <source>MEN_OPACITY</source>
-            <translation>Opacity</translation>
-        </message>
-        <message>
-            <source>MEN_PARALLEL_ANIMATION</source>
-            <translation>Parallel Animation...</translation>
-        </message>
-        <message>
-            <source>MEN_PARTIAL_SELECTION</source>
-            <translation>Partial Selection</translation>
-        </message>
-        <message>
-            <source>MEN_PLOT3D_FROM_CUTPLANE</source>
-            <translation>Plot3d</translation>
-        </message>
-        <message>
-            <source>MEN_PLOT_3D</source>
-            <translation>Plot3D</translation>
-        </message>
-        <message>
-            <source>MEN_POINTS</source>
-            <translation>Points</translation>
-        </message>
-        <message>
-            <source>MEN_PROPERTIES</source>
-            <translation>Properties</translation>
-        </message>
-        <message>
-            <source>MEN_RENAME</source>
-            <translation>Rename...</translation>
-        </message>
-        <message>
-            <source>MEN_RENAME_CONTAINER</source>
-            <translation>Rename...</translation>
-        </message>
-        <message>
-            <source>MEN_RENAME_TABLE</source>
-            <translation>Rename...</translation>
-        </message>
-        <message>
-            <source>MEN_REPRESENTATION</source>
-            <translation>Representation</translation>
-        </message>
-        <message>
-            <source>MEN_RESTORE_VIEWPARAMS</source>
-            <translation>Restore view parameters</translation>
-        </message>
-        <message>
-            <source>MEN_SAVE_VIEWPARAMS</source>
-            <translation>Save view parameters</translation>
-        </message>
-        <message>
-            <source>MEN_SCALAR_MAP</source>
-            <translation>Scalar Map</translation>
-        </message>
-        <message>
-            <source>MEN_DEFORMED_SHAPE_AND_SCALAR_MAP</source>
-            <translation>Deformed Shape and Scalar Map</translation>
-        </message>
-        <message>
-            <source>MEN_SCALING</source>
-            <translation>Scaling</translation>
-        </message>
-        <message>
-            <source>MEN_SELECTION</source>
-            <translation>Selection</translation>
-        </message>
-        <message>
-            <source>MEN_SELECTION_INFO</source>
-            <translation>Selection Info...</translation>
-        </message>
-        <message>
-            <source>MEN_SHADING</source>
-            <translation>Shading On</translation>
-        </message>
-        <message>
-            <source>MEN_SHOW_ANIMATION</source>
-            <translation>Show...</translation>
-        </message>
-        <message>
-            <source>MEN_SHOW_TABLE</source>
-            <translation>Show Table</translation>
-        </message>
-        <message>
-            <source>MEN_SHRINK</source>
-            <translation>Shrink</translation>
-        </message>
-        <message>
-            <source>MEN_STREAM_LINES</source>
-            <translation>Stream Lines</translation>
-        </message>
-        <message>
-            <source>MEN_SUCCCESSIVE_ANIMATION</source>
-            <translation>Successive Animation...</translation>
-        </message>
-        <message>
-            <source>MEN_SURFACE</source>
-            <translation>Surface</translation>
-        </message>
-        <message>
-            <source>MEN_SURFACEFRAME</source>
-            <translation>Surfaceframe</translation>
-        </message>
-        <message>
-            <source>MEN_SWEEP</source>
-            <translation>Sweep</translation>
-        </message>
-        <message>
-            <source>MEN_TRANSLATE_PRS</source>
-            <translation>Translate Presentation</translation>
-        </message>
-        <message>
-            <source>MEN_UNSHRINK</source>
-            <translation>Unshrink</translation>
-        </message>
-        <message>
-            <source>MEN_VECTORS</source>
-            <translation>Vectors</translation>
-        </message>
-        <message>
-            <source>MEN_VISUALIZATION</source>
-            <translation>Visualization</translation>
-        </message>
-        <message>
-            <source>MEN_WIREFRAME</source>
-            <translation>Wireframe</translation>
-        </message>
-        <message>
-            <source>TOOL_IMPORT</source>
-            <translation>Import Toolbar</translation>
-        </message>
-        <message>
-            <source>TOOL_REPRESENTATION</source>
-            <translation>Representation Toolbar</translation>
-        </message>
-        <message>
-            <source>TOOL_VISUALISATION</source>
-            <translation>Visualization Toolbar</translation>
-        </message>
-        <message>
-            <source>USE_BUILD_PROGRESS</source>
-            <translation>Use build progress</translation>
-        </message>
-        <message>
-            <source>MEN_LOAD_COMPONENT_DATA</source>
-            <translation>Load Component Data</translation>
-        </message>
-        <message>
-            <source>FLT_DISTRIBUTED_MED_FILES</source>
-            <translation>Distributed MED Files (*_maitre.med)</translation>
-        </message>
-        <message>
-            <source>SHOW_LEVEL_LABELS</source>
-            <translation>Show level labels</translation>
-        </message>
-        <message>
-            <source>MEN_FILE_INFO</source>
-            <translation>MED File information</translation>
-        </message>
-        <message>
-            <source>ERR_ERROR_IN_THE_FILE</source>
-            <translation>Error in the file</translation>
-        </message>
-        <message>
-            <source>ERR_FILE_NOT_EXISTS</source>
-            <translation>File does not exist</translation>
-        </message>
-        <message>
-            <source>IMPORT_ERRORS</source>
-            <translation>Import operation has finished with errors:</translation>
-        </message>
-        <message>
-            <source>TLT_IMPORT_TABLE</source>
-            <translation>Import table</translation>
-        </message>
-        <message>
-            <source>UNKNOWN_IMPORT_ERROR</source>
-            <translation>Unknown error</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_AxisWg</name>
-        <message>
-            <source>AXIS_NAME</source>
-            <translation>Axis name</translation>
-        </message>
-        <message>
-            <source>FONT</source>
-            <translation>Font</translation>
-        </message>
-        <message>
-            <source>IS_VISIBLE</source>
-            <translation>Is visible</translation>
-        </message>
-        <message>
-            <source>LABELS</source>
-            <translation>Labels</translation>
-        </message>
-        <message>
-            <source>LENGTH</source>
-            <translation>Length</translation>
-        </message>
-        <message>
-            <source>NAME</source>
-            <translation>Name</translation>
-        </message>
-        <message>
-            <source>NUMBER</source>
-            <translation>Number</translation>
-        </message>
-        <message>
-            <source>OFFSET</source>
-            <translation>Offset</translation>
-        </message>
-        <message>
-            <source>TICK_MARKS</source>
-            <translation>Tick marks</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_BuildProgressDlg</name>
-        <message>
-            <source>BUILD_ALL</source>
-            <translation>Build all</translation>
-        </message>
-        <message>
-            <source>BUILD_AT_ONCE</source>
-            <translation>Build at once</translation>
-        </message>
-        <message>
-            <source>BUILD_ENTITIES</source>
-            <translation>Build entities</translation>
-        </message>
-        <message>
-            <source>BUILD_FIELDS</source>
-            <translation>Build fields</translation>
-        </message>
-        <message>
-            <source>BUILD_GROUPS</source>
-            <translation>Build groups</translation>
-        </message>
-        <message>
-            <source>BUILD_MINMAX</source>
-            <translation>Build min/max</translation>
-        </message>
-        <message>
-            <source>CLOSE</source>
-            <translation>Close</translation>
-        </message>
-        <message>
-            <source>CLOSE_AT_FINISH</source>
-            <translation>Close dialog at finish</translation>
-        </message>
-        <message>
-            <source>DLG_BUILD_PROGRESS_TITLE</source>
-            <translation>Build progress</translation>
-        </message>
-        <message>
-            <source>ERR_ERROR_IN_THE_FILE</source>
-            <translation>Error in the file</translation>
-        </message>
-        <message>
-            <source>FILE_NAME</source>
-            <translation>Import file : </translation>
-        </message>
-        <message>
-            <source>FLT_ALL_FILES</source>
-            <translation>All Files (*.*)</translation>
-        </message>
-        <message>
-            <source>FLT_MED_FILES</source>
-            <translation>MED Files (*.med)</translation>
-        </message>
-        <message>
-            <source>HELP</source>
-            <translation>Help</translation>
-        </message>
-        <message>
-            <source>IMPORT_FROM_FILE</source>
-            <translation>Import from File</translation>
-        </message>
-        <message>
-            <source>IMPORT_PROGRESS</source>
-            <translation>Import progress</translation>
-        </message>
-        <message>
-            <source>IMPORT_SETTINGS</source>
-            <translation>Settings</translation>
-        </message>
-        <message>
-            <source>IMPORT_TIME</source>
-            <translation>Time</translation>
-        </message>
-        <message>
-            <source>START</source>
-            <translation>Start</translation>
-        </message>
-        <message>
-            <source>TIME</source>
-            <translation>Elapsed time : </translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_CacheDlg</name>
-        <message>
-            <source>CACHE_TITLE</source>
-            <translation>Cache properties</translation>
-        </message>
-        <message>
-            <source>FREE</source>
-            <translation>Free</translation>
-        </message>
-        <message>
-            <source>LIMITED_MEMORY</source>
-            <translation>Limited memory</translation>
-        </message>
-        <message>
-            <source>MEMORY STATE</source>
-            <translation>Memory state</translation>
-        </message>
-        <message>
-            <source>MEMORY_MODE</source>
-            <translation>Memory mode</translation>
-        </message>
-        <message>
-            <source>MINIMAL_MEMORY</source>
-            <translation>Minimal memory</translation>
-        </message>
-        <message>
-            <source>USED_BY_CACHE</source>
-            <translation>Used by cache</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_ClippingDlg</name>
-        <message>
-            <source>AUTO_APPLY_CHK</source>
-            <translation>Auto Apply</translation>
-        </message>
-        <message>
-            <source>BUT_DELETE</source>
-            <translation>Delete</translation>
-        </message>
-        <message>
-            <source>BUT_NEW</source>
-            <translation>New</translation>
-        </message>
-        <message>
-            <source>GRP_IJK_AXIS</source>
-            <translation>Axis</translation>
-        </message>
-        <message>
-            <source>GRP_PARAMETERS</source>
-            <translation>Parameters</translation>
-        </message>
-        <message>
-            <source>GRP_PLANES</source>
-            <translation>Clipping planes</translation>
-        </message>
-        <message>
-            <source>I_RADIO_BTN</source>
-            <translation>I</translation>
-        </message>
-        <message>
-            <source>J_RADIO_BTN</source>
-            <translation>J</translation>
-        </message>
-        <message>
-            <source>K_RADIO_BTN</source>
-            <translation>K</translation>
-        </message>
-        <message>
-            <source>LBL_DISTANCE</source>
-            <translation>Distance</translation>
-        </message>
-        <message>
-            <source>LBL_IJK_INDEX</source>
-            <translation>Index (from 0 to ...)</translation>
-        </message>
-        <message>
-            <source>LBL_IJK_INDEX_TO_arg</source>
-            <translation>Index (from 0 to %1) </translation>
-        </message>
-        <message>
-            <source>LBL_ORIENTATION</source>
-            <translation>Orientation</translation>
-        </message>
-        <message>
-            <source>LBL_ROTATION_XY</source>
-            <translation>Rotation around Z (X to Y):</translation>
-        </message>
-        <message>
-            <source>LBL_ROTATION_XZ</source>
-            <translation>Rotation around Y (X to Z):</translation>
-        </message>
-        <message>
-            <source>LBL_ROTATION_YX</source>
-            <translation>Rotation around Z (Y to X):</translation>
-        </message>
-        <message>
-            <source>LBL_ROTATION_YZ</source>
-            <translation>Rotation around X (Y to Z):</translation>
-        </message>
-        <message>
-            <source>LBL_ROTATION_ZX</source>
-            <translation>Rotation around Y (Z to X):</translation>
-        </message>
-        <message>
-            <source>LBL_ROTATION_ZY</source>
-            <translation>Rotation around X (Z to Y):</translation>
-        </message>
-        <message>
-            <source>PARALLEL_XOY_COMBO_ITEM</source>
-            <translation>|| X-Y</translation>
-        </message>
-        <message>
-            <source>PARALLEL_YOZ_COMBO_ITEM</source>
-            <translation>|| Y-Z</translation>
-        </message>
-        <message>
-            <source>PARALLEL_ZOX_COMBO_ITEM</source>
-            <translation>|| Z-X</translation>
-        </message>
-        <message>
-            <source>PLANES_COMBO_ITEM_i</source>
-            <translation>Plane# %1</translation>
-        </message>
-        <message>
-            <source>PLANES_COMBO_ITEM_no</source>
-            <translation>No planes</translation>
-        </message>
-        <message>
-            <source>REVERSE_NORMAL_CHK</source>
-            <translation>Reverse normal</translation>
-        </message>
-        <message>
-            <source>SHOW_PREVIEW_CHK</source>
-            <translation>Show preview</translation>
-        </message>
-        <message>
-            <source>TAB_IJK_STRUCTURED</source>
-            <translation>IJK (Structured)</translation>
-        </message>
-        <message>
-            <source>TAB_NON_STRUCTURED</source>
-            <translation>Non structured</translation>
-        </message>
-        <message>
-            <source>TITLE</source>
-            <translation>Change Clipping</translation>
-        </message>
-        <message>
-            <source>WRN_EMPTY_RESULTING_PRS</source>
-            <translation>Impossible to use given clipping planes because of VTK restrictions.
-Please, provide non-empty resulting presentation.</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_CubeAxesDlg</name>
-        <message>
-            <source>CAPTION</source>
-            <translation>Graduated axes</translation>
-        </message>
-        <message>
-            <source>IS_VISIBLE</source>
-            <translation>Is visible</translation>
-        </message>
-        <message>
-            <source>X_AXIS</source>
-            <translation>X axis</translation>
-        </message>
-        <message>
-            <source>Y_AXIS</source>
-            <translation>Y axis</translation>
-        </message>
-        <message>
-            <source>Z_AXIS</source>
-            <translation>Z axis</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_CursorDlg</name>
-        <message>
-            <source>&amp;Cancel</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>&amp;OK</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>TextLabel1</source>
-            <translation>Set value between</translation>
-        </message>
-        <message>
-            <source>TextLabel2</source>
-            <translation>minimal and maximal</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_CutLinesDlg</name>
-        <message>
-            <source>BASE_PLANE_POS</source>
-            <translation>Base plane position</translation>
-        </message>
-        <message>
-            <source>LBL_ABSOLUTE_LENGTH</source>
-            <translation>Use absolute length</translation>
-        </message>
-        <message>
-            <source>LBL_GENERATE_CURVES</source>
-            <translation>Generate Curves</translation>
-        </message>
-        <message>
-            <source>LBL_GENERATE_TABLE</source>
-            <translation>Generate Data Table</translation>
-        </message>
-        <message>
-            <source>LBL_INVERT_CURVES</source>
-            <translation>Invert all curves</translation>
-        </message>
-        <message>
-            <source>LBL_LINES_CUT</source>
-            <translation>Cut planes</translation>
-        </message>
-        <message>
-            <source>LBL_LINES_PLANE</source>
-            <translation>Plane of lines</translation>
-        </message>
-        <message>
-            <source>LBL_NB_PLANS</source>
-            <translation>Number of planes:</translation>
-        </message>
-        <message>
-            <source>LBL_POS</source>
-            <translation>Displacement (0...1):</translation>
-        </message>
-        <message>
-            <source>LBL_ROTATION</source>
-            <translation>Rotations</translation>
-        </message>
-        <message>
-            <source>LBL_ROT_X</source>
-            <translation>Rotation around X (Y to Z):</translation>
-        </message>
-        <message>
-            <source>LBL_ROT_Y</source>
-            <translation>Rotation around Y (Z to X):</translation>
-        </message>
-        <message>
-            <source>LBL_ROT_Z</source>
-            <translation>Rotation around Z (X to Y):</translation>
-        </message>
-        <message>
-            <source>LBL_SHOW_PREVIEW</source>
-            <translation>Show preview</translation>
-        </message>
-        <message>
-            <source>PARALLEL_XOY</source>
-            <translation>|| X-Y</translation>
-        </message>
-        <message>
-            <source>PARALLEL_YOZ</source>
-            <translation>|| Y-Z</translation>
-        </message>
-        <message>
-            <source>PARALLEL_ZOX</source>
-            <translation>|| Z-X</translation>
-        </message>
-        <message>
-            <source>SET_DEFAULT</source>
-            <translation>Set default</translation>
-        </message>
-        <message>
-            <source>TXT_ORIENTATION</source>
-            <translation>Orientation</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_CutPlanesDlg</name>
-        <message>
-            <source>&amp;Cancel</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>&amp;OK</source>
-            <translation></translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_CutPlanesPane</name>
-        <message>
-            <source>LBL_NB_PLANS</source>
-            <translation>Number of planes:</translation>
-        </message>
-        <message>
-            <source>LBL_POS</source>
-            <translation>Displacement (0...1):</translation>
-        </message>
-        <message>
-            <source>LBL_ROTATION</source>
-            <translation>Rotations</translation>
-        </message>
-        <message>
-            <source>LBL_ROT_X</source>
-            <translation>Rotation around X (Y to Z):</translation>
-        </message>
-        <message>
-            <source>LBL_ROT_Y</source>
-            <translation>Rotation around Y (Z to X):</translation>
-        </message>
-        <message>
-            <source>LBL_ROT_Z</source>
-            <translation>Rotation around Z (X to Y):</translation>
-        </message>
-        <message>
-            <source>LBL_SHOW_PREVIEW</source>
-            <translation>Show preview</translation>
-        </message>
-        <message>
-            <source>PARALLEL_XOY</source>
-            <translation>// X-Y</translation>
-        </message>
-        <message>
-            <source>PARALLEL_YOZ</source>
-            <translation>// Y-Z</translation>
-        </message>
-        <message>
-            <source>PARALLEL_ZOX</source>
-            <translation>// Z-X</translation>
-        </message>
-        <message>
-            <source>TXT_ORIENTATION</source>
-            <translation>Orientation</translation>
-        </message>
-        <message>
-            <source>LBL_DEFORMATION</source>
-            <translation>Deformation</translation>
-        </message>
-        <message>
-            <source>LBL_DEFROMATION_SCALE</source>
-            <translation>Scale Factor :</translation>
-        </message>
-        <message>
-            <source>LBL_DEFROMATION_VECT</source>
-            <translation>Vectors :</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_DeformedShapeDlg</name>
-        <message>
-            <source>&amp;Cancel</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>&amp;OK</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>DEFORMED_SHAPE_TAB</source>
-            <translation>Deformed Shape</translation>
-        </message>
-        <message>
-            <source>DLG_TITLE</source>
-            <translation>Deformed Shape</translation>
-        </message>
-        <message>
-            <source>INPUT_TAB</source>
-            <translation>Input</translation>
-        </message>
-        <message>
-            <source>MAGNITUDE_COLORING</source>
-            <translation>Magnitude coloring</translation>
-        </message>
-        <message>
-            <source>SCALAR_BAR_TAB</source>
-            <translation>Scalar Bar</translation>
-        </message>
-        <message>
-            <source>SCALE_FACTOR</source>
-            <translation>Scale Factor:</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_EditContainerDlg</name>
-        <message>
-            <source>&amp;Cancel</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>&amp;OK</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>LBL_CONTAINER</source>
-            <translation>Container</translation>
-        </message>
-        <message>
-            <source>LBL_STUDY</source>
-            <translation>Study</translation>
-        </message>
-        <message>
-            <source>TXT_CURVE</source>
-            <translation>Curve</translation>
-        </message>
-        <message>
-            <source>TXT_TABLE</source>
-            <translation>Table</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_FileDlg</name>
-        <message>
-            <source>FULL_LOAD</source>
-            <translation>Full loading for current file</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_FontWg</name>
-        <message>
-            <source>ARIAL</source>
-            <translation>Arial</translation>
-        </message>
-        <message>
-            <source>BOLD</source>
-            <translation>Bold</translation>
-        </message>
-        <message>
-            <source>COURIER</source>
-            <translation>Courier</translation>
-        </message>
-        <message>
-            <source>ITALIC</source>
-            <translation>Italic</translation>
-        </message>
-        <message>
-            <source>SHADOW</source>
-            <translation>Shadow</translation>
-        </message>
-        <message>
-            <source>TIMES</source>
-            <translation>Times</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_GaussPointsDlg</name>
-        <message>
-            <source>&amp;Cancel</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>&amp;OK</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>DEFORMED_SHAPE</source>
-            <translation>Deformed Shape</translation>
-        </message>
-        <message>
-            <source>DEFORMED_SHAPE_TITLE</source>
-            <translation>Deformed Shape</translation>
-        </message>
-        <message>
-            <source>DLG_PREF_TITLE</source>
-            <translation>Gauss Points Preferences</translation>
-        </message>
-        <message>
-            <source>DLG_PROP_TITLE</source>
-            <translation>Gauss Points Properties</translation>
-        </message>
-        <message>
-            <source>DLG_TITLE</source>
-            <translation>Gauss Points</translation>
-        </message>
-        <message>
-            <source>GAUSS_POINTS_TAB</source>
-            <translation>Gauss Points</translation>
-        </message>
-        <message>
-            <source>GEOMETRY</source>
-            <translation>Geometry</translation>
-        </message>
-        <message>
-            <source>INPUT_TAB</source>
-            <translation>Input</translation>
-        </message>
-        <message>
-            <source>PRS_TITLE</source>
-            <translation>Presentation</translation>
-        </message>
-        <message>
-            <source>RESULTS</source>
-            <translation>Results</translation>
-        </message>
-        <message>
-            <source>SCALAR_BAR_TAB</source>
-            <translation>Scalar Bar</translation>
-        </message>
-        <message>
-            <source>SCALE_FACTOR</source>
-            <translation>Scale Factor :</translation>
-        </message>
-        <message>
-            <source>WARNING</source>
-            <translation>Warning</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_GaussScalarBarPane</name>
-        <message>
-            <source>ACTIVE_BAR_GRP</source>
-            <translation>Active bar</translation>
-        </message>
-        <message>
-            <source>BICOLOR</source>
-            <translation>Bicolor</translation>
-        </message>
-        <message>
-            <source>COLORS_LABELS_GRP</source>
-            <translation>Colors and labels</translation>
-        </message>
-        <message>
-            <source>DIMENSIONS_GRP</source>
-            <translation>Dimensions</translation>
-        </message>
-        <message>
-            <source>DISPLAYED</source>
-            <translation>Displayed</translation>
-        </message>
-        <message>
-            <source>FIELD_RANGE_BTN</source>
-            <translation>Use field range</translation>
-        </message>
-        <message>
-            <source>GLOBAL</source>
-            <translation>Global</translation>
-        </message>
-        <message>
-            <source>HORIZONTAL_BTN</source>
-            <translation>Horizontal</translation>
-        </message>
-        <message>
-            <source>IMPOSED_RANGE_BTN</source>
-            <translation>Use imposed range</translation>
-        </message>
-        <message>
-            <source>LBL_HEIGHT</source>
-            <translation>Height:</translation>
-        </message>
-        <message>
-            <source>LBL_MAX</source>
-            <translation>Max:</translation>
-        </message>
-        <message>
-            <source>LBL_MIN</source>
-            <translation>Min:</translation>
-        </message>
-        <message>
-            <source>LBL_NB_COLORS</source>
-            <translation>Nb. of colors:</translation>
-        </message>
-        <message>
-            <source>LBL_NB_LABELS</source>
-            <translation>Nb. of labels:</translation>
-        </message>
-        <message>
-            <source>LBL_SPACING</source>
-            <translation>Spacing:</translation>
-        </message>
-        <message>
-            <source>LBL_WIDTH</source>
-            <translation>Width:</translation>
-        </message>
-        <message>
-            <source>LBL_X</source>
-            <translation>X:</translation>
-        </message>
-        <message>
-            <source>LBL_Y</source>
-            <translation>Y:</translation>
-        </message>
-        <message>
-            <source>LOCAL</source>
-            <translation>Local</translation>
-        </message>
-        <message>
-            <source>LOGARITHMIC_SCALING</source>
-            <translation>Logarithmic scaling</translation>
-        </message>
-        <message>
-            <source>ORIENTATION_GRP</source>
-            <translation>Orientation</translation>
-        </message>
-        <message>
-            <source>ORIGIN_GRP</source>
-            <translation>Origin</translation>
-        </message>
-        <message>
-            <source>RAINBOW</source>
-            <translation>Rainbow</translation>
-        </message>
-        <message>
-            <source>SAVE_DEFAULT_CHK</source>
-            <translation>Save as default values</translation>
-        </message>
-        <message>
-            <source>SCALAR_RANGE_GRP</source>
-            <translation>Scalar range</translation>
-        </message>
-        <message>
-            <source>VERTICAL_BTN</source>
-            <translation>Vertical</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_InputPane</name>
-        <message>
-            <source>ENTITY</source>
-            <translation>Entity :</translation>
-        </message>
-        <message>
-            <source>FIELD</source>
-            <translation>Field :</translation>
-        </message>
-        <message>
-            <source>MED_FILE</source>
-            <translation>Source File :</translation>
-        </message>
-        <message>
-            <source>MESH</source>
-            <translation>Mesh :</translation>
-        </message>
-        <message>
-            <source>PRS_DATA_SOUIRCE</source>
-            <translation>Data Source</translation>
-        </message>
-        <message>
-            <source>REINITIALIZE</source>
-            <translation>Auto Update</translation>
-        </message>
-        <message>
-            <source>TIME_STAMP</source>
-            <translation>Time Stamp :</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_IsoSurfPane</name>
-        <message>
-            <source>MAX_VALUE</source>
-            <translation>Maximum value:</translation>
-        </message>
-        <message>
-            <source>MIN_VALUE</source>
-            <translation>Minimum value:</translation>
-        </message>
-        <message>
-            <source>MSG_MINMAX_VALUES</source>
-            <translation>Min value can not be higher or equal to Max value</translation>
-        </message>
-        <message>
-            <source>NB_SURFACES</source>
-            <translation>Number of surfaces:</translation>
-        </message>
-        <message>
-            <source>MAGNITUDE_COLORING_CHK</source>
-            <translation>Magnitude coloring</translation>
-        </message>
-        <message>
-            <source>SEL_COLOR_BTN</source>
-            <translation>Select Color</translation>
-        </message>
-        <message>
-            <source>SHOW_VALUES_CHK</source>
-            <translation>Show values (nb per surface)</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_IsoSurfacesDlg</name>
-        <message>
-            <source>&amp;Cancel</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>&amp;OK</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>DEFINE_ISOSURFACES</source>
-            <translation>Iso Surfaces Definition</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_ItemContainer</name>
-        <message>
-            <source>AUTO_CHECK_LBL</source>
-            <translation>Auto assign</translation>
-        </message>
-        <message>
-            <source>CIRCLE_MARKER_LBL</source>
-            <translation>Circle</translation>
-        </message>
-        <message>
-            <source>CROSS_MARKER_LBL</source>
-            <translation>Cross</translation>
-        </message>
-        <message>
-            <source>DAHSDOTDOT_LINE_LBL</source>
-            <translation>DashDotDot</translation>
-        </message>
-        <message>
-            <source>DASHDOT_LINE_LBL</source>
-            <translation>DashDot</translation>
-        </message>
-        <message>
-            <source>DASH_LINE_LBL</source>
-            <translation>Dash</translation>
-        </message>
-        <message>
-            <source>DIAMOND_MARKER_LBL</source>
-            <translation>Diamond</translation>
-        </message>
-        <message>
-            <source>DOT_LINE_LBL</source>
-            <translation>Dot</translation>
-        </message>
-        <message>
-            <source>DTRIANGLE_MARKER_LBL</source>
-            <translation>Downward triangle</translation>
-        </message>
-        <message>
-            <source>H</source>
-            <translation> H </translation>
-        </message>
-        <message>
-            <source>LTRIANGLE_MARKER_LBL</source>
-            <translation>Leftward triangle</translation>
-        </message>
-        <message>
-            <source>NONE_LINE_LBL</source>
-            <translation>None</translation>
-        </message>
-        <message>
-            <source>NONE_MARKER_LBL</source>
-            <translation>None</translation>
-        </message>
-        <message>
-            <source>RECTANGLE_MARKER_LBL</source>
-            <translation>Rectangle</translation>
-        </message>
-        <message>
-            <source>RTRIANGLE_MARKER_LBL</source>
-            <translation>Rightward triangle</translation>
-        </message>
-        <message>
-            <source>SOLID_LINE_LBL</source>
-            <translation>Solid</translation>
-        </message>
-        <message>
-            <source>UTRIANGLE_MARKER_LBL</source>
-            <translation>Upward triangle</translation>
-        </message>
-        <message>
-            <source>V</source>
-            <translation> V </translation>
-        </message>
-        <message>
-            <source>XCROSS_MARKER_LBL</source>
-            <translation>Diagonal cross</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_Module</name>
-        <message>
-            <source>MEN_DESK_FILE_SAVE_GUI_STATE</source>
-            <translation>Save VISU state</translation>
-        </message>
-        <message>
-            <source>MEN_GAUSS</source>
-            <translation>Gauss</translation>
-        </message>
-        <message>
-            <source>MEN_GAUSS_CREATE_PRS</source>
-            <translation>Gauss Points</translation>
-        </message>
-        <message>
-            <source>MEN_GAUSS_NEW_VIEWER</source>
-            <translation>Points view</translation>
-        </message>
-        <message>
-            <source>MEN_OVERWRITE_CONFIGURATION</source>
-            <translation>Overwrite current configuration</translation>
-        </message>
-        <message>
-            <source>MEN_RESTORE_CONFIGURATION</source>
-            <translation>Restore current configuration</translation>
-        </message>
-        <message>
-            <source>MEN_SAVE_CONFIGURATION</source>
-            <translation>Store current configuration</translation>
-        </message>
-        <message>
-            <source>MEN_VISUALISATION</source>
-            <translation>Visualization</translation>
-        </message>
-        <message>
-            <source>PRP_DESK_FILE_SAVE_GUI_STATE</source>
-            <translation>Saves current state of viewers, displayed objects, etc.</translation>
-        </message>
-        <message>
-            <source>TOOL_IMPORT</source>
-            <translation>Import Toolbar</translation>
-        </message>
-        <message>
-            <source>TOOL_VISUALISATION</source>
-            <translation>Visualization Toolbar</translation>
-        </message>
-        <message>
-            <source>TOT_DESK_FILE_SAVE_GUI_STATE</source>
-            <translation>Save VISU state</translation>
-        </message>
-        <message>
-            <source>VISU_CAMERA_MOVE_PREF</source>
-            <translation>Number of steps between two positions</translation>
-        </message>
-        <message>
-            <source>VISU_CAMERA_PREF_GROUP_TTL</source>
-            <translation>Camera movements</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_INSIDE_CURSOR_PREF_TAB_TTL</source>
-            <translation>Inside Cursor</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_OUTSIDE_CURSOR_PREF_TAB_TTL</source>
-            <translation>Outside Cursor</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_ACTIVE_BAR</source>
-            <translation>Active bar</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_ALPHA_TEXTURE</source>
-            <translation>Alpha Channel Texture (16x16)</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_ALPHA_THRESHOLD</source>
-            <translation>Alpha Channel Threshold</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_BICOLOR</source>
-            <translation>Bicolor</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_CLAMP</source>
-            <translation>Maximum Size (Clamp)</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_COLOR</source>
-            <translation>Color</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_COLOR_GROUP_TTL</source>
-            <translation>Color</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_DEFORMED_SHAPE_GROUP_TTL</source>
-            <translation>Deformed Shape</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_DISPLAY_GLOBAL</source>
-            <translation>Display global bar</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_FACE_LIMIT</source>
-            <translation>Notify when number of faces exceeds</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_GEOMSPHERE</source>
-            <translation>Geometrical sphere</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_GEOM_GROUP_TTL</source>
-            <translation>Geometry</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_GLOBAL</source>
-            <translation>Global</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_INCREMENT</source>
-            <translation>+/- Ratio</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_LOCAL</source>
-            <translation>Local</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_MAGNIFICATION</source>
-            <translation>Magnification (%)</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_MAGNIFICATION_GROUP_TTL</source>
-            <translation>Magnification (Inside and Outside)</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_MAIN_TEXTURE</source>
-            <translation>Main Texture (16x16)</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_MAX_SIZE</source>
-            <translation>Range value for max size (%)</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_MIN_SIZE</source>
-            <translation>Range value for min size (%)</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_OPENGLPOINT</source>
-            <translation>OpenGL point</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_POINTSPRITE</source>
-            <translation>Point sprite</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_PRIMITIVE_GROUP_TTL</source>
-            <translation>Primitive</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_PRIMITIVE_TYPE</source>
-            <translation>Primitive Type</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_RAINBOW</source>
-            <translation>Rainbow</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_RESOLUTION</source>
-            <translation>Geometrical sphere resolution</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_SCALAR_BAR_MODE</source>
-            <translation>Scalar bar mode</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_SCALE_FACTOR</source>
-            <translation>Scale factor</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_SIZE</source>
-            <translation>Size of points (%)</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_SIZE_GROUP_TTL</source>
-            <translation>Size</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_SPACING</source>
-            <translation>Spacing</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_TAB_TTL</source>
-            <translation>Gauss Points</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_PREF_UNIFORM_COLOR</source>
-            <translation>Uniform Color</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_SCALAR_BAR_PREF_GROUP_TTL</source>
-            <translation>Gauss Points Scalar Bar</translation>
-        </message>
-        <message>
-            <source>VISU_GAUSS_SCALAR_BAR_PREF_TAB_TTL</source>
-            <translation>Gauss Points Scalar Bar</translation>
-        </message>
-        <message>
-            <source>VISU_KEYBOARD_PREF</source>
-            <translation>[+]/[-] Speed increment</translation>
-        </message>
-        <message>
-            <source>VISU_KEYBOARD_PREF_GROUP_TTL</source>
-            <translation>Keyboard</translation>
-        </message>
-        <message>
-            <source>VISU_MOUSE_PREF</source>
-            <translation>Mouse behaviour</translation>
-        </message>
-        <message>
-            <source>VISU_MOUSE_PREF_GROUP_TLT</source>
-            <translation>Mouse</translation>
-        </message>
-        <message>
-            <source>VISU_MOUSE_PREF_KEYBOARD_FREE</source>
-            <translation>Keyboard free</translation>
-        </message>
-        <message>
-            <source>VISU_MOUSE_PREF_STANDARD</source>
-            <translation>Salome standard controls</translation>
-        </message>
-        <message>
-            <source>VISU_MOUSE_PREF_TAB_TLT</source>
-            <translation>Navigation</translation>
-        </message>
-        <message>
-            <source>VISU_PICKING_PREF_BELOW_POINT</source>
-            <translation>Centered below the point</translation>
-        </message>
-        <message>
-            <source>VISU_PICKING_PREF_CAMERA_GROUP_TTL</source>
-            <translation>Movement of the camera</translation>
-        </message>
-        <message>
-            <source>VISU_PICKING_PREF_CURSOR_GROUP_TTL</source>
-            <translation>Cursor</translation>
-        </message>
-        <message>
-            <source>VISU_PICKING_PREF_CURSOR_SIZE</source>
-            <translation>Size of the cursor</translation>
-        </message>
-        <message>
-            <source>VISU_PICKING_PREF_DISPLAY_PARENT_MESH</source>
-            <translation>Display parent mesh element</translation>
-        </message>
-        <message>
-            <source>VISU_PICKING_PREF_INFO_WINDOW_GROUP_TTL</source>
-            <translation>Information window</translation>
-        </message>
-        <message>
-            <source>VISU_PICKING_PREF_PARENT_MESH_TTL</source>
-            <translation>Parent mesh element</translation>
-        </message>
-        <message>
-            <source>VISU_PICKING_PREF_POINT_SELECTION_TOLERANCE</source>
-            <translation>Point selection tolerance</translation>
-        </message>
-        <message>
-            <source>VISU_PICKING_PREF_POSITION</source>
-            <translation>Position</translation>
-        </message>
-        <message>
-            <source>VISU_PICKING_PREF_PYRAMID_HEIGHT</source>
-            <translation>Height of the pyramids</translation>
-        </message>
-        <message>
-            <source>VISU_PICKING_PREF_SELECTION_COLOR</source>
-            <translation>Selection cursor color</translation>
-        </message>
-        <message>
-            <source>VISU_PICKING_PREF_STEP_NUMBER</source>
-            <translation>Number of steps between two positions</translation>
-        </message>
-        <message>
-            <source>VISU_PICKING_PREF_TAB_TTL</source>
-            <translation>Picking</translation>
-        </message>
-        <message>
-            <source>VISU_PICKING_PREF_TOLERANCE_GROUP_TTL</source>
-            <translation>Tolerance</translation>
-        </message>
-        <message>
-            <source>VISU_PICKING_PREF_TOP_LEFT_CORNER</source>
-            <translation>Top-left corner of the 3D view</translation>
-        </message>
-        <message>
-            <source>VISU_PICKING_PREF_TRANSPARENCY</source>
-            <translation>Transparency</translation>
-        </message>
-        <message>
-            <source>VISU_PICKING_PREF_ZOOM_FACTOR</source>
-            <translation>Zoom at first selected point (ratio)</translation>
-        </message>
-        <message>
-            <source>VISU_RECORDER_PREF_ALL_DISLPAYED_FRAMES</source>
-            <translation>Recording all displayed frames</translation>
-        </message>
-        <message>
-            <source>VISU_RECORDER_PREF_FPS</source>
-            <translation>FPS</translation>
-        </message>
-        <message>
-            <source>VISU_RECORDER_PREF_GROUP_TTL</source>
-            <translation>Settings</translation>
-        </message>
-        <message>
-            <source>VISU_RECORDER_PREF_PROGRESSIVE</source>
-            <translation>Progressive</translation>
-        </message>
-        <message>
-            <source>VISU_RECORDER_PREF_QUALITY</source>
-            <translation>Quality</translation>
-        </message>
-        <message>
-            <source>VISU_RECORDER_PREF_RECORDING_MODE</source>
-            <translation>Mode</translation>
-        </message>
-        <message>
-            <source>VISU_RECORDER_PREF_SKIPPED_FRAMES</source>
-            <translation>Recording at a given FPS</translation>
-        </message>
-        <message>
-            <source>VISU_RECORDER_PREF_TAB_TTL</source>
-            <translation>Recorder</translation>
-        </message>
-        <message>
-            <source>VISU_SPACEMOUSE_PREF</source>
-            <translation>Spacemouse</translation>
-        </message>
-        <message>
-            <source>VISU_SPACEMOUSE_PREF_1</source>
-            <translation>Decrease speed increment</translation>
-        </message>
-        <message>
-            <source>VISU_SPACEMOUSE_PREF_2</source>
-            <translation>Increase speed increment</translation>
-        </message>
-        <message>
-            <source>VISU_SPACEMOUSE_PREF_3</source>
-            <translation>Decrease Gauss points magnification</translation>
-        </message>
-        <message>
-            <source>VISU_SPACEMOUSE_PREF_4</source>
-            <translation>Increase Gauss points magnification</translation>
-        </message>
-        <message>
-            <source>VISU_SPACEMOUSE_PREF_5</source>
-            <translation>Dominant / combined switch</translation>
-        </message>
-        <message>
-            <source>VISU_SPACEMOUSE_PREF_BTN_*</source>
-            <translation>Button *</translation>
-        </message>
-        <message>
-            <source>VISU_SPACEMOUSE_PREF_BTN_1</source>
-            <translation>Button 1</translation>
-        </message>
-        <message>
-            <source>VISU_SPACEMOUSE_PREF_BTN_10</source>
-            <translation>Button 10</translation>
-        </message>
-        <message>
-            <source>VISU_SPACEMOUSE_PREF_BTN_11</source>
-            <translation>Button 11</translation>
-        </message>
-        <message>
-            <source>VISU_SPACEMOUSE_PREF_BTN_2</source>
-            <translation>Button 2</translation>
-        </message>
-        <message>
-            <source>VISU_SPACEMOUSE_PREF_BTN_3</source>
-            <translation>Button 3</translation>
-        </message>
-        <message>
-            <source>VISU_SPACEMOUSE_PREF_BTN_4</source>
-            <translation>Button 4</translation>
-        </message>
-        <message>
-            <source>VISU_SPACEMOUSE_PREF_BTN_5</source>
-            <translation>Button 5</translation>
-        </message>
-        <message>
-            <source>VISU_SPACEMOUSE_PREF_BTN_6</source>
-            <translation>Button 6</translation>
-        </message>
-        <message>
-            <source>VISU_SPACEMOUSE_PREF_BTN_7</source>
-            <translation>Button 7</translation>
-        </message>
-        <message>
-            <source>VISU_SPACEMOUSE_PREF_BTN_8</source>
-            <translation>Button 8</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_NameDlg</name>
-        <message>
-            <source>NAME_LBL</source>
-            <translation>Name: </translation>
-        </message>
-        <message>
-            <source>TLT_RENAME</source>
-            <translation>Rename</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_NonIsometricDlg</name>
-        <message>
-            <source>&amp;Apply</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>&amp;Cancel</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>&amp;Reset</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>DLG_TITLE</source>
-            <translation>Scaling</translation>
-        </message>
-        <message>
-            <source>LBL_X</source>
-            <translation>X :</translation>
-        </message>
-        <message>
-            <source>LBL_Y</source>
-            <translation>Y :</translation>
-        </message>
-        <message>
-            <source>LBL_Z</source>
-            <translation>Z :</translation>
-        </message>
-        <message>
-            <source>O&amp;K</source>
-            <translation></translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_Plot3DDlg</name>
-        <message>
-            <source>INPUT_TAB_TITLE</source>
-            <translation>Input</translation>
-        </message>
-        <message>
-            <source>PLOT3D_TAB_TITLE</source>
-            <translation>Plot 3D</translation>
-        </message>
-        <message>
-            <source>SCALAR_BAR_TAB_TITLE</source>
-            <translation>Scalar Bar</translation>
-        </message>
-        <message>
-            <source>TITLE</source>
-            <translation>Plot3D Definition</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_Plot3DPane</name>
-        <message>
-            <source>CONTOUR</source>
-            <translation>Contour</translation>
-        </message>
-        <message>
-            <source>NUMBER_CONTOURS</source>
-            <translation>Number of contours:</translation>
-        </message>
-        <message>
-            <source>ORIENTATION</source>
-            <translation>Orientation</translation>
-        </message>
-        <message>
-            <source>POSITION</source>
-            <translation>Position</translation>
-        </message>
-        <message>
-            <source>POSITION_VALUE</source>
-            <translation>Value: </translation>
-        </message>
-        <message>
-            <source>PRESENTATION_TYPE</source>
-            <translation>Presentation type</translation>
-        </message>
-        <message>
-            <source>PREVIEW</source>
-            <translation>Preview cutting plane</translation>
-        </message>
-        <message>
-            <source>RELATIVE</source>
-            <translation>Relative</translation>
-        </message>
-        <message>
-            <source>ROTATIONS</source>
-            <translation>Rotations</translation>
-        </message>
-        <message>
-            <source>ROTATION_X</source>
-            <translation>Rotation around X (Y to Z):</translation>
-        </message>
-        <message>
-            <source>ROTATION_Y</source>
-            <translation>Rotation around Y (Z to X):</translation>
-        </message>
-        <message>
-            <source>ROTATION_Z</source>
-            <translation>Rotation around Z (X to Y):</translation>
-        </message>
-        <message>
-            <source>SCALE</source>
-            <translation>Scale Factor:</translation>
-        </message>
-        <message>
-            <source>SURFACE</source>
-            <translation>Surface</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_ScalarBarDlg</name>
-        <message>
-            <source>&amp;Cancel</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>&amp;OK</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>DLG_PREF_TITLE</source>
-            <translation>Scalar Bar Preferences</translation>
-        </message>
-        <message>
-            <source>DLG_PROP_TITLE</source>
-            <translation>Scalar Bar Properties</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_ScalarBarPane</name>
-        <message>
-            <source>COLORS_LABELS_GRP</source>
-            <translation>Colors and labels</translation>
-        </message>
-        <message>
-            <source>DIMENSIONS_GRP</source>
-            <translation>Dimensions</translation>
-        </message>
-        <message>
-            <source>FIELD_RANGE_BTN</source>
-            <translation>Use field range</translation>
-        </message>
-        <message>
-            <source>HORIZONTAL_BTN</source>
-            <translation>Horizontal</translation>
-        </message>
-        <message>
-            <source>IMPOSED_RANGE_BTN</source>
-            <translation>Use imposed range</translation>
-        </message>
-        <message>
-            <source>LBL_HEIGHT</source>
-            <translation>Height:</translation>
-        </message>
-        <message>
-            <source>LBL_MAX</source>
-            <translation>Max:</translation>
-        </message>
-        <message>
-            <source>LBL_MIN</source>
-            <translation>Min:</translation>
-        </message>
-        <message>
-            <source>LBL_NB_COLORS</source>
-            <translation>Nb. of colors:</translation>
-        </message>
-        <message>
-            <source>LBL_NB_LABELS</source>
-            <translation>Nb. of labels:</translation>
-        </message>
-        <message>
-            <source>LBL_SHOW_PREVIEW</source>
-            <translation>Show preview</translation>
-        </message>
-        <message>
-            <source>LBL_WIDTH</source>
-            <translation>Width:</translation>
-        </message>
-        <message>
-            <source>LBL_X</source>
-            <translation>X:</translation>
-        </message>
-        <message>
-            <source>LBL_Y</source>
-            <translation>Y:</translation>
-        </message>
-        <message>
-            <source>LOGARITHMIC_SCALING</source>
-            <translation>Logarithmic scaling</translation>
-        </message>
-        <message>
-            <source>MSG_MINMAX_VALUES</source>
-            <translation>Min value can not be higher or equal to Max value</translation>
-        </message>
-        <message>
-            <source>ORIENTATION_GRP</source>
-            <translation>Orientation</translation>
-        </message>
-        <message>
-            <source>ORIGIN_GRP</source>
-            <translation>Origin</translation>
-        </message>
-        <message>
-            <source>SAVE_DEFAULT_CHK</source>
-            <translation>Save as default values</translation>
-        </message>
-        <message>
-            <source>SCALAR_RANGE_GRP</source>
-            <translation>Scalar range</translation>
-        </message>
-        <message>
-            <source>VERTICAL_BTN</source>
-            <translation>Vertical</translation>
-        </message>
-        <message>
-            <source>WRN_LOGARITHMIC_FIELD_RANGE</source>
-            <translation>Logarithmic scaling: field range contains negative values, use imposed range instead</translation>
-        </message>
-        <message>
-            <source>WRN_LOGARITHMIC_RANGE</source>
-            <translation>Logarithmic scaling: use imposed range values > 0</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_DeformedShapeAndScalarMapDlg</name>
-        <message>
-            <source>&amp;Cancel</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>&amp;OK</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>DLG_TITLE</source>
-            <translation>Deformed Shape and Scalar Map</translation>
-        </message>
-        <message>
-            <source>FIELD_ITEM</source>
-            <translation>Scalar Field:</translation>
-        </message>
-        <message>
-            <source>INPUT_TAB</source>
-            <translation>Input</translation>
-        </message>
-        <message>
-            <source>SCALAR_BAR_TAB</source>
-            <translation>Scalar Bar</translation>
-        </message>
-        <message>
-            <source>DEFORMED_SHAPE_AND_SCALAR_MAP_TAB</source>
-            <translation>Deformed Shape and Scalar Map</translation>
-        </message>
-        <message>
-            <source>SCALE_FACTOR</source>
-            <translation>Scale Factor:</translation>
-        </message>
-        <message>
-            <source>TIMESTAMP_ITEM</source>
-            <translation>Current Time Stamp:</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_SetupPlot2dDlg</name>
-        <message>
-            <source>BUT_NO</source>
-            <translation>No</translation>
-        </message>
-        <message>
-            <source>BUT_YES</source>
-            <translation>Yes</translation>
-        </message>
-        <message>
-            <source>QUE_WANT_SAME_UNITS</source>
-            <translation>Do you want to choose all items with the same units for vertical axis?</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_Slider</name>
-        <message>
-            <source>AVI</source>
-            <translation>AVI</translation>
-        </message>
-        <message>
-            <source>CACHE_MEMORY</source>
-            <translation>Cache:</translation>
-        </message>
-        <message>
-            <source>FREE_MEMORY</source>
-            <translation>Free:</translation>
-        </message>
-        <message>
-            <source>MORE</source>
-            <translation>More...</translation>
-        </message>
-        <message>
-            <source>SPEED</source>
-            <translation>Speed:</translation>
-        </message>
-        <message>
-            <source>TOOLBAR_TITLE</source>
-            <translation>Slider</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_StreamLinesDlg</name>
-        <message>
-            <source>&amp;Cancel</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>&amp;OK</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>DLG_TITLE</source>
-            <translation>Stream lines Preferences</translation>
-        </message>
-        <message>
-            <source>LBL_DIRECTION</source>
-            <translation>Direction</translation>
-        </message>
-        <message>
-            <source>LBL_INTEGRATION_STEP</source>
-            <translation>Integration Step</translation>
-        </message>
-        <message>
-            <source>LBL_PROPAGATION_TIME</source>
-            <translation>Propagation Time</translation>
-        </message>
-        <message>
-            <source>LBL_SOURCE_TYPE</source>
-            <translation>Source type</translation>
-        </message>
-        <message>
-            <source>LBL_STEP_LENGTH</source>
-            <translation>Step Length</translation>
-        </message>
-        <message>
-            <source>LBL_USED_POINTS</source>
-            <translation>Used points (0..1)</translation>
-        </message>
-        <message>
-            <source>MAGNITUDE_COLORING_CHK</source>
-            <translation>Magnitude coloring</translation>
-        </message>
-        <message>
-            <source>SOURCE_GRP</source>
-            <translation>Source</translation>
-        </message>
-        <message>
-            <source>USE_COLOR_BTN</source>
-            <translation>Use Color</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_SweepPrefDlg</name>
-        <message>
-            <source>&amp;Cancel</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>&amp;OK</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>DLG_TITLE</source>
-            <translation>Sweeping Preferences</translation>
-        </message>
-        <message>
-            <source>LBL_NB_CYCLES</source>
-            <translation>Number of cycles:</translation>
-        </message>
-        <message>
-            <source>LBL_NB_STEPS</source>
-            <translation>Number of steps:</translation>
-        </message>
-        <message>
-            <source>LBL_TIME_STEP</source>
-            <translation>Time step (second):</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_TableDlg</name>
-        <message>
-            <source>EDIT_TABLE_TLT</source>
-            <translation>Edit Table</translation>
-        </message>
-        <message>
-            <source>ERR_TABLE_NOT_AVAILABLE</source>
-            <translation>Table is not available</translation>
-        </message>
-        <message>
-            <source>TABLE_OF_INTEGER_TLT</source>
-            <translation>Table of integer</translation>
-        </message>
-        <message>
-            <source>TABLE_OF_REAL_TLT</source>
-            <translation>Table of real</translation>
-        </message>
-        <message>
-            <source>VIEW_TABLE_TLT</source>
-            <translation>View Table</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_TableWidget</name>
-        <message>
-            <source>ADD_COLUMN_BTN</source>
-            <translation>Add Column</translation>
-        </message>
-        <message>
-            <source>ADD_ROW_BTN</source>
-            <translation>Add Row</translation>
-        </message>
-        <message>
-            <source>ADJUST_CELLS_BTN</source>
-            <translation>Adjust Cells</translation>
-        </message>
-        <message>
-            <source>CLEAR_BTN</source>
-            <translation>Clear</translation>
-        </message>
-        <message>
-            <source>REMOVE_COLUMN_BTN</source>
-            <translation>Remove Column(s)</translation>
-        </message>
-        <message>
-            <source>REMOVE_ROW_BTN</source>
-            <translation>Remove Row(s)</translation>
-        </message>
-        <message>
-            <source>SELECT_ALL_BTN</source>
-            <translation>Select All</translation>
-        </message>
-        <message>
-            <source>SET_TITLE_TLT</source>
-            <translation>Set title</translation>
-        </message>
-        <message>
-            <source>TITLE_LBL</source>
-            <translation>Title:</translation>
-        </message>
-        <message>
-            <source>UNITS_TLT</source>
-            <translation>Units</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_TextPrefDlg</name>
-        <message>
-            <source>&amp;Cancel</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>&amp;OK</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>LBL_BOLD</source>
-            <translation>Bold</translation>
-        </message>
-        <message>
-            <source>LBL_ITALIC</source>
-            <translation>Italic</translation>
-        </message>
-        <message>
-            <source>LBL_LABELS</source>
-            <translation>Labels</translation>
-        </message>
-        <message>
-            <source>LBL_SHADOW</source>
-            <translation>Shadow</translation>
-        </message>
-        <message>
-            <source>LBL_TITLE</source>
-            <translation>Title</translation>
-        </message>
-        <message>
-            <source>TIT_TEXT_PREF</source>
-            <translation>Text properties</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_TimeAnimationDlg</name>
-        <message>
-            <source>&amp;OK</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>ERROR</source>
-            <translation>Error</translation>
-        </message>
-        <message>
-            <source>MSG_NO_ANIMATIONDATA</source>
-            <translation>There is no data for animation</translation>
-        </message>
-        <message>
-            <source>MSG_NO_AVI_MAKER</source>
-            <translation>Tool jpeg2yuv, necessary for AVI recording, is not available.
-Please, refer to the documentation.</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_TransparencyDlg</name>
-        <message>
-            <source>BUT_CLOSE</source>
-            <translation>Close</translation>
-        </message>
-        <message>
-            <source>TRANSPARENCY_OPAQUE</source>
-            <translation>Opaque</translation>
-        </message>
-        <message>
-            <source>TRANSPARENCY_TITLE</source>
-            <translation>Change Transparency</translation>
-        </message>
-        <message>
-            <source>TRANSPARENCY_TRANSPARENT</source>
-            <translation>Transparent</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_VectorsDlg</name>
-        <message>
-            <source>&amp;Cancel</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>&amp;OK</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>ARROWS_BTN</source>
-            <translation>Arrows</translation>
-        </message>
-        <message>
-            <source>CENTER_BTN</source>
-            <translation>Center</translation>
-        </message>
-        <message>
-            <source>CONES2_BTN</source>
-            <translation>Cones (2)</translation>
-        </message>
-        <message>
-            <source>CONES6_BTN</source>
-            <translation>Cones (6)</translation>
-        </message>
-        <message>
-            <source>DLG_TITLE</source>
-            <translation>Vector Field Representation</translation>
-        </message>
-        <message>
-            <source>GLYPH_POSITION_GRP</source>
-            <translation>Glyph position</translation>
-        </message>
-        <message>
-            <source>GLYPH_TYPE_GRP</source>
-            <translation>Glyph type</translation>
-        </message>
-        <message>
-            <source>HEAD_BTN</source>
-            <translation>Head</translation>
-        </message>
-        <message>
-            <source>LBL_LINE_WIDTH</source>
-            <translation>Line width:</translation>
-        </message>
-        <message>
-            <source>LBL_SCALE_FACTOR</source>
-            <translation>Scale factor:</translation>
-        </message>
-        <message>
-            <source>MAGNITUDE_COLORING_CHK</source>
-            <translation>Magnitude coloring</translation>
-        </message>
-        <message>
-            <source>SEL_COLOR_BTN</source>
-            <translation>Select Color</translation>
-        </message>
-        <message>
-            <source>TAIL_BTN</source>
-            <translation>Tail</translation>
-        </message>
-        <message>
-            <source>USE_GLYPHS_CHK</source>
-            <translation>Use glyphs</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_SelectionDlg</name>
-        <message>
-            <source>WINDOW_TITLE</source>
-            <translation>Data on elements</translation>
-        </message>
-        <message>
-            <source>MODE_TITLE</source>
-            <translation>Selection</translation>
-        </message>
-       <message>
-            <source>MODE_POINT</source>
-            <translation>Point</translation>
-        </message>
-       <message>
-            <source>MODE_CELL</source>
-            <translation>Cell</translation>
-        </message>
-       <message>
-            <source>MODE_ACTOR</source>
-            <translation>Actor</translation>
-        </message>
-       <message>
-            <source>MESH_NAME_LBL</source>
-            <translation>Mesh name:</translation>
-        </message>
-       <message>
-           <source>FIELD_NAME_LBL</source>
-            <translation>Field name:</translation>
-        </message>
-       <message>
-           <source>POINT_DATA_TITLE</source>
-            <translation>Data of Point</translation>
-        </message>
-       <message>
-           <source>DATA_ID_LBL</source>
-            <translation>ID:</translation>
-        </message>
-       <message>
-           <source>DATA_SCALAR_LBL</source>
-            <translation>Scalar Value:</translation>
-        </message>
-       <message>
-           <source>DATA_VECTOR_LBL</source>
-            <translation>Vector Value:</translation>
-        </message>
-        <message>
-           <source>POINT_COORD_TITLE</source>
-            <translation>Coordinates</translation>
-        </message>
-       <message>
-           <source>CELL_DATA_TITLE</source>
-            <translation>Data of Cell</translation>
-        </message>
-       <message>
-           <source>CELL_DATA_ID_LBL</source>
-            <translation>ID:</translation>
-        </message>
-       <message>
-           <source>CELL_DATA_SCALAR_HDR</source>
-            <translation>Scalar</translation>
-        </message>
-       <message>
-           <source>CELL_DATA_VECTOR_HDR</source>
-            <translation>Vector</translation>
-        </message>
-       <message>
-           <source>ACTOR_DATA_POSITION_TITLE</source>
-            <translation>Position</translation>
-        </message>
-       <message>
-           <source>ACTOR_DATA_SIZE_TITLE</source>
-            <translation>Size</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_BarPrefDlg</name>
-        <message>
-            <source>&amp;OK</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>&amp;Cancel</source>
-            <translation></translation>
-        </message>
-        <message>
-            <source>TIT_BAR_PREF</source>
-            <translation>Bar properties</translation>
-        </message>
-        <message>
-            <source>LBL_TITLE_W</source>
-            <translation>Title width (%)</translation>
-        </message>
-        <message>
-            <source>LBL_TITLE_H</source>
-            <translation>Title height (%)</translation>
-        </message>
-        <message>
-            <source>LBL_LABEL_W</source>
-            <translation>Label width (%)</translation>
-        </message>
-        <message>
-            <source>LBL_LABEL_H</source>
-            <translation>Label height (%)</translation>
-        </message>
-        <message>
-            <source>LBL_BAR_W</source>
-            <translation>Bar width (%)</translation>
-        </message>
-        <message>
-            <source>LBL_BAR_H</source>
-            <translation>Bar height (%)</translation>
-        </message>
-        <message>
-            <source>LBL_SHOW_UNITS</source>
-            <translation>Show units</translation>
-        </message>
-        <message>
-            <source>LBL_UNITS_FORMAT</source>
-            <translation>Format:</translation>
-        </message>
-        <message>
-            <source>MSG_LABEL_FORMAT</source>
-            <translation>Labels format is invalid.</translation>
-        </message>
-        <message>
-            <source>MSG_BIG_SCALE</source>
-            <translation>The common (Title, Label, Bar) width or height should not be greater then 100%.</translation>
-        </message>
-        <message>
-            <source>AUTO</source>
-            <translation>auto</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_Table3DDlg</name>
-        <message>
-            <source>DLG_PREF_TITLE</source>
-            <translation>Table 3D Bar Preferences</translation>
-        </message>
-        <message>
-            <source>DLG_PROP_TITLE</source>
-            <translation>Scalar Bar Properties</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_TableScalarBarPane</name>
-        <message>
-            <source>SCALAR_RANGE_GRP</source>
-            <translation>Scalar range</translation>
-        </message>
-        <message>
-            <source>LOGARITHMIC_SCALING</source>
-            <translation>Logarithmic scaling</translation>
-        </message>
-        <message>
-            <source>FIELD_RANGE_BTN</source>
-            <translation>Use field range</translation>
-        </message>
-        <message>
-            <source>IMPOSED_RANGE_BTN</source>
-            <translation>Use imposed range</translation>
-        </message>
-        <message>
-            <source>LBL_MIN</source>
-            <translation>Min:</translation>
-        </message>
-        <message>
-            <source>LBL_MAX</source>
-            <translation>Max:</translation>
-        </message>
-        <message>
-            <source>COLORS_LABELS_GRP</source>
-            <translation>Colors and labels</translation>
-        </message>
-        <message>
-            <source>LBL_NB_COLORS</source>
-            <translation>Nb. of colors:</translation>
-        </message>
-        <message>
-            <source>LBL_NB_LABELS</source>
-            <translation>Nb. of labels:</translation>
-        </message>
-        <message>
-            <source>ORIENTATION_GRP</source>
-            <translation>Orientation</translation>
-        </message>
-        <message>
-            <source>VERTICAL_BTN</source>
-            <translation>Vertical</translation>
-        </message>
-        <message>
-            <source>HORIZONTAL_BTN</source>
-            <translation>Horizontal</translation>
-        </message>
-        <message>
-            <source>ORIGIN_GRP</source>
-            <translation>Origin</translation>
-        </message>
-        <message>
-            <source>LBL_X</source>
-            <translation>X:</translation>
-        </message>
-        <message>
-            <source>LBL_Y</source>
-            <translation>Y:</translation>
-        </message>
-        <message>
-            <source>LBL_SHOW_PREVIEW</source>
-            <translation>Show preview</translation>
-        </message>
-        <message>
-            <source>DIMENSIONS_GRP</source>
-            <translation>Dimensions</translation>
-        </message>
-        <message>
-            <source>LBL_WIDTH</source>
-            <translation>Width:</translation>
-        </message>
-        <message>
-            <source>LBL_HEIGHT</source>
-            <translation>Height:</translation>
-        </message>
-        <message>
-            <source>SAVE_DEFAULT_CHK</source>
-            <translation>Save as default values</translation>
-        </message>
-        <message>
-            <source>MSG_MINMAX_VALUES</source>
-            <translation>Min value can not be higher or equal to Max value</translation>
-        </message>
-        <message>
-            <source>WRN_LOGARITHMIC_RANGE</source>
-            <translation>Logarithmic scaling: use imposed range values > 0</translation>
-        </message>
-        <message>
-            <source>WRN_LOGARITHMIC_FIELD_RANGE</source>
-            <translation>Logarithmic scaling: field range contains negative values, use imposed range instead</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_Table3DPane</name>
-        <message>
-            <source>SCALE</source>
-            <translation>Scale Factor:</translation>
-        </message>
-        <message>
-            <source>PRESENTATION_TYPE</source>
-            <translation>Presentation type</translation>
-        </message>
-        <message>
-            <source>SURFACE</source>
-            <translation>Surface</translation>
-        </message>
-        <message>
-            <source>CONTOUR</source>
-            <translation>Contour</translation>
-        </message>
-        <message>
-            <source>NUMBER_CONTOURS</source>
-            <translation>Number of contours:</translation>
-        </message>
-    </context>
-    <context>
-        <name>VisuGUI_FileInfoDlg</name>
-        <message>
-            <source>CAPTION</source>
-            <translation>File information</translation>
-        </message>
-        <message>
-            <source>FILE_NAME</source>
-            <translation>File name</translation>
-        </message>
-        <message>
-            <source>FILE_SIZE</source>
-            <translation>File size (bytes)</translation>
-        </message>
-        <message>
-            <source>MED_VERSION</source>
-            <translation>MED version</translation>
-        </message>
-    </context>
-</TS>
index 3d7fcc0f79166f5529695ae61fd473fdef683f3e..e52a0e8d6661660ec40b1e572f3eb738f4656020 100644 (file)
@@ -63,6 +63,7 @@
 #include "SVTK_ViewWindow.h"
 #include "SVTK_ViewModel.h"
 #include "SVTK_Functor.h"
+//#include "SVTK_MainWindow.h"
 
 #include "SPlot2d_ViewModel.h"
 #include "VisuGUI_SetupPlot2dDlg.h"
 #include "VisuGUI_Prs3dTools.h"
 #include "VisuGUI_Tools.h"
 
-#include "VisuGUI_PopupTools.h"
+#include "VisuGUI_SelectionPanel.h"
+#include "VisuGUI_FeatureEdgesPanel.h"
 #include "VisuGUI_NameDlg.h"
 #include "VisuGUI_CursorDlg.h"
 #include "VisuGUI_Selection.h"
 #include "VisuGUI_TransparencyDlg.h"
 #include "VisuGUI_CacheDlg.h"
 #include "VisuGUI_Table3dDlg.h"
+#include "VisuGUI_ClippingPanel.h"
+#include "VisuGUI_FilterScalarsDlg.h"
 
 #include "VISU_ScalarMap_i.hh"
 #include "VisuGUI_ScalarBarDlg.h"
 
 #include "VisuGUI_Timer.h"
 
-#include "VVTK_ViewModel.h"
+//#include "VVTK_ViewModel.h"
+
+#include "VisuGUI_Slider.h"
+#include "VisuGUI_Sweep.h"
+#include <VISU_ScalarMapAct.h>
+#include <VISU_GaussPtsAct.h>
+#include <VisuGUI_ValuesLabelingDlg.h>
 
 using namespace VISU;
 
@@ -174,11 +184,12 @@ static int MYDEBUG = 0;
 VisuGUI
 ::VisuGUI():
   SalomeApp_Module( "VISU" ),
-  myDisplayer( 0 )
+  myDisplayer( 0 ),
+  mySlider( NULL ),
+  mySweep( NULL )
 {
 }
 
-
 VisuGUI
 ::~VisuGUI()
 {
@@ -189,6 +200,7 @@ VisuGUI
 ::OnImportFromFile()
 {
   if(MYDEBUG) MESSAGE("VisuGUI::OnImportFromFile()");
+
   if ( CheckLock(GetCStudy(GetAppStudy(this)),GetDesktop(this)) )
     return;
 
@@ -204,7 +216,7 @@ VisuGUI
 
   SalomeApp_CheckFileDlg fd( GetDesktop(this), true, tr("USE_BUILD_PROGRESS") );
   fd.setWindowTitle( tr( "IMPORT_FROM_FILE" ) );
-  fd.setFileMode( SalomeApp_CheckFileDlg::ExistingFiles );     
+  fd.setFileMode( SalomeApp_CheckFileDlg::ExistingFiles );
   fd.setFilters( aFilter );
   fd.SetChecked( toUseBuildProgress );
   if ( SalomeApp_CheckFileDlg::getLastVisitedPath().isEmpty() )
@@ -225,7 +237,7 @@ VisuGUI
 
   for ( QStringList::ConstIterator it = fileNames.begin(); it != fileNames.end(); ++it ) {
     QFileInfo aFileInfo( *it );
-  
+
     if ( !aFileInfo.exists() ) {
       // file not exist
       errors.append( QString( "%1 :\n\t%2" ).arg( aFileInfo.filePath() ).
@@ -240,12 +252,12 @@ VisuGUI
          bool toBuildGroups = aResourceMgr->booleanValue( "VISU", "build_groups",     true );
          bool toBuildAll    = aResourceMgr->booleanValue( "VISU", "full_med_loading", false );
          bool toBuildAtOnce = aResourceMgr->booleanValue( "VISU", "build_at_once",    false );
-         
-         QString anInfo( tr( "IMPORT_FROM_FILE" ) + " " + aFileInfo.filePath() + " ... " ); 
+
+         QString anInfo( tr( "IMPORT_FROM_FILE" ) + " " + aFileInfo.filePath() + " ... " );
          application()->putInfo( anInfo );
-         
+
          VISU::Result_var aResult = GetVisuGen( this )->CreateResult( aFileInfo.filePath().toLatin1().constData() );
-         
+
          if ( CORBA::is_nil( aResult.in() ) ) {
            errors.append( QString( "%1 :\n\t%2" ).arg( aFileInfo.filePath() ).
                           arg( tr( "ERR_ERROR_IN_THE_FILE" ) ) );
@@ -316,15 +328,15 @@ VisuGUI
     }
     else {
       try {
-       QString anInfo( tr("TLT_IMPORT_TABLE") + " " + aFileInfo.filePath() + " ..." ); 
+       QString anInfo( tr("TLT_IMPORT_TABLE") + " " + aFileInfo.filePath() + " ..." );
        application()->putInfo( anInfo );
-       
+
        CORBA::Object_var anObject = GetVisuGen(this)->ImportTables(aFileInfo.filePath().toLatin1().constData());
-      
+
        if (CORBA::is_nil(anObject.in())) {
          errors.append( QString( "%1 :\n\t%2" ).arg( aFileInfo.filePath() ).
                         arg( tr( "ERR_ERROR_IN_THE_FILE" ) ) );
-       } 
+       }
        else {
          application()->putInfo( anInfo + tr("INF_DONE") );
        }
@@ -683,7 +695,9 @@ VisuGUI
   SVTK_ViewWindow* aViewWindow = GetViewWindow<SVTK_Viewer>(this);
 
   // create mesh presentation and display it in aViewWindow
-  CreateMesh(this, anIO, aViewWindow);
+  VISU::Mesh_i* aPrs = CreateMesh(this, anIO, aViewWindow);
+  if (aPrs)
+    emit presentationCreated(aPrs);
 }
 
 void
@@ -708,7 +722,9 @@ VisuGUI
       return;
 
     // create mesh presentation and display it in aViewWindow
-    CreateMesh(this, anIO, aViewWindow);
+    VISU::Mesh_i* aPrs = CreateMesh(this, anIO, aViewWindow);
+    if (aPrs)
+      emit presentationCreated(aPrs);
   }
 }
 
@@ -716,7 +732,9 @@ void
 VisuGUI
 ::OnCreateScalarMap()
 {
-  CreatePrs3d<VISU::ScalarMap_i,VisuGUI_ScalarBarDlg,1>(this);
+  Prs3d_i* aPrs = CreatePrs3d<VISU::ScalarMap_i,VisuGUI_ScalarBarDlg,1>(this);
+  if (aPrs)
+    emit presentationCreated(aPrs);
 }
 
 
@@ -724,56 +742,73 @@ void
 VisuGUI
 ::OnCreateDeformedShape()
 {
-  CreatePrs3d<VISU::DeformedShape_i,VisuGUI_DeformedShapeDlg,1>(this);
+  //  CreatePrs3d<VISU::DeformedShape_i,VisuGUI_DeformedShapeDlg,1>(this);
+  Prs3d_i* aPrs = VisuGUI_DeformedShapeDlg::CreatePrs3d(this);
+  if (aPrs)
+    emit presentationCreated(aPrs);
 }
 
 void
 VisuGUI
 ::OnCreateDeformedShapeAndScalarMap()
 {
-  CreatePrs3d<VISU::DeformedShapeAndScalarMap_i,VisuGUI_DeformedShapeAndScalarMapDlg,1>(this);
+  Prs3d_i* aPrs = CreatePrs3d<VISU::DeformedShapeAndScalarMap_i,VisuGUI_DeformedShapeAndScalarMapDlg,1>(this);
+  if (aPrs)
+    emit presentationCreated(aPrs);
 }
 
 void
 VisuGUI
 ::OnCreateVectors()
 {
-  CreatePrs3d<VISU::Vectors_i,VisuGUI_VectorsDlg,1>(this);
+  Prs3d_i* aPrs = CreatePrs3d<VISU::Vectors_i,VisuGUI_VectorsDlg,1>(this);
+  if (aPrs)
+    emit presentationCreated(aPrs);
 }
 
 void
 VisuGUI
 ::OnCreateIsoSurfaces()
 {
-  CreatePrs3d<VISU::IsoSurfaces_i,VisuGUI_IsoSurfacesDlg,1>(this);
+  Prs3d_i* aPrs = CreatePrs3d<VISU::IsoSurfaces_i,VisuGUI_IsoSurfacesDlg,1>(this);
+  if (aPrs)
+    emit presentationCreated(aPrs);
 }
 
 void
 VisuGUI
 ::OnCreateCutPlanes()
 {
-  CreatePrs3d<VISU::CutPlanes_i,VisuGUI_CutPlanesDlg,0>(this);
+  Prs3d_i* aPrs = CreatePrs3d<VISU::CutPlanes_i,VisuGUI_CutPlanesDlg,0>(this);
+  if (aPrs)
+    emit presentationCreated(aPrs);
 }
 
 void
 VisuGUI
 ::OnCreateCutLines()
 {
-  CreatePrs3d<VISU::CutLines_i,VisuGUI_CutLinesDlg,0>(this);
+  Prs3d_i* aPrs = CreatePrs3d<VISU::CutLines_i,VisuGUI_CutLinesDlg,0>(this);
+  if (aPrs)
+    emit presentationCreated(aPrs);
 }
 
 void
 VisuGUI
 ::OnCreateStreamLines()
 {
-  CreatePrs3d<VISU::StreamLines_i,VisuGUI_StreamLinesDlg,1>(this);
+  Prs3d_i* aPrs = CreatePrs3d<VISU::StreamLines_i,VisuGUI_StreamLinesDlg,1>(this);
+  if (aPrs)
+    emit presentationCreated(aPrs);
 }
 
 void
 VisuGUI
 ::OnCreatePlot3D()
 {
-  CreatePrs3d<VISU::Plot3D_i,VisuGUI_Plot3DDlg,0>(this);
+  Prs3d_i* aPrs = CreatePrs3d<VISU::Plot3D_i,VisuGUI_Plot3DDlg,0>(this);
+  if (aPrs)
+    emit presentationCreated(aPrs);
 }
 
 void
@@ -1053,6 +1088,14 @@ VisuGUI
   ChangeRepresentation(this, VISU::SHRINK);
 }
 
+//----------------------------------------------------------------------------
+void
+VisuGUI
+::OnMakeFeatureEdges()
+{
+  ChangeRepresentation(this, VISU::FEATURE_EDGES);
+}
+
 //----------------------------------------------------------------------------
 void
 VisuGUI
@@ -1070,36 +1113,6 @@ VisuGUI
 }
 
 
-namespace
-{
-  //----------------------------------------------------------------------------
-  bool
-  GetPrs3dSelectionInfo(const SalomeApp_Module* theModule,
-                       VISU::Prs3d_i*& thePrs3d,
-                       SVTK_ViewWindow*& theViewWindow,
-                       VISU_Actor*& thenActor)
-  {
-    VISU::TSelectionInfo aSelectionInfo = VISU::GetSelectedObjects(theModule);
-    if(aSelectionInfo.empty())
-      return false;
-
-    VISU::TSelectionItem aSelectionItem = aSelectionInfo.front();
-    thePrs3d = GetPrs3dFromBase(aSelectionItem.myObjectInfo.myBase);
-    if(!thePrs3d)
-      return false;
-
-    theViewWindow = GetActiveViewWindow<SVTK_ViewWindow>(theModule);
-    if(!theViewWindow)
-      return false;
-
-    thenActor = FindActor(theViewWindow, thePrs3d);
-    if(!thenActor)
-      return false;
-
-    return true;
-  }
-}
-
 //----------------------------------------------------------------------------
 void
 VisuGUI
@@ -1288,7 +1301,7 @@ VisuGUI
   VISU::TSelectionInfo aSelectionInfo = VISU::GetSelectedObjects(this);
   if(aSelectionInfo.empty())
     return;
-  
+
   VISU::TSelectionItem aSelectionItem = aSelectionInfo.front();
   Handle(SALOME_InteractiveObject) anIO = aSelectionItem.myIO;
   VISU::Base_i* aBase = aSelectionItem.myObjectInfo.myBase;
@@ -1344,11 +1357,22 @@ VisuGUI
   Handle(SALOME_InteractiveObject) anIO;
   for (SALOME_ListIteratorOfListIO it (aList); it.More(); it.Next()) {
     anIO = it.Value();
-    aNameList.append("\n    - ");
-    aNameList.append(anIO->getName());
     if (anIO->hasEntry()) {
-      if (IsRemovable(anIO->getEntry(), this))
-        anEntries[i++] = anIO->getEntry();
+      if (IsRemovable(anIO->getEntry(), this)) {
+       aNameList.append("\n    - ");
+       // Get Name Of the Main Object if it's a referenced object
+       VISU::TObjectInfo anObjectInfo = GetObjectByEntry(GetAppStudy(this), anIO->getEntry());
+       if(_PTR(SObject) aSObject = anObjectInfo.mySObject){
+         _PTR(SObject) aRefSObject;
+         if (aSObject->ReferencedObject(aRefSObject)) {
+           QString aRefName = QString::fromStdString ( aRefSObject->GetName() );
+           aNameList.append( aRefName );
+         }
+         else
+           aNameList.append(anIO->getName());
+       }
+       anEntries[i++] = anIO->getEntry();
+      }
     }
   }
   nbSelected = i;
@@ -1356,6 +1380,7 @@ VisuGUI
     SUIT_MessageBox::warning(GetDesktop(this),
                             QObject::tr("WRN_VISU"),
                             QObject::tr("WRN_NO_APPROPRIATE_SELECTION"));
+    return;
   }
 
   if ( SUIT_MessageBox::question( GetDesktop(this),
@@ -1371,6 +1396,7 @@ VisuGUI
   for (i = 0; i < nbSelected; i++) {
     VISU::TObjectInfo anObjectInfo = GetObjectByEntry(GetAppStudy(this), anEntries[i]);
     if(_PTR(SObject) aSObject = anObjectInfo.mySObject){
+      emit beforeObjectDelete(QString(aSObject->GetID().c_str()));
       _PTR(SObject) aRefSObject;
       if (aSObject->ReferencedObject(aRefSObject)) {
        // It can be a reference on curve, published under a container.
@@ -1755,7 +1781,7 @@ VisuGUI
             case VISU::TPOINTMAP3D: { // Table object
               if (VISU::PointMap3d_i* aTable3d = dynamic_cast<VISU::PointMap3d_i*>(aBase)) {
                 aTable3d->SetTitle(Name.toLatin1().constData());
-                aTable3d->UpdateActors(); 
+                aTable3d->UpdateActors();
               }
               break;
             }
@@ -1784,7 +1810,6 @@ VisuGUI
           }
 
           UpdateObjBrowser(this, false);
-
           QApplication::restoreOverrideCursor();
         }
       }
@@ -1811,65 +1836,8 @@ void
 VisuGUI
 ::OnSweep()
 {
-  VISU_Actor* anActor = NULL;
-  VISU::Prs3d_i* aPrs3d = NULL;
-  SVTK_ViewWindow* aViewWindow = NULL;
-  if(!GetPrs3dSelectionInfo(this, aPrs3d, aViewWindow, anActor))
-    return;
-
-  VISU::ScalarMap_i* aScalarMap = dynamic_cast<VISU::ScalarMap_i*>(aPrs3d);
-  if(!aScalarMap)
-    return;
-
-  if(!anActor->GetVisibility())
-    anActor->VisibilityOn();
-
-  // Get sweep parameters
-  SUIT_ResourceMgr* aResourceMgr = GetResourceMgr();
-
-  double aTempoDbl = aResourceMgr->doubleValue("VISU", "sweeping_time_step", 0.1);
-  int aTemp = int(1.E6 * aTempoDbl);
-
-  int aCycles = aResourceMgr->integerValue("VISU", "sweeping_number_cycles", 1);
-  int aSteps  = aResourceMgr->integerValue("VISU", "sweeping_number_steps", 40);
-
-  int aMode = aResourceMgr->integerValue("VISU", "sweeping_modes", 0);
-
-  int is2Pi = aResourceMgr->integerValue("VISU", "sweeping_is2PI", 0);
-
-  // Sweep
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-
-  for (int j = 0; j < aCycles; j++) {
-    for (int i = 0; i <= aSteps; i++) {
-      try {
-        float aPercents;
-       float aT;
-       if( aMode >= 1 )
-         aT = ( is2Pi == 1 ? -PI + 2. * PI * float(i)/aSteps : PI * float(i)/aSteps );
-        if( aMode == 1 ){  //if selected Periodic cosinusoidal mode of sweeping
-          //This is necessary in order for animation to return to the initial picture
-         aPercents = (1.-cos( aT ))/2.;
-        }
-        else if( aMode == 2 ){  //if selected Periodic sinusoidal mode of sweeping
-          //This is necessary in order for animation to return to the initial picture
-         aPercents = sin( aT - PI/2 );
-        }
-        else //if selected Linear mode of sweeping
-          aPercents = float(i)/aSteps;
-        aScalarMap->SetMapScale(aPercents);
-        aScalarMap->UpdateActor(anActor);
-        aViewWindow->getRenderWindow()->Render();
-        aViewWindow->Repaint();
-        usleep(aTemp);
-      } catch (std::exception& exc) {
-        INFOS("Follow exception was occured :\n" << exc.what());
-      } catch (...) {
-        INFOS("Unknown exception was occured!");
-      }
-    }
-  }
-  QApplication::restoreOverrideCursor();
+  mySweep->toggleViewAction()->setChecked(true);
+  mySweep->onPlay(true);
 }
 
 //----------------------------------------------------------------------------
@@ -2011,16 +1979,68 @@ VisuGUI
 //----------------------------------------------------------------------------
 void
 VisuGUI
-::OnSelectionInfo()
+::OnToggleSelectionPanel()
 {
   if (GetActiveViewWindow<SVTK_ViewWindow>(this))
-    (new VisuGUI_SelectionDlg(this))->show();
+  {
+    if( myPanels.find( SelectionPanelId ) != myPanels.end() )
+    {
+      if( VisuGUI_SelectionPanel* aSelectionPanel =
+         dynamic_cast<VisuGUI_SelectionPanel*>( myPanels[ SelectionPanelId ] ) )
+      {
+       if( aSelectionPanel->isVisible() )
+         aSelectionPanel->hide();
+       else
+         aSelectionPanel->show();
+      }
+    }
+  }
   else
     SUIT_MessageBox::warning(GetDesktop(this),
                              tr("WRN_VISU"),
                              tr("ERR_ACTIVATE_VIEW3D") );
 }
 
+//----------------------------------------------------------------------------
+void
+VisuGUI
+::OnSwitchSelectionMode()
+{
+  QAction* anAction = dynamic_cast<QAction*>( sender() );
+  if( !anAction )
+    return;
+
+  bool isAnyChecked = false;
+  for( int anId = VISU_ACTOR_SELECTION; anId <= VISU_GAUSS_POINT_SELECTION; anId++ )
+  {
+    QAction* aRefAction = action( anId );
+    isAnyChecked |= aRefAction->isChecked();
+    if( anAction != aRefAction )
+      aRefAction->setChecked( false );
+    else if( myPanels.find( SelectionPanelId ) != myPanels.end() )
+    {
+      if( VisuGUI_SelectionPanel* aSelectionPanel =
+         dynamic_cast<VisuGUI_SelectionPanel*>( myPanels[ SelectionPanelId ] ) )
+       aSelectionPanel->setSelectionMode( anId - VISU_ACTOR_SELECTION );
+    }
+  }
+  // At least one action must be checked
+  if( !isAnyChecked )
+    anAction->setChecked( true );
+}
+
+//----------------------------------------------------------------------------
+void
+VisuGUI
+::OnSwitchSelectionMode( int theId )
+{
+  for( int anId = VISU_ACTOR_SELECTION; anId <= VISU_GAUSS_POINT_SELECTION; anId++ )
+  {
+    QAction* aRefAction = action( anId );
+    aRefAction->setChecked( anId == VISU_ACTOR_SELECTION + theId );
+  }
+}
+
 //----------------------------------------------------------------------------
 void
 VisuGUI
@@ -2149,10 +2169,18 @@ VisuGUI
 {
   SalomeApp_Module::initialize( theApp );
 
+  mySlider = new VisuGUI_Slider( this, getApp()->desktop(), getApp()->selectionMgr() );
+
+  mySweep = new VisuGUI_Sweep( this, getApp()->desktop(), getApp()->selectionMgr() );
+
   createActions();
   createMenus();
   createToolBars();
   createPopupMenus();
+  createPanels();
+
+  // tmp
+  action( VISU_ACTOR_SELECTION )->setChecked( true );
 }
 
 void
@@ -2362,6 +2390,10 @@ VisuGUI
                 tr("MEN_UNSHRINK"), "", 0, aParent, false,
                 this, SLOT(OnMakeShrink()));
 
+  createAction( VISU_FEATURE_EDGES, tr("MEN_FEATURE_EDGES"), QIcon(),
+                tr("MEN_FEATURE_EDGES"), "", 0, aParent, false,
+                this, SLOT(OnMakeFeatureEdges()));
+
   createAction( VISU_SHADING, tr("MEN_SHADING"), QIcon(),
                 tr("MEN_SHADING"), "", 0, aParent, false,
                 this, SLOT(OnSetShadingOn()));
@@ -2440,10 +2472,6 @@ VisuGUI
                 tr("MEN_CLIPPING"), "", 0, aParent, false,
                 this, SLOT(OnClippingPlanes()));
 
-  createAction( VISU_SELECTION_INFO, tr("MEN_SELECTION_INFO"), QIcon(),
-                tr("MEN_SELECTION_INFO"), "", 0, aParent, false,
-                this, SLOT(OnSelectionInfo()));
-
   aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_TIMEANIMATION"));
   createAction( VISU_PARALLELANIMATION, tr("MEN_PARALLEL_ANIMATION"), QIcon(aPixmap),
                 tr("MEN_PARALLEL_ANIMATION"), "", 0, aParent, false,
@@ -2459,15 +2487,34 @@ VisuGUI
                 tr("MEN_ERASE_ALL"), "", 0, aParent, false,
                 this, SLOT(OnEraseAll()));
 
-  aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_GLOBAL_SELECTION"));
-  createAction( VISU_GLOBAL_SELECTION, tr("MEN_GLOBAL_SELECTION"), QIcon(aPixmap),
-                tr("MEN_GLOBAL_SELECTION"), "", 0, aParent, false,
-                this);
+  aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_SELECTION_PANEL"));
+  createAction( VISU_SELECTION_PANEL, tr("MEN_SELECTION_PANEL"), QIcon(aPixmap),
+                tr("MEN_SELECTION_PANEL"), "", 0, aParent, false,
+                this, SLOT(OnToggleSelectionPanel()));
+
+  aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_ACTOR_SELECTION"));
+  createAction( VISU_ACTOR_SELECTION, tr("MEN_ACTOR_SELECTION"), QIcon(aPixmap),
+                tr("MEN_ACTOR_SELECTION"), "", 0, aParent, true,
+                this, SLOT(OnSwitchSelectionMode()));
+
+  aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_CELL_SELECTION"));
+  createAction( VISU_CELL_SELECTION, tr("MEN_CELL_SELECTION"), QIcon(aPixmap),
+                tr("MEN_CELL_SELECTION"), "", 0, aParent, true,
+                this, SLOT(OnSwitchSelectionMode()));
+
+  aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_POINT_SELECTION"));
+  createAction( VISU_POINT_SELECTION, tr("MEN_POINT_SELECTION"), QIcon(aPixmap),
+                tr("MEN_POINT_SELECTION"), "", 0, aParent, true,
+                this, SLOT(OnSwitchSelectionMode()));
 
-  aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_PARTIAL_SELECTION"));
-  createAction( VISU_PARTIAL_SELECTION, tr("MEN_PARTIAL_SELECTION"), QIcon(aPixmap),
-                tr("MEN_PARTIAL_SELECTION"), "", 0, aParent, false,
-                this);
+  aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_GAUSS_POINT_SELECTION"));
+  createAction( VISU_GAUSS_POINT_SELECTION, tr("MEN_GAUSS_POINT_SELECTION"), QIcon(aPixmap),
+                tr("MEN_GAUSS_POINT_SELECTION"), "", 0, aParent, true,
+                this, SLOT(OnSwitchSelectionMode()));
+
+  // Defenition of the actions for the "Navigation" tool bar
+  registerAction( VISU_SLIDER_PANEL, mySlider->toggleViewAction() );
+  registerAction( VISU_SWEEP_PANEL, mySweep->toggleViewAction() );
 
   createAction( VISU_SHOW_ANIMATION, tr("MEN_SHOW_ANIMATION"), QIcon(),
                 tr("MEN_SHOW_ANIMATION"), "", 0, aParent, false,
@@ -2478,9 +2525,9 @@ VisuGUI
                 tr("MEN_PLOT3D_FROM_CUTPLANE"), "", 0, aParent, false,
                 this, SLOT(OnPlot3dFromCutPlane()));
 
-  createAction( VISU_CACHE_PROPERTIES, tr("MEN_CACHE_PROPERTIES"), QIcon(),
-                tr("MEN_CACHE_PROPERTIES"), "", 0, aParent, false,
-                this, SLOT(OnCacheProperties()));
+  createAction( VISU_MANAGE_CACHE, tr("MEN_MANAGE_CACHE"), QIcon(),
+                tr("MEN_MANAGE_CACHE"), "", 0, aParent, false,
+                this, SLOT( OnManageCache() ) );
 
   aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_MULTIPR_VIEW_FULL"));
   createAction( VISU_MULTIPR_FULL_RES, tr("MEN_MULTIPR_VIEW_FULL_RES"), QIcon(aPixmap),
@@ -2509,6 +2556,19 @@ VisuGUI
   createAction( VISU_EXPORT_MED, tr("MEN_EXPORT_MED"), QIcon(),
                 tr("MEN_EXPORT_MED"), "", 0, aParent, false,
                 this, SLOT(OnExportMED()));
+
+  createAction( VISU_FILTERSCALARS, tr("MEN_FILTER_SCALARS"), QIcon(),
+                tr("MEN_FILTER_SCALARS"), "", 0, aParent, false,
+                this, SLOT(OnFilterScalars()));
+                
+  createAction( VISU_VALUES_LABELING, tr("MEN_VALUES_LABELING"), QIcon(),
+                tr("MEN_VALUES_LABELING"), "", 0, aParent, true,
+                this, SLOT(OnValuesLabeling())); 
+
+  createAction( VISU_VALUES_LABELING_PARAMS, tr("VISU_VALUES_LABELING_PARAMS"), QIcon(),
+                tr("VISU_VALUES_LABELING_PARAMS"), "", 0, aParent, false,
+                this, SLOT(OnValuesLabelingParams())); 
+
 }
 
 void
@@ -2535,9 +2595,6 @@ VisuGUI
   createMenu( VISU_PLOT_3D, aMenuId, 10 ); // Plot3d
   createMenu( VISU_DEFORMED_SHAPE_AND_SCALAR_MAP, aMenuId, 10 ); // scalar map on deformed shape
 
-  aMenuId = createMenu( tr( "MEN_SELECTION" ), -1, -1, 30 );
-  createMenu( VISU_SELECTION_INFO, aMenuId, 10 ); // selection info
-
   aMenuId = createMenu( tr( "MEN_REPRESENTATION" ), -1, -1, 30 );
   int parentId =
     createMenu( tr( "MEN_DISPLAY_SELECTION" ), aMenuId, 10 ); // display selection
@@ -2545,8 +2602,6 @@ VisuGUI
   createMenu( VISU_WIREFRAME, parentId, 10 ); //   wireframe
   createMenu( VISU_SURFACE, parentId, 10 ); //   surface
   createMenu( VISU_ERASE_ALL, aMenuId, 10 ); // erase all
-  createMenu( VISU_GLOBAL_SELECTION, aMenuId, 10 ); // global selection
-  createMenu( VISU_PARTIAL_SELECTION, aMenuId, 10 ); // partial selection
 }
 
 void
@@ -2572,8 +2627,19 @@ VisuGUI
   createTool( VISU_WIREFRAME, aToolId );
   createTool( VISU_SURFACE, aToolId );
   createTool( VISU_ERASE_ALL, aToolId );
-  createTool( VISU_GLOBAL_SELECTION, aToolId );
-  createTool( VISU_PARTIAL_SELECTION, aToolId );
+
+  aToolId = createTool(tr("TOOL_SELECTION"));
+  createTool( VISU_SELECTION_PANEL, aToolId );
+  createTool( separator(), aToolId );
+  createTool( VISU_ACTOR_SELECTION, aToolId );
+  createTool( VISU_CELL_SELECTION, aToolId );
+  createTool( VISU_POINT_SELECTION, aToolId );
+  createTool( VISU_GAUSS_POINT_SELECTION, aToolId );
+
+  aToolId = createTool( tr( "TOOL_NAVIGATION" ) );
+  createTool( VISU_SLIDER_PANEL, aToolId );
+  createTool( separator(), aToolId );
+  createTool( VISU_SWEEP_PANEL, aToolId );
 }
 
 void
@@ -2619,6 +2685,8 @@ VisuGUI
   mgr->insert( action( VISU_EDIT_CONTAINER ), -1, -1, -1 );
   mgr->insert( action( VISU_EDIT_POINTMAP3D ), -1, -1, -1 );
 
+  mgr->insert( action( VISU_FILTERSCALARS ), -1, -1, -1 );
+
   // rename
   mgr->insert( action( VISU_RENAME ), -1, -1, -1 );
 
@@ -2627,6 +2695,12 @@ VisuGUI
 
   // delete
   mgr->insert( action( VISU_CLEAR_CONTAINER ), -1, -1, -1 );
+  
+  // labeling
+  mgr->insert( separator(), -1, -1, -1 );
+  mgr->insert( action( VISU_VALUES_LABELING ), -1, -1, -1 );
+  mgr->insert( action( VISU_VALUES_LABELING_PARAMS ), -1, -1, -1 );
+  mgr->insert( separator(), -1, -1, -1 );
 
   // table commands
   mgr->insert( action( VISU_SHOW_TABLE ), -1, -1, -1 ); // show table
@@ -2646,6 +2720,7 @@ VisuGUI
   mgr->insert( action( VISU_SURFACE )     , parentId, -1, -1 ); // surface
   mgr->insert( action( VISU_INSIDEFRAME ) , parentId, -1, -1 ); // insideframe
   mgr->insert( action( VISU_SURFACEFRAME ), parentId, -1, -1 ); // surfaceframe
+  mgr->insert( action( VISU_FEATURE_EDGES ), parentId, -1, -1 ); // feature edges
   mgr->insert( action( VISU_SHRINK )      , parentId, -1, -1 ); // shrink
   mgr->insert( action( VISU_UNSHRINK )    , parentId, -1, -1 ); // unshrink
   mgr->insert( separator(), parentId, -1, -1 );
@@ -2685,8 +2760,6 @@ VisuGUI
 
   mgr->insert( action( VISU_CURVE_PROPS ), -1, -1, -1 ); // curve properties
 
-  mgr->insert( action( VISU_SELECTION_INFO ), -1, -1, -1 ); // Selection info
-
   mgr->insert( action( VISU_MULTIPR_FULL_RES ), -1, -1, -1 );
   mgr->insert( action( VISU_MULTIPR_MED_RES ), -1, -1, -1 );
   mgr->insert( action( VISU_MULTIPR_LOW_RES ), -1, -1, -1 );
@@ -2700,6 +2773,9 @@ VisuGUI
   QString aPrsAll ("'VISU::TSCALARMAP' 'VISU::TISOSURFACES' 'VISU::TDEFORMEDSHAPE' 'VISU::TCUTPLANES' "
                    "'VISU::TCUTLINES' 'VISU::TVECTORS' 'VISU::TSTREAMLINES' 'VISU::TPLOT3D' "
                   "'VISU::TSCALARMAPONDEFORMEDSHAPE' 'VISU::TDEFORMEDSHAPEANDSCALARMAP' 'VISU::TCOLOREDPRS3DHOLDER'");
+  QString aSimplePrsAll ("'VISU::TSCALARMAP' 'VISU::TISOSURFACES' 'VISU::TDEFORMEDSHAPE' 'VISU::TCUTPLANES' "
+                        "'VISU::TCUTLINES' 'VISU::TVECTORS' 'VISU::TSTREAMLINES' 'VISU::TPLOT3D' "
+                        "'VISU::TSCALARMAPONDEFORMEDSHAPE'");
 
   // VISU root commands
   QString aRule = "client='ObjectBrowser' and selcount=1 and type='VISU::TVISUGEN'";
@@ -2750,6 +2826,16 @@ VisuGUI
   mgr->setRule( action( VISU_MERGE_SCALAR_BARS ), aRule );
   mgr->setRule( action( VISU_FREE_SCALAR_BARS ), aRule );
 
+  aRule = "selcount=1 and $type in { " + aSimplePrsAll + "}";
+  mgr->setRule( action( VISU_FILTERSCALARS ), aRule );
+  
+  // labeling
+
+  aRule = "hasActor=1 and selcount=1 and $type in { 'VISU::TGAUSSPOINTS'"  + aPrsAll + " }";
+  mgr->setRule( action( VISU_VALUES_LABELING ), aRule, QtxPopupMgr::VisibleRule );
+  mgr->setRule( action( VISU_VALUES_LABELING ), "{true} in $isValuesLabeled", QtxPopupMgr::ToggleRule );
+  mgr->setRule( action( VISU_VALUES_LABELING_PARAMS ), aRule, QtxPopupMgr::VisibleRule );
+
   // view parameters
   aRule = "selcount=1 and type='VISU::TVIEW3D' and activeView='VTKViewer'";
   mgr->setRule( action( VISU_SAVE_VIEW_PARAMS_1 ), aRule );
@@ -2757,34 +2843,41 @@ VisuGUI
   mgr->setRule( action( VISU_RESTORE_VIEW_PARAMS ), "selcount=1 and type='VISU::TVIEW3D' and activeView='VTKViewer'" );
   //mgr->setRule( action( VISU_DELETE_VIEW_PARAMS ), "selcount=1 and type='VISU::TVIEW3D'", true );
 
-  mgr->setRule( action( VISU_ARRANGE_ACTORS ), "$client in {'VTKViewer' 'VVTK'} and selcount=0" );
+  mgr->setRule( action( VISU_ARRANGE_ACTORS ), "$client in {'VTKViewer' 'SVTK'} and selcount=0" );
 
   // 3D presentations commands
-  QString aPrsType    = " and $type in {'VISU::TMESH'" + aPrsAll + "}";
+  QString aPrsType    = " and $type in {'VISU::TMESH' 'VISU::TGAUSSPOINTS' " + aPrsAll + "}";
   QString aPrsType2    = " and $type in {'VISU::TMESH' 'VISU::TPOINTMAP3D'" + aPrsAll + "}";
   QString anInsideType = " and $type in {'VISU::TMESH' 'VISU::TSCALARMAP' 'VISU::TDEFORMEDSHAPE' 'VISU::TSCALARMAPONDEFORMEDSHAPE' 'VISU::TDEFORMEDSHAPEANDSCALARMAP'}";
-  QString aSurfFrameType   = " and $type in {'VISU::TMESH' 'VISU::TSCALARMAP''VISU::TDEFORMEDSHAPE' 'VISU::TSCALARMAPONDEFORMEDSHAPE' 'VISU::TDEFORMEDSHAPEANDSCALARMAP'}";
+  //QString aSurfFrameType   = " and $type in {'VISU::TMESH' 'VISU::TSCALARMAP''VISU::TDEFORMEDSHAPE' 'VISU::TSCALARMAPONDEFORMEDSHAPE' 'VISU::TDEFORMEDSHAPEANDSCALARMAP'}";
+  QString aSurfFrameType   = " and $type in {'VISU::TMESH' 'VISU::TSCALARMAP''VISU::TDEFORMEDSHAPE' 'VISU::TSCALARMAPONDEFORMEDSHAPE' 'VISU::TDEFORMEDSHAPEANDSCALARMAP' 'VISU::TCUTPLANES' 'VISU::TISOSURFACES' 'VISU::TPLOT3D' }";
+  //QString aPrsType    = " and $type in {'VISU::TMESH' " + aPrsAll + "}";
   QString aSurfType   = " and $type in {'VISU::TMESH' 'VISU::TSCALARMAP' 'VISU::TSCALARMAP' 'VISU::TISOSURFACES' 'VISU::TDEFORMEDSHAPE' 'VISU::TCUTPLANES' "
                         " 'VISU::TPLOT3D' 'VISU::TSCALARMAPONDEFORMEDSHAPE' 'VISU::TDEFORMEDSHAPEANDSCALARMAP' 'VISU::TPOINTMAP3D'}";
   QString aShrinkType = " and $type in {'VISU::TMESH' 'VISU::TSCALARMAP' 'VISU::TDEFORMEDSHAPE' 'VISU::TSCALARMAPONDEFORMEDSHAPE' 'VISU::TDEFORMEDSHAPEANDSCALARMAP' 'VISU::TPOINTMAP3D'}";
   QString aLineType   = " and $type in {'VISU::TMESH' 'VISU::TSCALARMAP' 'VISU::TSCALARMAP' 'VISU::TISOSURFACES' 'VISU::TDEFORMEDSHAPE' "
                         "'VISU::TCUTPLANES' 'VISU::TCUTLINES' 'VISU::TSTREAMLINES' 'VISU::TPLOT3D' 'VISU::TSCALARMAPONDEFORMEDSHAPE' 'VISU::TDEFORMEDSHAPEANDSCALARMAP' 'VISU::TPOINTMAP3D'}";
 
+  QString aFeatureEdgesType =  " and $type in {'VISU::TMESH' 'VISU::TSCALARMAP''VISU::TDEFORMEDSHAPE' 'VISU::TSCALARMAPONDEFORMEDSHAPE'}";
+
   aRule = "selcount=1";
   mgr->setRule( action( VISU_CLIPPING ), aRule + aPrsType );
+  aPrsType = " and $type in {'VISU::TMESH' " + aPrsAll + "}";
 
   // "Representation" submenu
-  QString aNotPoints = " and $representation in {'VISU::WIREFRAME' 'VISU::SHADED' 'VISU::INSIDEFRAME' 'VISU::SURFACEFRAME'}";
-  QString aNotWirefr = " and $representation in {'VISU::POINT' 'VISU::SHADED' 'VISU::INSIDEFRAME' 'VISU::SURFACEFRAME'}";
-  QString aNotSurfac = " and $representation in {'VISU::POINT' 'VISU::WIREFRAME' 'VISU::INSIDEFRAME' 'VISU::SURFACEFRAME'}";
-  QString aNotInside = " and $representation in {'VISU::POINT' 'VISU::WIREFRAME' 'VISU::SHADED' 'VISU::SURFACEFRAME'}";
-  QString aNotSurffr = " and $representation in {'VISU::POINT' 'VISU::WIREFRAME' 'VISU::SHADED' 'VISU::INSIDEFRAME'}";
+  QString aNotPoints = " and $representation in {'VISU::WIREFRAME' 'VISU::SHADED' 'VISU::INSIDEFRAME' 'VISU::SURFACEFRAME' 'VISU::FEATURE_EDGES'}";
+  QString aNotWirefr = " and $representation in {'VISU::POINT' 'VISU::SHADED' 'VISU::INSIDEFRAME' 'VISU::SURFACEFRAME' 'VISU::FEATURE_EDGES'}";
+  QString aNotSurfac = " and $representation in {'VISU::POINT' 'VISU::WIREFRAME' 'VISU::INSIDEFRAME' 'VISU::SURFACEFRAME' 'VISU::FEATURE_EDGES'}";
+  QString aNotInside = " and $representation in {'VISU::POINT' 'VISU::WIREFRAME' 'VISU::SHADED' 'VISU::SURFACEFRAME' 'VISU::FEATURE_EDGES'}";
+  QString aNotSurffr = " and $representation in {'VISU::POINT' 'VISU::WIREFRAME' 'VISU::SHADED' 'VISU::INSIDEFRAME' 'VISU::FEATURE_EDGES'}";
+  QString aNotFeatureEdges =  " and $representation in {'VISU::POINT' 'VISU::WIREFRAME' 'VISU::SHADED' 'VISU::INSIDEFRAME' 'VISU::SURFACEFRAME'}";
 
   mgr->setRule( action( VISU_POINTS )      , aRule + aPrsType + aNotPoints );
   mgr->setRule( action( VISU_WIREFRAME )   , aRule + aPrsType2 + aNotWirefr );
   mgr->setRule( action( VISU_SURFACE )     , aRule + aSurfType + aNotSurfac );
   mgr->setRule( action( VISU_INSIDEFRAME ) , aRule + anInsideType + aNotInside );
   mgr->setRule( action( VISU_SURFACEFRAME ), aRule + aSurfFrameType + aNotSurffr );
+  mgr->setRule( action( VISU_FEATURE_EDGES ), aRule + aFeatureEdgesType + aNotFeatureEdges );
 
   mgr->setRule( action( VISU_SHRINK )  , aRule + aShrinkType + " and isShrunk=0" );
   mgr->setRule( action( VISU_UNSHRINK ), aRule + aShrinkType + " and isShrunk=1" );
@@ -2850,23 +2943,19 @@ VisuGUI
   aRule = "selcount=1 and type='VISU::TCUTLINES' and nbNamedChildren=0";
   mgr->setRule( action( VISU_CREATE_TABLE ), aRule );
 
-  aRule = "selcount=1 and ($type in {" + aPrsAll + "})";
+  aRule = "client='VTKViewer' and selcount=1 and ($type in {" + aSimplePrsAll + "})";
   mgr->setRule( action( VISU_SWEEP ), aRule );
 
-  // "Selection info" popup item
-  aRule = "client='VTKViewer' and selcount=1" + anInsideType;
-  mgr->setRule( action( VISU_SELECTION_INFO ), aRule );
-
   aRule = "client='ObjectBrowser' and selcount>0";
   aRule += " and $type in {'VISU::TFIELD'}";
   aRule += " and nbTimeStamps>1";
-  aRule += " and activeView in {'VTKViewer' 'VVTK'}";
+  aRule += " and activeView in {'VTKViewer' 'SVTK'}";
   mgr->setRule( action( VISU_PARALLELANIMATION ), aRule );
 
-  aRule = "client='ObjectBrowser' and selcount>0";
+  aRule = "client='ObjectBrowser'";
+  aRule += " and (selcount=1 and nbTimeStamps>1 or selcount>1 and nbTimeStamps>0)";
   aRule += " and $type in {'VISU::TFIELD'}";
-  aRule += " and nbTimeStamps>0";
-  aRule += " and activeView in {'VTKViewer' 'VVTK'}";
+  aRule += " and activeView in {'VTKViewer' 'SVTK'}";
   mgr->setRule( action( VISU_SUCCCESSIVEANIMATION ), aRule );
 
   aRule = "client='ObjectBrowser' and $type in {'VISU::TENTITY' 'VISU::TFAMILY' 'VISU::TGROUP'}";
@@ -2900,6 +2989,23 @@ VisuGUI
   mgr->setRule( action( VISU_EXPORT_MED ), "selcount=1 and type in {'VISU::TRESULT'}" );
 }
 
+void VisuGUI::createPanels()
+{
+  myPanels.insert( SelectionPanelId,    new VisuGUI_SelectionPanel( this ) );
+  myPanels.insert( FeatureEdgesPanelId, new VisuGUI_FeatureEdgesPanel( this ) );
+  myPanels.insert( ClippingPlanesPanelId, new VisuGUI_ClippingPanel( this ) );
+
+  QMap< PanelId, VisuGUI_Panel* >::iterator it = myPanels.begin(), itEnd = myPanels.end();
+  for( ; it != itEnd; ++it )
+  {
+    if( VisuGUI_Panel* aPanel = it.value() )
+    {
+      aPanel->hide();
+      GetDesktop(this)->addDockWidget( Qt::RightDockWidgetArea, aPanel );
+    }
+  }
+}
+
 //***************************************************************************
 void VisuGUI::contextMenuPopup( const QString& theClient, QMenu* theMenu, QString& theTitle )
 {
@@ -2998,7 +3104,7 @@ void VisuGUI::contextMenuPopup( const QString& theClient, QMenu* theMenu, QStrin
 
   if(VISU::Base_i* aBase = aSelectionItem.myObjectInfo.myBase){
     if(aBase->GetType() == VISU::TCOLOREDPRS3DCACHE)
-      theMenu->addAction( action( VISU_CACHE_PROPERTIES ) );
+      theMenu->addAction( action( VISU_MANAGE_CACHE ) );
   }
 
   theMenu->addSeparator();
@@ -3078,10 +3184,10 @@ VisuGUI
 {
   theList.clear();
   // append SVTK viewer only if there is no opened VVTK
-  SUIT_ViewManager* vm = getApp()->getViewManager( VVTK_Viewer::Type(), false );
-  if( vm && vm->getViewsCount()>0 )
-    theList.append( VVTK_Viewer::Type() );
-  else
+//   SUIT_ViewManager* vm = getApp()->getViewManager( VVTK_Viewer::Type(), false );
+//   if( vm && vm->getViewsCount()>0 )
+//     theList.append( VVTK_Viewer::Type() );
+//   else
     theList.append( SVTK_Viewer::Type() );
 }
 
@@ -3099,7 +3205,8 @@ bool
 VisuGUI
 ::activateModule( SUIT_Study* theStudy )
 {
-  SalomeApp_Module::activateModule( theStudy );
+  bool aResult = SalomeApp_Module::activateModule( theStudy );
+
   studyActivated();
   setMenuShown( true );
   setToolShown( true );
@@ -3112,7 +3219,11 @@ VisuGUI
   action(VISU_DELETE_OBJS)->setEnabled(true); // Delete: Key_Delete
   action(VISU_RENAME     )->setEnabled(true); // Rename: Key_F2
 
-  return true;
+  ((VisuGUI_ClippingPanel*) myPanels[ClippingPlanesPanelId])->init();
+
+  emit moduleActivated();
+
+  return aResult;
 }
 
 
@@ -3123,14 +3234,24 @@ VisuGUI
   setMenuShown( false );
   setToolShown( false );
 
+  QMap< PanelId, VisuGUI_Panel* >::iterator it = myPanels.begin(), itEnd = myPanels.end();
+  for( ; it != itEnd; ++it )
+  {
+    if( VisuGUI_Panel* aPanel = it.value() )
+      aPanel->hide();
+  }
+
   // Unset actions accelerator keys
   action(VISU_IMPORT_FROM_FILE)->setShortcuts(QKeySequence::UnknownKey); // Import: CTRL + Key_I
 
   action(VISU_DELETE_OBJS)->setEnabled(false); // Delete: Key_Delete
   action(VISU_RENAME     )->setEnabled(false); // Rename: Key_F2
 
-  SalomeApp_Module::deactivateModule( theStudy );
-  return true;
+  bool aResult = SalomeApp_Module::deactivateModule( theStudy );
+  
+  emit moduleDeactivated();
+
+  return aResult;
 }
 
 LightApp_Selection*
@@ -3144,6 +3265,7 @@ VisuGUI
 void VisuGUI::studyActivated()
 {
   GetVisuGen(this)->SetCurrentStudy(GetDSStudy(GetCStudy(GetAppStudy(this))));
+  
 }
 
 /*
@@ -3222,23 +3344,11 @@ void VisuGUI::createPreferences()
   int fontGr = addPreference( tr( "VISU_FONT" ), sbarTab );
   setPreferenceProperty( fontGr, "columns", 2 );
 
-  int tfont = addPreference( tr( "VISU_TITLE" ), fontGr, LightApp_Preferences::Font, "VISU", "scalar_bar_title_font" );
+  addVtkFontPref( tr( "VISU_TITLE" ), fontGr, "scalar_bar_title_font", false );
   addPreference( tr( "VISU_TITLE" ), fontGr, LightApp_Preferences::Color, "VISU", "scalar_bar_title_color" );
-  int lfont = addPreference( tr( "VISU_LABELS" ), fontGr, LightApp_Preferences::Font, "VISU", "scalar_bar_label_font" );
-  addPreference( tr( "VISU_LABELS" ), fontGr, LightApp_Preferences::Color, "VISU", "scalar_bar_label_color" );
 
-  QStringList fam;
-  fam.append( tr( "VISU_FONT_ARIAL" ) );
-  fam.append( tr( "VISU_FONT_COURIER" ) );
-  fam.append( tr( "VISU_FONT_TIMES" ) );
-  int wflag = ( QtxFontEdit::All & ( ~( QtxFontEdit::Size | QtxFontEdit::UserSize ) ) );
-
-  setPreferenceProperty( tfont, "families", fam );
-  setPreferenceProperty( tfont, "system", false );
-  setPreferenceProperty( tfont, "widget_flags", wflag );
-  setPreferenceProperty( lfont, "families", fam );
-  setPreferenceProperty( lfont, "system", false );
-  setPreferenceProperty( lfont, "widget_flags", wflag );
+  addVtkFontPref( tr( "VISU_LABELS" ), fontGr, "scalar_bar_label_font", false );
+  addPreference( tr( "VISU_LABELS" ), fontGr, LightApp_Preferences::Color, "VISU", "scalar_bar_label_color" );
 
   // group: "Colors & Labels"
   int colorsLabelsGr = addPreference( tr( "VISU_COLORS_AND_LABELS" ), sbarTab );
@@ -3257,11 +3367,17 @@ void VisuGUI::createPreferences()
   setPreferenceProperty( numlab, "min", 2 );
   setPreferenceProperty( numlab, "max", 65 );
 
-  addPreference( tr( "VISU_LABELS_FORMAT" ), colorsLabelsGr,
-                LightApp_Preferences::String, "VISU", "scalar_bar_label_format" );
+  int lPrec = addPreference( tr( "PRECISION" ), colorsLabelsGr,
+    LightApp_Preferences::IntSpin, "VISU", "scalar_bar_label_precision" );
+
+  setPreferenceProperty( lPrec, "min", 1 );
+  setPreferenceProperty( lPrec, "max", 100 );
+  
+  int frame = addPreference( "", sbarTab, LightApp_Preferences::Frame, "", "" );
+  setPreferenceProperty( frame, "orientation", "horizontal" );
 
   // group: "Orientation"
-  int orientGr = addPreference( tr( "VISU_ORIENTATION" ), sbarTab );
+  int orientGr = addPreference( tr( "VISU_ORIENTATION" ), frame, LightApp_Preferences::GroupBox );
   setPreferenceProperty( orientGr, "columns", 2 );
   int orient = addPreference( tr( "VISU_ORIENTATION" ), orientGr,
                               LightApp_Preferences::Selector, "VISU", "scalar_bar_orientation" );
@@ -3274,8 +3390,17 @@ void VisuGUI::createPreferences()
   setPreferenceProperty( orient, "strings", orients );
   setPreferenceProperty( orient, "indexes", indices );
 
+  // group: "Scalar bars default position"
+  int scalarBarGr = addPreference( tr( "Scalar bars default position" ), frame, LightApp_Preferences::GroupBox );
+  addPreference( tr( "Arrange Scalar Bars" ), scalarBarGr, LightApp_Preferences::Bool, "VISU", "scalar_bars_default_position" );
+
+
   // group: "Origin & Size Vertical"
-  int posVSizeGr = addPreference( tr( "VISU_ORIGIN_AND_SIZE" ) + " " + tr( "VISU_VERTICAL" ), sbarTab );
+  int psSzFrame = addPreference( "", sbarTab, LightApp_Preferences::Frame, "", "" );
+  setPreferenceProperty( psSzFrame, "orientation", "horizontal" );
+
+  int posVSizeGr = addPreference( tr( "VISU_ORIGIN_AND_SIZE" ) + " " + tr( "VISU_VERTICAL" ),
+                                 psSzFrame, LightApp_Preferences::GroupBox );
   setPreferenceProperty( posVSizeGr, "columns", 2 );
   int xv = addPreference( tr( "VISU_X" ), posVSizeGr,
                           LightApp_Preferences::DblSpin, "VISU", "scalar_bar_vertical_x" );
@@ -3287,16 +3412,12 @@ void VisuGUI::createPreferences()
   int hv = addPreference( tr( "VISU_HEIGHT" ), posVSizeGr,
                           LightApp_Preferences::DblSpin, "VISU", "scalar_bar_vertical_height" );
 
-  int twv = addPreference( tr( "VISU_TITLE_WIDTH" ), posVSizeGr,
-                          LightApp_Preferences::IntSpin, "VISU", "scalar_bar_vertical_title_width" );
-  int thv = addPreference( tr( "VISU_TITLE_HEIGHT" ), posVSizeGr,
-                          LightApp_Preferences::IntSpin, "VISU", "scalar_bar_vertical_title_height" );
-
-  int lwv = addPreference( tr( "VISU_LABEL_WIDTH" ), posVSizeGr,
-                          LightApp_Preferences::IntSpin, "VISU", "scalar_bar_vertical_label_width" );
-  int lhv = addPreference( tr( "VISU_LABEL_HEIGHT" ), posVSizeGr,
-                          LightApp_Preferences::IntSpin, "VISU", "scalar_bar_vertical_label_height" );
-
+  int twv = addPreference( tr( "VISU_TITLE_SIZE" ), posVSizeGr,
+                          LightApp_Preferences::IntSpin, "VISU", "scalar_bar_vertical_title_size" );
+  
+  int lwv = addPreference( tr( "VISU_LABEL_SIZE" ), posVSizeGr,
+                          LightApp_Preferences::IntSpin, "VISU", "scalar_bar_vertical_label_size" );
+  
   int bwv = addPreference( tr( "VISU_BAR_WIDTH" ), posVSizeGr,
                           LightApp_Preferences::IntSpin, "VISU", "scalar_bar_vertical_bar_width" );
   int bhv = addPreference( tr( "VISU_BAR_HEIGHT" ), posVSizeGr,
@@ -3312,12 +3433,8 @@ void VisuGUI::createPreferences()
   setPreferenceProperty( hv, "min", 0.0 );
   setPreferenceProperty( twv, "min", 0 );
   setPreferenceProperty( twv, "special", "auto" );
-  setPreferenceProperty( thv, "min", 0 );
-  setPreferenceProperty( thv, "special", "auto" );
   setPreferenceProperty( lwv, "min", 0 );
   setPreferenceProperty( lwv, "special", "auto" );
-  setPreferenceProperty( lhv, "min", 0 );
-  setPreferenceProperty( lhv, "special", "auto" );
   setPreferenceProperty( bwv, "min", 0 );
   setPreferenceProperty( bwv, "special", "auto" );
   setPreferenceProperty( bhv, "min", 0 );
@@ -3327,14 +3444,13 @@ void VisuGUI::createPreferences()
   setPreferenceProperty( wv, "max", 1.0 );
   setPreferenceProperty( hv, "max", 1.0 );
   setPreferenceProperty( twv, "max", 100 );
-  setPreferenceProperty( thv, "max", 100 );
   setPreferenceProperty( lwv, "max", 100 );
-  setPreferenceProperty( lhv, "max", 100 );
   setPreferenceProperty( bwv, "max", 100 );
   setPreferenceProperty( bhv, "max", 100 );
 
   // group: "Origin & Size Horizontal"
-  int posHSizeGr = addPreference( tr( "VISU_ORIGIN_AND_SIZE" ) + " " + tr( "VISU_HORIZONTAL" ), sbarTab );
+  int posHSizeGr = addPreference( tr( "VISU_ORIGIN_AND_SIZE" ) + " " + tr( "VISU_HORIZONTAL" ),
+                                 psSzFrame, LightApp_Preferences::GroupBox );
   setPreferenceProperty( posHSizeGr, "columns", 2 );
 
   int xh = addPreference( tr( "VISU_X" ), posHSizeGr,
@@ -3347,19 +3463,15 @@ void VisuGUI::createPreferences()
   int hh = addPreference( tr( "VISU_HEIGHT" ), posHSizeGr,
                           LightApp_Preferences::DblSpin, "VISU", "scalar_bar_horizontal_height" );
 
-  int twh = addPreference( tr( "Title width (%)" ), posHSizeGr,
-                          LightApp_Preferences::IntSpin, "VISU", "scalar_bar_horizontal_title_width" );
-  int thh = addPreference( tr( "Title height (%)" ), posHSizeGr,
-                          LightApp_Preferences::IntSpin, "VISU", "scalar_bar_horizontal_title_height" );
-
-  int lwh = addPreference( tr( "Label width (%)" ), posHSizeGr,
-                          LightApp_Preferences::IntSpin, "VISU", "scalar_bar_horizontal_label_width" );
-  int lhh = addPreference( tr( "Label height (%)" ), posHSizeGr,
-                          LightApp_Preferences::IntSpin, "VISU", "scalar_bar_horizontal_label_height" );
-
-  int bwh = addPreference( tr( "Bar width (%)" ), posHSizeGr,
+  int twh = addPreference( tr( "VISU_TITLE_SIZE" ), posHSizeGr,
+                          LightApp_Preferences::IntSpin, "VISU", "scalar_bar_horizontal_title_size" );
+  
+  int lwh = addPreference( tr( "VISU_LABEL_SIZE" ), posHSizeGr,
+                          LightApp_Preferences::IntSpin, "VISU", "scalar_bar_horizontal_label_size" );
+  
+  int bwh = addPreference( tr( "VISU_BAR_WIDTH" ), posHSizeGr,
                           LightApp_Preferences::IntSpin, "VISU", "scalar_bar_horizontal_bar_width" );
-  int bhh = addPreference( tr( "Bar height (%)" ), posHSizeGr,
+  int bhh = addPreference( tr( "VISU_BAR_HEIGHT" ), posHSizeGr,
                           LightApp_Preferences::IntSpin, "VISU", "scalar_bar_horizontal_bar_height" );
 
   setPreferenceProperty( xh, "step", 0.1 );
@@ -3372,12 +3484,8 @@ void VisuGUI::createPreferences()
   setPreferenceProperty( hh, "min", 0.0 );
   setPreferenceProperty( twh, "min", 0 );
   setPreferenceProperty( twh, "special", "auto" );
-  setPreferenceProperty( thh, "min", 0 );
-  setPreferenceProperty( thh, "special", "auto" );
   setPreferenceProperty( lwh, "min", 0 );
   setPreferenceProperty( lwh, "special", "auto" );
-  setPreferenceProperty( lhh, "min", 0 );
-  setPreferenceProperty( lhh, "special", "auto" );
   setPreferenceProperty( bwh, "min", 0 );
   setPreferenceProperty( bwh, "special", "auto" );
   setPreferenceProperty( bhh, "min", 0 );
@@ -3387,16 +3495,10 @@ void VisuGUI::createPreferences()
   setPreferenceProperty( wh, "max", 1.0 );
   setPreferenceProperty( hh, "max", 1.0 );
   setPreferenceProperty( twh, "max", 100 );
-  setPreferenceProperty( thh, "max", 100 );
   setPreferenceProperty( lwh, "max", 100 );
-  setPreferenceProperty( lhh, "max", 100 );
   setPreferenceProperty( bwh, "max", 100 );
   setPreferenceProperty( bhh, "max", 100 );
 
-  // group: "Scalar bars default position"
-  int scalarBarGr = addPreference( tr( "Scalar bars default position" ), sbarTab );
-  addPreference( tr( "Arrange Scalar Bars" ), scalarBarGr, LightApp_Preferences::Bool, "VISU", "scalar_bars_default_position" );
-
   // TAB: "CutLines"
   int cutLineTab = addPreference( tr( "CutLines" ) );
 
@@ -3409,58 +3511,88 @@ void VisuGUI::createPreferences()
   addPreference( tr( "Generate data table" ), cutLineGr, LightApp_Preferences::Bool, "VISU", "generate_data_table" );
   addPreference( tr( "Generate curves" ), cutLineGr, LightApp_Preferences::Bool, "VISU", "generate_curves" );
 
-  // TAB: "Sweep, Animation"
-  int srangeTab = addPreference( tr( "Sweep, Animation" ) );
-
-  // group: "Sweeping preferences"
-  int sweepGr = addPreference( tr( "VISU_SWEEPING_PREF" ), srangeTab );
-  setPreferenceProperty( sweepGr, "columns", 2 );
-
-  int modeSw = addPreference( tr( "VISU_SWEEPING_MODES" ), sweepGr, LightApp_Preferences::Selector, "VISU", "sweeping_modes" );
-  QStringList sweep_modes;
-  sweep_modes.append( tr( "VISU_LINEAR_SWEEP" ) );
-  sweep_modes.append( tr( "VISU_COS_SWEEP" ) );
-  sweep_modes.append( tr( "VISU_SIN_SWEEP" ) );
-  indices.clear();
-  indices.append( 0 );
-  indices.append( 1 );
-  indices.append( 2 );
-  setPreferenceProperty( modeSw, "strings", sweep_modes );
-  setPreferenceProperty( modeSw, "indexes", indices );
-
-  int timestep   = addPreference( tr( "VISU_TIME_STEP" ), sweepGr,
-                                  LightApp_Preferences::DblSpin, "VISU", "sweeping_time_step" );
-  int nbcycles   = addPreference( tr( "VISU_NB_CYCLES" ), sweepGr,
-                                  LightApp_Preferences::IntSpin, "VISU", "sweeping_number_cycles" );
-  int nbsteps    = addPreference( tr( "VISU_NB_STEPS" ),  sweepGr,
-                                  LightApp_Preferences::IntSpin, "VISU", "sweeping_number_steps" );
-  int rangeSw = addPreference( tr( "VISU_IS2PI" ), sweepGr, LightApp_Preferences::Selector, "VISU", "sweeping_is2PI" );
-  QStringList ranges;
-  ranges.append( tr( "PERIOD_PI" ) );
-  ranges.append( tr( "PERIOD_2PI" ) );
-  indices.clear();
-  indices.append( 0 );
-  indices.append( 1 );
-  setPreferenceProperty( rangeSw, "strings", ranges );
-  setPreferenceProperty( rangeSw, "indexes", indices );
-
-  setPreferenceProperty( timestep, "min",  0.1 );
-  setPreferenceProperty( timestep, "step", 0.1 );
-  setPreferenceProperty( timestep, "max",  1000 );
-  setPreferenceProperty( nbcycles, "max",  100  );
-  setPreferenceProperty( nbsteps,  "max",  200  );
-
-  // group: "Animation preferences"
-  int animationGr = addPreference( tr( "Animation preferences" ), srangeTab );
-  setPreferenceProperty( animationGr, "columns", 3 );
+  // TAB: "Sweep, Animation, 3D Cache"
+  int animationTab = addPreference( tr( "Animation" ) );
+  {
+    // group: "3D Cache System prefereces"
+    {
+      int cacheGroup = addPreference( tr( "VISU_3DCACHE_PREFERENCES" ), animationTab );
+      setPreferenceProperty( cacheGroup, "columns", 2 );
+      
+      int memory_mode = addPreference( tr( "VISU_MEMORY_MODE" ), cacheGroup,
+                                      LightApp_Preferences::Selector, "VISU", "cache_memory_mode" );
+      
+      modes.clear();
+      modes.append( tr( "VISU_MINIMAL" ) );
+      modes.append( tr( "VISU_LIMITED" ) );
+      setPreferenceProperty( memory_mode, "strings", modes );
+      
+      indices.clear();
+      indices.append( 0 );
+      indices.append( 1 );
+      setPreferenceProperty( memory_mode, "indexes", indices );
+      
+      int memory_limit = addPreference( tr( "VISU_MEMORY_LIMIT" ), cacheGroup,
+                                       LightApp_Preferences::IntSpin, "VISU", "cache_memory_limit" );
+      setPreferenceProperty( memory_limit, "min", 1 );
+      setPreferenceProperty( memory_limit, "max", 5000 );
+      setPreferenceProperty( memory_limit, "step", 10 );
+    }
 
-  int speed = addPreference( tr( "Speed" ), animationGr, LightApp_Preferences::IntSpin, "VISU", "speed" );
-  addPreference( tr( "Cycled animation" ), animationGr, LightApp_Preferences::Bool, "VISU", "cycled_animation" );
-  addPreference( tr( "Use proportional timing" ), animationGr, LightApp_Preferences::Bool, "VISU", "use_proportional_timing" );
-  addPreference( tr( "Clean memory at each frame" ), animationGr, LightApp_Preferences::Bool, "VISU", "clean_memory_at_each_frame" );
+    // group: "Animation preferences"
+    {
+      int animationGroup = addPreference( tr( "VISU_ANIMATION_PREFERENCES" ), animationTab );
+      setPreferenceProperty( animationGroup, "columns", 3 );
+      
+      int speed = addPreference( tr( "Speed" ), animationGroup, LightApp_Preferences::IntSpin, "VISU", "speed" );
+      addPreference( tr( "Cycled animation" ), animationGroup, LightApp_Preferences::Bool, "VISU", "cycled_animation" );
+      addPreference( tr( "Use proportional timing" ), animationGroup, LightApp_Preferences::Bool, "VISU", "use_proportional_timing" );
+      addPreference( tr( "Clean memory at each frame" ), animationGroup, LightApp_Preferences::Bool, "VISU", "clean_memory_at_each_frame" );
+      
+      setPreferenceProperty( speed, "min", 1 );
+      setPreferenceProperty( speed, "max", 99 );
+    }
 
-  setPreferenceProperty( speed, "min", 1 );
-  setPreferenceProperty( speed, "max", 99 );
+    // group: "Sweeping preferences"
+    {
+      int sweepGroup = addPreference( tr( "VISU_SWEEPING_PREF" ), animationTab );
+      setPreferenceProperty( sweepGroup, "columns", 2 );
+      
+      int modeSw = addPreference( tr( "VISU_SWEEPING_MODES" ), sweepGroup, LightApp_Preferences::Selector, "VISU", "sweeping_modes" );
+      QStringList sweep_modes;
+      sweep_modes.append( tr( "VISU_LINEAR_SWEEP" ) );
+      sweep_modes.append( tr( "VISU_COS_SWEEP" ) );
+      sweep_modes.append( tr( "VISU_SIN_SWEEP" ) );
+      indices.clear();
+      indices.append( 0 );
+      indices.append( 1 );
+      indices.append( 2 );
+      setPreferenceProperty( modeSw, "strings", sweep_modes );
+      setPreferenceProperty( modeSw, "indexes", indices );
+      
+      int timestep   = addPreference( tr( "VISU_TIME_STEP" ), sweepGroup,
+                                     LightApp_Preferences::DblSpin, "VISU", "sweeping_time_step" );
+      int nbcycles   = addPreference( tr( "VISU_NB_CYCLES" ), sweepGroup,
+                                     LightApp_Preferences::IntSpin, "VISU", "sweeping_number_cycles" );
+      int nbsteps    = addPreference( tr( "VISU_NB_STEPS" ),  sweepGroup,
+                                     LightApp_Preferences::IntSpin, "VISU", "sweeping_number_steps" );
+      int rangeSw = addPreference( tr( "VISU_IS2PI" ), sweepGroup, LightApp_Preferences::Selector, "VISU", "sweeping_is2PI" );
+      QStringList ranges;
+      ranges.append( tr( "PERIOD_PI" ) );
+      ranges.append( tr( "PERIOD_2PI" ) );
+      indices.clear();
+      indices.append( 0 );
+      indices.append( 1 );
+      setPreferenceProperty( rangeSw, "strings", ranges );
+      setPreferenceProperty( rangeSw, "indexes", indices );
+      
+      setPreferenceProperty( timestep, "min",  0.1 );
+      setPreferenceProperty( timestep, "step", 0.1 );
+      setPreferenceProperty( timestep, "max",  1000 );
+      setPreferenceProperty( nbcycles, "max",  100  );
+      setPreferenceProperty( nbsteps,  "max",  200  );
+    }
+  }
 
   // TAB: Representation ; group: "Representation properties"
   int representationTab = addPreference( tr( "Representation" ) );
@@ -3474,16 +3606,23 @@ void VisuGUI::createPreferences()
   mesh_modes.append( "Insideframe" );
   mesh_modes.append( "Surfaceframe" );
   mesh_modes.append( "Surface" );
+  mesh_modes.append( "Feature edges" );
   QList<QVariant> mesh_indices;
   mesh_indices.append( 0 );
   mesh_indices.append( 1 );
   mesh_indices.append( 3 );
   mesh_indices.append( 4 );
   mesh_indices.append( 2 );
+  mesh_indices.append( 5 );
+
+  QStringList modes0 = mesh_modes;
+  modes0.removeAll( "Feature edges" );
+  QList<QVariant> indices0 = mesh_indices;
+  indices0.removeAll( 5 );
 
-  QStringList modes1 = mesh_modes;
+  QStringList modes1 = modes0;
   modes1.removeAll( "Insideframe" );
-  QList<QVariant> indices1 = mesh_indices;
+  QList<QVariant> indices1 = indices0;
   indices1.removeAll( 3 );
 
   QStringList modes2 = modes1;
@@ -3503,8 +3642,8 @@ void VisuGUI::createPreferences()
   addPreference( tr( "VISU_SHRINK" ), representGr, LightApp_Preferences::Bool, "VISU", "mesh_shrink" );
 
   int scalar_map_represent = addPreference( tr( "VISU_SCALAR_MAP" ), representGr, LightApp_Preferences::Selector, "VISU", "scalar_map_represent" );
-  setPreferenceProperty( scalar_map_represent, "strings", mesh_modes );
-  setPreferenceProperty( scalar_map_represent, "indexes", mesh_indices );
+  setPreferenceProperty( scalar_map_represent, "strings", modes0 );
+  setPreferenceProperty( scalar_map_represent, "indexes", indices0 );
   addPreference( tr( "VISU_SHRINK" ), representGr, LightApp_Preferences::Bool, "VISU", "scalar_map_shrink" );
 
   int iso_surfaces_represent = addPreference( tr( "VISU_ISO_SURFACES" ), representGr, LightApp_Preferences::Selector, "VISU", "iso_surfaces_represent" );
@@ -3527,8 +3666,8 @@ void VisuGUI::createPreferences()
   setPreferenceProperty( sp, "vstretch", 0 );
 
   int deformed_shape_represent = addPreference( tr( "VISU_DEFORMED_SHAPE" ), representGr, LightApp_Preferences::Selector, "VISU", "deformed_shape_represent" );
-  setPreferenceProperty( deformed_shape_represent, "strings", mesh_modes );
-  setPreferenceProperty( deformed_shape_represent, "indexes", mesh_indices );
+  setPreferenceProperty( deformed_shape_represent, "strings", modes0 );
+  setPreferenceProperty( deformed_shape_represent, "indexes", indices0 );
   addPreference( tr( "VISU_SHRINK" ), representGr, LightApp_Preferences::Bool, "VISU", "deformed_shape_shrink" );
 
   int vectors_represent = addPreference( tr( "VISU_VECTORS" ), representGr, LightApp_Preferences::Selector, "VISU", "vectors_represent" );
@@ -3575,30 +3714,39 @@ void VisuGUI::createPreferences()
   addPreference( tr( "VISU_AUTOMATIC_FIT_ALL" ), representGr,
                  LightApp_Preferences::Bool, "VISU", "automatic_fit_all" );
 
-  // TAB: 3D Cache ; group: "Cache properties"
-  int cacheTab = addPreference( tr( "3D Cache" ) );
+  // TAB: Feature edges ; group: "Feature edges properties"
+  int featureEdgesTab = addPreference( tr( "VISU_FEATURE_EDGES" ) );
 
-  int cacheGr = addPreference( tr( "VISU_3DCACHE_PROPS" ), cacheTab );
-  setPreferenceProperty( cacheGr, "columns", 2 );
+  int featureEdgesGr = addPreference( tr( "VISU_FEATURE_EDGES_PROPS" ), featureEdgesTab );
+  setPreferenceProperty( featureEdgesGr, "columns", 2 );
 
-  int memory_mode = addPreference( tr( "VISU_MEMORY_MODE" ), cacheGr,
-                                  LightApp_Preferences::Selector, "VISU", "cache_memory_mode" );
+  int featureEdgesAnglePref = addPreference( tr( "VISU_FEATURE_EDGES_ANGLE" ), featureEdgesGr,
+                                            LightApp_Preferences::DblSpin, "VISU", "feature_edges_angle" );
+  setPreferenceProperty( featureEdgesAnglePref, "step", 10.0 );
+  setPreferenceProperty( featureEdgesAnglePref, "min", 0.0 );
+  setPreferenceProperty( featureEdgesAnglePref, "max", 90.0 );
+
+  addPreference( tr( "VISU_SHOW_FEATURE_EDGES" ), featureEdgesGr, LightApp_Preferences::Bool, "VISU", "show_feature_edges" );
+  addPreference( tr( "VISU_SHOW_BOUNDARY_EDGES" ), featureEdgesGr, LightApp_Preferences::Bool, "VISU", "show_boundary_edges" );
+  addPreference( tr( "VISU_SHOW_MANIFOLD_EDGES" ), featureEdgesGr, LightApp_Preferences::Bool, "VISU", "show_manifold_edges" );
+  addPreference( tr( "VISU_SHOW_NON_MANIFOLD_EDGES" ), featureEdgesGr, LightApp_Preferences::Bool, "VISU", "show_non_manifold_edges" );
+  //addPreference( tr( "VISU_FEATURE_EDGES_COLORING" ), featureEdgesGr, LightApp_Preferences::Bool, "VISU", "feature_edges_coloring" );
+  
+  // TAB: "Values labels"
+  
+  int valLblTab = addPreference( tr( "VALUES_LABELING" ) );
 
-  modes.clear();
-  modes.append( tr( "VISU_MINIMAL" ) );
-  modes.append( tr( "VISU_LIMITED" ) );
-  setPreferenceProperty( memory_mode, "strings", modes );
+  // "Font" group
+  int valLblFontGr = addPreference( tr( "VISU_FONT" ), valLblTab );
+  setPreferenceProperty( valLblFontGr, "columns", 2 );
 
-  indices.clear();
-  indices.append( 0 );
-  indices.append( 1 );
-  setPreferenceProperty( memory_mode, "indexes", indices );
+  // font
+  addVtkFontPref( tr( "LABELS" ), valLblFontGr, "values_labeling_font", true );
+
+  // color
+  addPreference( tr( "COLOR" ), valLblFontGr, 
+    LightApp_Preferences::Color, "VISU", "values_labeling_color" );
 
-  int memory_limit = addPreference( tr( "VISU_MEMORY_LIMIT" ), cacheGr,
-                                   LightApp_Preferences::IntSpin, "VISU", "cache_memory_limit" );
-  setPreferenceProperty( memory_limit, "min", 1 );
-  setPreferenceProperty( memory_limit, "max", 5000 );
-  setPreferenceProperty( memory_limit, "step", 10 );
 }
 
 void VisuGUI::preferencesChanged( const QString& a, const QString& b)
@@ -3610,8 +3758,8 @@ void VisuGUI::preferencesChanged( const QString& a, const QString& b)
   float aTol = 1.00000009999999;
   QString aWarning;
   if(b == QString("scalar_bar_vertical_x") || b == QString("scalar_bar_vertical_width")){
-    sbX1 = aResourceMgr->doubleValue("VISU", "scalar_bar_vertical_x", sbX1);
-    sbW = aResourceMgr->doubleValue("VISU", "scalar_bar_vertical_width", sbW);
+    sbX1 = aResourceMgr->doubleValue("VISU", "scalar_bar_vertical_x", 0.01);
+    sbW = aResourceMgr->doubleValue("VISU", "scalar_bar_vertical_width", 0.05);
     if(sbX1+sbW > aTol){
       aWarning = "Origin and Size Vertical: X+Width > 1\n";
       sbX1=0.01;
@@ -3621,8 +3769,8 @@ void VisuGUI::preferencesChanged( const QString& a, const QString& b)
     }
   }
   else if(b == QString("scalar_bar_vertical_y") || b == QString("scalar_bar_vertical_height")){
-    sbY1 = aResourceMgr->doubleValue("VISU", "scalar_bar_vertical_y", sbY1);
-    sbH = aResourceMgr->doubleValue("VISU", "scalar_bar_vertical_height",sbH);
+    sbY1 = aResourceMgr->doubleValue("VISU", "scalar_bar_vertical_y", 0.01);
+    sbH = aResourceMgr->doubleValue("VISU", "scalar_bar_vertical_height",0.5);
     if(sbY1+sbH > aTol){
       aWarning = "Origin and Size Vertical: Y+Height > 1\n";
       sbY1=0.01;
@@ -3632,8 +3780,8 @@ void VisuGUI::preferencesChanged( const QString& a, const QString& b)
     }
   }
   else if(b ==  QString("scalar_bar_horizontal_x") || b ==  QString("scalar_bar_horizontal_width")){
-    sbX1 = aResourceMgr->doubleValue("VISU", "scalar_bar_horizontal_x", sbX1);
-    sbW = aResourceMgr->doubleValue("VISU", "scalar_bar_horizontal_width", sbW);
+    sbX1 = aResourceMgr->doubleValue("VISU", "scalar_bar_horizontal_x", 0.2);
+    sbW = aResourceMgr->doubleValue("VISU", "scalar_bar_horizontal_width", 0.6);
     if(sbX1+sbW > aTol){
       aWarning = "Origin and Size Horizontal: X+Width > 1\n";
       sbX1=0.2;
@@ -3643,8 +3791,8 @@ void VisuGUI::preferencesChanged( const QString& a, const QString& b)
     }
   }
   else if(b ==  QString("scalar_bar_horizontal_y") || b ==  QString("scalar_bar_horizontal_height")){
-    sbY1 = aResourceMgr->doubleValue("VISU", "scalar_bar_horizontal_y", sbY1);
-    sbH = aResourceMgr->doubleValue("VISU", "scalar_bar_horizontal_height",sbH);
+    sbY1 = aResourceMgr->doubleValue("VISU", "scalar_bar_horizontal_y", 0.01);
+    sbH = aResourceMgr->doubleValue("VISU", "scalar_bar_horizontal_height",0.12);
     if(sbY1+sbH > aTol){
       aWarning = "Origin and Size Horizontal: Y+Height > 1\n";
       sbY1=0.01;
@@ -3652,17 +3800,8 @@ void VisuGUI::preferencesChanged( const QString& a, const QString& b)
       aResourceMgr->setValue("VISU", "scalar_bar_horizontal_y", sbY1);
       aResourceMgr->setValue("VISU", "scalar_bar_horizontal_height",sbH);
     }
-  } else if(b == QString("scalar_bar_label_format")) {
-    QString dVal;
-    dVal.sprintf(aResourceMgr->stringValue("VISU", "scalar_bar_label_format",dVal).toLatin1().data(), 1.1);
-    if(dVal.toDouble() == 0.) {
-      aWarning = "Label format is incorrect ";
-      aWarning += dVal;
-      aWarning += "\n";
-      dVal="%-#6.3g";
-      aResourceMgr->setValue("VISU", "scalar_bar_label_format", dVal);
-    }
-  }
+  } 
+  
   if ( !aWarning.isEmpty() ){
     aWarning += "The default values are applied instead.";
     SUIT_MessageBox::warning(GetDesktop(this),
@@ -3734,7 +3873,7 @@ void VisuGUI::OnPlot3dFromCutPlane()
    _PTR(SObject) aTimeStampSObj = aSObject->GetFather();
    if (SUIT_ViewManager* aViewManager = getApp()->activeViewManager()) {
      QString aViewType = aViewManager->getType();
-     bool anIsVVTK = (aViewType == VVTK_Viewer::Type());
+     //bool anIsVVTK = (aViewType == VVTK_Viewer::Type());
 
      Storable::TRestoringMap aRestoringMap = Storable::GetStorableMap(aTimeStampSObj);
      VISU::VISUType aType = VISU::Storable::RestoringMap2Type( aRestoringMap );
@@ -3748,13 +3887,13 @@ void VisuGUI::OnPlot3dFromCutPlane()
 
      int aPos;
      SUIT_ViewWindow* aViewWindow = 0;
-     if (anIsVVTK) {
-       aViewWindow = GetViewWindow<VVTK_Viewer>(this);
-       aPos = GetFreePositionOfDefaultScalarBar(this, dynamic_cast<VVTK_ViewWindow*>(aViewWindow));
-     } else {
+//      if (anIsVVTK) {
+//     aViewWindow = GetViewWindow<VVTK_Viewer>(this);
+//     aPos = GetFreePositionOfDefaultScalarBar(this, dynamic_cast<VVTK_ViewWindow*>(aViewWindow));
+//      } else {
        aViewWindow = GetViewWindow<SVTK_Viewer>(this);
        aPos = GetFreePositionOfDefaultScalarBar(this, dynamic_cast<SVTK_ViewWindow*>(GetViewWindow<SVTK_Viewer>(this)));
-     }
+       //     }
      GetResourceMgr()->setValue("VISU", "scalar_bar_position_num", aPos);
 
      VISU::Plot3D_i* aPrs3d =
@@ -3792,31 +3931,17 @@ void VisuGUI::OnPlot3dFromCutPlane()
 
          AddScalarBarPosition(this, aSVtkWindow, aPrs3d, aPos);
        }
+       if (aPrs3d)
+         emit presentationCreated(aPrs3d);
      }
    }
    application()->putInfo(QObject::tr("INF_DONE"));
  }
 }
 
-void VisuGUI::OnCacheProperties()
+void VisuGUI::OnManageCache()
 {
-  VISU::TSelectionInfo aSelectionInfo = VISU::GetSelectedObjects(this);
-  if(aSelectionInfo.empty())
-    return;
-
-  VISU::TSelectionItem aSelectionItem = aSelectionInfo.front();
-  _PTR(SObject) aSObject = aSelectionItem.myObjectInfo.mySObject;
-
-  CORBA::Object_var anObject = VISU::ClientSObjectToObject(aSObject);
-  if( CORBA::is_nil( anObject ) )
-    return;
-
-  VISU::ColoredPrs3dCache_var aCache = VISU::GetInterface<VISU::ColoredPrs3dCache>(anObject);
-  if( CORBA::is_nil( aCache ) )
-    return;
-
-  VisuGUI_CacheDlg* aDlg = new VisuGUI_CacheDlg( aCache, this );
-  aDlg->exec();
+  mySlider->show();
 }
 
 
@@ -3936,7 +4061,7 @@ void VisuGUI::OnExportMED()
 
   SUIT_ResourceMgr* aResourceMgr = GetResourceMgr();
   QString aDir = aResourceMgr->stringValue("VISU","OutputDir","");
-  
+
   // get name for the file
   QStringList aFilter;
   aFilter.append("MED Files (*.med)");
@@ -3946,7 +4071,7 @@ void VisuGUI::OnExportMED()
   QString aBaseName = anInitFileInfo.fileName();
 
   QString aPath = Qtx::addSlash(aDir) + aBaseName;
-  
+
   QFileInfo aFileInfo =
     SUIT_FileDlg::getFileName(GetDesktop(this),
                              aPath,
@@ -3959,3 +4084,107 @@ void VisuGUI::OnExportMED()
     aResult->ExportMED((const char*)aFile.toLatin1());
   }
 }
+
+void VisuGUI::OnFilterScalars()
+{
+  VisuGUI_FilterScalarsDlg* aDlg = new VisuGUI_FilterScalarsDlg( this );
+  aDlg->show();
+}
+
+/*!
+  \brief SLOT called when "Labeling" popup menu item of presentation is clicked 
+   activates/deactivates labeling of results of the screen. This functionality works 
+   to numbering in SMESH module but is intended for showing results on the screen 
+   instead of elements numbers
+   \sa OnValuesLabelingParams()
+*/
+void VisuGUI::OnValuesLabeling()
+{
+  // to do: rewrite for several actors if necessary
+
+  VISU::TSelectionInfo aSelectionInfo = VISU::GetSelectedObjects( this );
+  if ( aSelectionInfo.empty() )
+    return;
+
+  TSelectionItem aSelectionItem = GetSelectedObjects(this).front();
+  VISU::Prs3d_i* aPrs3d = GetPrs3dFromBase(aSelectionItem.myObjectInfo.myBase);
+  if(!aPrs3d)
+    return;
+
+  SVTK_ViewWindow* aViewWindow = GetActiveViewWindow<SVTK_ViewWindow>(this);
+  if(!aViewWindow)
+    return;
+
+  VISU_Actor* anActor = FindActor(aViewWindow, aPrs3d);
+  if(!anActor)
+    return;
+
+  if( VISU_ScalarMapAct* aScalarMapActor = dynamic_cast<VISU_ScalarMapAct*>(anActor) )
+  {
+    aScalarMapActor->SetValuesLabeled( !aScalarMapActor->GetValuesLabeled() );
+    aViewWindow->Repaint();
+  }
+  else if( VISU_GaussPtsAct* aGaussPtsAct = dynamic_cast<VISU_GaussPtsAct*>(anActor) )
+  {
+    aGaussPtsAct->SetValuesLabeled( !aGaussPtsAct->GetValuesLabeled() );
+    aViewWindow->Repaint();
+  }
+}
+
+/*!
+  \brief SLOT called when "Labeling parameters" popup menu item of presentation 
+  is clicked launch dialog box for changing parameters of labeling
+  \sa OnValuesLabeling()
+*/
+void VisuGUI::OnValuesLabelingParams()
+{
+  Handle(SALOME_InteractiveObject) anIO;
+  if ( VISU::Prs3d_i* aPrs3d = GetPrsToModify( this, anIO ) )
+    EditPrs3d<VISU::ColoredPrs3d_i, VisuGUI_ValuesLabelingDlg, 1>(this, anIO, aPrs3d);  
+}
+/*!
+  \brief Adds preferences for dfont of VTK viewer
+  \param label label
+  \param pIf group identifier
+  \param param parameter
+  \return identifier of preferences
+*/
+int VisuGUI::addVtkFontPref( 
+  const QString& label, 
+  const int pId, 
+  const QString& param, 
+  const bool useSize )
+{
+  int tfont = addPreference( label, pId, LightApp_Preferences::Font, "VISU", param );
+  
+  setPreferenceProperty( tfont, "mode", QtxFontEdit::Custom );
+
+  QStringList fam;
+  fam.append( tr( "VISU_FONT_ARIAL" ) );
+  fam.append( tr( "VISU_FONT_COURIER" ) );
+  fam.append( tr( "VISU_FONT_TIMES" ) );
+
+  setPreferenceProperty( tfont, "fonts", fam );
+
+  int f = QtxFontEdit::Family | QtxFontEdit::Bold | QtxFontEdit::Italic | QtxFontEdit::Shadow;
+  if ( useSize )
+    f |= QtxFontEdit::UserSize | QtxFontEdit::Size;
+
+  setPreferenceProperty( tfont, "features", f );
+
+  return tfont;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
index 2325ddc12656345b7824a79546d35f5d1551b5da..6ca1a8a2ad1aefe8e06137a1f3e050e9a4a6f658 100644 (file)
 #ifndef VisuGUI_HeaderFile
 #define VisuGUI_HeaderFile
 
-#include <map>
-#include <set>
+#include <SalomeApp_Module.h>
 
-#include "SalomeApp_Module.h"
-
-#include "SALOME_ListIO.hxx"
-#include "VISU_Prs3d_i.hh"
-#include "SVTK_ViewWindow.h"
+#include <SVTK_ViewWindow.h>
+#include <VISU_Prs3d_i.hh>
 
+#include "VisuGUI_Panel.h"
 
+#include <map>
+#include <set>
 
 class SUIT_ViewManager;
-class SVTK_ViewWindow;
-class Prs3d_i;
+class VisuGUI_Slider;
+class VisuGUI_Sweep;
 
 namespace VISU
 {
+  class Prs3d_i;
   typedef std::pair<Prs3d_i*,int> TPrs3dToInd; // prs pointer and default index of scalar bar placement
   typedef std::set<TPrs3dToInd> TSetPrs3d;
   typedef std::map<SVTK_ViewWindow*,TSetPrs3d> TViewToPrs3d;
@@ -56,7 +56,11 @@ class VisuGUI: public SalomeApp_Module
   Q_OBJECT;
 
 public:
+  enum PanelId { SelectionPanelId = 0,
+                FeatureEdgesPanelId,
+                 ClippingPlanesPanelId };
 
+public:
   VisuGUI();
   virtual ~VisuGUI();
 
@@ -81,7 +85,13 @@ public:
 
   VISU::TViewToPrs3d&
   getScalarBarsMap();
-  
+
+signals:
+  void moduleDeactivated();
+  void moduleActivated();
+  void presentationCreated(VISU::Prs3d_i* thePrs);
+  void beforeObjectDelete(QString theEntry);
+
 public slots:
   virtual bool deactivateModule( SUIT_Study* );
   virtual bool activateModule( SUIT_Study* );
@@ -123,6 +133,10 @@ protected slots:
   virtual void OnErasePrs();
   //  virtual void OnEraseAll();
 
+  void OnToggleSelectionPanel();
+  void OnSwitchSelectionMode();
+  void OnSwitchSelectionMode( int );
+
   void OnMakeSurfaceframe();
   void OnMakeInsideframe();
   void OnMakeWireframe();
@@ -130,6 +144,8 @@ protected slots:
   void OnMakePoints();
   void OnMakeShrink();
 
+  void OnMakeFeatureEdges();
+
   void OnSetShadingOn();
   void OnSetShadingOff();
 
@@ -162,13 +178,16 @@ protected slots:
 
   void OnCopyPresentation();
 
-  void OnSelectionInfo();
-
   void OnTranslatePrs();
   void OnArrangeActors();
   void OnPlot3dFromCutPlane();
 
-  void OnCacheProperties();
+  void OnManageCache();
+
+  void OnFilterScalars();
+  
+  void OnValuesLabeling();
+  void OnValuesLabelingParams();
 
   // MULTIPR
   void OnMultiprViewFullRes();
@@ -190,10 +209,16 @@ private:
   void createMenus();
   void createToolBars();
   void createPopupMenus();
+  void createPanels();
+  int  addVtkFontPref( const QString& label, const int pId, const QString& param, const bool useSize );
 
 private:
-  LightApp_Displayer* myDisplayer;
-  VISU::TViewToPrs3d myScalarBarsMap;
+  QMap< PanelId, VisuGUI_Panel* > myPanels;
+  VisuGUI_Slider*         mySlider;
+  VisuGUI_Sweep*          mySweep; 
+
+  LightApp_Displayer*     myDisplayer;
+  VISU::TViewToPrs3d      myScalarBarsMap;
 };
 
 #endif
index 13cb18dbee1517def33ee114d6f373695ead1538..0abafd3f37292ebe8b1a3dce130b396911759f5e 100644 (file)
@@ -75,6 +75,9 @@
 #define VISU_SHRINK                 4055
 #define VISU_UNSHRINK               4056
 
+#define VISU_FEATURE_EDGES          4091
+#define VISU_FEATURE_EDGES_DISABLE  4092
+
 #define VISU_SHADING                4083
 #define VISU_NOSHADING              4084
 
 
 #define VISU_PLOT3D_FROM_CUTPLANE   4085
 
-#define VISU_CACHE_PROPERTIES       4090
+#define VISU_MANAGE_CACHE           4090
 
 // MULTIPR
 #define VISU_MULTIPR_FULL_RES       4095
 #define VISU_FILE_INFO              4100
 #define VISU_EXPORT_MED             4101
 
+#define VISU_SELECTION_PANEL        4102
+#define VISU_ACTOR_SELECTION        4103
+#define VISU_CELL_SELECTION         4104
+#define VISU_POINT_SELECTION        4105
+#define VISU_GAUSS_POINT_SELECTION  4106
+
+#define VISU_SLIDER_PANEL           4200
+#define VISU_SWEEP_PANEL            4300
+#define VISU_FILTERSCALARS          4301
+
+#define VISU_VALUES_LABELING        4302
+#define VISU_VALUES_LABELING_PARAMS 4303
+
+
 #endif
index 7dc9d39b96dbbbffb2e2aa4978cb2b61ab91bf5d..1a9dd664a9ea5988c483397fa77a142ff07c4193 100644 (file)
 #include "VISU_Result_i.hh"
 
 #include "VISU_PipeLine.hxx"
+#include "VISU_DataSetActor.h"
 
 #include "LightApp_SelectionMgr.h"
 #include "LightApp_Application.h"
 
 #include "SVTK_ViewWindow.h"
+#include <VTKViewer_Utilities.h>
 
 #include "SUIT_Session.h"
 #include "SUIT_Desktop.h"
@@ -41,6 +43,7 @@
 #include "SUIT_OverrideCursor.h"
 
 #include "SALOME_Actor.h"
+#include "VISU_ViewManager_i.hh"
 
 // QT Includes
 #include <QLabel>
 #include <QSpinBox>
 #include <QKeyEvent>
 #include <QPushButton>
+#include <QListWidget>
+#include <QVBoxLayout>
+#include <QHBoxLayout>
+#include <QStackedWidget>
 
 // VTK Includes
 #include <vtkMath.h>
@@ -67,6 +74,7 @@
 #include <vtkPolyData.h>
 #include <vtkUnstructuredGrid.h>
 #include <vtkProperty.h>
+#include <vtkImplicitFunctionCollection.h>
 
 // OCCT Includes
 #include <gp_Dir.hxx>
@@ -244,25 +252,31 @@ VisuGUI_ClippingDlg::VisuGUI_ClippingDlg (VisuGUI* theModule,
     mySelectionMgr(VISU::GetSelectionMgr(theModule)),
     myVisuGUI(theModule),
     myPrs3d(0),
-    myIsSelectPlane(false)
+    myIsSelectPlane(false),
+    myDSActor(0)
 {
   setWindowTitle(tr("TITLE"));
   setSizeGripEnabled(TRUE);
   setAttribute( Qt::WA_DeleteOnClose, true );
 
-  QGridLayout* VisuGUI_ClippingDlgLayout = new QGridLayout(this);
+  QVBoxLayout* VisuGUI_ClippingDlgLayout = new QVBoxLayout(this);
   VisuGUI_ClippingDlgLayout->setSpacing(6);
   VisuGUI_ClippingDlgLayout->setMargin(11);
+  
+  QStackedWidget* aStackWidget = new QStackedWidget(this);
+  VisuGUI_ClippingDlgLayout->addWidget(aStackWidget);
+  // Local planes
+  QWidget* aLocalPlanes = new QWidget(aStackWidget);
+  QVBoxLayout* aLocalLayout = new QVBoxLayout(aLocalPlanes);
+  aStackWidget->addWidget(aLocalPlanes);
 
   // Controls for selecting, creating, deleting planes
-  QGroupBox* GroupPlanes = new QGroupBox (tr("GRP_PLANES"),  this);
-  //GroupPlanes->setColumnLayout(0, Qt::Vertical);
-  //GroupPlanes->layout()->setSpacing(0);
-  //GroupPlanes->layout()->setMargin(0);
+  QGroupBox* GroupPlanes = new QGroupBox (tr("GRP_PLANES"),  aLocalPlanes);
   QGridLayout* GroupPlanesLayout = new QGridLayout (GroupPlanes);
   GroupPlanesLayout->setAlignment(Qt::AlignTop);
   GroupPlanesLayout->setSpacing(6);
   GroupPlanesLayout->setMargin(11);
+  aLocalLayout->addWidget(GroupPlanes);
 
   ComboBoxPlanes = new QComboBox (GroupPlanes);
   GroupPlanesLayout->addWidget(ComboBoxPlanes, 0, 0);
@@ -281,30 +295,38 @@ VisuGUI_ClippingDlg::VisuGUI_ClippingDlg (VisuGUI* theModule,
   // Controls for defining plane parameters
 
   // Tab pane
-  QGroupBox* GroupParameters = new QGroupBox(tr("GRP_PARAMETERS"), this);
-  //GroupParameters->setColumnLayout(0, Qt::Vertical);
-  //GroupParameters->layout()->setSpacing(0);
-  //GroupParameters->layout()->setMargin(0);
+  QGroupBox* GroupParameters = new QGroupBox(tr("GRP_PARAMETERS"), aLocalPlanes);
   QGridLayout* GroupParametersLayout = new QGridLayout (GroupParameters);
   GroupParametersLayout->setAlignment(Qt::AlignTop);
   GroupParametersLayout->setSpacing(6);
   GroupParametersLayout->setMargin(11);
+  aLocalLayout->addWidget(GroupParameters);
 
   TabPane = new QTabWidget (GroupParameters);
   TabPane->addTab(createParamsTab()   , tr("TAB_NON_STRUCTURED"));
   TabPane->addTab(createIJKParamsTab(), tr("TAB_IJK_STRUCTURED"));
   GroupParametersLayout->addWidget(TabPane, 0, 0);
 
+
+
+
+
   // "Show preview" and "Auto Apply" check boxes
+  QHBoxLayout* aCheckBoxLayout = new QHBoxLayout(this);
+  VisuGUI_ClippingDlgLayout->addLayout(aCheckBoxLayout);
 
   PreviewCheckBox = new QCheckBox (tr("SHOW_PREVIEW_CHK"), this);
   PreviewCheckBox->setChecked(true);
+  aCheckBoxLayout->addWidget(PreviewCheckBox);
+  aCheckBoxLayout->addStretch();
 
   AutoApplyCheckBox = new QCheckBox (tr("AUTO_APPLY_CHK"), this);
   AutoApplyCheckBox->setChecked(false);
+  aCheckBoxLayout->addWidget(AutoApplyCheckBox);
 
   // Controls for "Ok", "Apply" and "Close" button
   QGroupBox* GroupButtons = new QGroupBox (this);
+  VisuGUI_ClippingDlgLayout->addWidget(GroupButtons);
   QSizePolicy aSizePolicy(QSizePolicy::Expanding,
                           QSizePolicy::Fixed );
   aSizePolicy.setHeightForWidth( GroupButtons->sizePolicy().hasHeightForWidth() );
@@ -312,9 +334,6 @@ VisuGUI_ClippingDlg::VisuGUI_ClippingDlg (VisuGUI* theModule,
   aSizePolicy.setVerticalStretch( 0 );
   GroupButtons->setSizePolicy( aSizePolicy );
   GroupButtons->setGeometry(QRect(10, 10, 281, 48));
-  //GroupButtons->setColumnLayout(0, Qt::Vertical);
-  //GroupButtons->layout()->setSpacing(0);
-  //GroupButtons->layout()->setMargin(0);
   QGridLayout* GroupButtonsLayout = new QGridLayout (GroupButtons);
   GroupButtons->setLayout(GroupButtonsLayout);
   GroupButtonsLayout->setAlignment(Qt::AlignTop);
@@ -340,12 +359,6 @@ VisuGUI_ClippingDlg::VisuGUI_ClippingDlg (VisuGUI* theModule,
   buttonOk->setDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonOk, 0, 0);
 
-  VisuGUI_ClippingDlgLayout->addWidget(GroupPlanes,       0, 0, 1, 2);
-  VisuGUI_ClippingDlgLayout->addWidget(GroupParameters,   1, 0, 1, 2);
-  VisuGUI_ClippingDlgLayout->addWidget(PreviewCheckBox,   2,    0);
-  VisuGUI_ClippingDlgLayout->addWidget(AutoApplyCheckBox, 2,    1);
-  VisuGUI_ClippingDlgLayout->addWidget(GroupButtons,      3, 0, 3, 2);
-
   // Initial state
   VISU::RangeStepAndValidator(SpinBoxDistance, 0.0, 1.0, 0.01, 3);
   VISU::RangeStepAndValidator(SpinBoxRot1, -180.0, 180.0, 1, 3);
@@ -488,6 +501,16 @@ QWidget* VisuGUI_ClippingDlg::createIJKParamsTab()
 // purpose  :
 //=================================================================================
 void VisuGUI_ClippingDlg::ClickOnApply()
+{
+  applyLocalPlanes();
+}
+
+
+//=================================================================================
+// function : applyLocalPlanes()
+// purpose  :
+//=================================================================================
+void VisuGUI_ClippingDlg::applyLocalPlanes()
 {
   if (!myPrs3d)
     return;
@@ -512,7 +535,8 @@ void VisuGUI_ClippingDlg::ClickOnApply()
     }
 
     // Try to apply new clipping
-    myPrs3d->RemoveAllClippingPlanes();
+    //myPrs3d->RemoveAllClippingPlanes();
+    removeAllClippingPlanes(myPrs3d);
 
     VISU::TPlanes::iterator anIter = myPlanes.begin();
     for (; anIter != myPlanes.end(); anIter++) {
@@ -537,7 +561,8 @@ void VisuGUI_ClippingDlg::ClickOnApply()
 
     if (isFailed) {
       // Restore previous clipping state because of failure.
-      myPrs3d->RemoveAllClippingPlanes();
+      //myPrs3d->RemoveAllClippingPlanes();
+      removeAllClippingPlanes(myPrs3d);
 
       TPlns::iterator anOldIter = anOldPlanes.begin();
       for (; anOldIter != anOldPlanes.end(); anOldIter++) {
@@ -555,6 +580,9 @@ void VisuGUI_ClippingDlg::ClickOnApply()
   }
 }
 
+
+
+
 //=================================================================================
 // function : ClickOnOk()
 // purpose  :
@@ -804,9 +832,9 @@ void VisuGUI_ClippingDlg::Sinchronize()
   }
 
   buttonDelete           ->setEnabled(anIsControlsEnable);
-  buttonApply            ->setEnabled(anIsControlsEnable);
-  PreviewCheckBox        ->setEnabled(anIsControlsEnable);
-  AutoApplyCheckBox      ->setEnabled(anIsControlsEnable);
+  //buttonApply            ->setEnabled(anIsControlsEnable);
+  //  PreviewCheckBox        ->setEnabled(anIsControlsEnable);
+  //  AutoApplyCheckBox      ->setEnabled(anIsControlsEnable);
 
   ComboBoxOrientation    ->setEnabled(anIsControlsEnable);
   SpinBoxDistance        ->setEnabled(anIsControlsEnable);
@@ -1210,3 +1238,15 @@ void VisuGUI_ClippingDlg::SetPrs3d(VISU::Prs3d_i* thePrs)
   } else 
     return;
 }
+
+
+void VisuGUI_ClippingDlg::removeAllClippingPlanes(VISU::Prs3d_i* thePrs)
+{
+  for (int i = thePrs->GetNumberOfClippingPlanes() - 1; i >= 0 ; i--) {
+    OrientedPlane* aPlane = dynamic_cast<OrientedPlane*>(thePrs->GetClippingPlane(i));
+    if (aPlane) 
+      thePrs->RemoveClippingPlane(i);
+  }
+}
+
+
index f14ac0951007bdc60a397b3df8c1f2f47256d764..c35e1b93ff99215b389731e69de4fe520945c7bf 100644 (file)
@@ -44,6 +44,7 @@ class QComboBox;
 class QButtonGroup;
 class QSpinBox;
 class QTabWidget;
+class QListWidget;
 
 class SALOME_Actor;
 
@@ -54,11 +55,11 @@ class SVTK_ViewWindow;
 class LightApp_SelectionMgr;
 
 class VisuGUI;
-
 class vtkPlaneSource;
 class vtkDataSetMapper;
-
 class OrientedPlane;
+class VISU_Actor;
+class PreviewPlane;
 
 namespace VISU {
   class Prs3d_i;
@@ -136,6 +137,11 @@ private:
   
     void SetPrs3d(VISU::Prs3d_i* thePrs);
   
+    VISU_Actor* getSelectedActor();
+
+    void applyLocalPlanes();
+
+    void removeAllClippingPlanes(VISU::Prs3d_i* thePrs);
 
 private:
 
@@ -179,6 +185,9 @@ private:
 
     bool myIsSelectPlane;
 
+    VISU_Actor* myDSActor;
+    QList<PreviewPlane*> myPreviewList;
+
 protected:
     QWidget* createParamsTab();
     QWidget* createIJKParamsTab();
@@ -204,3 +213,5 @@ public slots:
 };
 
 #endif // DIALOGBOX_TRANSPARENCYDLG_H
+
+
index d16325ac2ef6a6c43ec09bc950bba86752a96c6c..7cdb29cbdd9364da69a854a79bc5780a50db1c0c 100644 (file)
@@ -183,19 +183,16 @@ VisuGUI_CutPlanesPane::VisuGUI_CutPlanesPane (QWidget* theParent)
   myVectorialFieldCombo = new QComboBox (GDeformation);
   GDeformationLayout->addWidget( myVectorialFieldCombo, 0, 1 );
 
+  SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
+  int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 );
+  
   QLabel* LabelDeformation2 = new QLabel (tr("LBL_DEFROMATION_SCALE"), GDeformation);
   GDeformationLayout->addWidget( LabelDeformation2, 1, 0 );
-  myScaleSpn = new QtxDoubleSpinBox (0.0, 1.0E+38, 0.1, GDeformation);
+  myScaleSpn = new QtxDoubleSpinBox (0, 1.0E+38, 0.1, aPrecision*(-1), 38, GDeformation);
   myScaleSpn->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
   GDeformationLayout->addWidget( myScaleSpn, 1, 1 );
   connect(myVectorialFieldCombo,     SIGNAL(activated(int)), this, SLOT(onVectorialFieldChanged(int)));
   connect(myScaleSpn, SIGNAL(valueChanged(double)), this, SLOT(onScaleFactorChanged(double)));
-
-  SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
-  int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 );
-  
-  myScaleSpn->setPrecision( aPrecision*(-1) );
-  myScaleSpn->setDecimals(38);
   myScaleSpn->setValue(0.1);
 
   myPreviewCheck = new QCheckBox(tr("LBL_SHOW_PREVIEW"), this);
@@ -315,17 +312,17 @@ double VisuGUI_CutPlanesPane::getScaleFactor(){
 
 void VisuGUI_CutPlanesPane::setScaleFactor(double theFactor){
   double i=0.1;
-  while (1) { // Calculate Step & Precission
-    if ( int (theFactor/i) >= 0)
-      break;
-    else {
-      i = i*0.1;
+  if (theFactor > 0) {
+    while (1) { // Calculate Step & Precission
+      if ( int (theFactor/i) >= 0)
+       break;
+      else
+       i = i*0.1;
     }
   }
 
   myScaleSpn->setSingleStep(i);
   myScaleSpn->setValue(theFactor);
-  
 }
 
 void VisuGUI_CutPlanesPane::createPlanes()
diff --git a/src/VISUGUI/VisuGUI_DeformedShapeAndScalarMapDlg.cxx b/src/VISUGUI/VisuGUI_DeformedShapeAndScalarMapDlg.cxx
deleted file mode 100644 (file)
index e3d180b..0000000
+++ /dev/null
@@ -1,496 +0,0 @@
-//  VISU VISUGUI : GUI of VISU component
-//
-//  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   : VisuGUI_DeformedShapeAndScalarMapDlg.cxx
-//  Author : Eugeny Nikolaev
-//  Module : VISU
-
-#include "VisuGUI_DeformedShapeAndScalarMapDlg.h"
-
-#include "VisuGUI_Tools.h"
-#include "VisuGUI_InputPane.h"
-
-#include "VISU_Result_i.hh"
-#include "VISU_DeformedShapeAndScalarMap_i.hh"
-#include "VISU_ColoredPrs3dFactory.hh"
-
-#include "VISU_ScalarMapPL.hxx"
-#include "VISU_DeformedShapeAndScalarMapPL.hxx"
-
-#include "VISU_Convertor.hxx"
-
-#include <QtxDoubleSpinBox.h>
-#include <SalomeApp_Module.h>
-#include <LightApp_Application.h>
-#include <LightApp_SelectionMgr.h>
-#include <SUIT_Desktop.h>
-#include <SUIT_ResourceMgr.h>
-#include <SUIT_Session.h>
-#include <SUIT_MessageBox.h>
-
-#include <SALOME_ListIO.hxx>
-
-#include <SALOMEDSClient_AttributeString.hxx>
-#include <SALOMEDSClient_AttributeName.hxx>
-
-#include <QVBoxLayout>
-#include <QHBoxLayout>
-#include <QGridLayout>
-#include <QTabWidget>
-#include <QComboBox>
-#include <QPushButton>
-#include <QLabel>
-
-#define MYDEBUG 0
-
-/*!
- * Constructor
- */
-VisuGUI_DeformedShapeAndScalarMapDlg::VisuGUI_DeformedShapeAndScalarMapDlg (SalomeApp_Module* theModule)
-  : VisuGUI_ScalarBarBaseDlg(theModule),
-    myIsAnimation(false),
-    myUpdateScalars(true),
-    myVisuGUI(theModule)
-{
-  setWindowTitle(tr("DLG_TITLE"));
-  setSizeGripEnabled(true);
-
-  QVBoxLayout* TopLayout = new QVBoxLayout (this);
-  TopLayout->setSpacing(6);
-  TopLayout->setMargin(11);
-
-  myTabBox = new QTabWidget (this);
-
-  // Scalar Map on Deformed shape pane
-  QWidget* aBox = new QWidget (this);
-  QVBoxLayout* aVBLay = new QVBoxLayout( aBox );
-  aVBLay->setMargin(11);
-  QFrame* TopGroup = new QFrame (aBox);
-  aVBLay->addWidget(TopGroup);
-  TopGroup->setFrameStyle(QFrame::Box | QFrame::Sunken);
-  TopGroup->setLineWidth(1);
-  QGridLayout* TopGroupLayout = new QGridLayout (TopGroup);
-  TopGroupLayout->setSpacing(6);
-  TopGroupLayout->setMargin(11);
-
-  //   Scale factor
-  QLabel* ScaleLabel = new QLabel (tr("SCALE_FACTOR"), TopGroup);
-  TopGroupLayout->addWidget(ScaleLabel, 0, 0);
-
-  ScalFact = new QtxDoubleSpinBox (0.0, 1.0E+38, 0.1, TopGroup);
-  ScalFact->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
-
-  SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
-  int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 );
-
-  ScalFact->setPrecision( aPrecision*(-1) );
-  ScalFact->setDecimals( 32 );
-  ScalFact->setValue(0.1);
-  TopGroupLayout->addWidget(ScalFact, 0, 1);
-
-  // Fields combo box
-  QLabel* FieldLabel = new QLabel (tr("FIELD_ITEM"), TopGroup);
-  myFieldsCombo = new QComboBox (TopGroup);
-
-  TopGroupLayout->addWidget(FieldLabel, 1, 0);
-  TopGroupLayout->addWidget(myFieldsCombo,1,1);
-
-  // TimeStamps combo box
-  QLabel* TimeStampLabel = new QLabel (tr("TIMESTAMP_ITEM"), TopGroup);
-  myTimeStampsCombo = new QComboBox (TopGroup);
-
-  TopGroupLayout->addWidget(TimeStampLabel, 2, 0);
-  TopGroupLayout->addWidget(myTimeStampsCombo,2,1);
-  TopGroupLayout->setRowStretch(3,5);
-
-  //
-  myTabBox->addTab(aBox, tr("DEFORMED_SHAPE_AND_SCALAR_MAP_TAB"));
-
-  // Scalar bar pane
-  myInputPane = new VisuGUI_InputPane(VISU::TDEFORMEDSHAPEANDSCALARMAP, theModule, this);
-
-  myTabBox->addTab(GetScalarPane(), tr("SCALAR_BAR_TAB"));
-  myTabBox->addTab(myInputPane, tr("INPUT_TAB"));
-
-  // Buttons
-  QGroupBox* GroupButtons = new QGroupBox (this);
-  QHBoxLayout* GroupButtonsLayout = new QHBoxLayout(GroupButtons);
-  GroupButtonsLayout->setSpacing(6);
-  GroupButtonsLayout->setMargin(11);
-
-  QPushButton* buttonOk = new QPushButton (tr("&OK"), GroupButtons);
-  buttonOk->setAutoDefault(true);
-  buttonOk->setDefault(true);
-  QPushButton* buttonCancel = new QPushButton (tr("&Cancel") , GroupButtons);
-  buttonCancel->setAutoDefault(true);
-  QPushButton* buttonHelp = new QPushButton (tr("&Help") , GroupButtons);
-  buttonHelp->setAutoDefault(true);
-
-  GroupButtonsLayout->addWidget(buttonOk);
-  GroupButtonsLayout->addSpacing(10);
-  GroupButtonsLayout->addStretch();
-  GroupButtonsLayout->addWidget(buttonCancel);
-  GroupButtonsLayout->addWidget(buttonHelp);
-
-  // Add Tab box and Buttons to the top layout
-  TopLayout->addWidget(myTabBox);
-  TopLayout->addWidget(GroupButtons);
-
-  // signals and slots connections
-  connect(buttonOk,     SIGNAL(clicked()), this, SLOT(accept()));
-  connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
-  connect(buttonHelp,   SIGNAL(clicked()), this, SLOT(onHelp()));
-  connect(myFieldsCombo,     SIGNAL(activated(int)), this, SLOT(onFieldChanged(int)));
-  connect(myTimeStampsCombo, SIGNAL(activated(int)), this, SLOT(onTimeStampChanged(int)));
-}
-
-VisuGUI_DeformedShapeAndScalarMapDlg::~VisuGUI_DeformedShapeAndScalarMapDlg()
-{
-}
-
-void VisuGUI_DeformedShapeAndScalarMapDlg::initFromPrsObject( VISU::ColoredPrs3d_i* thePrs,
-                                                             bool theInit )
-{
-  if( theInit )
-    myPrsCopy = VISU::TSameAsFactory<VISU::TDEFORMEDSHAPEANDSCALARMAP>().Create(thePrs, VISU::ColoredPrs3d_i::EDoNotPublish);
-  setFactor(myPrsCopy->GetScale());
-  myTimeStampsCombo->setDisabled(myIsAnimation);
-
-  CORBA::String_var aFieldName(myPrsCopy->GetScalarFieldName());
-  QString aIteration = GetFloatValueOfTimeStamp(myPrsCopy->GetScalarEntity(),
-                                               aFieldName.in(),
-                                               myPrsCopy->GetScalarTimeStampNumber());
-  if (myEntity2Fields.size() == 0)
-  {
-    // find all fields and time stamps on it
-    _PTR(Study) aActiveStudy = VISU::GetCStudy(VISU::GetAppStudy(myVisuGUI));
-    LightApp_SelectionMgr* aSel = VISU::GetSelectionMgr(myVisuGUI);
-    SALOME_ListIO selected;
-    aSel->selectedObjects(selected);
-    if (selected.Extent() > 0) {
-      Handle(SALOME_InteractiveObject) aIO = selected.First();
-      if (aIO->hasEntry()) {
-       _PTR(SObject) aSObject = aActiveStudy->FindObjectID(aIO->getEntry());
-       VISU::VISUType aType = VISU::Storable::SObject2Type( aSObject );
-       switch(aType){
-       case VISU::TTIMESTAMP: {
-         aSObject = aSObject->GetFather();
-         aSObject = aSObject->GetFather();
-         break;
-       }
-       case VISU::TFIELD: {
-         _PTR(SObject) newSObject;
-         if(aSObject->ReferencedObject(newSObject)) aSObject = newSObject;
-         aSObject = aSObject->GetFather();
-         break;
-       }
-       case VISU::TANIMATION: {
-         _PTR(ChildIterator) aTmpIter = aActiveStudy->NewChildIterator(aSObject);
-         for (aTmpIter->InitEx(true); aTmpIter->More(); aTmpIter->Next()) {
-           _PTR(SObject) aTmpChildSObj = aTmpIter->Value();
-           _PTR(SObject) newSObject;
-           if(aTmpChildSObj->ReferencedObject(newSObject)){
-             aSObject = newSObject;
-             aSObject->GetFather();
-             break;
-           }
-         }
-         break;
-       }}
-       
-       aSObject = aSObject->GetFather();
-       aSObject = aSObject->GetFather();
-
-       mySelectionObj = aSObject;
-       CORBA::Object_var anObject = VISU::ClientSObjectToObject(mySelectionObj);
-       if (CORBA::is_nil(anObject)) {
-         mySelectionObj = mySelectionObj->GetFather();
-       }
-      }
-    }
-
-    if (mySelectionObj) {
-      _PTR(ChildIterator) aIter = aActiveStudy->NewChildIterator(mySelectionObj);
-
-      for (aIter->InitEx(true); aIter->More(); aIter->Next()) {
-        _PTR(SObject) aChildSObj = aIter->Value();
-       VISU::Storable::TRestoringMap aRestoringMap = VISU::Storable::GetStorableMap(aChildSObj);
-        if (!aRestoringMap.empty()) {
-         VISU::VISUType aType = VISU::Storable::RestoringMap2Type(aRestoringMap);
-         if (aType == VISU::TTIMESTAMP) {
-           QString aMeshName = aRestoringMap["myMeshName"];
-           CORBA::String_var aName = myPrsCopy->GetMeshName();
-           if (aMeshName != aName.in())
-             continue;
-           QString aFieldName = aRestoringMap["myFieldName"];
-           QString aTimeIter  = aRestoringMap["myTimeStampId"];
-           QString aEntity    = aRestoringMap["myEntityId"];
-           VISU::Entity anEntity;
-           switch (aEntity.toInt()) {
-           case 0: anEntity = VISU::NODE; break;
-           case 1: anEntity = VISU::EDGE; break;
-           case 2: anEntity = VISU::FACE; break;
-           case 3: anEntity = VISU::CELL; break;
-           }
-           TFieldName2TimeStamps& aFieldName2TimeStamps = myEntity2Fields[anEntity];
-           TTimeStampNumber2Time& aTimeStampNumber2Time = aFieldName2TimeStamps[aFieldName];
-           aTimeStampNumber2Time[aTimeIter.toInt()] = 
-             GetFloatValueOfTimeStamp(anEntity,
-                                      aFieldName.toLatin1().constData(),
-                                      aTimeIter.toInt());
-         }
-        }
-      }
-    }
-    AddAllFieldNames();
-  }
-  int idx = myFieldsCombo->findText(aFieldName.in());
-  if (idx >= 0)
-    myFieldsCombo->setCurrentIndex(idx);
-  else {
-    myFieldsCombo->addItem(aFieldName.in());
-    myFieldsCombo->setCurrentIndex(myFieldsCombo->count()-1);
-  }
-  AddAllTimes(myFieldsCombo->currentText());
-  idx = myTimeStampsCombo->findText(aIteration);
-  if (idx >= 0)
-    myTimeStampsCombo->setCurrentIndex(idx);
-  else {
-    myTimeStampsCombo->addItem(aIteration);
-    myTimeStampsCombo->setCurrentIndex(myTimeStampsCombo->count()-1);
-  }
-  SetScalarField( false );
-
-  VisuGUI_ScalarBarBaseDlg::initFromPrsObject(myPrsCopy, theInit);
-
-  if( !theInit )
-    return;
-
-  myInputPane->initFromPrsObject( myPrsCopy );
-  myTabBox->setCurrentIndex( 0 );
-}
-
-double VisuGUI_DeformedShapeAndScalarMapDlg::getFactor() const
-{
-  return ScalFact->value();
-}
-
-void VisuGUI_DeformedShapeAndScalarMapDlg::setFactor(double theFactor)
-{
-  double i=0.1;
-  while (1) { // Calculate Step & Precission
-    if ( int (theFactor/i) > 0)
-      break;
-    else {
-      i = i*0.1;
-    }
-  }
-
-  ScalFact->setSingleStep(i);
-
-  ScalFact->setValue(theFactor);
-}
-
-int
-VisuGUI_DeformedShapeAndScalarMapDlg
-::storeToPrsObject(VISU::ColoredPrs3d_i* thePrs)
-{
-  if(!myInputPane->check() || !GetScalarPane()->check())
-    return 0;
-  
-  int anIsOk = myInputPane->storeToPrsObject( myPrsCopy );
-  anIsOk &= GetScalarPane()->storeToPrsObject( myPrsCopy );
-  
-  myPrsCopy->SetScale(getFactor());
-
-  myPrsCopy->SetScalarField(myPrsCopy->GetScalarEntity(),
-                           getCurrentScalarFieldName().toLatin1().constData(),
-                           myTimeStampID[ myTimeStampsCombo->currentIndex() ]);
-
-  if(myUpdateScalars) 
-    SetScalarField( false );
-
-  VISU::TSameAsFactory<VISU::TDEFORMEDSHAPEANDSCALARMAP>().Copy(myPrsCopy, thePrs);
-
-  return anIsOk;
-}
-
-int VisuGUI_DeformedShapeAndScalarMapDlg::getCurrentScalarFieldNamePos(){
-  return myFieldsCombo->currentIndex();
-}
-
-QString VisuGUI_DeformedShapeAndScalarMapDlg::getCurrentScalarFieldName(){
-  return myFieldsCombo->currentText();
-}
-
-int VisuGUI_DeformedShapeAndScalarMapDlg::getCurrentScalarNbIterations(){
-  return myTimeStampsCombo->count();
-}
-
-VISU::Entity
-VisuGUI_DeformedShapeAndScalarMapDlg
-::getCurrentScalarEntity()
-{
-  VISU::Entity anEntity = VISU::Entity(-1);
-  TEntity2Fields::const_iterator anIter = myEntity2Fields.begin();
-  for(; anIter != myEntity2Fields.end(); anIter++){
-    const TFieldName2TimeStamps& aFieldName2TimeStamps = anIter->second;
-    TFieldName2TimeStamps::const_iterator aFieldIter = aFieldName2TimeStamps.begin();
-    for(; aFieldIter != aFieldName2TimeStamps.end(); aFieldIter++){
-      const QString& aFieldName = aFieldIter->first;
-      if (aFieldName == myFieldsCombo->currentText()) {
-       anEntity = anIter->first;
-       break;
-      }
-    }
-  }
-  return anEntity;
-}
-
-void VisuGUI_DeformedShapeAndScalarMapDlg::SetScalarField( const bool save_scalar_pane ){
-  SetScalarField( myTimeStampID[ myTimeStampsCombo->currentIndex() ], "", save_scalar_pane );
-}
-
-void
-VisuGUI_DeformedShapeAndScalarMapDlg
-::SetScalarField(int theIter,
-                QString theFieldName, 
-                const bool save_scalar_pane )
-{
-  QApplication::setOverrideCursor(Qt::WaitCursor);
-
-  if( save_scalar_pane )
-    GetScalarPane()->storeToPrsObject(myPrsCopy);
-
-  QString aFieldName;
-
-  if(theFieldName.isEmpty())
-    aFieldName = myFieldsCombo->currentText();
-  else
-    aFieldName = theFieldName;
-
-  VISU::Entity anEntity = getCurrentScalarEntity();
-  
-  myPrsCopy->SetScalarField(anEntity,
-                           aFieldName.toLatin1().constData(),
-                           theIter);
-  
-  if( save_scalar_pane )
-    UpdateScalarField();
-
-  QApplication::restoreOverrideCursor();
-}
-
-void VisuGUI_DeformedShapeAndScalarMapDlg::accept()
-{
-  VisuGUI_ScalarBarBaseDlg::accept();
-}
-
-void VisuGUI_DeformedShapeAndScalarMapDlg::reject()
-{
-  VisuGUI_ScalarBarBaseDlg::reject();
-}
-
-QString VisuGUI_DeformedShapeAndScalarMapDlg::GetContextHelpFilePath()
-{
-  return "scalar_map_on_deformed_shape_page.html";
-}
-
-void VisuGUI_DeformedShapeAndScalarMapDlg::AddAllFieldNames(){
-  TEntity2Fields::const_iterator anIter = myEntity2Fields.begin();
-  for(; anIter != myEntity2Fields.end(); anIter++){
-    const TFieldName2TimeStamps& aFieldName2TimeStamps = anIter->second;
-    TFieldName2TimeStamps::const_iterator aFieldIter = aFieldName2TimeStamps.begin();
-    for(; aFieldIter != aFieldName2TimeStamps.end(); aFieldIter++){
-      const QString& aFieldName = aFieldIter->first;
-      myFieldsCombo->addItem(aFieldName);
-    }
-  }
-}
-
-void VisuGUI_DeformedShapeAndScalarMapDlg::AddAllTimes(const QString& theFieldName){
-  TEntity2Fields::const_iterator anIter = myEntity2Fields.begin();
-  for(; anIter != myEntity2Fields.end(); anIter++){
-    const TFieldName2TimeStamps& aFieldName2TimeStamps = anIter->second;
-    TFieldName2TimeStamps::const_iterator aFieldIter = aFieldName2TimeStamps.begin();
-    for(; aFieldIter != aFieldName2TimeStamps.end(); aFieldIter++){
-      const QString& aFieldName = aFieldIter->first;
-      if(theFieldName != aFieldName) 
-       continue;
-
-      myTimeStampID.clear();
-      myTimeStampsCombo->clear();
-
-      const TTimeStampNumber2Time& aTimeStampNumber2Time = aFieldIter->second;
-      TTimeStampNumber2Time::const_iterator aTimeStampIter = aTimeStampNumber2Time.begin();
-      for(; aTimeStampIter != aTimeStampNumber2Time.end(); aTimeStampIter++){
-       int aTimeStampNumber = aTimeStampIter->first;
-       myTimeStampID.push_back(aTimeStampNumber);
-
-       QString aTimeStampTime = aTimeStampIter->second;
-       myTimeStampsCombo->addItem(aTimeStampTime);
-      }
-      return;
-    }
-  }
-}
-
-void VisuGUI_DeformedShapeAndScalarMapDlg::onFieldChanged(int){
-  AddAllTimes(myFieldsCombo->currentText());
-  SetScalarField();
-  UpdateScalarField();
-}
-
-void VisuGUI_DeformedShapeAndScalarMapDlg::onTimeStampChanged(int){
-  SetScalarField();
-  UpdateScalarField();
-}
-
-void VisuGUI_DeformedShapeAndScalarMapDlg::UpdateScalarField(){
-  GetScalarPane()->initFromPrsObject(myPrsCopy);
-}
-
-QString 
-VisuGUI_DeformedShapeAndScalarMapDlg
-::GetFloatValueOfTimeStamp(VISU::Entity theEntity,
-                          const std::string& theFieldName,
-                          int theTimeStampNumber)
-{
-  QString aTime("");
-  VISU::TEntity anEntity = VISU::TEntity(theEntity);
-  VISU::Result_i* theResult = myPrsCopy->GetCResult();
-  VISU::Result_i::PInput anInput = theResult->GetInput();
-  VISU::PField aField = anInput->GetField(myPrsCopy->GetCMeshName(),
-                                         anEntity,
-                                         theFieldName);
-  if(!aField) 
-    return aTime;
-
-  VISU::TValField& aValField = aField->myValField;
-  VISU::TValField::const_iterator aIter = aValField.find(theTimeStampNumber);
-  if(aIter != aValField.end()){
-    VISU::PValForTime aValForTime = aIter->second;
-    aTime = VISU_Convertor::GenerateName(aValForTime->myTime).c_str();
-  }
-  return aTime;
-}
diff --git a/src/VISUGUI/VisuGUI_DeformedShapeAndScalarMapDlg.h b/src/VISUGUI/VisuGUI_DeformedShapeAndScalarMapDlg.h
deleted file mode 100644 (file)
index 9daf4a5..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-//  VISU VISUGUI : GUI of VISU component
-//
-//  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   : VisuGUI_DeformedShapeAndScalarMapDlg.h
-//  Author : Eugeny Nikolaev
-//  Module : VISU
-
-#ifndef VISUGUI_DEFORMEDSHAPEANDSCALARMAPDLS_H
-#define VISUGUI_DEFORMEDSHAPEANDSCALARMAPDLS_H
-
-#include "VisuGUI_Prs3dDlg.h"
-
-#include "VISUConfig.hh"
-
-#include <QDialog>
-
-#include <set>
-#include <vector>
-
-class SalomeApp_Module;
-class VisuGUI_InputPane;
-class QtxDoubleSpinBox;
-class QComboBox;
-class QTabWidget;
-
-namespace VISU
-{
-  class DeformedShapeAndScalarMap_i;
-}
-
-class VisuGUI_DeformedShapeAndScalarMapDlg : public VisuGUI_ScalarBarBaseDlg
-{
-    Q_OBJECT
-
-public:
-    VisuGUI_DeformedShapeAndScalarMapDlg (SalomeApp_Module* theModule);
-    ~VisuGUI_DeformedShapeAndScalarMapDlg();
-
-    double getFactor() const;
-    void setFactor(double theFactor);
-    
-    virtual void initFromPrsObject( VISU::ColoredPrs3d_i* thePrs,
-                                   bool theInit );
-
-    virtual int  storeToPrsObject(VISU::ColoredPrs3d_i* thePrs);
-
-    int getCurrentScalarFieldNamePos();
-    QString getCurrentScalarFieldName();
-    int getCurrentScalarNbIterations();
-    VISU::Entity getCurrentScalarEntity();
-    void SetScalarField(int theIter,QString theFieldName=QString(""), const bool = true );
-
-protected:
-  virtual QString GetContextHelpFilePath();
-
-protected slots:
-  void accept();
-  void reject();
-
-private slots:
-  void onFieldChanged(int i=0);
-  void onTimeStampChanged(int i=0);
-
-private:
- QtxDoubleSpinBox* ScalFact;
- QTabWidget* myTabBox;
- VisuGUI_ScalarBarPane* myScalarPane;
- VisuGUI_InputPane*     myInputPane;
- QComboBox *myFieldsCombo;
- QComboBox *myTimeStampsCombo;
- typedef std::map<int, QString> TTimeStampNumber2Time; // Times map definition (iteration time, real value of time)
- typedef std::map<QString, TTimeStampNumber2Time> TFieldName2TimeStamps; // Field name and enity to Times
- typedef std::map<VISU::Entity, TFieldName2TimeStamps> TEntity2Fields; // Mesh to fields map
- TEntity2Fields myEntity2Fields;
- int myCurrScalarIter;
- bool myIsAnimation;
- bool myUpdateScalars;
- std::vector<int> myTimeStampID;
- _PTR(SObject) mySelectionObj;
- SALOME::GenericObjPtr<VISU::DeformedShapeAndScalarMap_i> myPrsCopy;
- SalomeApp_Module* myVisuGUI;
-protected:
- void UpdateScalarField();
- void SetScalarField( const bool = true );
- void AddAllFieldNames();
- void AddAllTimes(const QString& theFieldName);
- QString GetFloatValueOfTimeStamp(VISU::Entity theEntity,
-                                 const std::string& theFieldName,
-                                 int theTimeStampNumber);
-};
-
-#endif // VISUGUI_DEFORMEDSHAPEDLS_H
index 6f6aa2b46a951d6278af7b28e7f7ad446dac9c78..9f4de1b4e93ffe05a66a3ff5ac2769fc8a148e51 100644 (file)
@@ -89,14 +89,11 @@ VisuGUI_DeformedShapeDlg::VisuGUI_DeformedShapeDlg (SalomeApp_Module* theModule)
   QLabel* ScaleLabel = new QLabel (tr("SCALE_FACTOR"), TopGroup );
   TopGroupLayout->addWidget(ScaleLabel, 0, 0);
 
-  ScalFact = new QtxDoubleSpinBox (0.0, 1.0E+38, 0.1, TopGroup);
-  ScalFact->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
-
   SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
   int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 );
 
-  ScalFact->setPrecision( aPrecision*(-1) );
-  ScalFact->setDecimals(38);
+  ScalFact = new QtxDoubleSpinBox (0, 1.0E+38, 0.1, aPrecision*(-1), 38, TopGroup);
+  ScalFact->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
   ScalFact->setValue(0.1);
   TopGroupLayout->addWidget(ScalFact, 0, 1);
 
@@ -176,16 +173,16 @@ void VisuGUI_DeformedShapeDlg::initFromPrsObject (VISU::ColoredPrs3d_i* thePrs,
 void VisuGUI_DeformedShapeDlg::setFactor(double theFactor)
 {
   double i=0.1;
-  while (1) { // Calculate Step & Precission
-    if ( int (theFactor/i) > 0)
-      break;
-    else {
-      i = i*0.1;
+  if (theFactor > 0) {
+    while (1) { // Calculate Step & Precission
+      if ( int (theFactor/i) > 0)
+       break;
+      else
+       i = i*0.1;
     }
   }
 
   ScalFact->setSingleStep(i);
-
   ScalFact->setValue(theFactor);
 }
 
@@ -263,8 +260,9 @@ bool VisuGUI_DeformedShapeDlg::onApply()
 //  Create and Edit
 ////////////////////////////////////////////////////////////////////////////////
 
-void VisuGUI_DeformedShapeDlg::CreatePrs3d(VisuGUI* theModule)
+VISU::Prs3d_i* VisuGUI_DeformedShapeDlg::CreatePrs3d(VisuGUI* theModule)
 {
+  VISU::DeformedShape_i* aPrs3d = NULL;
   _PTR(SObject) aTimeStamp;
   Handle(SALOME_InteractiveObject) anIO;
   VISU::ColoredPrs3d_i::EPublishInStudyMode aPublishInStudyMode;
@@ -281,10 +279,10 @@ void VisuGUI_DeformedShapeDlg::CreatePrs3d(VisuGUI* theModule)
          QString aFieldName = aRestoringMap["myFieldName"];
          QString aTimeStampId = aRestoringMap["myTimeStampId"];
          
-         typedef VISU::DeformedShape_i TPrs3d_i; 
+         //typedef VISU::DeformedShape_i TPrs3d_i; 
          
-         TPrs3d_i* aPrs3d =
-           VISU::CreatePrs3dFromFactory<TPrs3d_i>(theModule,
+         aPrs3d =
+           VISU::CreatePrs3dFromFactory<VISU::DeformedShape_i>(theModule,
                                                   aTimeStamp,
                                                   aMeshName.toLatin1().data(),
                                                   (VISU::Entity)anEntity.toInt(),
@@ -316,6 +314,7 @@ void VisuGUI_DeformedShapeDlg::CreatePrs3d(VisuGUI* theModule)
          }
        }
     }
+  return aPrs3d;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
index 1449af505b771ccc08ce27a9f7dc6711cf8864ad..d8ed8e7a90e5a5bd8adfdfd11d44fec5dca2829a 100644 (file)
@@ -70,7 +70,7 @@ public:
 
     virtual int  storeToPrsObject(VISU::ColoredPrs3d_i* thePrs);
 
-    static void CreatePrs3d(VisuGUI*  theModule);
+    static VISU::Prs3d_i* CreatePrs3d(VisuGUI*  theModule);
     static void EditPrs3d(VisuGUI* theModule, VISU::Prs3d_i* thePrs3d, Handle(SALOME_InteractiveObject)& theIO);
 
     void updatePrsCopy();
index 9cf7e830f2dd0f990a1261e9f6d835601f23c934..df6fbc230f33cca7e0ba749660a1d712bca10b4a 100644 (file)
@@ -33,7 +33,7 @@
 #include "VISU_ViewManager_i.hh"
 #include "VISU_Actor.h"
 
-#include "VVTK_ViewModel.h"
+//#include "VVTK_ViewModel.h"
 
 #include <SVTK_ViewModel.h>
 #include <SVTK_ViewWindow.h>
@@ -80,10 +80,10 @@ SALOME_Prs* VisuGUI_Displayer::buildPresentation( const QString& theEntry, SALOM
     SALOME_View* aView = theView ? theView : GetActiveView();
     VISU::VISUType aType = aBase->GetType();
     VISU::Prs3d_var aPrs3d = VISU::Prs3d::_narrow(aBase);
-    if( aView && (!CORBA::is_nil(aPrs3d) || aType == VISU::TCOLOREDPRS3DHOLDER) ){
-      SVTK_Viewer* aViewer = dynamic_cast<VVTK_Viewer*>( aView );
-      if (!aViewer)
-       aViewer = dynamic_cast<SVTK_Viewer*>( aView );
+    if(!CORBA::is_nil(aPrs3d) || aType == VISU::TCOLOREDPRS3DHOLDER){
+      SVTK_Viewer* aViewer = dynamic_cast<SVTK_Viewer*>( aView );
+      //if (!aViewer)
+      //aViewer = dynamic_cast<SVTK_Viewer*>( aView );
       if( aViewer ){
        SUIT_ViewManager* aViewManager = aViewer->getViewManager();
        SUIT_ViewWindow* aWindow = aViewManager->getActiveView();
@@ -294,7 +294,7 @@ bool VisuGUI_Displayer::canBeDisplayed( const QString& entry, const QString& vie
       dynamic_cast<VISU::Container_i*>( VISU::GetServant( anObj ).in() ) )
     return true;
 
-  if( viewer_type==SVTK_Viewer::Type() || viewer_type==VVTK_Viewer::Type())
+  if( viewer_type==SVTK_Viewer::Type() /*|| viewer_type==VVTK_Viewer::Type()*/)
   {
     VISU::Base_i* aBase = dynamic_cast<VISU::Base_i*>(VISU::GetServant(anObj).in());
 
diff --git a/src/VISUGUI/VisuGUI_FileInfoDlg.cxx b/src/VISUGUI/VisuGUI_FileInfoDlg.cxx
deleted file mode 100644 (file)
index 78d8c09..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-// VISU VISUGUI : GUI of VISU component
-//
-// 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   : VisuGUI_FileInfoDlg.cxx
-// Author : Alexandre SOLOVYOV, Open CASCADE S.A.S. ( alexander.solovyov@opencascade.com)
-// Module : VISU
-//
-
-#include <VisuGUI_FileInfoDlg.h>
-
-#include <MED_Common.hxx>
-
-#include <QGridLayout>
-#include <QLabel>
-#include <QLineEdit>
-
-VisuGUI_FileInfoDlg::VisuGUI_FileInfoDlg( QWidget* parent, SALOME_MED::MedFileInfo* inf )
-  : QtxDialog( parent, true, true, QtxDialog::OK )
-{
-  setWindowTitle( tr( "CAPTION" ) );
-  setSizeGripEnabled( true );
-  
-  QLineEdit* fname = new QLineEdit( mainFrame() );
-  fname->setReadOnly( true );
-  QLineEdit* fsize = new QLineEdit( mainFrame() );
-  fsize->setReadOnly( true );
-  QLineEdit* medversion = new QLineEdit( mainFrame() );
-  medversion->setReadOnly( true );
-  fname->setMinimumWidth( 300 );
-  
-  QGridLayout* lay = new QGridLayout( mainFrame() );
-  lay->setMargin( 5 ); lay->setSpacing( 5 );
-  lay->addWidget( new QLabel( tr( "FILE_NAME" ), mainFrame() ), 0, 0 );
-  lay->addWidget( fname, 0, 1 );
-  lay->addWidget( new QLabel( tr( "FILE_SIZE" ), mainFrame() ), 1, 0 );
-  lay->addWidget( fsize, 1, 1 );
-  lay->addWidget( new QLabel( tr( "MED_VERSION" ), mainFrame() ), 2, 0 );
-  lay->addWidget( medversion, 2, 1 );
-
-  fname->setText( (char*)inf->fileName );
-  fname->home( false );
-  fsize->setText( QString::number( inf->fileSize ) );
-
-  QString version;
-  if( inf->major>=0 )
-  {
-    version = QString::number( inf->major );
-    if( inf->minor>=0 )
-    {
-      version += "." + QString::number( inf->minor );
-      if( inf->release>=0 )
-        version += "." + QString::number( inf->release );
-    }
-  }
-  medversion->setText( version );
-}
-
-VisuGUI_FileInfoDlg::~VisuGUI_FileInfoDlg()
-{
-}
diff --git a/src/VISUGUI/VisuGUI_FileInfoDlg.h b/src/VISUGUI/VisuGUI_FileInfoDlg.h
deleted file mode 100644 (file)
index c755474..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// VISU VISUGUI : GUI of VISU component
-//
-// 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   : VisuGUI_FileInfoDlg.h
-// Author : Alexandre SOLOVYOV, Open CASCADE S.A.S. ( alexander.solovyov@opencascade.com)
-//
-
-#ifndef VISUGUI_FILEINFODLG_H
-#define VISUGUI_FILEINFODLG_H
-
-#include <MED.hh>
-#include <QtxDialog.h>
-
-class VisuGUI_FileInfoDlg : public QtxDialog
-{
-  Q_OBJECT
-
-public:
-  VisuGUI_FileInfoDlg( QWidget*, SALOME_MED::MedFileInfo* );
-  virtual ~VisuGUI_FileInfoDlg();
-};
-
-#endif // VISUGUI_FILEINFODLG_H
index 14826a2fb927c6a091ad428dc713985a897298f0..bcc76d29d56b761a26f13b362525b222095ce9d6 100644 (file)
@@ -34,6 +34,7 @@
 
 #include "VISU_ColoredPrs3dFactory.hh"
 #include "VISU_GaussPoints_i.hh"
+#include "VISU_Prs3dUtils.hh"
 #include "VISU_GaussPointsPL.hxx"
 #include "VISU_OpenGLPointSpriteMapper.hxx"
 #include "VISU_Convertor.hxx"
@@ -79,10 +80,10 @@ using namespace std;
 VisuGUI_GaussScalarBarPane::VisuGUI_GaussScalarBarPane (QWidget * parent):
   QWidget(parent)
 {
-  myVerX = 0.01;  myVerY = 0.10;  myVerW = 0.10;  myVerH = 0.80;
-  myHorX = 0.20;  myHorY = 0.01;  myHorW = 0.60;  myHorH = 0.12;
-  myVerTW = myVerTH = myVerLW = myVerLH = myVerBW = myVerBH = 0;
-  myHorTW = myHorTH = myHorLW = myHorLH = myHorBW = myHorBH = 0;
+  myVerX = 0.01;  myVerY = 0.10;  myVerW = 0.08;  myVerH = 0.80;
+  myHorX = 0.10;  myHorY = 0.01;  myHorW = 0.80;  myHorH = 0.08;
+  myVerTS = myVerLS = myVerBW = myVerBH = 0;
+  myHorTS = myHorLS = myHorBW = myHorBH = 0;
   Imin = 0.0; Imax = 0.0;
   myRangeMode = -1;
 
@@ -476,22 +477,18 @@ void VisuGUI_GaussScalarBarPane::initFromPrsObject(VISU::GaussPoints_i* thePrs,
                 thePrs->GetBarOrientation());
 
   if(RBvert->isChecked()) {
-    myVerTW = thePrs->GetTitleWidth();
-    myVerTH = thePrs->GetTitleHeight();
-    myVerLW = thePrs->GetLabelWidth();
-    myVerLH = thePrs->GetLabelHeight();
+    myVerTS = thePrs->GetTitleSize();
+    myVerLS = thePrs->GetLabelSize();
     myVerBW = thePrs->GetBarWidth();
     myVerBH = thePrs->GetBarHeight();
   } else {
-    myHorTW = thePrs->GetTitleWidth();
-    myHorTH = thePrs->GetTitleHeight();
-    myHorLW = thePrs->GetLabelWidth();
-    myHorLH = thePrs->GetLabelHeight();
+    myHorTS = thePrs->GetTitleSize();
+    myHorLS = thePrs->GetLabelSize();
     myHorBW = thePrs->GetBarWidth();
     myHorBH = thePrs->GetBarHeight();
   }
 
-  myBarDlg->setLabelsFormat(thePrs->GetLabelsFormat());
+  myBarDlg->setLabelsPrecision( VISU::ToPrecision( thePrs->GetLabelsFormat() ) );
   myBarDlg->setUnitsVisible(thePrs->IsUnitsVisible());
 
   SpacingSpin->setValue(thePrs->GetSpacing());
@@ -554,7 +551,8 @@ void VisuGUI_GaussScalarBarPane::initFromPrsObject(VISU::GaussPoints_i* thePrs,
   vtkFloatingPointType R, G, B;
   thePrs->GetTitleColor(R, G, B);
 
-  myBarDlg->setLabelsFormat(thePrs->GetLabelsFormat());
+  int lp = VISU::ToPrecision( thePrs->GetLabelsFormat() );
+  myBarDlg->setLabelsPrecision( lp );
   myBarDlg->setUnitsVisible(thePrs->IsUnitsVisible());
 
   myTextDlg->myTitleFont->SetData(QColor((int)(R*255.), (int)(G*255.), (int)(B*255.)),
@@ -597,12 +595,13 @@ int VisuGUI_GaussScalarBarPane::storeToPrsObject(VISU::GaussPoints_i* thePrs) {
   thePrs->SetLabels(LabelSpin->value());
 
   if(RBvert->isChecked()) {
-    thePrs->SetRatios(myVerTW, myVerTH, myVerLW, myVerLH, myVerBW, myVerBH);
+    thePrs->SetRatios(myVerTS, myVerLS, myVerBW, myVerBH);
   } else {
-    thePrs->SetRatios(myHorTW, myHorTH, myHorLW, myHorLH, myHorBW, myHorBH);
+    thePrs->SetRatios(myHorTS, myHorLS, myHorBW, myHorBH);
   }
 
-  thePrs->SetLabelsFormat(myBarDlg->getLabelsFormat().toLatin1().data());
+  std::string f = VISU::ToFormat( myBarDlg->getLabelsPrecision() );
+  thePrs->SetLabelsFormat( f.c_str() );
   thePrs->SetUnitsVisible(myBarDlg->isUnitsVisible());
 
   if (myIsStoreTextProp) {
@@ -758,14 +757,14 @@ void VisuGUI_GaussScalarBarPane::onTextPref()
 void VisuGUI_GaussScalarBarPane::onBarPref()
 {
   if(RBvert->isChecked())
-    myBarDlg->setRatios(myVerTW, myVerTH, myVerLW, myVerLH, myVerBW, myVerBH);
+    myBarDlg->setRatios(myVerTS, myVerLS, myVerBW, myVerBH);
   else
-    myBarDlg->setRatios(myHorTW, myHorTH, myHorLW, myHorLH, myHorBW, myHorBH);
+    myBarDlg->setRatios(myHorTS, myHorLS, myHorBW, myHorBH);
   if(myBarDlg->exec()) {
     if(RBvert->isChecked())
-      myBarDlg->getRatios(myVerTW, myVerTH, myVerLW, myVerLH, myVerBW, myVerBH);
+      myBarDlg->getRatios(myVerTS, myVerLS, myVerBW, myVerBH);
     else
-      myBarDlg->getRatios(myHorTW, myHorTH, myHorLW, myHorLH, myHorBW, myHorBH);
+      myBarDlg->getRatios(myHorTS, myHorLS, myHorBW, myHorBH);
   }
 }
 
index e23b9a1ee21b5d098a99b6682370753aeb31c5c4..92210ccebda2bd4305bc1b4fafc4377520ba8a5c 100644 (file)
@@ -101,8 +101,8 @@ class VisuGUI_GaussScalarBarPane : public QWidget//QVBox
   double          Imin,   Imax;
   double          myHorX, myHorY, myHorW, myHorH;
   double          myVerX, myVerY, myVerW, myVerH;
-  int             myHorTW, myHorTH, myHorLW, myHorLH, myHorBW, myHorBH;
-  int             myVerTW, myVerTH, myVerLW, myVerLH, myVerBW, myVerBH;
+  int             myHorTS, myHorLS, myHorBW, myHorBH;
+  int             myVerTS, myVerLS, myVerBW, myVerBH;
   int             myRangeMode;
   bool myIsStoreTextProp;
 
index 4dd635c718a763f5abefb1ae1d55acbcfec252c5..5466db2af5571f55b95d0dbf388918c0e80a8002 100644 (file)
 #include "SALOMEDSClient_ClientFactory.hxx"
 #include "SALOMEDSClient_IParameters.hxx"
 
-#include "VVTK_ViewManager.h"
-#include "VVTK_ViewWindow.h"
-#include "VVTK_ViewModel.h"
+//#include "VVTK_ViewManager.h"
+//#include "VVTK_ViewWindow.h"
+//#include "VVTK_ViewModel.h"
 
 #include "SVTK_ViewModel.h"
 #include "SVTK_ViewManager.h"
-#include "SVTK_MainWindow.h"
+#include "SVTK_ViewWindow.h"
 #include "SVTK_RenderWindowInteractor.h"
 #include "VISU_Event.h"
 
@@ -65,8 +65,6 @@
 #include "VISU_GaussPtsAct.h"
 #include "VisuGUI_GaussPointsDlg.h"
 
-#include "VisuGUI_Slider.h"
-
 #include "VISU_Gen_i.hh"
 #include "VISU_Result_i.hh"
 #include "VISU_CutLines_i.hh"
@@ -81,7 +79,7 @@
 #include "VISU_SphereWidget.hxx"
 
 #include "SalomeApp_Study.h"
-#include "VVTK_MainWindow.h"
+//#include "VVTK_MainWindow.h"
 #include "VISU_View_i.hh"
 
 #ifndef DISABLE_VTKVIEWER
 
 #include <sstream>
 
+
 #ifdef _DEBUG_
 static int MYDEBUG = 0;
 #else
@@ -147,6 +146,8 @@ static int MYDEBUG = 0;
 #define GAUSS_RESTORE_CONFIGURATION    5702
 #define GAUSS_RENAME_CONFIGURATION     5703
 
+using namespace std;
+
 void
 CreateCurves( SalomeApp_Module* theModule,
               VISU::CutLines_i* thePrs,
@@ -159,12 +160,12 @@ namespace VISU
 {
   //---------------------------------------------------------------
   typedef void (SUIT_ViewWindow::* TViewVisibility)();
-  void
-  SetViewVisibility(SalomeApp_Application* app,
-                   TViewVisibility theViewVisibility)
+  void SetViewVisibility(SalomeApp_Application* app,
+                        TViewVisibility theViewVisibility)
   {
     ViewManagerList l;
-    app->viewManagers( VVTK_Viewer::Type(), l );
+    //app->viewManagers( VVTK_Viewer::Type(), l );
+    app->viewManagers( SVTK_Viewer::Type(), l );
     ViewManagerList::const_iterator anIt = l.begin(), aLast = l.end();
     for( ; anIt!=aLast; anIt++ )
       if( SUIT_ViewManager* aViewManager = *anIt )
@@ -181,24 +182,20 @@ namespace VISU
 }
 
 //---------------------------------------------------------------
-VisuGUI_Module::
-VisuGUI_Module() :
+VisuGUI_Module::VisuGUI_Module() : 
   VisuGUI()
 {
 }
 
 
 //---------------------------------------------------------------
-VisuGUI_Module::
-~VisuGUI_Module()
+VisuGUI_Module::~VisuGUI_Module()
 {
 }
 
 
 //---------------------------------------------------------------
-void
-VisuGUI_Module::
-initialize( CAM_Application* theApp )
+void VisuGUI_Module::initialize( CAM_Application* theApp )
 {
   VisuGUI::initialize( theApp );
 
@@ -212,9 +209,9 @@ initialize( CAM_Application* theApp )
   createMenu( SAVE_VISU_STATE, fileMenu, 9, -1 );
 
   QPixmap aPixmap;
-  aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_GAUSS_NEW_VIEWER"));
-  createAction( GAUSS_NEW_VIEWER,
-               tr("MEN_GAUSS_NEW_VIEWER"),
+  /*  aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_GAUSS_NEW_VIEWER"));
+  createAction( GAUSS_NEW_VIEWER, 
+               tr("MEN_GAUSS_NEW_VIEWER"), 
                aPixmap,
                 tr("MEN_GAUSS_NEW_VIEWER"),
                tr("MEN_GAUSS_NEW_VIEWER"),
@@ -226,12 +223,12 @@ initialize( CAM_Application* theApp )
   int windowMenu = createMenu( tr( "MEN_DESK_WINDOW" ), -1, 100 );
   int newWinMenu = createMenu( tr( "MEN_DESK_NEWWINDOW" ), windowMenu, -1, 0 );
   createMenu( action( GAUSS_NEW_VIEWER ), newWinMenu, -1 );
-
+  */
   // Add actions to menus
   createMenu( tr( "MEN_GAUSS" ), -1, -1, 30 );
   //createMenu( GAUSS_CREATE_PRS, aMenuId, 10 );
 
-  QString aViewerType = VVTK_Viewer::Type();
+  QString aViewerType = SVTK_Viewer::Type();
   SUIT_Accel* accel = getApp()->accel();
   accel->setActionKey( SUIT_Accel::PanLeft, Qt::Key_Left, aViewerType );
   accel->setActionKey( SUIT_Accel::PanRight, Qt::Key_Right, aViewerType );
@@ -245,10 +242,10 @@ initialize( CAM_Application* theApp )
   accel->setActionKey( SUIT_Accel::RotateDown, Qt::CTRL+Qt::Key_Down, aViewerType );
   accel->setActionKey( SVTK::PlusSpeedIncrementEvent, Qt::Key_Plus, aViewerType );
   accel->setActionKey( SVTK::MinusSpeedIncrementEvent, Qt::Key_Minus, aViewerType );
-
+  
   connect( getApp(), SIGNAL( viewManagerAdded( SUIT_ViewManager* ) ),
            this, SLOT( OnViewManagerAdded (SUIT_ViewManager*) ) );
-
+  
   // Prepare popup menus
   QtxPopupMgr* mgr = popupMgr();
   QString aRule;
@@ -302,7 +299,7 @@ initialize( CAM_Application* theApp )
 #ifndef DISABLE_VTKVIEWER
 #ifndef DISABLE_SALOMEOBJECT
   viewers.append( SVTK_Viewer::Type() );
-  viewers.append( VVTK_Viewer::Type() );
+  //viewers.append( VVTK_Viewer::Type() );
 #else
   viewers.append( VTKViewer_Viewer::Type() );
 #endif
@@ -359,14 +356,14 @@ initialize( CAM_Application* theApp )
                 this, SLOT(OnSaveConfiguration()));
   mgr->insert( action( GAUSS_SAVE_CONFIGURATION ), -1, -1, -1 );
   mgr->setRule( action( GAUSS_SAVE_CONFIGURATION ),
-    "selcount>=0 and client='VVTK' and activeView='VVTK'" );
+    "selcount>=0 and client='SVTK' and activeView='SVTK'" );
 
   createAction( GAUSS_OVERWRITE_CONFIGURATION, tr("MEN_OVERWRITE_CONFIGURATION"), QIcon(),
                 tr("MEN_OVERWRITE_CONFIGURATION"), "", 0, this, false,
                 this, SLOT(OnOverwriteConfiguration()));
   mgr->insert( action( GAUSS_OVERWRITE_CONFIGURATION ), -1, -1, -1 );
   mgr->setRule( action( GAUSS_OVERWRITE_CONFIGURATION ),
-    "selcount>0 and type='VISU::TGAUSSVIEW' and activeView='VVTK'" );
+    "selcount>0 and type='VISU::TGAUSSVIEW' and activeView='SVTK'" );
 
   createAction( GAUSS_RESTORE_CONFIGURATION, tr("MEN_RESTORE_CONFIGURATION"), QIcon(),
                 tr("MEN_RESTORE_CONFIGURATION"), "", 0, this, false,
@@ -376,61 +373,55 @@ initialize( CAM_Application* theApp )
   "selcount=1 and type='VISU::TGAUSSVIEW'" );
 }
 
-//---------------------------------------------------------------
-bool
-VisuGUI_Module::
-activateModule( SUIT_Study* theStudy )
-{
-  VisuGUI::activateModule( theStudy );
+// //---------------------------------------------------------------
+// bool VisuGUI_Module::activateModule( SUIT_Study* theStudy )
+// {
+//   VisuGUI::activateModule( theStudy );
 
-  SetViewVisibility(getApp(),&SUIT_ViewWindow::show);
-
-  return true;
-}
+//   //SetViewVisibility(getApp(),&SUIT_ViewWindow::show);
 
+//   return true;
+// }
 
 //---------------------------------------------------------------
-bool
-VisuGUI_Module::
-deactivateModule( SUIT_Study* theStudy )
-{
-  VisuGUI::deactivateModule( theStudy );
+// bool VisuGUI_Module::deactivateModule( SUIT_Study* theStudy )
+// {
+//   return VisuGUI::deactivateModule( theStudy );
 
-  SetViewVisibility(getApp(),&SUIT_ViewWindow::hide);
+//   //SetViewVisibility(getApp(),&SUIT_ViewWindow::hide);
 
-  return true;
-}
+//   //return true;
+// }
 
 
 //---------------------------------------------------------------
-SUIT_ViewManager*
-VisuGUI_Module::
-onCreateViewManager()
-{
-  SalomeApp_Application* anApp = getApp();
-  SUIT_ResourceMgr* aResourceMgr = anApp->resourceMgr();
-  VVTK_ViewManager* aViewManager = new VVTK_ViewManager( anApp->activeStudy(), anApp->desktop() );
-  VVTK_Viewer* aViewer = (VVTK_Viewer*)aViewManager->getViewModel();
-  aViewer->setBackgroundColor( aResourceMgr->colorValue( "VTKViewer", "background", aViewer->backgroundColor() ) );
-  aViewer->setTrihedronSize( aResourceMgr->integerValue( "VTKViewer", "trihedron_size", aViewer->trihedronSize() ),
-                            aResourceMgr->booleanValue( "VTKViewer", "relative_size", aViewer->trihedronRelative() ) );
-  new LightApp_VTKSelector( aViewer, anApp->selectionMgr() );
-  anApp->addViewManager( aViewManager );
-
-  VVTK_ViewWindow* aViewWindow = ( VVTK_ViewWindow* )aViewManager->createViewWindow();
-  if( aViewWindow )
-  {
-    new VisuGUI_Slider( this, aViewWindow, anApp->selectionMgr() );
-  }
-
-  return aViewer->getViewManager();
-}
+// SUIT_ViewManager* VisuGUI_Module::onCreateViewManager()
+// {
+//   SalomeApp_Application* anApp = getApp();
+//   SUIT_ResourceMgr* aResourceMgr = anApp->resourceMgr();
+//   VVTK_ViewManager* aViewManager = new VVTK_ViewManager( anApp->activeStudy(), anApp->desktop() );
+//   VVTK_Viewer* aViewer = (VVTK_Viewer*)aViewManager->getViewModel();
+//   aViewer->setBackgroundColor( aResourceMgr->colorValue( "VTKViewer", "background", aViewer->backgroundColor() ) );
+//   aViewer->setProjectionMode( aResourceMgr->integerValue( "VTKViewer", "projection_mode", aViewer->projectionMode() ) );
+//   aViewer->setTrihedronSize( aResourceMgr->integerValue( "VTKViewer", "trihedron_size", aViewer->trihedronSize() ),
+//                          aResourceMgr->booleanValue( "VTKViewer", "relative_size", aViewer->trihedronRelative() ) );
+//   aViewer->setIncrementalSpeed( aResourceMgr->integerValue( "VTKViewer", "speed_value", aViewer->incrementalSpeed() ),
+//                             aResourceMgr->integerValue( "VTKViewer", "speed_mode", aViewer->incrementalSpeedMode() ) );
+//   aViewer->setInteractionStyle( aResourceMgr->integerValue( "VTKViewer", "navigation_mode", aViewer->interactionStyle() ) );
+//   aViewer->setSpacemouseButtons( aResourceMgr->integerValue( "VTKViewer", "spacemouse_func1_btn", aViewer->spacemouseBtn(1) ),
+//                              aResourceMgr->integerValue( "VTKViewer", "spacemouse_func2_btn", aViewer->spacemouseBtn(1) ),
+//                              aResourceMgr->integerValue( "VTKViewer", "spacemouse_func5_btn", aViewer->spacemouseBtn(1) ) );
+
+//   new LightApp_VTKSelector( aViewer, anApp->selectionMgr() );
+
+//   anApp->addViewManager( aViewManager );
+
+//   return aViewer->getViewManager();
+// }
 
 
 //---------------------------------------------------------------
-void
-VisuGUI_Module::
-createPreferences()
+void VisuGUI_Module::createPreferences()
 {
   VisuGUI::createPreferences();
 
@@ -438,15 +429,13 @@ createPreferences()
   createInsideCursorPreferences();
   createOutsideCursorPreferences();
   createPickingPreferences();
-  createSpaceMousePreferences();
-  createRecorderPreferences();
+  // createSpaceMousePreferences();
+  //createRecorderPreferences();
 }
 
 
 //---------------------------------------------------------------
-void
-VisuGUI_Module::
-createGaussPointsPreferences()
+void VisuGUI_Module::createGaussPointsPreferences()
 {
   int gaussTab = addPreference( tr( "VISU_GAUSS_PREF_TAB_TTL" ) );
   int primitiveGr = addPreference( tr( "VISU_GAUSS_PREF_PRIMITIVE_GROUP_TTL" ), gaussTab );
@@ -567,13 +556,49 @@ createGaussPointsPreferences()
   setPreferenceProperty( spacingPref, "min", 0.01 );
   setPreferenceProperty( spacingPref, "max", 1.0 );
   setPreferenceProperty( spacingPref, "step", 0.01 );
+
+  // spacemouse
+  int spacemouseGr = addPreference( tr( "VISU_SPACEMOUSE_PREF" ), gaussTab );
+  setPreferenceProperty( spacemouseGr, "columns", 2 );
+  int spacemousePref3 = addPreference( tr( "VISU_SPACEMOUSE_PREF_3" ), spacemouseGr,
+                                       LightApp_Preferences::Selector, "VISU",
+                                       "spacemouse_func3_btn" ); //decrease_gauss_point_magnification
+  int spacemousePref4 = addPreference( tr( "VISU_SPACEMOUSE_PREF_4" ), spacemouseGr,
+                                       LightApp_Preferences::Selector, "VISU",
+                                       "spacemouse_func4_btn" ); //increase_gauss_point_magnification
+  values.clear();
+  values.append( tr( "VISU_SPACEMOUSE_PREF_BTN_1" ) );
+  values.append( tr( "VISU_SPACEMOUSE_PREF_BTN_2" ) );
+  values.append( tr( "VISU_SPACEMOUSE_PREF_BTN_3" ) );
+  values.append( tr( "VISU_SPACEMOUSE_PREF_BTN_4" ) );
+  values.append( tr( "VISU_SPACEMOUSE_PREF_BTN_5" ) );
+  values.append( tr( "VISU_SPACEMOUSE_PREF_BTN_6" ) );
+  values.append( tr( "VISU_SPACEMOUSE_PREF_BTN_7" ) );
+  values.append( tr( "VISU_SPACEMOUSE_PREF_BTN_8" ) );
+  values.append( tr( "VISU_SPACEMOUSE_PREF_BTN_*" ) );
+  values.append( tr( "VISU_SPACEMOUSE_PREF_BTN_10" ) );
+  values.append( tr( "VISU_SPACEMOUSE_PREF_BTN_11" ) );
+  indices.clear();
+  indices.append( 1 );
+  indices.append( 2 );
+  indices.append( 3 );
+  indices.append( 4 );
+  indices.append( 5 );
+  indices.append( 6 );
+  indices.append( 7 );
+  indices.append( 8 );
+  indices.append( 9 ); // == button_*
+  indices.append( 10 );
+  indices.append( 11 );
+  setPreferenceProperty( spacemousePref3, "strings", values );
+  setPreferenceProperty( spacemousePref3, "indexes", indices );
+  setPreferenceProperty( spacemousePref4, "strings", values );
+  setPreferenceProperty( spacemousePref4, "indexes", indices );
 }
 
 
 //---------------------------------------------------------------
-void
-VisuGUI_Module::
-createInsideCursorPreferences()
+void VisuGUI_Module::createInsideCursorPreferences()
 {
   int insideCursorTab = addPreference( tr( "VISU_GAUSS_INSIDE_CURSOR_PREF_TAB_TTL" ) );
 
@@ -659,9 +684,7 @@ createInsideCursorPreferences()
 
 
 //---------------------------------------------------------------
-void
-VisuGUI_Module::
-createOutsideCursorPreferences()
+void VisuGUI_Module::createOutsideCursorPreferences()
 {
   int outsideCursorTab = addPreference( tr( "VISU_GAUSS_OUTSIDE_CURSOR_PREF_TAB_TTL" ) );
 
@@ -733,9 +756,7 @@ createOutsideCursorPreferences()
 
 
 //---------------------------------------------------------------
-void
-VisuGUI_Module::
-createPickingPreferences()
+void VisuGUI_Module::createPickingPreferences()
 {
   int pickingTab = addPreference( tr( "VISU_PICKING_PREF_TAB_TTL" ) );
 
@@ -772,6 +793,10 @@ createPickingPreferences()
   int infoWindowGr = addPreference( tr( "VISU_PICKING_PREF_INFO_WINDOW_GROUP_TTL" ), pickingTab );
   setPreferenceProperty( infoWindowGr, "columns", 2 );
 
+  int infoWindowPref = addPreference( tr( "VISU_PICKING_PREF_INFO_WINDOW" ), infoWindowGr,
+                                     LightApp_Preferences::Bool, "VISU", "picking_info_window" );
+  setPreferenceProperty( infoWindowPref, "columns", 2 );
+
   int transparencyPref = addPreference( tr( "VISU_PICKING_PREF_TRANSPARENCY" ), infoWindowGr,
                                        LightApp_Preferences::IntSpin, "VISU", "picking_transparency" );
   setPreferenceProperty( transparencyPref, "min", 0 );
@@ -793,6 +818,10 @@ createPickingPreferences()
   int cameraGr = addPreference( tr( "VISU_PICKING_PREF_CAMERA_GROUP_TTL" ), pickingTab );
   setPreferenceProperty( cameraGr, "columns", 2 );
 
+  int cameraPref = addPreference( tr( "VISU_PICKING_PREF_CAMERA_MOVEMENT" ), cameraGr,
+                                 LightApp_Preferences::Bool, "VISU", "picking_camera_movement" );
+  setPreferenceProperty( cameraPref, "columns", 2 );
+
   int zoomFactorPref = addPreference( tr( "VISU_PICKING_PREF_ZOOM_FACTOR" ), cameraGr,
                                      LightApp_Preferences::DblSpin, "VISU", "picking_zoom_factor" );
   setPreferenceProperty( zoomFactorPref, "min", 0.1 );
@@ -814,9 +843,7 @@ createPickingPreferences()
 
 
 //---------------------------------------------------------------
-void
-VisuGUI_Module::
-createSpaceMousePreferences()
+void VisuGUI_Module::createSpaceMousePreferences()
 {
   int mouseTab = addPreference( tr( "VISU_MOUSE_PREF_TAB_TLT" ) );
 
@@ -894,9 +921,7 @@ createSpaceMousePreferences()
 
 
 //---------------------------------------------------------------
-void
-VisuGUI_Module::
-createRecorderPreferences()
+void VisuGUI_Module::createRecorderPreferences()
 {
   int recorderTab = addPreference( tr( "VISU_RECORDER_PREF_TAB_TTL" ) );
 
@@ -930,29 +955,26 @@ createRecorderPreferences()
 
 
 //---------------------------------------------------------------
-void
-VisuGUI_Module::
-OnCreateGaussPoints()
+void VisuGUI_Module::OnCreateGaussPoints()
 {
   double initialTime = vtkTimerLog::GetCPUTime();
-  CreatePrs3d<VISU::GaussPoints_i, VisuGUI_GaussPointsDlg, 1>(this, VVTK_Viewer::Type());
+  //CreatePrs3d<VISU::GaussPoints_i, VisuGUI_GaussPointsDlg, 1>(this, VVTK_Viewer::Type());
+  Prs3d_i* aPrs = CreatePrs3d<VISU::GaussPoints_i, VisuGUI_GaussPointsDlg, 1>(this, SVTK_Viewer::Type());
+  if (aPrs)
+    emit presentationCreated(aPrs);
   INFOS( "VisuGUI_Module::OnCreateGaussPoints() : Gauss Points created in " <<
         vtkTimerLog::GetCPUTime() - initialTime << " seconds" );
 }
 
-void
-VisuGUI_Module::
-OnViewManagerAdded(SUIT_ViewManager* viewMgr)
-{
-  QString type = viewMgr->getViewModel()->getType();
-  if ( type == VVTK_Viewer::Type() )
-    connect( viewMgr, SIGNAL( viewCreated( SUIT_ViewWindow* ) ),
-             this, SLOT( OnViewCreated( SUIT_ViewWindow* ) ) );
-}
+// void VisuGUI_Module::OnViewManagerAdded(SUIT_ViewManager* viewMgr)
+// {
+//   QString type = viewMgr->getViewModel()->getType();
+//   if ( type == VVTK_Viewer::Type() ) 
+//     connect( viewMgr, SIGNAL( viewCreated( SUIT_ViewWindow* ) ),
+//              this, SLOT( OnViewCreated( SUIT_ViewWindow* ) ) );
+// }
 
-void
-VisuGUI_Module::
-OnViewCreated(SUIT_ViewWindow* view)
+void VisuGUI_Module::OnViewCreated(SUIT_ViewWindow* view)
 {
   SVTK_ViewWindow* viewWindow = dynamic_cast<SVTK_ViewWindow*>( view );
   if ( viewWindow ) {
@@ -965,45 +987,41 @@ OnViewCreated(SUIT_ViewWindow* view)
   }
 }
 
-void
-VisuGUI_Module::
-setProperty( SVTK_ViewWindow* viewWindow, const QString& pref )
+void VisuGUI_Module::setProperty( SVTK_ViewWindow* viewWindow, const QString& pref )
 {
   if ( !viewWindow )
     return;
 
   SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
-  SVTK_MainWindow* aMainWindow = viewWindow->getMainWindow();
+  //SVTK_MainWindow* aMainWindow = viewWindow->getMainWindow();
   int val;
   if ( pref == "speed_increment" ) {
-    val = resMgr->integerValue( "VISU", pref, 10 );
-    aMainWindow->InvokeEvent( SVTK::SetSpeedIncrementEvent, &val );
+    val = resMgr->integerValue( "VTKViewer", pref, 10 );
+    viewWindow->InvokeEvent( SVTK::SetSpeedIncrementEvent, &val );
   }
   else if ( pref == "spacemouse_func1_btn" ) {
-    val = resMgr->integerValue( "VISU", pref, 1 );
-    aMainWindow->InvokeEvent( SVTK::SetSMDecreaseSpeedEvent, &val );
+    val = resMgr->integerValue( "VTKViewer", pref, 1 );
+    viewWindow->InvokeEvent( SVTK::SetSMDecreaseSpeedEvent, &val );
   }
   else if ( pref == "spacemouse_func2_btn" ) {
-    val = resMgr->integerValue( "VISU", pref, 2 );
-    aMainWindow->InvokeEvent( SVTK::SetSMIncreaseSpeedEvent, &val );
+    val = resMgr->integerValue( "VTKViewer", pref, 2 );
+    viewWindow->InvokeEvent( SVTK::SetSMIncreaseSpeedEvent, &val );
   }
   else if ( pref == "spacemouse_func3_btn" ) {
     val = resMgr->integerValue( "VISU", pref, 10 );
-    aMainWindow->InvokeEvent( VISU::SetSMDecreaseMagnificationEvent, &val );
+    viewWindow->InvokeEvent( VISU::SetSMDecreaseMagnificationEvent, &val );
   }
   else if ( pref == "spacemouse_func4_btn" ) {
     val = resMgr->integerValue( "VISU", pref, 11 );
-    aMainWindow->InvokeEvent( VISU::SetSMIncreaseMagnificationEvent, &val );
+    viewWindow->InvokeEvent( VISU::SetSMIncreaseMagnificationEvent, &val );
   }
   else if ( pref == "spacemouse_func5_btn" ) {
-    val = resMgr->integerValue( "VISU", pref, 9 );
-    aMainWindow->InvokeEvent( SVTK::SetSMDominantCombinedSwitchEvent, &val );
+    val = resMgr->integerValue( "VTKViewer", pref, 9 );
+    viewWindow->InvokeEvent( SVTK::SetSMDominantCombinedSwitchEvent, &val );
   }
 }
 
-void
-VisuGUI_Module::
-setProperty( SVTK_ViewManager* vm, const QString& prop )
+void VisuGUI_Module::setProperty( SVTK_ViewManager* vm, const QString& prop )
 {
   if ( !vm )
     return;
@@ -1013,43 +1031,37 @@ setProperty( SVTK_ViewManager* vm, const QString& prop )
     setProperty( dynamic_cast<SVTK_ViewWindow*>( windows[i] ), prop );
 }
 
-void
-VisuGUI_Module::
-preferencesChanged( const QString& group, const QString& pref )
+void VisuGUI_Module::preferencesChanged( const QString& group, const QString& pref )
 {
   VisuGUI::preferencesChanged(group,pref);
 
-  if ( group == "VISU" && ( pref == "speed_increment" || pref == "spacemouse_func1_btn" ||
-                           pref == "spacemouse_func2_btn" || pref == "spacemouse_func3_btn" ||
-                           pref == "spacemouse_func4_btn" || pref == "spacemouse_func5_btn" ) ) {
+//   if ( group == "VISU" && ( pref == "speed_increment" || pref == "spacemouse_func1_btn" ||
+//                         pref == "spacemouse_func2_btn" || pref == "spacemouse_func3_btn" || 
+//                         pref == "spacemouse_func4_btn" || pref == "spacemouse_func5_btn" ) ) {
 
-    // update properties of VVTK view windows
-    SUIT_ViewManager* vm = getApp()->getViewManager( VVTK_Viewer::Type(), false );
-    if ( vm )
-      setProperty( dynamic_cast<SVTK_ViewManager*>( vm ), pref );
-  }
+//     // update properties of VVTK view windows
+//     SUIT_ViewManager* vm = getApp()->getViewManager( VVTK_Viewer::Type(), false );
+//     if ( vm ) 
+//       setProperty( dynamic_cast<SVTK_ViewManager*>( vm ), pref );
+//   }
 }
 
 
 //---------------------------------------------------------------
-SUIT_ViewManager*
-VisuGUI_Module::
-getViewManager(const QString& theType,
+SUIT_ViewManager* VisuGUI_Module::getViewManager(const QString& theType, 
                const bool theIsCreate)
 {
   if (SUIT_ViewManager* aViewManager = VisuGUI::getViewManager(theType,theIsCreate))
     return aViewManager;
 
-  if (theIsCreate && theType == VVTK_Viewer::Type())
-    return onCreateViewManager();
+//   if (theIsCreate && theType == VVTK_Viewer::Type())
+//     return onCreateViewManager();
 
   return NULL;
 }
 
 //---------------------------------------------------------------
-void
-VisuGUI_Module::
-OnEditGaussPoints()
+void VisuGUI_Module::OnEditGaussPoints()
 {
   VISU::TSelectionInfo aSelectionInfo = VISU::GetSelectedObjects(this);
   if(aSelectionInfo.empty())
@@ -1059,10 +1071,13 @@ OnEditGaussPoints()
   Handle(SALOME_InteractiveObject) anIO = aSelectionItem.myIO;
 
   if(VISU::Prs3d_i* aPrs3d = VISU::GetPrs3dToModify(this, aSelectionItem.myObjectInfo.myBase)){
-    // Create VVTK_ViewWindow, if it does not exist
-    if (VVTK_ViewWindow* aViewWindow = GetViewWindow<VVTK_Viewer>(this)) {
+    if (SVTK_ViewWindow* aViewWindow = GetViewWindow<SVTK_Viewer>(this)) {
       EditPrs3d<VISU::GaussPoints_i, VisuGUI_GaussPointsDlg, 1>(this, anIO, aPrs3d, aViewWindow);
     }
+    // Create VVTK_ViewWindow, if it does not exist
+//     if (VVTK_ViewWindow* aViewWindow = GetViewWindow<VVTK_Viewer>(this)) {
+//       EditPrs3d<VISU::GaussPoints_i, VisuGUI_GaussPointsDlg, 1>(this, anIO, aPrs3d, aViewWindow);
+//     }
   }
 }
 
@@ -1070,10 +1085,9 @@ OnEditGaussPoints()
 //---------------------------------------------------------------
 namespace
 {
-  void
-  GetViewParams(VVTK_MainWindow* theViewWindow,
-               const char* theSuffix,
-               std::ostringstream& theStr)
+  /*  void   GetViewParams(VVTK_MainWindow* theViewWindow,
+                      const char* theSuffix,
+                      std::ostringstream& theStr)
   {
     vtkFloatingPointType aColor[3];
     vtkRenderer* aRenderer = theViewWindow->getRenderer();
@@ -1110,12 +1124,11 @@ namespace
     Storable::DataToStream(theStr,(std::string("myScaleFactor") + theSuffix + "[1]").c_str(),aScaleFactor[1]);
     Storable::DataToStream(theStr,(std::string("myScaleFactor") + theSuffix + "[2]").c_str(),aScaleFactor[2]);
   }
-
+  */
   //---------------------------------------------------------------
-  void
-  SetViewParams(VVTK_MainWindow* theViewWindow,
-               const char* theSuffix,
-               const Storable::TRestoringMap& theMap)
+  /*  void SetViewParams(VVTK_MainWindow* theViewWindow,
+                    const char* theSuffix,
+                    const Storable::TRestoringMap& theMap)
   {
     vtkFloatingPointType aColor[3];
     aColor[0] = Storable::FindValue(theMap,std::string("myColor") + theSuffix + ".R").toDouble();
@@ -1152,11 +1165,10 @@ namespace
     aScaleFactor[2] = Storable::FindValue(theMap,std::string("myScaleFactor") + theSuffix + "[2]").toDouble();
     theViewWindow->SetScale(aScaleFactor);
   }
-
+  */
   //---------------------------------------------------------------
-  void
-  GetViewParams(VVTK_MainWindow1* theViewWindow,
-               std::ostringstream& theStr)
+  /*  void   GetViewParams(VVTK_MainWindow1* theViewWindow,
+                      std::ostringstream& theStr)
   {
     GetViewParams(theViewWindow,"1",theStr);
 
@@ -1198,35 +1210,31 @@ namespace
       Storable::DataToStream(theStr,"mySegmentationMode",aSegmentationMode.c_str());
     }
   }
-
+  */
   //---------------------------------------------------------------
-  void
-  SetViewParams(VVTK_MainWindow1* theViewWindow,
-               const Storable::TRestoringMap& theMap)
+  /*void SetViewParams(VVTK_MainWindow1* theViewWindow,
+                    const Storable::TRestoringMap& theMap)
   {
     SetViewParams(theViewWindow,"1",theMap);
   }
 
-
+  */
   //---------------------------------------------------------------
-  void
-  GetViewParams(VVTK_MainWindow2* theViewWindow,
-               std::ostringstream& theStr)
+  /*void GetViewParams(VVTK_MainWindow2* theViewWindow,
+                    std::ostringstream& theStr)
   {
     GetViewParams(theViewWindow,"2",theStr);
   }
 
-  void
-  SetViewParams(VVTK_MainWindow2* theViewWindow,
-               const Storable::TRestoringMap& theMap)
+  void SetViewParams(VVTK_MainWindow2* theViewWindow,
+                    const Storable::TRestoringMap& theMap)
   {
     SetViewParams(theViewWindow,"2",theMap);
   }
-
+  */
 
   //---------------------------------------------------------------
-  std::string
-  GetViewParams(VVTK_ViewWindow* theViewWindow)
+  /*std::string GetViewParams(VVTK_ViewWindow* theViewWindow)
   {
     std::ostringstream aStream;
 
@@ -1241,7 +1249,7 @@ namespace
 
     return aStream.str();
   }
-
+  */
   //---------------------------------------------------------------
   struct TSelection
   {
@@ -1266,8 +1274,7 @@ namespace
       myVisibleEntries(theVisibleEntries)
     {}
 
-    void
-    operator()(VISU_GaussPtsAct* theActor)
+    void operator()(VISU_GaussPtsAct* theActor) 
     {
       if(theActor->GetVisibility()){
        const Handle(SALOME_InteractiveObject)& anIO = theActor->getIO();
@@ -1276,9 +1283,8 @@ namespace
     }
   };
 
-  void
-  GetGaussPointsSelection(VVTK_ViewWindow* theViewWindow,
-                         TVisibleEntries& theVisibleEntries)
+  /*void GetGaussPointsSelection(SVTK_ViewWindow* theViewWindow,
+                              TVisibleEntries& theVisibleEntries)
   {
     // First find all visible Gauss Points presentations
     vtkRenderer* aRenderer = theViewWindow->getRenderer();
@@ -1307,16 +1313,14 @@ namespace
       }
     }
   }
-
+  */
 
   //---------------------------------------------------------------
-  inline
-  void
-  CreateReference(_PTR(Study) theStudyDocument,
-                 _PTR(StudyBuilder) theStudyBuilder,
-                 _PTR(SObject) theFatherSObject,
-                 const string& theRefEntry,
-                 const TSelection& theSelection)
+  inline void CreateReference(_PTR(Study) theStudyDocument,
+                             _PTR(StudyBuilder) theStudyBuilder,
+                             _PTR(SObject) theFatherSObject, 
+                             const string& theRefEntry,
+                             const TSelection& theSelection)
   {
     _PTR(SObject) aNewObj = theStudyBuilder->NewObject(theFatherSObject);
     _PTR(SObject) aRefSObj = theStudyDocument->FindObjectID(theRefEntry);
@@ -1335,11 +1339,10 @@ namespace
 
 
   //---------------------------------------------------------------
-  void
-  SetGaussPointsSelection(VisuGUI* theModule,
-                         VVTK_ViewWindow* theViewWindow,
-                         _PTR(Study) theCStudy,
-                         _PTR(SObject) theSObject)
+  /*void SetGaussPointsSelection(VisuGUI* theModule,
+                              SVTK_ViewWindow* theViewWindow,
+                              _PTR(Study) theCStudy,
+                              _PTR(SObject) theSObject)
   {
     SVTK_Selector* aSelector = theViewWindow->GetSelector();
     aSelector->ClearIObjects();
@@ -1354,7 +1357,7 @@ namespace
        PortableServer::ServantBase_var aServant = VISU::GetServant(anObject);
        if(VISU::Prs3d_i* aPrs3d = dynamic_cast<VISU::Prs3d_i*>(aServant.in())){
          // To set visiblity
-         VISU::UpdateViewer(theModule, aPrs3d, /*disp_only = */anIsFirst, /*highlight = */false);
+         VISU::UpdateViewer(theModule, aPrs3d, anIsFirst, false);
          anIsFirst = false;
 
          // To update selection
@@ -1378,12 +1381,11 @@ namespace
 
     aSelector->EndPickCallback(); // To invoke selection changed signal
   }
-
+  */
 
   //---------------------------------------------------------------
-  void
-  OnStoreConfiguration(SalomeApp_Module* theModule,
-                      bool theIsNew)
+  /*void OnStoreConfiguration(SalomeApp_Module* theModule,
+                           bool theIsNew)
   {
     _PTR(Study) aCStudy = GetCStudy(GetAppStudy(theModule));
     if (CheckLock(aCStudy,GetDesktop(theModule)))
@@ -1392,7 +1394,7 @@ namespace
     LightApp_SelectionMgr* aSelectionMgr = GetSelectionMgr(theModule);
 
     SUIT_ViewManager* aViewManager = theModule->getApp()->activeViewManager();
-    if(aViewManager->getType() == VVTK_Viewer::Type()){
+        if(aViewManager->getType() == VVTK_Viewer::Type()){
       SUIT_ViewWindow* aWindow = aViewManager->getActiveView();
       VVTK_ViewWindow* aViewWindow = dynamic_cast<VVTK_ViewWindow*>(aWindow);
 
@@ -1466,49 +1468,42 @@ namespace
        //UpdateObjBrowser(theModule,true,aSObject);
        UpdateObjBrowser(theModule,true);
       }
-    }
-  }
+    } 
+    }*/
 
 
   //---------------------------------------------------------------
-  template<class TMainWindow>
-  void
-  SetMainWindowParams(VisuGUI* theModule,
-                     _PTR(SObject) theSObject,
-                     VVTK_ViewWindow* theViewWindow,
-                     TMainWindow* theMainWindow)
+/*  template<class TMainWindow>
+  void SetMainWindowParams(VisuGUI* theModule,
+                          _PTR(SObject) theSObject,
+                          VVTK_ViewWindow* theViewWindow,
+                          TMainWindow* theMainWindow)
   {
     _PTR(Study) aCStudy = GetCStudy(GetAppStudy(theModule));
 
     Storable::TRestoringMap aMap = Storable::GetStorableMap(theSObject);
     if(!aMap.empty())
       SetViewParams(theMainWindow, aMap);
-  }
+      }*/
 }
 
 
 //---------------------------------------------------------------
-void
-VisuGUI_Module::
-OnSaveConfiguration()
-{
-  ::OnStoreConfiguration(this,true);
-}
+// void VisuGUI_Module::OnSaveConfiguration()
+// {
+//   ::OnStoreConfiguration(this,true);
+// }
 
 
 //---------------------------------------------------------------
-void
-VisuGUI_Module::
-OnOverwriteConfiguration()
-{
-  ::OnStoreConfiguration(this,false);
-}
+// void VisuGUI_Module::OnOverwriteConfiguration()
+// {
+//   ::OnStoreConfiguration(this,false);
+// }
 
 
 //---------------------------------------------------------------
-void
-VisuGUI_Module::
-OnRestoreConfiguration()
+/*void VisuGUI_Module::OnRestoreConfiguration()
 {
   LightApp_SelectionMgr* aSelectionMgr = GetSelectionMgr(this);
 
@@ -1524,9 +1519,8 @@ OnRestoreConfiguration()
     myConfigSObject = aSObject;
     Storable::TRestoringMap aMap = Storable::GetStorableMap(aSObject);
     if(!aMap.empty()){
-      SUIT_ViewWindow* aWindow = aViewManager->getActiveView();
-      VVTK_ViewWindow* aViewWindow = dynamic_cast<VVTK_ViewWindow*>(aWindow);
-
+      SUIT_ViewWindow* aViewWindow = aViewManager->getActiveView();
+      
       Selection_Mode aSelectionMode = Storable::FindValue(aMap,"mySelectionMode").toInt();
       SVTK_Selector* aSelector = aViewWindow->GetSelector();
       aSelector->SetSelectionMode(aSelectionMode);
@@ -1594,37 +1588,35 @@ OnRestoreConfiguration()
       SetGaussPointsSelection(this,aViewWindow,aCStudy,aSObject);
     }
   }
-}
+}*/
 
 
 //---------------------------------------------------------------
-bool
-VisuGUI_Module::
-eventFilter( QObject * theWatched, QEvent * theEvent )
-{
-  bool aRet = VisuGUI::eventFilter(theWatched,theEvent);
-  if(theEvent->type() == QEvent::Show){
-    if(SUIT_ViewManager* aViewManager = getViewManager(VVTK_Viewer::Type(),false)){
-      SUIT_ViewWindow* aWindow = aViewManager->getActiveView();
-      VVTK_ViewWindow* aViewWindow = dynamic_cast<VVTK_ViewWindow*>(aWindow);
-      if(VVTK_MainWindow1* aMainWindow = aViewWindow->getMainWindow1()){
-       SVTK_RenderWindowInteractor* anInteractor = aMainWindow->GetInteractor();
-       if(theWatched == anInteractor){
-         SetMainWindowParams(this,myConfigSObject,aViewWindow,aMainWindow);
-         anInteractor->removeEventFilter(this);
-       }
-      }
-      if(VVTK_MainWindow2* aMainWindow = aViewWindow->getMainWindow2()){
-       SVTK_RenderWindowInteractor* anInteractor = aMainWindow->GetInteractor();
-       if(theWatched == aMainWindow->GetInteractor()){
-         SetMainWindowParams(this,myConfigSObject,aViewWindow,aMainWindow);
-         anInteractor->removeEventFilter(this);
-       }
-      }
-    }
-  }
-  return aRet;
-}
+//bool VisuGUI_Module::eventFilter( QObject * theWatched, QEvent * theEvent )
+//{
+//  bool aRet = VisuGUI::eventFilter(theWatched,theEvent);
+//   if(theEvent->type() == QEvent::Show){
+//     if(SUIT_ViewManager* aViewManager = getViewManager(VVTK_Viewer::Type(),false)){
+//       SUIT_ViewWindow* aWindow = aViewManager->getActiveView();
+//       VVTK_ViewWindow* aViewWindow = dynamic_cast<VVTK_ViewWindow*>(aWindow);
+//       if(VVTK_MainWindow1* aMainWindow = aViewWindow->getMainWindow1()){
+//     SVTK_RenderWindowInteractor* anInteractor = aMainWindow->GetInteractor();
+//     if(theWatched == anInteractor){
+//       SetMainWindowParams(this,myConfigSObject,aViewWindow,aMainWindow);
+//       anInteractor->removeEventFilter(this);
+//     }
+//       }
+//       if(VVTK_MainWindow2* aMainWindow = aViewWindow->getMainWindow2()){
+//     SVTK_RenderWindowInteractor* anInteractor = aMainWindow->GetInteractor();
+//     if(theWatched == aMainWindow->GetInteractor()){
+//       SetMainWindowParams(this,myConfigSObject,aViewWindow,aMainWindow);
+//       anInteractor->removeEventFilter(this);
+//     }
+//       }
+//     }
+//   }
+//  return aRet;
+//}
 
 
 const char gSeparator = '_'; // character used to separate parameter names
@@ -1645,7 +1637,7 @@ void VisuGUI_Module::storeVisualParameters(int savePoint)
   _PTR(IParameters) ip = ClientFactory::getIParameters(ap);
 
   // viewers counters are used for storing view_numbers in IParameters
-  int svtkViewers( 0 ), vvtkViewers( 0 ), plotViewers( 0 );
+  int svtkViewers( 0 ), /*vvtkViewers( 0 ),*/ plotViewers( 0 );
 
   // componentName is used for encoding of entries when storing them in IParameters
   _PTR(SComponent) visuEng = ClientFindOrCreateVisuComponent( studyDS );
@@ -1657,7 +1649,7 @@ void VisuGUI_Module::storeVisualParameters(int savePoint)
   // saving VVTK viewer parameters.  VVTK (Gauss Viewers) are NOT created by SalomeApp since
   // VVTK is declared in VISU, so here we store VVTK view window parameters.
   // VisuGUI_Module::restoreVisualParameters() creates VVTK_Views and restores its parameters.
-  ip->setProperty( "ActiveGaussViewer", "-1" );
+  /*  ip->setProperty( "ActiveGaussViewer", "-1" ); 
   getApp()->viewManagers( VVTK_Viewer::Type(), lst );
   for ( it = lst.begin(); it != lst.end(); it++ ) {
     if ( SUIT_ViewWindow* vwin = (*it)->getActiveView() ) {
@@ -1674,7 +1666,7 @@ void VisuGUI_Module::storeVisualParameters(int savePoint)
       vvtkViewers++;
     }
   }
-
+  */
   // VISU module opens one SVTK viewer in activateModule().  This causes a bug in save-restore visual
   // parameters: it no SVTK view was saved, we need NOT any SVTK on restore.  Here we store if any is open..
   /*
@@ -1686,17 +1678,17 @@ void VisuGUI_Module::storeVisualParameters(int savePoint)
   // main cycle to store parameters of displayed objects
   lst.clear();
   getApp()->viewManagers( lst );
-  vvtkViewers = svtkViewers = plotViewers = 0;
+  /*vvtkViewers = */svtkViewers = plotViewers = 0;
   for ( it = lst.begin(); it != lst.end(); it++ ) {
     SUIT_ViewManager* vman = *it;
     QString vType = vman->getType();
     int* viewsCounter = vType == SVTK_Viewer::Type()    ? &svtkViewers :
-                        vType == VVTK_Viewer::Type()    ? &vvtkViewers :
+      //vType == VVTK_Viewer::Type()    ? &vvtkViewers :
                         vType == SPlot2d_Viewer::Type() ? &plotViewers : 0;
 
     // saving VTK actors' properties
-    if ( vType == SVTK_Viewer::Type() ||  // processing SVTK and VVTK viewers in the same
-        vType == VVTK_Viewer::Type() ) { // way (VVTK_ViewWindow inherits SVTK_ViewWindow)
+    if ( vType == SVTK_Viewer::Type() /*||  // processing SVTK and VVTK viewers in the same
+                                       vType == VVTK_Viewer::Type()*/ ) { // way (VVTK_ViewWindow inherits SVTK_ViewWindow)       
 
       QVector<SUIT_ViewWindow*> views = vman->getViews();
       for ( int i = 0, iEnd = vman->getViewsCount(); i < iEnd; i++ ) {
@@ -1783,8 +1775,8 @@ void VisuGUI_Module::storeVisualParameters(int savePoint)
          QList<Plot2d_Curve*> curves;
           QList<Plot2d_Curve*>::Iterator itCurve;
          plotVF->getCurves( curves );
-
-         Plot2d_Curve* curve;
+         
+         //Plot2d_Curve* curve;
          for ( itCurve = curves.begin(); itCurve != curves.end(); itCurve++ ) {
            if ( SPlot2d_Curve* sCurve = dynamic_cast<SPlot2d_Curve*>( *itCurve ) ) {
              if ( sCurve->hasIO() ) {
@@ -1853,24 +1845,24 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint)
     std::vector<std::string> paramValues = ip->getAllParameterValues( *entIt );
     std::vector<std::string>::iterator namesIt = paramNames.begin();
     std::vector<std::string>::iterator valuesIt = paramValues.begin();
-
-    if ( *entIt == "GaussViewer" ) {
-      // parameter names are view window's captions, values - visual parameters.
-      for ( ; namesIt != paramNames.end(); ++namesIt, ++valuesIt ) {
-       SUIT_ViewManager* vman = onCreateViewManager();
-       SUIT_ViewWindow* vwin = vman->getActiveView();
-       vwin->setWindowTitle( (*namesIt).c_str() );
-
-       // wait untill the window is really shown.  This step fixes MANY bugs..
-       while ( !vwin->isVisible() )
-         qApp->processEvents();
-
-       vwin->setVisualParameters( (*valuesIt).c_str() );
-      }
-      continue; // skip to next entry
-    }
-
-    // entry is a normal entry - it should be "decoded" (setting base adress of component)
+    
+//     if ( *entIt == "GaussViewer" ) {
+//       // parameter names are view window's captions, values - visual parameters.
+//       for ( ; namesIt != paramNames.end(); ++namesIt, ++valuesIt ) {
+//     SUIT_ViewManager* vman = onCreateViewManager();
+//     SUIT_ViewWindow* vwin = vman->getActiveView(); 
+//     vwin->setWindowTitle( (*namesIt).c_str() );
+
+//     // wait untill the window is really shown.  This step fixes MANY bugs..
+//     while ( !vwin->isVisible() )
+//       qApp->processEvents();
+
+//     vwin->setVisualParameters( (*valuesIt).c_str() );
+//       }
+//       continue; // skip to next entry
+//     }
+    
+    // entry is a normal entry - it should be "decoded" (setting base adress of component) 
     QString entry( ip->decodeEntry( *entIt ).c_str() );
 
     //SRN: Added a check that the entry corresponds to Standard_Real object in the Study
@@ -1890,8 +1882,8 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint)
 
       //      cout << " -- " << viewerType << ": entry = " << entry.latin1() << ", paramName = " << paramName << endl;
 
-      if ( viewerType == SVTK_Viewer::Type().toLatin1().data() ||
-          viewerType == VVTK_Viewer::Type().toLatin1().data() ) {
+      if ( viewerType == SVTK_Viewer::Type().toLatin1().data() /*||
+                                                                viewerType == VVTK_Viewer::Type().toLatin1().data()*/ ) {
 
        // used as inner map key for locating the actor.
        QString viewerTypeIndex = QString( viewerType.c_str() ) + QString::number( viewIndex );
@@ -1966,7 +1958,12 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint)
            if ( !prs )
              continue;
 
-           prs->RemoveAllClippingPlanes();
+           //prs->RemoveAllClippingPlanes();
+           for (int i = prs->GetNumberOfClippingPlanes() - 1; i >= 0 ; i--) {
+             OrientedPlane* aPlane = dynamic_cast<OrientedPlane*>(prs->GetClippingPlane(i));
+             if (aPlane) 
+               prs->RemoveClippingPlane(i);
+           }
            if ( val != "Off" ) {
              QStringList vals = val.split( gDigitsSep, QString::SkipEmptyParts );
              if ( vals.count() == 6 ) { // format check: 6 float values
@@ -2012,8 +2009,8 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint)
     SUIT_ViewModel* vmodel = (*it)->getViewModel();
     if ( !vmodel )
       continue;
-    if ( vmodel->getType() == SVTK_Viewer::Type() ||  // processing SVTK and VVTK viewers
-        vmodel->getType() == VVTK_Viewer::Type() ) { // in the same way
+    if ( vmodel->getType() == SVTK_Viewer::Type() /*||  // processing SVTK and VVTK viewers
+                                                   vmodel->getType() == VVTK_Viewer::Type()*/ ) { // in the same way 
       SVTK_ViewWindow* vtkView = (SVTK_ViewWindow*) (*it)->getActiveView();
       vtkView->getRenderer()->ResetCameraClippingRange();
       vtkView->Repaint();
@@ -2039,19 +2036,19 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint)
   */
 
   // if active Gauss Viewer is set ( != -1) then raise the gauss view window.
-  bool ok;
-  QString activeGaussViewerStr = ip->getProperty( "ActiveGaussViewer" ).c_str();
-  int activeGaussViewer = activeGaussViewerStr.toInt( &ok );
-  if ( ok && activeGaussViewer != -1 ) {
-    lst.clear();
-    getApp()->viewManagers( VVTK_Viewer::Type(), lst );
-    if ( activeGaussViewer >= 0 && activeGaussViewer < lst.count() ) {
-      SUIT_ViewWindow* activeView = lst.at( activeGaussViewer )->getActiveView();
-      if ( activeView ) {
-       activeView->activateWindow();
-       //activeView->setFocus();
-      }
-    }
-  }
+//   bool ok;
+//   QString activeGaussViewerStr = ip->getProperty( "ActiveGaussViewer" ).c_str();
+//   int activeGaussViewer = activeGaussViewerStr.toInt( &ok );
+//   if ( ok && activeGaussViewer != -1 ) {
+//     lst.clear();
+//     getApp()->viewManagers( VVTK_Viewer::Type(), lst );
+//     if ( activeGaussViewer >= 0 && activeGaussViewer < lst.count() ) {
+//       SUIT_ViewWindow* activeView = lst.at( activeGaussViewer )->getActiveView();
+//       if ( activeView ) {
+//     activeView->activateWindow();
+//     //activeView->setFocus();
+//       }          
+//     }
+//   }
 }
 
index 02abf76e08c74e5d7465f7466a0245f6a23b9ce7..606ff7d420a75afcbd0bc6a70ccdec35da60c51d 100644 (file)
@@ -50,9 +50,9 @@ public:
   virtual
   ~VisuGUI_Module();
 
-  virtual
-  bool
-  eventFilter( QObject * theWatched, QEvent * theEvent );
+  //  virtual
+  //  bool
+  //  eventFilter( QObject * theWatched, QEvent * theEvent );
 
   //! Redifined method of the module initializing.
   virtual
@@ -81,16 +81,12 @@ public:
   void
   restoreVisualParameters(int savePoint);
 
-public slots:
+  //public slots:
   //! Reimplemented method of the module deactivation.
-  virtual 
-  bool
-  deactivateModule( SUIT_Study* );
+  //  virtual bool deactivateModule( SUIT_Study* );
 
   //! Reimplemented method of the module activation.
-  virtual 
-  bool
-  activateModule( SUIT_Study* );
+  //  virtual bool activateModule( SUIT_Study* );
 
 protected:
   //! Create preferences for Gauss Points presentation.
@@ -123,8 +119,8 @@ protected:
   createRecorderPreferences();
 
 protected slots:
-  SUIT_ViewManager*
-  onCreateViewManager();
+  //  SUIT_ViewManager*
+  //  onCreateViewManager();
 
   void
   OnCreateGaussPoints();
@@ -132,8 +128,8 @@ protected slots:
   void
   OnViewCreated(SUIT_ViewWindow*);
 
-  void 
-  OnViewManagerAdded(SUIT_ViewManager*);
+  //  void 
+  //OnViewManagerAdded(SUIT_ViewManager*);
 
   //! Reimplemented method of the Gauss Points edition.
   virtual
@@ -141,25 +137,26 @@ protected slots:
   OnEditGaussPoints();
 
   //! Virtual method of saving configuration.
-  virtual
-  void
-  OnSaveConfiguration();
+  //  virtual
+  //  void
+  //  OnSaveConfiguration();
 
   //! Virtual method of overwriting configuration.
-  virtual
-  void
-  OnOverwriteConfiguration();
+  //  virtual
+  //  void
+  //  OnOverwriteConfiguration();
 
   //! Virtual method of restoring configuration.
-  virtual
-  void
-  OnRestoreConfiguration();
+  //  virtual
+  //  void
+  //  OnRestoreConfiguration();
 
 protected:
   _PTR(SObject) myConfigSObject;
 
   void setProperty( SVTK_ViewWindow*, const QString& );  // set a property (speed_increment, etc ) for SVTK ViewWindow
   void setProperty( SVTK_ViewManager*, const QString& ); // set a property for SVTK ViewWindow // set only 1 property for all ViewWindows of given view manager
+
 };
 
 #endif
index d8110578183490425a2b3a415651c1000e8f3b49..5405386588eb4d64520092c32fa93eadfe851a62 100644 (file)
@@ -42,6 +42,7 @@
 #include "VISU_ScalarMapAct.h"
 #include "VISU_ScalarMap_i.hh"
 #include "VISU_Result_i.hh"
+#include "VISU_Prs3dUtils.hh"
 
 #include "LightApp_Application.h"
 
@@ -87,9 +88,9 @@ VisuGUI_TextPrefDlg::VisuGUI_TextPrefDlg (QWidget* parent)
   setWindowTitle(tr("TIT_TEXT_PREF"));
   setSizeGripEnabled(TRUE);
 
-  QVBoxLayout* TopLayout = new QVBoxLayout(this);
-  TopLayout->setSpacing(6);
-  TopLayout->setMargin(11);
+  QVBoxLayout* aMainLay = new QVBoxLayout(this);
+  aMainLay->setSpacing(6);
+  aMainLay->setMargin(11);
 
   // "Title" grp
   QGroupBox* aTitleGrp = new QGroupBox ( tr("LBL_TITLE"), this);
@@ -109,7 +110,7 @@ VisuGUI_TextPrefDlg::VisuGUI_TextPrefDlg (QWidget* parent)
   myTitleFont = new SVTK_FontWidget (aHBox);
   aHBLay->addWidget( myTitleFont );
 
-  TopLayout->addWidget(aTitleGrp);
+  aMainLay->addWidget(aTitleGrp);
 
   // "Labels" grp
   QGroupBox* aLabelsGrp = new QGroupBox (tr("LBL_LABELS"), this);
@@ -125,7 +126,7 @@ VisuGUI_TextPrefDlg::VisuGUI_TextPrefDlg (QWidget* parent)
   myLabelFont = new SVTK_FontWidget (aHBox);
   aHBLay->addWidget( myLabelFont );
 
-  TopLayout->addWidget(aLabelsGrp);
+  aMainLay->addWidget(aLabelsGrp);
 
   // Common buttons ===========================================================
   QGroupBox* GroupButtons = new QGroupBox( this );
@@ -151,7 +152,7 @@ VisuGUI_TextPrefDlg::VisuGUI_TextPrefDlg (QWidget* parent)
   buttonHelp->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonHelp, 0, 3 );
 
-  TopLayout->addWidget( GroupButtons );
+  aMainLay->addWidget( GroupButtons );
 
   connect(buttonOk,     SIGNAL(clicked()), this, SLOT(accept()));
   connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
@@ -260,7 +261,8 @@ void VisuGUI_TextPrefDlg::keyPressEvent( QKeyEvent* e )
   Constructor
 */
 VisuGUI_BarPrefDlg::VisuGUI_BarPrefDlg( QWidget* parent )
-  : QDialog( parent )
+  : QDialog( parent ),
+    myOrientation( 1 )
 {
   setModal( true );
   setWindowTitle( tr( "TIT_BAR_PREF" ) );
@@ -268,109 +270,79 @@ VisuGUI_BarPrefDlg::VisuGUI_BarPrefDlg( QWidget* parent )
 
   QString propertyName = QString( "scalar_bar_vertical_" );
 
-  myTitleWidth = myTitleHeight = myLabelWidth = myLabelHeight = myBarWidth = myBarHeight = 0;
+  myTitleSize = myLabelSize = myBarWidth = myBarHeight = 0;
   myUnits = true;
-  myUnitsFormat = "%-#6.3g";
+  myPrecision = 3;
 
-  QVBoxLayout* TopLayout = new QVBoxLayout( this );
-  TopLayout->setSpacing( 6 );
-  TopLayout->setMargin( 11 );
+  QVBoxLayout* aMainLay = new QVBoxLayout( this );
+  aMainLay->setSpacing( 5 );
+  aMainLay->setMargin( 5 );
+
+  // dimensions
+  
+  QGroupBox* aDimGrp = new QGroupBox( this );
+  QGridLayout* aDimGrpLay = new QGridLayout( aDimGrp );
+  aDimGrpLay->setSpacing( 5 );
+  aDimGrpLay->setMargin( 5 );
+
+  myTitleSizeSpin = new QSpinBox( aDimGrp );
+  myTitleSizeSpin->setRange( 0, 100 );
+  myTitleSizeSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+  myTitleSizeSpin->setMinimumWidth( 70 );
+  myTitleSizeSpin->setValue( 0 );
+  myTitleSizeSpin->setSpecialValueText( tr( "AUTO" ) );
+  QLabel* aTitleSizeLbl = new QLabel( tr( "LBL_TITLE_W" ), aDimGrp );
+  
+  myLabelSizeSpin = new QSpinBox( aDimGrp );
+  myLabelSizeSpin->setRange( 0, 100 );
+  myLabelSizeSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+  myLabelSizeSpin->setMinimumWidth( 70 );
+  myLabelSizeSpin->setValue( 0 );
+  myLabelSizeSpin->setSpecialValueText( tr( "AUTO" ) );
+  QLabel* aLabelSizeLbl = new QLabel( tr( "LBL_LABEL_W" ), aDimGrp );
+  
+  myBarWidthSpin = new QSpinBox( aDimGrp );
+  myBarWidthSpin->setRange( 0, 100 );
+  myBarWidthSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+  myBarWidthSpin->setMinimumWidth( 70 );
+  myBarWidthSpin->setValue( 0 );
+  myBarWidthSpin->setSpecialValueText( tr( "AUTO" ) );
+  QLabel* aBarWidthLbl = new QLabel( tr( "LBL_BAR_W" ), aDimGrp );
+  
+  myBarHeightSpin = new QSpinBox( aDimGrp );
+  myBarHeightSpin->setRange( 0, 100 );
+  myBarHeightSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+  myBarHeightSpin->setMinimumWidth( 70 );
+  myBarHeightSpin->setValue( 0 );
+  myBarHeightSpin->setSpecialValueText( tr( "AUTO" ) );
+  QLabel* aBarHeightLbl = new QLabel( tr( "LBL_BAR_H" ), aDimGrp );
+
+  // format and units
+
+  QLabel* aPrecLbl = new QLabel( tr( "PRECISION" ), aDimGrp );
+  myPrecisionSpin = new QSpinBox( aDimGrp );
+  myPrecisionSpin->setRange( 1, 100 );
+  
+  myUnitsChk = new QCheckBox( tr( "LBL_SHOW_UNITS" ), aDimGrp );
+  
+  // layout
+  
+  aDimGrpLay->addWidget( aTitleSizeLbl,  0, 0 );
+  aDimGrpLay->addWidget( myTitleSizeSpin,   0, 1 );
+  aDimGrpLay->addWidget( aLabelSizeLbl,  0, 2 );
+  aDimGrpLay->addWidget( myLabelSizeSpin,   0, 3 );
+  aDimGrpLay->addWidget( aBarWidthLbl,   1, 0 );
+  aDimGrpLay->addWidget( myBarWidthSpin,    1, 1 );
+  aDimGrpLay->addWidget( aBarHeightLbl,  1, 2 );
+  aDimGrpLay->addWidget( myBarHeightSpin,   1, 3 );
+  aDimGrpLay->addWidget( aPrecLbl, 2, 0 );
+  aDimGrpLay->addWidget( myPrecisionSpin, 2, 1 );
+  aDimGrpLay->addWidget( myUnitsChk, 2, 2, 1, 2 );
   
-  QGroupBox* WidthHeightGroup = new QGroupBox ( this );
-  QGridLayout* WidthHeightGroupLayout = new QGridLayout( WidthHeightGroup );
-  WidthHeightGroupLayout->setAlignment( Qt::AlignTop );
-  WidthHeightGroupLayout->setSpacing( 6 );
-  WidthHeightGroupLayout->setMargin( 11 );
-
-  TitleWidthSpin = new QSpinBox( WidthHeightGroup );
-  TitleWidthSpin->setRange( 0, 100 );
-  TitleWidthSpin->setSingleStep( 1 );
-  TitleWidthSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-  TitleWidthSpin->setMinimumWidth( 70 );
-  TitleWidthSpin->setValue( 0 );
-  TitleWidthSpin->setSpecialValueText( tr( "AUTO" ) );
-  QLabel* LabelTitleWidth = new QLabel( tr( "LBL_TITLE_W" ), WidthHeightGroup );
-  LabelTitleWidth->setBuddy( TitleWidthSpin );
-
-  TitleHeightSpin = new QSpinBox( WidthHeightGroup );
-  TitleHeightSpin->setRange( 0, 100 );
-  TitleHeightSpin->setSingleStep( 1 );
-  TitleHeightSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-  TitleHeightSpin->setMinimumWidth( 70 );
-  TitleHeightSpin->setValue( 0 );
-  TitleHeightSpin->setSpecialValueText( tr( "AUTO" ) );
-  QLabel* LabelTitleHeight = new QLabel( tr( "LBL_TITLE_H" ), WidthHeightGroup );
-  LabelTitleHeight->setBuddy( TitleHeightSpin );
-
-  CBUnits = new QCheckBox( tr( "LBL_SHOW_UNITS" ), WidthHeightGroup );
-  CBUnits->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-
-  LabelWidthSpin = new QSpinBox( WidthHeightGroup );
-  LabelWidthSpin->setRange( 0, 100 );
-  LabelWidthSpin->setSingleStep( 1 );
-  LabelWidthSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-  LabelWidthSpin->setMinimumWidth( 70 );
-  LabelWidthSpin->setValue( 0 );
-  LabelWidthSpin->setSpecialValueText( tr( "AUTO" ) );
-  QLabel* LabelLabelWidth = new QLabel( tr( "LBL_LABEL_W" ), WidthHeightGroup );
-  LabelLabelWidth->setBuddy( LabelWidthSpin );
-
-  LabelHeightSpin = new QSpinBox( WidthHeightGroup );
-  LabelHeightSpin->setRange( 0, 100 );
-  LabelHeightSpin->setSingleStep( 1 );
-  LabelHeightSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-  LabelHeightSpin->setMinimumWidth( 70 );
-  LabelHeightSpin->setValue( 0 );
-  LabelHeightSpin->setSpecialValueText( tr( "AUTO" ) );
-  QLabel* LabelLabelHeight = new QLabel( tr( "LBL_LABEL_H" ), WidthHeightGroup );
-  LabelLabelHeight->setBuddy( LabelHeightSpin );
-
-  UnitsEdit = new QLineEdit( WidthHeightGroup );
-  UnitsEdit->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-  UnitsEdit->setMinimumWidth( 35 );
-  UnitsEdit->setText( myUnitsFormat );
-  QLabel* UnitsLabel = new QLabel( tr( "LBL_UNITS_FORMAT" ), WidthHeightGroup );
-  UnitsLabel->setBuddy( UnitsEdit );
-
-  BarWidthSpin = new QSpinBox( WidthHeightGroup );
-  BarWidthSpin->setRange( 0, 100 );
-  BarWidthSpin->setSingleStep( 1 );
-  BarWidthSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-  BarWidthSpin->setMinimumWidth( 70 );
-  BarWidthSpin->setValue( 0 );
-  BarWidthSpin->setSpecialValueText( tr( "AUTO" ) );
-  QLabel* LabelBarWidth = new QLabel( tr( "LBL_BAR_W" ), WidthHeightGroup );
-  LabelBarWidth->setBuddy( BarWidthSpin );
-
-  BarHeightSpin = new QSpinBox( WidthHeightGroup );
-  BarHeightSpin->setRange( 0, 100 );
-  BarHeightSpin->setSingleStep( 1 );
-  BarHeightSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-  BarHeightSpin->setMinimumWidth( 70 );
-  BarHeightSpin->setValue( 0 );
-  BarHeightSpin->setSpecialValueText( tr( "AUTO" ) );
-  QLabel* LabelBarHeight = new QLabel( tr( "LBL_BAR_H" ), WidthHeightGroup );
-  LabelBarHeight->setBuddy( BarHeightSpin );
-
-  WidthHeightGroupLayout->addWidget( LabelTitleWidth,  0, 0 );
-  WidthHeightGroupLayout->addWidget( TitleWidthSpin,   0, 1 );
-  WidthHeightGroupLayout->addWidget( LabelTitleHeight, 0, 2 );
-  WidthHeightGroupLayout->addWidget( TitleHeightSpin,  0, 3 );
-  WidthHeightGroupLayout->addWidget( CBUnits,          0, 4, 1, 2 );
-  WidthHeightGroupLayout->addWidget( LabelLabelWidth,  1, 0 );
-  WidthHeightGroupLayout->addWidget( LabelWidthSpin,   1, 1 );
-  WidthHeightGroupLayout->addWidget( LabelLabelHeight, 1, 2 );
-  WidthHeightGroupLayout->addWidget( LabelHeightSpin,  1, 3 );
-  WidthHeightGroupLayout->addWidget( UnitsLabel,       1, 4 );
-  WidthHeightGroupLayout->addWidget( UnitsEdit,        1, 5 );
-  WidthHeightGroupLayout->addWidget( LabelBarWidth,    2, 0 );
-  WidthHeightGroupLayout->addWidget( BarWidthSpin,     2, 1 );
-  WidthHeightGroupLayout->addWidget( LabelBarHeight,   2, 2 );
-  WidthHeightGroupLayout->addWidget( BarHeightSpin,    2, 3 );
-
-  TopLayout->addWidget( WidthHeightGroup );
+  aMainLay->addWidget( aDimGrp );
 
   // Common buttons ===========================================================
+
   QGroupBox* GroupButtons = new QGroupBox( this );
   QHBoxLayout* GroupButtonsLayout = new QHBoxLayout( GroupButtons );
   GroupButtonsLayout->setAlignment( Qt::AlignTop );
@@ -393,63 +365,66 @@ VisuGUI_BarPrefDlg::VisuGUI_BarPrefDlg( QWidget* parent )
   GroupButtonsLayout->addWidget( buttonCancel );
   GroupButtonsLayout->addWidget( buttonHelp );
 
-  TopLayout->addWidget( GroupButtons );
+  aMainLay->addWidget( GroupButtons );
 
   connect( buttonOk,        SIGNAL( clicked() ),           this, SLOT( accept() ) );
   connect( buttonCancel,    SIGNAL( clicked() ),           this, SLOT( reject() ) );
   connect( buttonHelp,      SIGNAL( clicked() ),           this, SLOT( onHelp() ) );
-  connect( TitleWidthSpin,  SIGNAL( valueChanged( int ) ), this, SIGNAL( updatePreview() ) );
-  connect( TitleHeightSpin, SIGNAL( valueChanged( int ) ), this, SIGNAL( updatePreview() ) );
-  connect( LabelWidthSpin,  SIGNAL( valueChanged( int ) ), this, SIGNAL( updatePreview() ) );
-  connect( LabelHeightSpin, SIGNAL( valueChanged( int ) ), this, SIGNAL( updatePreview() ) );
-  connect( BarWidthSpin,    SIGNAL( valueChanged( int ) ), this, SIGNAL( updatePreview() ) );
-  connect( BarHeightSpin,   SIGNAL( valueChanged( int ) ), this, SIGNAL( updatePreview() ) );
-  connect( CBUnits,         SIGNAL( toggled( bool ) ),     this, SIGNAL( updatePreview() ) );
-  connect( UnitsEdit,       SIGNAL( editingFinished() ),   this, SIGNAL( updatePreview() ) );
+  connect( myTitleSizeSpin,  SIGNAL( valueChanged( int ) ), this, SIGNAL( updatePreview() ) );
+  connect( myLabelSizeSpin,  SIGNAL( valueChanged( int ) ), this, SIGNAL( updatePreview() ) );
+  connect( myBarWidthSpin,    SIGNAL( valueChanged( int ) ), this, SIGNAL( updatePreview() ) );
+  connect( myBarHeightSpin,   SIGNAL( valueChanged( int ) ), this, SIGNAL( updatePreview() ) );
+  connect( myUnitsChk,         SIGNAL( toggled( bool ) ),     this, SIGNAL( updatePreview() ) );
+  connect( myPrecisionSpin,  SIGNAL( valueChanged( int ) ), this, SIGNAL( updatePreview() ) );
 }
 
 
 //----------------------------------------------------------------------------
-void VisuGUI_BarPrefDlg::setRatios( int titleRatioWidth, int titleRatioHeight,
-                                   int labelRatioWidth, int labelRatioHeight,
-                                   int barRatioWidth,   int barRatioHeight )
+void VisuGUI_BarPrefDlg::setRatios( int titleRatioSize, int labelRatioWidth,
+                                   int barRatioWidth, int barRatioHeight )
 {
-  TitleWidthSpin->setValue( myTitleWidth = titleRatioWidth );
-  TitleHeightSpin->setValue( myTitleHeight = titleRatioHeight );
-  LabelWidthSpin->setValue( myLabelWidth = labelRatioWidth );
-  LabelHeightSpin->setValue( myLabelHeight = labelRatioHeight );
-  BarWidthSpin->setValue( myBarWidth = barRatioWidth );
-  BarHeightSpin->setValue( myBarHeight = barRatioHeight );
+  myTitleSizeSpin->setValue( myTitleSize = titleRatioSize );
+  myLabelSizeSpin->setValue( myLabelSize = labelRatioWidth );
+  myBarWidthSpin->setValue( myBarWidth = barRatioWidth );
+  myBarHeightSpin->setValue( myBarHeight = barRatioHeight );
 }
 
 
 //----------------------------------------------------------------------------
-void VisuGUI_BarPrefDlg::getRatios( int& titleRatioWidth, int& titleRatioHeight,
-                                   int& labelRatioWidth, int& labelRatioHeight,
-                                   int& barRatioWidth,   int& barRatioHeight )
+void VisuGUI_BarPrefDlg::getRatios( int& titleRatioSize, int& labelRatioWidth,
+                                   int& barRatioWidth, int& barRatioHeight )
 {
-  titleRatioWidth  = TitleWidthSpin->value();
-  titleRatioHeight = TitleHeightSpin->value();
-  labelRatioWidth  = LabelWidthSpin->value();
-  labelRatioHeight = LabelHeightSpin->value();
-  barRatioWidth    = BarWidthSpin->value();
-  barRatioHeight   = BarHeightSpin->value();
+  titleRatioSize  = myTitleSizeSpin->value();
+  labelRatioWidth  = myLabelSizeSpin->value();
+  barRatioWidth    = myBarWidthSpin->value();
+  barRatioHeight   = myBarHeightSpin->value();
 }
 
 
 //----------------------------------------------------------------------------
-void VisuGUI_BarPrefDlg::setLabelsFormat( const QString& format )
+void VisuGUI_BarPrefDlg::setLabelsPrecision( const int p )
 {
-  UnitsEdit->setText( myUnitsFormat = format );
+  myPrecisionSpin->setValue( p );
 }
 
+//----------------------------------------------------------------------------
+int VisuGUI_BarPrefDlg::getLabelsPrecision() const
+{
+  return myPrecisionSpin->value();
+}
 
 //----------------------------------------------------------------------------
-QString VisuGUI_BarPrefDlg::getLabelsFormat()
+void VisuGUI_BarPrefDlg::setOrientation( const int ori )
 {
-  return UnitsEdit->text();
+  myOrientation = ori;
 }
 
+//----------------------------------------------------------------------------
+
+int VisuGUI_BarPrefDlg::getOrientation() const
+{
+  return myOrientation;
+}
 
 //----------------------------------------------------------------------------
 void VisuGUI_BarPrefDlg::onHelp()
@@ -473,14 +448,14 @@ void VisuGUI_BarPrefDlg::onHelp()
 //----------------------------------------------------------------------------
 void VisuGUI_BarPrefDlg::setUnitsVisible(bool isVisible)
 {
-  CBUnits->setChecked( myUnits = isVisible );
+  myUnitsChk->setChecked( myUnits = isVisible );
 }
 
 
 //----------------------------------------------------------------------------
 bool VisuGUI_BarPrefDlg::isUnitsVisible()
 {
-  return CBUnits->isChecked();
+  return myUnitsChk->isChecked();
 }
 
 
@@ -490,14 +465,12 @@ bool VisuGUI_BarPrefDlg::isUnitsVisible()
 */
 void VisuGUI_BarPrefDlg::reject()
 {
-  TitleWidthSpin->setValue( myTitleWidth );
-  TitleHeightSpin->setValue( myTitleHeight );
-  LabelWidthSpin->setValue( myLabelWidth );
-  LabelHeightSpin->setValue( myLabelHeight );
-  BarWidthSpin->setValue( myBarWidth );
-  BarHeightSpin->setValue( myBarHeight );
-  CBUnits->setChecked( myUnits );
-  UnitsEdit->setText( myUnitsFormat );
+  myTitleSizeSpin->setValue( myTitleSize );
+  myLabelSizeSpin->setValue( myLabelSize );
+  myBarWidthSpin->setValue( myBarWidth );
+  myBarHeightSpin->setValue( myBarHeight );
+  myUnitsChk->setChecked( myUnits );
+  myPrecisionSpin->setValue( myPrecision );
   QDialog::reject();
 }
 
@@ -509,39 +482,26 @@ void VisuGUI_BarPrefDlg::reject()
 void VisuGUI_BarPrefDlg::accept()
 {
   QString dVal;
-  dVal.sprintf( UnitsEdit->text().toLatin1().data(), 1.1 );
-  if ( dVal.toDouble() == 0. ) {
-    SUIT_MessageBox::warning( this, tr( "WRN_VISU" ), tr ( "MSG_LABEL_FORMAT" ) );
+  int aBWH = myOrientation == 1 ? myBarWidthSpin->value() : myBarHeightSpin->value();
+  if( ( myLabelSizeSpin->value()+ aBWH ) > 100 ) 
+  {
+    SUIT_MessageBox::warning( this, tr( "WRN_VISU" ), tr( "MSG_BIG_SCALE" ) );
+    return;
   } 
-  else {
-    if(
-       (
-       TitleWidthSpin->value()+
-       LabelWidthSpin->value()+
-       BarWidthSpin->value()
-       > 100
-       ) ||
-       (
-       TitleHeightSpin->value()+
-       LabelHeightSpin->value()+
-       BarHeightSpin->value()
-       > 100
-        )
-       ) {
-      SUIT_MessageBox::warning( this, tr( "WRN_VISU" ), tr( "MSG_BIG_SCALE" ) );
-    } 
-    else {
-      myTitleWidth = TitleWidthSpin->value();
-      myTitleHeight = TitleHeightSpin->value();
-      myLabelWidth = LabelWidthSpin->value();
-      myLabelHeight = LabelHeightSpin->value();
-      myBarWidth = BarWidthSpin->value();
-      myBarHeight = BarHeightSpin->value();
-      myUnits = CBUnits->isChecked();
-      myUnitsFormat = UnitsEdit->text();
-      QDialog::accept();
-    }
+  
+  if ( myTitleSizeSpin->value() > 100 )
+  {
+    SUIT_MessageBox::warning( this, tr( "WRN_VISU" ), tr( "MSG_BIG_SCALE_TLT" ) );
+    return;
   }
+  
+  myTitleSize = myTitleSizeSpin->value();
+  myLabelSize = myLabelSizeSpin->value();
+  myBarWidth = myBarWidthSpin->value();
+  myBarHeight = myBarHeightSpin->value();
+  myUnits = myUnitsChk->isChecked();
+  myPrecision = myPrecisionSpin->value();
+  QDialog::accept();
 }
 
 
@@ -583,10 +543,8 @@ VisuGUI_ScalarBarPane::VisuGUI_ScalarBarPane( QWidget* parent, bool thePreview )
   myVerY = aResourceMgr->doubleValue("VISU", propertyName + "y", 0.);
   myVerW = aResourceMgr->doubleValue("VISU", propertyName + "width", 0.);
   myVerH = aResourceMgr->doubleValue("VISU", propertyName + "height",0.);
-  myVerTW = aResourceMgr->integerValue("VISU", propertyName + "title_width", 0);
-  myVerTH = aResourceMgr->integerValue("VISU", propertyName + "title_height",0);
-  myVerLW = aResourceMgr->integerValue("VISU", propertyName + "label_width", 0);
-  myVerLH = aResourceMgr->integerValue("VISU", propertyName + "label_height",0);
+  myVerTS = aResourceMgr->integerValue("VISU", propertyName + "title_size", 0);
+  myVerLS = aResourceMgr->integerValue("VISU", propertyName + "label_size", 0);
   myVerBW = aResourceMgr->integerValue("VISU", propertyName + "bar_width", 0);
   myVerBH = aResourceMgr->integerValue("VISU", propertyName + "bar_height",0);
   
@@ -595,27 +553,21 @@ VisuGUI_ScalarBarPane::VisuGUI_ScalarBarPane( QWidget* parent, bool thePreview )
   myHorY  = aResourceMgr->doubleValue("VISU", propertyName + "y", 0.);
   myHorW  = aResourceMgr->doubleValue("VISU", propertyName + "width", 0.);
   myHorH  = aResourceMgr->doubleValue("VISU", propertyName + "height",0.);
-  myHorTW = aResourceMgr->integerValue("VISU", propertyName + "title_width", 0);
-  myHorTH = aResourceMgr->integerValue("VISU", propertyName + "title_height",0);
-  myHorLW = aResourceMgr->integerValue("VISU", propertyName + "label_width", 0);
-  myHorLH = aResourceMgr->integerValue("VISU", propertyName + "label_height",0);
+  myHorTS = aResourceMgr->integerValue("VISU", propertyName + "title_size", 0);
+  myHorLS = aResourceMgr->integerValue("VISU", propertyName + "label_size", 0);
   myHorBW = aResourceMgr->integerValue("VISU", propertyName + "bar_width", 0);
   myHorBH = aResourceMgr->integerValue("VISU", propertyName + "bar_height",0);
 
-  aMainLayout->setSpacing(6);
-  //setMargin(11);
+  //aMainLayout->setSpacing(6);
 
   // Range ============================================================
   RangeGroup = new QButtonGroup ( this );
   QGroupBox* aGB = new QGroupBox( tr("SCALAR_RANGE_GRP"),this  );
   aMainLayout->addWidget( aGB );
-  //RangeGroup->setColumnLayout(0, Qt::Vertical );
-  //RangeGroup->layout()->setSpacing( 0 );
-  //RangeGroup->layout()->setMargin( 0 );
   QGridLayout* RangeGroupLayout = new QGridLayout( aGB );
   RangeGroupLayout->setAlignment( Qt::AlignTop );
-  RangeGroupLayout->setSpacing( 6 );
-  RangeGroupLayout->setMargin( 11 );
+  //RangeGroupLayout->setSpacing( 6 );
+  //RangeGroupLayout->setMargin( 11 );
 
   myModeLbl = new QLabel("Scalar Mode", aGB);
 
@@ -632,42 +584,39 @@ VisuGUI_ScalarBarPane::VisuGUI_ScalarBarPane( QWidget* parent, bool thePreview )
 
   MinEdit = new QLineEdit( aGB );
   MinEdit->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-  MinEdit->setMinimumWidth( 70 );
+  //MinEdit->setMinimumWidth( 70 );
   MinEdit->setValidator( new QDoubleValidator(this) );
   MinEdit->setText( "0.0" );
   QLabel* MinLabel = new QLabel (tr("LBL_MIN"), aGB);
+  MinLabel->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
   MinLabel->setBuddy(MinEdit);
 
   MaxEdit = new QLineEdit( aGB );
   MaxEdit->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-  MaxEdit->setMinimumWidth( 70 );
+  //MaxEdit->setMinimumWidth( 70 );
   MaxEdit->setValidator( new QDoubleValidator(this) );
   MaxEdit->setText( "0.0" );
   QLabel* MaxLabel = new QLabel (tr("LBL_MAX"), aGB);
+  MaxLabel->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
   MaxLabel->setBuddy(MaxEdit);
 
-  RangeGroupLayout->addWidget( myModeLbl, 0, 0 );
-  RangeGroupLayout->addWidget( myModeCombo, 0, 1, 1, 4);
-  RangeGroupLayout->addWidget( CBLog, 1, 0, 1, 4);
-  RangeGroupLayout->addWidget( RBFrange, 2, 0, 1, 2);
-  RangeGroupLayout->addWidget( RBIrange, 2, 2, 1, 2);
-  RangeGroupLayout->addWidget( MinLabel, 3, 0 );
-  RangeGroupLayout->addWidget( MinEdit,  3, 1 );
-  RangeGroupLayout->addWidget( MaxLabel, 3, 2 );
-  RangeGroupLayout->addWidget( MaxEdit,  3, 3 );
-
-  //TopLayout->addWidget( RangeGroup );
+  RangeGroupLayout->addWidget( myModeLbl, 0, 0, 1, 1 );
+  RangeGroupLayout->addWidget( myModeCombo, 0, 1, 1, 2);
+  RangeGroupLayout->addWidget( CBLog, 0, 3, 1, 1);
+  RangeGroupLayout->addWidget( RBFrange, 1, 0, 1, 2);
+  RangeGroupLayout->addWidget( RBIrange, 1, 2, 1, 2);
+  RangeGroupLayout->addWidget( MinLabel, 2, 0 );
+  RangeGroupLayout->addWidget( MinEdit,  2, 1 );
+  RangeGroupLayout->addWidget( MaxLabel, 2, 2 );
+  RangeGroupLayout->addWidget( MaxEdit,  2, 3 );
 
   // Colors and Labels ========================================================
   QGroupBox* ColLabGroup = new QGroupBox (tr("COLORS_LABELS_GRP"), this);
   aMainLayout->addWidget( ColLabGroup );
-  //ColLabGroup->setColumnLayout(0, Qt::Vertical );
-  //ColLabGroup->layout()->setSpacing( 0 );
-  //ColLabGroup->layout()->setMargin( 0 );
   QGridLayout* ColLabGroupLayout = new QGridLayout( ColLabGroup );
   ColLabGroupLayout->setAlignment( Qt::AlignTop );
-  ColLabGroupLayout->setSpacing( 6 );
-  ColLabGroupLayout->setMargin( 11 );
+  //ColLabGroupLayout->setSpacing( 6 );
+  //ColLabGroupLayout->setMargin( 11 );
 
   QLabel* ColorLabel = new QLabel (tr("LBL_NB_COLORS"), ColLabGroup);
   ColorSpin = new QSpinBox( ColLabGroup );
@@ -675,7 +624,7 @@ VisuGUI_ScalarBarPane::VisuGUI_ScalarBarPane( QWidget* parent, bool thePreview )
   ColorSpin->setMaximum( 256 );
   ColorSpin->setSingleStep( 1 );
   ColorSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-  ColorSpin->setMinimumWidth( 70 );
+  //ColorSpin->setMinimumWidth( 70 );
   ColorSpin->setValue( 64 );
 
   QLabel* LabelLabel = new QLabel (tr("LBL_NB_LABELS"), ColLabGroup);
@@ -685,7 +634,7 @@ VisuGUI_ScalarBarPane::VisuGUI_ScalarBarPane( QWidget* parent, bool thePreview )
   LabelSpin->setSingleStep( 1 );
   
   LabelSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-  LabelSpin->setMinimumWidth( 70 );
+  //LabelSpin->setMinimumWidth( 70 );
   LabelSpin->setValue( 5 );
 
   ColLabGroupLayout->addWidget( ColorLabel, 0, 0);
@@ -693,19 +642,14 @@ VisuGUI_ScalarBarPane::VisuGUI_ScalarBarPane( QWidget* parent, bool thePreview )
   ColLabGroupLayout->addWidget( LabelLabel, 0, 2);
   ColLabGroupLayout->addWidget( LabelSpin,  0, 3);
 
-  //TopLayout->addWidget( ColLabGroup );
-
   // Orientation ==========================================================
   QButtonGroup* OrientGroup = new QButtonGroup ( this );
   QGroupBox* OrientGB = new QGroupBox( tr("ORIENTATION_GRP"),this );
   aMainLayout->addWidget( OrientGB );
-  //OrientGroup->setColumnLayout(0, Qt::Vertical );
-  //OrientGroup->layout()->setSpacing( 0 );
-  //OrientGroup->layout()->setMargin( 0 );
   QGridLayout* OrientGroupLayout = new QGridLayout( OrientGB );
   OrientGroupLayout->setAlignment( Qt::AlignTop );
-  OrientGroupLayout->setSpacing( 6 );
-  OrientGroupLayout->setMargin( 11 );
+  //OrientGroupLayout->setSpacing( 6 );
+  //OrientGroupLayout->setMargin( 11 );
 
   RBvert = new QRadioButton (tr("VERTICAL_BTN"), OrientGB);
   RBvert->setChecked( true );
@@ -715,63 +659,53 @@ VisuGUI_ScalarBarPane::VisuGUI_ScalarBarPane( QWidget* parent, bool thePreview )
   OrientGroupLayout->addWidget( RBvert, 0, 0 );
   OrientGroupLayout->addWidget( RBhori, 0, 1 );
 
-  //  TopLayout->addWidget( OrientGroup );
-
   // Origin ===============================================================
   QGroupBox* OriginGroup = new QGroupBox (tr("ORIGIN_GRP"), this);
   aMainLayout->addWidget( OriginGroup );
-  //OriginGroup->setColumnLayout(0, Qt::Vertical );
-  //OriginGroup->layout()->setSpacing( 0 );
-  // OriginGroup->layout()->setMargin( 0 );
   QGridLayout* OriginGroupLayout = new QGridLayout( OriginGroup );
   OriginGroupLayout->setAlignment( Qt::AlignTop );
-  OriginGroupLayout->setSpacing( 6 );
-  OriginGroupLayout->setMargin( 11 );
+  //OriginGroupLayout->setSpacing( 6 );
+  //OriginGroupLayout->setMargin( 11 );
 
   QLabel* XLabel = new QLabel (tr("LBL_X"), OriginGroup);
   XSpin = new QtxDoubleSpinBox( OriginGroup );
   VISU::initSpinBox(XSpin, 0.0, +1.0);
   XSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-  XSpin->setMinimumWidth( 70 );
+  //XSpin->setMinimumWidth( 70 );
   XSpin->setValue( 0.01 );
 
   QLabel* YLabel = new QLabel (tr("LBL_Y"), OriginGroup);
   YSpin = new QtxDoubleSpinBox( OriginGroup );
   VISU::initSpinBox(YSpin, 0.0, +1.0);
   YSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-  YSpin->setMinimumWidth( 70 );
-  YSpin->setValue( 0.01 );
+  //YSpin->setMinimumWidth( 70 );
+  YSpin->setValue( 0.1 );
 
   OriginGroupLayout->addWidget( XLabel, 0, 0);
   OriginGroupLayout->addWidget( XSpin,  0, 1);
   OriginGroupLayout->addWidget( YLabel, 0, 2);
   OriginGroupLayout->addWidget( YSpin,  0, 3);
 
-  //TopLayout->addWidget( OriginGroup );
-
   // Dimensions =========================================================
   QGroupBox* DimGroup = new QGroupBox (tr("DIMENSIONS_GRP"), this );
   aMainLayout->addWidget( DimGroup );
-  //DimGroup->setColumnLayout(0, Qt::Vertical );
-  //DimGroup->layout()->setSpacing( 0 );
-  //DimGroup->layout()->setMargin( 0 );
   QGridLayout* DimGroupLayout = new QGridLayout( DimGroup );
   DimGroupLayout->setAlignment( Qt::AlignTop );
-  DimGroupLayout->setSpacing( 6 );
-  DimGroupLayout->setMargin( 11 );
+  //DimGroupLayout->setSpacing( 6 );
+  //DimGroupLayout->setMargin( 11 );
 
   QLabel* WidthLabel = new QLabel (tr("LBL_WIDTH"), DimGroup);
   WidthSpin = new QtxDoubleSpinBox( DimGroup );
   VISU::initSpinBox(WidthSpin, 0.0, +1.0);
   WidthSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-  WidthSpin->setMinimumWidth( 70 );
+  //WidthSpin->setMinimumWidth( 70 );
   WidthSpin->setValue( 0.1 );
 
   QLabel* HeightLabel = new QLabel (tr("LBL_HEIGHT"), DimGroup);
   HeightSpin = new QtxDoubleSpinBox( DimGroup );
   VISU::initSpinBox(HeightSpin, 0.0, +1.0);
   HeightSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-  HeightSpin->setMinimumWidth( 70 );
+  //HeightSpin->setMinimumWidth( 70 );
   HeightSpin->setValue( 0.8 );
 
   DimGroupLayout->addWidget( WidthLabel, 0, 0);
@@ -779,19 +713,10 @@ VisuGUI_ScalarBarPane::VisuGUI_ScalarBarPane( QWidget* parent, bool thePreview )
   DimGroupLayout->addWidget( HeightLabel, 0, 2);
   DimGroupLayout->addWidget( HeightSpin,  0, 3);
 
-  //TopLayout->addWidget( DimGroup );
-
   // Save check box ===========================================================
   QWidget* aSaveBox = new QWidget(this);
   aMainLayout->addWidget( aSaveBox );
-  QVBoxLayout* aVBLay = new QVBoxLayout( aSaveBox );
-  if (!thePreview) {
-    CBSave = new QCheckBox (tr("SAVE_DEFAULT_CHK"), aSaveBox);
-    aVBLay->addWidget( CBSave );
-  }
-  else {
-    CBSave = 0;
-  }
+  QHBoxLayout* aVBLay = new QHBoxLayout( aSaveBox );
   aVBLay->addWidget( myTextBtn = new QPushButton("Text properties...", aSaveBox) );
   aVBLay->addWidget( myBarBtn  = new QPushButton("Bar properties...",  aSaveBox) );
   
@@ -801,28 +726,43 @@ VisuGUI_ScalarBarPane::VisuGUI_ScalarBarPane( QWidget* parent, bool thePreview )
 
   QGroupBox* CheckGroup = new QGroupBox("", this );
   aMainLayout->addWidget( CheckGroup );
+  //QHBoxLayout* CheckGroupLayout = new QHBoxLayout( CheckGroup );
   QGridLayout* CheckGroupLayout = new QGridLayout( CheckGroup );
   
   myPreviewCheck = new QCheckBox(tr("LBL_SHOW_PREVIEW"), CheckGroup);
   myPreviewCheck->setChecked(false);
-  CheckGroupLayout->addWidget(myPreviewCheck , 0, 0 );
-
-  if ( thePreview ) {
+  CheckGroupLayout->addWidget(myPreviewCheck, 0, 0);
+  
+  myHideBar = new QCheckBox(tr("HIDE_SCALAR_BAR"), CheckGroup);
+  myHideBar->setChecked(false);
+  CheckGroupLayout->addWidget(myHideBar, 0, 1);
+
+// RKV : Begin
+  CBDistr = new QCheckBox (tr("SHOW_DISTRIBUTION"), CheckGroup);
+  CheckGroupLayout->addWidget(CBDistr, 1, 0);
+// RKV : End
+  if (!thePreview) {
+    CBSave = new QCheckBox (tr("SAVE_DEFAULT_CHK"), CheckGroup);
+    CheckGroupLayout->addWidget( CBSave, 1, 1 );
+  }
+  else {
+    CBSave = 0;
     myPreviewCheck->hide();
     CheckGroup->hide();
   }
 
   if(RBvert->isChecked()) {
-    myBarDlg->setRatios(myVerTW, myVerTH, myVerLW, myVerLH, myVerBW, myVerBH);
+    myBarDlg->setRatios(myVerTS, myVerLS, myVerBW, myVerBH);
   } else {
-    myBarDlg->setRatios(myHorTW, myHorTH, myHorLW, myHorLH, myHorBW, myHorBH);
+    myBarDlg->setRatios(myHorTS, myHorLS, myHorBW, myHorBH);
   }
 
-  myBarDlg->setLabelsFormat(aResourceMgr->stringValue("VISU", propertyName + "label_format", "%-#6.3g"));
+  int lp = aResourceMgr->integerValue( "VISU", propertyName + "scalar_bar_label_precision", 3 );
+  myBarDlg->setLabelsPrecision( lp );
+  
   myBarDlg->setUnitsVisible(aResourceMgr->booleanValue("VISU", propertyName + "display_units", true));
 
   // signals and slots connections ===========================================
-  //  connect( RangeGroup,   SIGNAL( buttonClicked( int ) ), this, SLOT( changeRange( int ) ) );
   connect( RBFrange,   SIGNAL( toggled( bool ) ), this, SLOT( onFieldRange( bool ) ) );
   connect( RBIrange,   SIGNAL( toggled( bool ) ), this, SLOT( onImposedRange( bool ) ) );
 
@@ -833,6 +773,9 @@ VisuGUI_ScalarBarPane::VisuGUI_ScalarBarPane( QWidget* parent, bool thePreview )
   connect( myTextBtn,      SIGNAL( clicked() ),              this, SLOT( onTextPref() ) );
   connect( myBarBtn,       SIGNAL( clicked() ),              this, SLOT( onBarPref() ) );
   connect( myPreviewCheck, SIGNAL( toggled( bool )),         this, SLOT( onPreviewCheck( bool ) ) );
+  
+  connect( CBDistr,        SIGNAL( toggled( bool ) ),        this, SLOT( onShowDistribution( bool ) )); // RKV
+  
   connect( ColorSpin,      SIGNAL( valueChanged( int ) ),    this, SLOT( updatePreview() ));
   connect( LabelSpin,      SIGNAL( valueChanged( int ) ),    this, SLOT( updatePreview() ));
   connect( WidthSpin,      SIGNAL( valueChanged( double ) ), this, SLOT( updatePreview() ));
@@ -860,13 +803,13 @@ void VisuGUI_ScalarBarPane::storeToResources() {
     if(orient == 0) {
       sbX1=0.01;
       sbY1=0.1;
-      sbW=0.17;
+      sbW=0.1;
       sbH=0.8;
     } else {
-      sbX1=0.2;
+      sbX1=0.1;
       sbY1=0.01;
-      sbW=0.6;
-      sbH=0.12;
+      sbW=0.8;
+      sbH=0.08;
     }
   }
 
@@ -903,6 +846,7 @@ void VisuGUI_ScalarBarPane::storeToResources() {
     aResourceMgr->setValue("VISU", "scalar_range_type", 0);
   
   aResourceMgr->setValue("VISU", "scalar_bar_logarithmic", isLogarithmic());
+  aResourceMgr->setValue("VISU", "scalar_bar_show_distribution", isShowDistribution()); // RKV
  
   ////
 
@@ -921,7 +865,7 @@ void VisuGUI_ScalarBarPane::storeToResources() {
     
     aTitleFont.setBold(isTitleBold);
     aTitleFont.setItalic(isTitleItalic);
-    aTitleFont.setUnderline(isTitleShadow);
+    aTitleFont.setOverline(isTitleShadow);
     
     QString titleFontFamily;
     switch (aTitleFontFamily) {
@@ -956,7 +900,7 @@ void VisuGUI_ScalarBarPane::storeToResources() {
     
     aLabelFont.setBold(isLabelBold);
     aLabelFont.setItalic(isLabelItalic);
-    aLabelFont.setUnderline(isLabelShadow);
+    aLabelFont.setOverline(isLabelShadow);
 
     QString labelFontFamily;
     switch (aLabelFontFamily) {
@@ -1040,6 +984,7 @@ void VisuGUI_ScalarBarPane::initFromPrsObject(VISU::ColoredPrs3d_i* thePrs)
   setRange( myScalarMap->GetMin(), myScalarMap->GetMax(), myScalarMap->IsRangeFixed() );
 
   setScalarBarData( myScalarMap->GetNbColors(), myScalarMap->GetLabels() );
+  setShowDistribution( myScalarMap->GetIsDistributionVisible() );
 
   // "Title"
   CORBA::String_var aTitle = myScalarMap->GetTitle();
@@ -1053,24 +998,20 @@ void VisuGUI_ScalarBarPane::initFromPrsObject(VISU::ColoredPrs3d_i* thePrs)
                 myScalarMap->GetBarOrientation());
 
   if(RBvert->isChecked()) {
-    myVerTW = myScalarMap->GetTitleWidth();
-    myVerTH = myScalarMap->GetTitleHeight();
-    myVerLW = myScalarMap->GetLabelWidth();
-    myVerLH = myScalarMap->GetLabelHeight();
+    myVerTS = myScalarMap->GetTitleSize();
+    myVerLS = myScalarMap->GetLabelSize();
     myVerBW = myScalarMap->GetBarWidth();
     myVerBH = myScalarMap->GetBarHeight();
-    myBarDlg->setRatios(myVerTW, myVerTH, myVerLW, myVerLH, myVerBW, myVerBH);
+    myBarDlg->setRatios(myVerTS, myVerLS, myVerBW, myVerBH);
   } else {
-    myHorTW = myScalarMap->GetTitleWidth();
-    myHorTH = myScalarMap->GetTitleHeight();
-    myHorLW = myScalarMap->GetLabelWidth();
-    myHorLH = myScalarMap->GetLabelHeight();
+    myHorTS = myScalarMap->GetTitleSize();
+    myHorLS = myScalarMap->GetLabelSize();
     myHorBW = myScalarMap->GetBarWidth();
     myHorBH = myScalarMap->GetBarHeight();
-    myBarDlg->setRatios(myHorTW, myHorTH, myHorLW, myHorLH, myHorBW, myHorBH);
+    myBarDlg->setRatios(myHorTS, myHorLS, myHorBW, myHorBH);
   }
 
-  myBarDlg->setLabelsFormat(myScalarMap->GetLabelsFormat());
+  myBarDlg->setLabelsPrecision( VISU::ToPrecision( myScalarMap->GetLabelsFormat() ) );
   myBarDlg->setUnitsVisible(myScalarMap->IsUnitsVisible());
 
   vtkFloatingPointType R, G, B;
@@ -1095,6 +1036,8 @@ void VisuGUI_ScalarBarPane::initFromPrsObject(VISU::ColoredPrs3d_i* thePrs)
                                   myScalarMap->IsItalicLabel(),
                                   myScalarMap->IsShadowLabel());
 
+  myHideBar->setChecked(!myScalarMap->IsBarVisible());
+
   // Draw Preview
   if (myPreviewCheck->isChecked()) {
     createScalarBar();
@@ -1147,26 +1090,29 @@ void VisuGUI_ScalarBarPane::createScalarBar()
   VISU_ScalarBarActor* aScalarBarActor = myPreviewActor->GetScalarBar();
   myPreviewActor->GetScalarBar()->VisibilityOn();
   myPreviewActor->PickableOff();
+  //myPreviewActor->SetBarVisibility(!myHideBar->isChecked());
   
   myScalarMapPL->SetScalarMode(myModeCombo->currentIndex());
   if(isLogarithmic())
     myScalarMapPL->SetScaling(VISU::LOGARITHMIC);
   else
     myScalarMapPL->SetScaling(VISU::LINEAR);
-  vtkFloatingPointType theRange[2];
-  if(RBFrange->isChecked()) {
-    theRange[0] = myScalarMap->GetSourceMin();
-    theRange[1] = myScalarMap->GetSourceMax();
+
+  if ( RBFrange->isChecked() ) {
+    myScalarMapPL->SetSourceRange();
   } else {
-    theRange[0] = (vtkFloatingPointType)MinEdit->text().toDouble();
-    theRange[1] = (vtkFloatingPointType)MaxEdit->text().toDouble();
+    vtkFloatingPointType aRange[2];
+    aRange[0] = (vtkFloatingPointType)MinEdit->text().toDouble();
+    aRange[1] = (vtkFloatingPointType)MaxEdit->text().toDouble();
+    myScalarMapPL->SetScalarRange( aRange );
   }
-  myScalarMapPL->SetScalarRange(theRange);
-  myScalarMapPL->SetNbColors(sbCol);
-  
+
+  myScalarMapPL->SetNbColors(sbCol);  
   myScalarMapPL->Update();
   
   aScalarBarActor->SetLookupTable(myScalarMapPL->GetBarTable());
+  aScalarBarActor->SetDistribution( myScalarMapPL->GetDistribution() );
+  aScalarBarActor->SetDistributionVisibility( isShowDistribution() );
   
   if (!myTextDlg->getTitleText().isEmpty()) {
     VISU::PValForTime aValForTime;
@@ -1237,11 +1183,12 @@ void VisuGUI_ScalarBarPane::createScalarBar()
   (isLabelItalic)? aLabelProp->ItalicOn() : aLabelProp->ItalicOff();
   (isLabelShadow)? aLabelProp->ShadowOn() : aLabelProp->ShadowOff();
 
-  int VerTW, VerTH, VerLW, VerLH, VerBW, VerBH;
-  myBarDlg->getRatios(VerTW, VerTH, VerLW, VerLH, VerBW, VerBH);
-  aScalarBarActor->SetRatios(VerTW, VerTH, VerLW, VerLH, VerBW, VerBH);
+  int VerTS, VerTH, VerLS, VerBW, VerBH;
+  myBarDlg->getRatios(VerTS, VerLS, VerBW, VerBH);
+  aScalarBarActor->SetRatios(VerTS, VerLS, VerBW, VerBH);
 
-  aScalarBarActor->SetLabelFormat(myBarDlg->getLabelsFormat().toLatin1().data());
+  std::string f = VISU::ToFormat( myBarDlg->getLabelsPrecision() );
+  aScalarBarActor->SetLabelFormat( f.c_str() );
 
   aScalarBarActor->Modified();
 
@@ -1286,12 +1233,13 @@ int VisuGUI_ScalarBarPane::storeToPrsObject(VISU::ColoredPrs3d_i* thePrs) {
   myScalarMap->SetPosition(XSpin->value(), YSpin->value());
   myScalarMap->SetSize(WidthSpin->value(), HeightSpin->value());
   if(RBvert->isChecked()) {
-    myScalarMap->SetRatios(myVerTW, myVerTH, myVerLW, myVerLH, myVerBW, myVerBH);
+    myScalarMap->SetRatios(myVerTS, myVerLS, myVerBW, myVerBH);
   } else {
-    myScalarMap->SetRatios(myHorTW, myHorTH, myHorLW, myHorLH, myHorBW, myHorBH);
+    myScalarMap->SetRatios(myHorTS, myHorLS, myHorBW, myHorBH);
   }
 
-  myScalarMap->SetLabelsFormat(myBarDlg->getLabelsFormat().toLatin1().data());
+  std::string f = VISU::ToFormat( myBarDlg->getLabelsPrecision() );
+  myScalarMap->SetLabelsFormat( f.c_str() );
   myScalarMap->SetUnitsVisible(myBarDlg->isUnitsVisible());
 
   myScalarMap->SetBarOrientation((RBvert->isChecked())? VISU::ColoredPrs3dBase::VERTICAL : VISU::ColoredPrs3dBase::HORIZONTAL);
@@ -1300,13 +1248,16 @@ int VisuGUI_ScalarBarPane::storeToPrsObject(VISU::ColoredPrs3d_i* thePrs) {
   else
     myScalarMap->SetScaling(VISU::LINEAR);
 
-  if (RBFrange->isChecked()) {
+  if ( RBFrange->isChecked() ) {
     myScalarMap->SetSourceRange();
   } else {
-    myScalarMap->SetRange(MinEdit->text().toDouble(), MaxEdit->text().toDouble());
+    myScalarMap->SetRange( MinEdit->text().toDouble(), MaxEdit->text().toDouble() );
   }
   myScalarMap->SetNbColors(ColorSpin->value());
   myScalarMap->SetLabels(LabelSpin->value());
+  myScalarMap->SetIsDistributionVisible(isShowDistribution()); // RKV
+
+  myScalarMap->SetBarVisible(!myHideBar->isChecked());
 
   if (isToSave()) storeToResources();
 
@@ -1394,13 +1345,19 @@ void VisuGUI_ScalarBarPane::onFieldRange( bool isOn )
 void VisuGUI_ScalarBarPane::onImposedRange( bool isOn )
 {
   if (isOn) {
-    myScalarMap->SetRange(myScalarMap->GetMin(), myScalarMap->GetMax());
+    myScalarMap->SetRange( myScalarMap->GetMin(), myScalarMap->GetMax() );
     MinEdit->setEnabled( true );
     MaxEdit->setEnabled( true );
     changeScalarMode(myModeCombo->currentIndex());
   }
 }
 
+void VisuGUI_ScalarBarPane::onShowDistribution( bool isOn )
+{
+  myScalarMap->SetIsDistributionVisible(isOn);
+  updatePreview();
+}
+
 void VisuGUI_ScalarBarPane::changeRange( int )
 {
   if ( RBFrange->isChecked() ) {
@@ -1408,7 +1365,7 @@ void VisuGUI_ScalarBarPane::changeRange( int )
     MinEdit->setEnabled( false );
     MaxEdit->setEnabled( false );
   } else {
-    myScalarMap->SetRange(myScalarMap->GetMin(), myScalarMap->GetMax());
+    myScalarMap->SetRange( myScalarMap->GetMin(), myScalarMap->GetMax() );
     MinEdit->setEnabled( true );
     MaxEdit->setEnabled( true );
   }
@@ -1536,6 +1493,18 @@ void VisuGUI_ScalarBarPane::setLogarithmic( bool on ) {
   CBLog->setChecked( on );
 }
 
+//----------------------------------------------------------------------------
+bool VisuGUI_ScalarBarPane::isShowDistribution() {
+  return CBDistr->isChecked();
+}
+
+
+//----------------------------------------------------------------------------
+void VisuGUI_ScalarBarPane::setShowDistribution( bool on ) {
+  CBDistr->setChecked( on );
+}
+
+// RKV : End
 //----------------------------------------------------------------------------
 bool VisuGUI_ScalarBarPane::isToSave() {
   return CBSave ? CBSave->isChecked() : false;
@@ -1642,14 +1611,15 @@ void VisuGUI_ScalarBarPane::onTextPref()
 void VisuGUI_ScalarBarPane::onBarPref()
 {
   if(RBvert->isChecked())
-    myBarDlg->setRatios(myVerTW, myVerTH, myVerLW, myVerLH, myVerBW, myVerBH);
+    myBarDlg->setRatios(myVerTS, myVerLS, myVerBW, myVerBH);
   else
-    myBarDlg->setRatios(myHorTW, myHorTH, myHorLW, myHorLH, myHorBW, myHorBH);
+    myBarDlg->setRatios(myHorTS, myHorLS, myHorBW, myHorBH);
+  myBarDlg->setOrientation( getOrientation() );
   if(myBarDlg->exec()) {
     if(RBvert->isChecked())
-      myBarDlg->getRatios(myVerTW, myVerTH, myVerLW, myVerLH, myVerBW, myVerBH);
+      myBarDlg->getRatios(myVerTS, myVerLS, myVerBW, myVerBH);
     else
-      myBarDlg->getRatios(myHorTW, myHorTH, myHorLW, myHorLH, myHorBW, myHorBH);
+      myBarDlg->getRatios(myHorTS, myHorLS, myHorBW, myHorBH);
     updatePreview();
   }
 }
index 86c0705a9e01fd0caea568b8daa385a4b65fd73a..0acefb0c627a69fe2fff8a83d53333b0f8d68038 100644 (file)
@@ -105,18 +105,20 @@ class VisuGUI_BarPrefDlg: public QDialog
   VisuGUI_BarPrefDlg (QWidget* parent);
   ~VisuGUI_BarPrefDlg() {};
 
-  void setRatios(int titleRatioWidth, int titleRatioHeight,
-                int labelRatioWidth, int labelRatioHeight,
+  void setRatios(int titleRatioSize, int labelRatioWidth,
                 int barRatioWidth, int barRatioHeight);
-  void getRatios(int& titleRatioWidth, int& titleRatioHeight,
-                int& labelRatioWidth, int& labelRatioHeight,
+  void getRatios(int& titleRatioSize, int& labelRatioWidth,
                 int& barRatioWidth, int& barRatioHeight);
 
   void setUnitsVisible(bool isVisible);
   bool isUnitsVisible();
 
-  void setLabelsFormat( const QString& format);
-  QString getLabelsFormat();
+  void setLabelsPrecision( const int p );
+  int getLabelsPrecision() const;
+
+  void setOrientation( const int ori );
+  int getOrientation() const;
+
 
  private:
   void keyPressEvent( QKeyEvent* e );
@@ -130,23 +132,20 @@ class VisuGUI_BarPrefDlg: public QDialog
   void onHelp();
 
  protected:
-  QSpinBox*  TitleWidthSpin;
-  QSpinBox*  TitleHeightSpin;
-  QSpinBox*  LabelWidthSpin;
-  QSpinBox*  LabelHeightSpin;
-  QSpinBox*  BarWidthSpin;
-  QSpinBox*  BarHeightSpin;
-  QCheckBox* CBUnits;  
-  QLineEdit* UnitsEdit;
-
-  int        myTitleWidth;
-  int        myTitleHeight;
-  int        myLabelWidth;
-  int        myLabelHeight;
+  QSpinBox*  myTitleSizeSpin;
+  QSpinBox*  myLabelSizeSpin;
+  QSpinBox*  myBarWidthSpin;
+  QSpinBox*  myBarHeightSpin;
+  QCheckBox* myUnitsChk;  
+  QSpinBox*  myPrecisionSpin;
+
+  int        myTitleSize;
+  int        myLabelSize;
   int        myBarWidth;
   int        myBarHeight;
   bool       myUnits;
-  QString    myUnitsFormat;
+  int        myPrecision;
+  int        myOrientation;
 };
 
 
@@ -175,6 +174,8 @@ class VisuGUI_ScalarBarPane : public QWidget//QVBox
   int     getNbLabels();
   bool    isLogarithmic();
   void    setLogarithmic( bool on );
+  bool    isShowDistribution();
+  void    setShowDistribution( bool on );
   bool    isToSave();
 
   void storeToResources();
@@ -205,6 +206,9 @@ class VisuGUI_ScalarBarPane : public QWidget//QVBox
 
   QCheckBox*      CBSave;
   QCheckBox*      CBLog;
+  QCheckBox*      CBDistr;
+  QCheckBox*      myHideBar;
+
   QLabel*         myModeLbl;
   QComboBox*      myModeCombo;
   QPushButton*    myTextBtn;
@@ -214,8 +218,8 @@ class VisuGUI_ScalarBarPane : public QWidget//QVBox
 
   double          myHorX, myHorY, myHorW, myHorH;
   double          myVerX, myVerY, myVerW, myVerH;
-  int             myHorTW, myHorTH, myHorLW, myHorLH, myHorBW, myHorBH;
-  int             myVerTW, myVerTH, myVerLW, myVerLH, myVerBW, myVerBH;
+  int             myHorTS, myHorLS, myHorBW, myHorBH;
+  int             myVerTS, myVerTH, myVerLS, myVerBW, myVerBH;
   bool            myIsStoreTextProp;
 
  private slots:
@@ -228,7 +232,8 @@ class VisuGUI_ScalarBarPane : public QWidget//QVBox
   void onTextPref();
   void onBarPref();
   void onPreviewCheck(bool thePreview);
-  void updatePreview();
+  void updatePreview();  
+  void onShowDistribution(bool);
 
  private:
   void createScalarBar();
index 0fb0c6d4cc6ea224a7122fb67e71c3243ff3824c..21dc5ee5afb18d68fe796800b9be2b38ba3b862d 100644 (file)
@@ -280,61 +280,68 @@ namespace VISU
 
   //---------------------------------------------------------------
   template<class TPrs3d_i, class TViewer, class TDlg, int IsDlgModal>
-  void
+  TPrs3d_i*
   CreatePrs3dInViewer(VisuGUI* theModule,
                      _PTR(SObject) theTimeStampSObj,
                      ColoredPrs3d_i::EPublishInStudyMode thePublishInStudyMode)
   {
+    TPrs3d_i* aPrs = 0;
     // Create new TViewWindow instance, if it does not exist.
     typedef typename TViewer::TViewWindow TViewWindow;
     if (!GetViewWindow<TViewer>(theModule))
-      return;
+      return aPrs;
 
-    CreateAndEditPrs3d<TPrs3d_i,TViewer,TDlg,IsDlgModal>
-      (theModule,theTimeStampSObj,thePublishInStudyMode);
+    aPrs = CreateAndEditPrs3d<TPrs3d_i,TViewer,TDlg,IsDlgModal>
+              (theModule,theTimeStampSObj,thePublishInStudyMode);
 
     theModule->application()->putInfo(QObject::tr("INF_DONE"));
+    return aPrs;
   }
 
 
   //----------------------------------------------------------------------------
   template<class TPrs3d_i, class TDlg, int IsDlgModal>
-  void
+  TPrs3d_i*
   CreatePrs3d(VisuGUI* theModule,
              const QString& theDesiredViewerType = QString())
   {
+    TPrs3d_i* aPrs = 0;
     if (CheckLock(GetCStudy(GetAppStudy(theModule)),GetDesktop(theModule)))
-      return;
+      return aPrs;
 
     _PTR(SObject) aTimeStampSObj;
     Handle(SALOME_InteractiveObject) anIO;
     ColoredPrs3d_i::EPublishInStudyMode aPublishInStudyMode;
     if (!CheckTimeStamp(theModule,aTimeStampSObj,anIO,aPublishInStudyMode))
-      return;
-
-    if(aPublishInStudyMode == VISU::ColoredPrs3d_i::EPublishIndependently){
-      CreatePrs3dInViewer<TPrs3d_i,VVTK_Viewer,TDlg,0>
-       (theModule,aTimeStampSObj,aPublishInStudyMode);
-      return;
+      return aPrs;
+
+    if(/*aPublishInStudyMode == */VISU::ColoredPrs3d_i::EPublishIndependently){
+      //      CreatePrs3dInViewer<TPrs3d_i,VVTK_Viewer,TDlg,0>
+      //       (theModule,aTimeStampSObj,aPublishInStudyMode);
+      aPrs = CreatePrs3dInViewer<TPrs3d_i,SVTK_Viewer,TDlg,0>
+               (theModule,aTimeStampSObj,aPublishInStudyMode);
+      return aPrs;
     }else{
       if(theDesiredViewerType.isNull()){
-       if (SUIT_ViewManager* aViewManager = theModule->getApp()->activeViewManager())
-         if (aViewManager->getType() == VVTK_Viewer::Type()){ 
-           CreatePrs3dInViewer<TPrs3d_i,VVTK_Viewer,TDlg,IsDlgModal>
-             (theModule,aTimeStampSObj,aPublishInStudyMode);
-           return;
-         }
-       CreatePrs3dInViewer<TPrs3d_i,SVTK_Viewer,TDlg,IsDlgModal>
-         (theModule,aTimeStampSObj,aPublishInStudyMode);
+       if (/*SUIT_ViewManager* aViewManager = */theModule->getApp()->activeViewManager())
+         /*if (aViewManager->getType() == VVTK_Viewer::Type()){ 
+           aPrs = CreatePrs3dInViewer<TPrs3d_i,VVTK_Viewer,TDlg,IsDlgModal>
+                     (theModule,aTimeStampSObj,aPublishInStudyMode);
+           return aPrs;
+           }*/
+       aPrs = CreatePrs3dInViewer<TPrs3d_i,SVTK_Viewer,TDlg,IsDlgModal>
+                  (theModule,aTimeStampSObj,aPublishInStudyMode);
       }else{
-       if(theDesiredViewerType == VVTK_Viewer::Type())
-         CreatePrs3dInViewer<TPrs3d_i,VVTK_Viewer,TDlg,IsDlgModal>
-           (theModule,aTimeStampSObj,aPublishInStudyMode);
-       else
-         CreatePrs3dInViewer<TPrs3d_i,SVTK_Viewer,TDlg,IsDlgModal>
-           (theModule,aTimeStampSObj,aPublishInStudyMode);
+       /*if(theDesiredViewerType == VVTK_Viewer::Type()) {
+         aPrs = CreatePrs3dInViewer<TPrs3d_i,VVTK_Viewer,TDlg,IsDlgModal>
+                    (theModule,aTimeStampSObj,aPublishInStudyMode);
+                    } else {*/
+         aPrs = CreatePrs3dInViewer<TPrs3d_i,SVTK_Viewer,TDlg,IsDlgModal>
+                    (theModule,aTimeStampSObj,aPublishInStudyMode);
+         //}
       }
     }
+    return aPrs;
   }
 
 
diff --git a/src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.cxx b/src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.cxx
new file mode 100644 (file)
index 0000000..98dcd68
--- /dev/null
@@ -0,0 +1,458 @@
+//  VISU VISUGUI : GUI of VISU component
+//
+//  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   : VisuGUI_ScalarMapOnDeformedShapeDlg.cxx
+//  Author : Eugeny Nikolaev
+//  Module : VISU
+
+#include "VisuGUI_ScalarMapOnDeformedShapeDlg.h"
+
+#include "VisuGUI_Tools.h"
+#include "VisuGUI_InputPane.h"
+
+#include "VISU_Result_i.hh"
+#include "VISU_ScalarMapOnDeformedShape_i.hh"
+#include "VISU_ColoredPrs3dFactory.hh"
+
+#include "VISU_ScalarMapPL.hxx"
+#include "VISU_ScalarMapOnDeformedShapePL.hxx"
+
+#include "VISU_Convertor.hxx"
+
+#include "SalomeApp_Module.h"
+#include "LightApp_Application.h"
+#include "LightApp_SelectionMgr.h"
+#include "SUIT_Desktop.h"
+#include "SUIT_ResourceMgr.h"
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
+
+#include "SALOME_ListIO.hxx"
+
+#include "SALOMEDSClient_AttributeString.hxx"
+#include "SALOMEDSClient_AttributeName.hxx"
+
+#include <qlayout.h>
+#include <qtabwidget.h>
+
+using namespace std;
+
+#define MYDEBUG 0
+
+/*!
+ * Constructor
+ */
+VisuGUI_ScalarMapOnDeformedShapeDlg::VisuGUI_ScalarMapOnDeformedShapeDlg (SalomeApp_Module* theModule)
+  : VisuGUI_ScalarBarBaseDlg(theModule),
+    myIsAnimation(false),
+    myUpdateScalars(true),
+    myVisuGUI(theModule)
+{
+  setCaption(tr("DLG_TITLE"));
+  setSizeGripEnabled(TRUE);
+
+  QVBoxLayout* TopLayout = new QVBoxLayout (this);
+  TopLayout->setSpacing(6);
+  TopLayout->setMargin(11);
+
+  myTabBox = new QTabWidget (this);
+
+  // Scalar Map on Deformed shape pane
+  QVBox* aBox = new QVBox (this);
+  aBox->setMargin(11);
+  QFrame* TopGroup = new QFrame (aBox, "TopGroup");
+  TopGroup->setFrameStyle(QFrame::Box | QFrame::Sunken);
+  TopGroup->setLineWidth(1);
+  QGridLayout* TopGroupLayout = new QGridLayout (TopGroup);
+  TopGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
+  TopGroupLayout->setSpacing(6);
+  TopGroupLayout->setMargin(11);
+
+  //   Scale factor
+  QLabel* ScaleLabel = new QLabel (tr("SCALE_FACTOR"), TopGroup, "ScaleLabel");
+  TopGroupLayout->addWidget(ScaleLabel, 0, 0);
+
+  ScalFact = new QtxDblSpinBox (0.0, 1.0E+38, 0.1, TopGroup);
+  ScalFact->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
+  ScalFact->setPrecision(38);
+  ScalFact->setValue(0.1);
+  TopGroupLayout->addWidget(ScalFact, 0, 1);
+
+  // Fields combo box
+  QLabel* FieldLabel = new QLabel (tr("FIELD_ITEM"), TopGroup, "FieldLabel");
+  myFieldsCombo = new QComboBox (TopGroup,"Fields");
+
+  TopGroupLayout->addWidget(FieldLabel, 1, 0);
+  TopGroupLayout->addWidget(myFieldsCombo,1,1);
+
+  // TimeStamps combo box
+  QLabel* TimeStampLabel = new QLabel (tr("TIMESTAMP_ITEM"), TopGroup, "TimeStampLabel");
+  myTimeStampsCombo = new QComboBox (TopGroup,"TimeStamp");
+
+  TopGroupLayout->addWidget(TimeStampLabel, 2, 0);
+  TopGroupLayout->addWidget(myTimeStampsCombo,2,1);
+
+  //
+  myTabBox->addTab(aBox, tr("SCALAR_MAP_ON_DEFORMED_SHAPE_TAB"));
+
+  // Scalar bar pane
+  myInputPane = new VisuGUI_InputPane(VISU::TSCALARMAPONDEFORMEDSHAPE, theModule, this);
+
+  myTabBox->addTab(GetScalarPane(), tr("SCALAR_BAR_TAB"));
+  myTabBox->addTab(myInputPane, tr("INPUT_TAB"));
+
+  // Buttons
+  QGroupBox* GroupButtons = new QGroupBox (this, "GroupButtons");
+  GroupButtons->setGeometry(QRect(10, 10, 281, 48));
+  GroupButtons->setColumnLayout(0, Qt::Vertical);
+  GroupButtons->layout()->setSpacing(0);
+  GroupButtons->layout()->setMargin(0);
+  QGridLayout* GroupButtonsLayout = new QGridLayout (GroupButtons->layout());
+  GroupButtonsLayout->setAlignment(Qt::AlignTop);
+  GroupButtonsLayout->setSpacing(6);
+  GroupButtonsLayout->setMargin(11);
+
+  QPushButton* buttonOk = new QPushButton (tr("&OK"), GroupButtons, "buttonOk");
+  buttonOk->setAutoDefault(TRUE);
+  buttonOk->setDefault(TRUE);
+  GroupButtonsLayout->addWidget(buttonOk, 0, 0);
+
+  GroupButtonsLayout->addItem(new QSpacerItem (5, 5, QSizePolicy::Expanding,
+                                               QSizePolicy::Minimum), 0, 1);
+
+  QPushButton* buttonCancel = new QPushButton (tr("&Cancel") , GroupButtons, "buttonCancel");
+  buttonCancel->setAutoDefault(TRUE);
+  GroupButtonsLayout->addWidget(buttonCancel, 0, 2);
+
+  QPushButton* buttonHelp = new QPushButton (tr("&Help") , GroupButtons, "buttonHelp");
+  buttonHelp->setAutoDefault(TRUE);
+  GroupButtonsLayout->addWidget(buttonHelp, 0, 3);
+
+  // Add Tab box and Buttons to the top layout
+  TopLayout->addWidget(myTabBox);
+  TopLayout->addWidget(GroupButtons);
+
+  // signals and slots connections
+  connect(buttonOk,     SIGNAL(clicked()), this, SLOT(accept()));
+  connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
+  connect(buttonHelp,   SIGNAL(clicked()), this, SLOT(onHelp()));
+  connect(myFieldsCombo,     SIGNAL(activated(int)), this, SLOT(onFieldChanged(int)));
+  connect(myTimeStampsCombo, SIGNAL(activated(int)), this, SLOT(onTimeStampChanged(int)));
+}
+
+VisuGUI_ScalarMapOnDeformedShapeDlg::~VisuGUI_ScalarMapOnDeformedShapeDlg()
+{}
+
+void VisuGUI_ScalarMapOnDeformedShapeDlg::initFromPrsObject( VISU::ColoredPrs3d_i* thePrs,
+                                                            bool theInit )
+{
+  if( theInit )
+    myPrsCopy = VISU::TSameAsFactory<VISU::TSCALARMAPONDEFORMEDSHAPE>().Create(thePrs, VISU::ColoredPrs3d_i::EDoNotPublish);
+  setFactor(myPrsCopy->GetScale());
+  myTimeStampsCombo->setDisabled(myIsAnimation);
+
+  CORBA::String_var aFieldName(myPrsCopy->GetScalarFieldName());
+  QString aIteration = GetFloatValueOfTimeStamp(myPrsCopy->GetScalarEntity(),
+                                               aFieldName.in(),
+                                               myPrsCopy->GetScalarTimeStampNumber());
+  if (myEntity2Fields.size() == 0)
+  {
+    // find all fields and time stamps on it
+    _PTR(Study) aActiveStudy = VISU::GetCStudy(VISU::GetAppStudy(myVisuGUI));
+    LightApp_SelectionMgr* aSel = VISU::GetSelectionMgr(myVisuGUI);
+    SALOME_ListIO selected;
+    aSel->selectedObjects(selected);
+    if (selected.Extent() > 0) {
+      Handle(SALOME_InteractiveObject) aIO = selected.First();
+      if (aIO->hasEntry()) {
+       _PTR(SObject) aSObject = aActiveStudy->FindObjectID(aIO->getEntry());
+       VISU::VISUType aType = VISU::Storable::SObject2Type( aSObject );
+       switch(aType){
+       case VISU::TTIMESTAMP: {
+         aSObject = aSObject->GetFather();
+         aSObject = aSObject->GetFather();
+         break;
+       }
+       case VISU::TFIELD: {
+         _PTR(SObject) newSObject;
+         if(aSObject->ReferencedObject(newSObject)) aSObject = newSObject;
+         aSObject = aSObject->GetFather();
+         break;
+       }
+       case VISU::TANIMATION: {
+         _PTR(ChildIterator) aTmpIter = aActiveStudy->NewChildIterator(aSObject);
+         for (aTmpIter->InitEx(true); aTmpIter->More(); aTmpIter->Next()) {
+           _PTR(SObject) aTmpChildSObj = aTmpIter->Value();
+           _PTR(SObject) newSObject;
+           if(aTmpChildSObj->ReferencedObject(newSObject)){
+             aSObject = newSObject;
+             aSObject->GetFather();
+             break;
+           }
+         }
+         break;
+       }}
+       
+       aSObject = aSObject->GetFather();
+       aSObject = aSObject->GetFather();
+
+       mySelectionObj = aSObject;
+       CORBA::Object_var anObject = VISU::ClientSObjectToObject(mySelectionObj);
+       if (CORBA::is_nil(anObject)) {
+         mySelectionObj = mySelectionObj->GetFather();
+       }
+      }
+    }
+
+    if (mySelectionObj) {
+      _PTR(ChildIterator) aIter = aActiveStudy->NewChildIterator(mySelectionObj);
+
+      for (aIter->InitEx(true); aIter->More(); aIter->Next()) {
+        _PTR(SObject) aChildSObj = aIter->Value();
+       VISU::Storable::TRestoringMap aRestoringMap = VISU::Storable::GetStorableMap(aChildSObj);
+        if (!aRestoringMap.empty()) {
+         VISU::VISUType aType = VISU::Storable::RestoringMap2Type(aRestoringMap);
+         if (aType == VISU::TTIMESTAMP) {
+           QString aMeshName = aRestoringMap["myMeshName"];
+           CORBA::String_var aName = myPrsCopy->GetMeshName();
+           if (aMeshName != aName.in())
+             continue;
+           QString aFieldName = aRestoringMap["myFieldName"];
+           QString aTimeIter  = aRestoringMap["myTimeStampId"];
+           QString aEntity    = aRestoringMap["myEntityId"];
+           VISU::Entity anEntity;
+           switch (aEntity.toInt()) {
+           case 0: anEntity = VISU::NODE; break;
+           case 1: anEntity = VISU::EDGE; break;
+           case 2: anEntity = VISU::FACE; break;
+           case 3: anEntity = VISU::CELL; break;
+           }
+           TFieldName2TimeStamps& aFieldName2TimeStamps = myEntity2Fields[anEntity];
+           TTimeStampNumber2Time& aTimeStampNumber2Time = aFieldName2TimeStamps[aFieldName];
+           aTimeStampNumber2Time[aTimeIter.toInt()] = 
+             GetFloatValueOfTimeStamp(anEntity,
+                                      aFieldName.latin1(),
+                                      aTimeIter.toInt());
+         }
+        }
+      }
+    }
+    AddAllFieldNames();
+  }
+  myFieldsCombo->setCurrentText(aFieldName.in());
+  AddAllTimes(myFieldsCombo->currentText());
+  myTimeStampsCombo->setCurrentText(aIteration);
+  SetScalarField( false );
+
+  VisuGUI_ScalarBarBaseDlg::initFromPrsObject(myPrsCopy, theInit);
+
+  if( !theInit )
+    return;
+
+  myInputPane->initFromPrsObject( myPrsCopy );
+  myTabBox->setCurrentPage( 0 );
+}
+
+int
+VisuGUI_ScalarMapOnDeformedShapeDlg
+::storeToPrsObject(VISU::ColoredPrs3d_i* thePrs)
+{
+  if(!myInputPane->check() || !GetScalarPane()->check())
+    return 0;
+  
+  int anIsOk = myInputPane->storeToPrsObject( myPrsCopy );
+  anIsOk &= GetScalarPane()->storeToPrsObject( myPrsCopy );
+  
+  myPrsCopy->SetScale(getFactor());
+
+  myPrsCopy->SetScalarField(myPrsCopy->GetScalarEntity(),
+                           getCurrentScalarFieldName().latin1(),
+                           myTimeStampID[ myTimeStampsCombo->currentItem() ]);
+
+  if(myUpdateScalars) 
+    SetScalarField( false );
+
+  VISU::TSameAsFactory<VISU::TSCALARMAPONDEFORMEDSHAPE>().Copy(myPrsCopy, thePrs);
+
+  return anIsOk;
+}
+
+int VisuGUI_ScalarMapOnDeformedShapeDlg::getCurrentScalarFieldNamePos(){
+  return myFieldsCombo->currentItem();
+}
+
+QString VisuGUI_ScalarMapOnDeformedShapeDlg::getCurrentScalarFieldName(){
+  return myFieldsCombo->currentText();
+}
+
+int VisuGUI_ScalarMapOnDeformedShapeDlg::getCurrentScalarNbIterations(){
+  return myTimeStampsCombo->count();
+}
+
+VISU::Entity
+VisuGUI_ScalarMapOnDeformedShapeDlg
+::getCurrentScalarEntity()
+{
+  VISU::Entity anEntity = VISU::Entity(-1);
+  TEntity2Fields::const_iterator anIter = myEntity2Fields.begin();
+  for(; anIter != myEntity2Fields.end(); anIter++){
+    const TFieldName2TimeStamps& aFieldName2TimeStamps = anIter->second;
+    TFieldName2TimeStamps::const_iterator aFieldIter = aFieldName2TimeStamps.begin();
+    for(; aFieldIter != aFieldName2TimeStamps.end(); aFieldIter++){
+      const QString& aFieldName = aFieldIter->first;
+      if (aFieldName == myFieldsCombo->currentText()) {
+       anEntity = anIter->first;
+       break;
+      }
+    }
+  }
+  return anEntity;
+}
+
+void VisuGUI_ScalarMapOnDeformedShapeDlg::SetScalarField( const bool save_scalar_pane ){
+  SetScalarField( myTimeStampID[ myTimeStampsCombo->currentItem() ], "", save_scalar_pane );
+}
+
+void
+VisuGUI_ScalarMapOnDeformedShapeDlg
+::SetScalarField(int theIter,
+                QString theFieldName, 
+                const bool save_scalar_pane )
+{
+  QApplication::setOverrideCursor(Qt::waitCursor);
+
+  if( save_scalar_pane )
+    GetScalarPane()->storeToPrsObject(myPrsCopy);
+
+  QString aFieldName;
+
+  if(theFieldName.isEmpty())
+    aFieldName = myFieldsCombo->currentText();
+  else
+    aFieldName = theFieldName;
+
+  VISU::Entity anEntity = getCurrentScalarEntity();
+  
+  myPrsCopy->SetScalarField(anEntity,
+                           aFieldName.latin1(),
+                           theIter);
+  
+  if( save_scalar_pane )
+    UpdateScalarField();
+
+  QApplication::restoreOverrideCursor();
+}
+
+void VisuGUI_ScalarMapOnDeformedShapeDlg::accept()
+{
+  VisuGUI_ScalarBarBaseDlg::accept();
+}
+
+void VisuGUI_ScalarMapOnDeformedShapeDlg::reject()
+{
+  VisuGUI_ScalarBarBaseDlg::reject();
+}
+
+QString VisuGUI_ScalarMapOnDeformedShapeDlg::GetContextHelpFilePath()
+{
+  return "scalar_map_on_deformed_shape_page.html";
+}
+
+void VisuGUI_ScalarMapOnDeformedShapeDlg::AddAllFieldNames(){
+  TEntity2Fields::const_iterator anIter = myEntity2Fields.begin();
+  for(; anIter != myEntity2Fields.end(); anIter++){
+    const TFieldName2TimeStamps& aFieldName2TimeStamps = anIter->second;
+    TFieldName2TimeStamps::const_iterator aFieldIter = aFieldName2TimeStamps.begin();
+    for(; aFieldIter != aFieldName2TimeStamps.end(); aFieldIter++){
+      const QString& aFieldName = aFieldIter->first;
+      myFieldsCombo->insertItem(aFieldName);
+    }
+  }
+}
+
+void VisuGUI_ScalarMapOnDeformedShapeDlg::AddAllTimes(const QString& theFieldName){
+  TEntity2Fields::const_iterator anIter = myEntity2Fields.begin();
+  for(; anIter != myEntity2Fields.end(); anIter++){
+    const TFieldName2TimeStamps& aFieldName2TimeStamps = anIter->second;
+    TFieldName2TimeStamps::const_iterator aFieldIter = aFieldName2TimeStamps.begin();
+    for(; aFieldIter != aFieldName2TimeStamps.end(); aFieldIter++){
+      const QString& aFieldName = aFieldIter->first;
+      if(theFieldName != aFieldName) 
+       continue;
+
+      myTimeStampID.clear();
+      myTimeStampsCombo->clear();
+
+      const TTimeStampNumber2Time& aTimeStampNumber2Time = aFieldIter->second;
+      TTimeStampNumber2Time::const_iterator aTimeStampIter = aTimeStampNumber2Time.begin();
+      for(; aTimeStampIter != aTimeStampNumber2Time.end(); aTimeStampIter++){
+       int aTimeStampNumber = aTimeStampIter->first;
+       myTimeStampID.push_back(aTimeStampNumber);
+
+       QString aTimeStampTime = aTimeStampIter->second;
+       myTimeStampsCombo->insertItem(aTimeStampTime);
+      }
+      return;
+    }
+  }
+}
+
+void VisuGUI_ScalarMapOnDeformedShapeDlg::onFieldChanged(int){
+  AddAllTimes(myFieldsCombo->currentText());
+  SetScalarField();
+  UpdateScalarField();
+}
+
+void VisuGUI_ScalarMapOnDeformedShapeDlg::onTimeStampChanged(int){
+  SetScalarField();
+  UpdateScalarField();
+}
+
+void VisuGUI_ScalarMapOnDeformedShapeDlg::UpdateScalarField(){
+  GetScalarPane()->initFromPrsObject(myPrsCopy);
+}
+
+QString 
+VisuGUI_ScalarMapOnDeformedShapeDlg
+::GetFloatValueOfTimeStamp(VISU::Entity theEntity,
+                          const std::string& theFieldName,
+                          int theTimeStampNumber)
+{
+  QString aTime("");
+  VISU::TEntity anEntity = VISU::TEntity(theEntity);
+  VISU::Result_i* theResult = myPrsCopy->GetCResult();
+  VISU::Result_i::PInput anInput = theResult->GetInput();
+  VISU::PField aField = anInput->GetField(myPrsCopy->GetCMeshName(),
+                                         anEntity,
+                                         theFieldName);
+  if(!aField) 
+    return aTime;
+
+  VISU::TValField& aValField = aField->myValField;
+  VISU::TValField::const_iterator aIter = aValField.find(theTimeStampNumber);
+  if(aIter != aValField.end()){
+    VISU::PValForTime aValForTime = aIter->second;
+    aTime = VISU_Convertor::GenerateName(aValForTime->myTime).c_str();
+  }
+  return aTime;
+}
diff --git a/src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.h b/src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.h
new file mode 100644 (file)
index 0000000..6974d68
--- /dev/null
@@ -0,0 +1,123 @@
+//  VISU VISUGUI : GUI of VISU component
+//
+//  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   : VisuGUI_ScalarMapOnDeformedShapeDlg.h
+//  Author : Eugeny Nikolaev
+//  Module : VISU
+
+#ifndef VISUGUI_SCALARMAPONDEFORMEDSHAPEDLS_H
+#define VISUGUI_SCALARMAPONDEFORMEDSHAPEDLS_H
+
+#include "VisuGUI_Prs3dDlg.h"
+
+#include "VISUConfig.hh"
+
+#include "QtxDblSpinBox.h"
+
+#include <qdialog.h>
+#include <qgroupbox.h>
+#include <qcheckbox.h>
+#include <qcombobox.h>
+#include <qlabel.h>
+#include <qpushbutton.h>
+#include <qtabwidget.h>
+
+#include <set>
+#include <vector>
+
+class SalomeApp_Module;
+class VisuGUI_InputPane;
+
+namespace VISU
+{
+  class ScalarMapOnDeformedShape_i;
+}
+
+class VisuGUI_ScalarMapOnDeformedShapeDlg : public VisuGUI_ScalarBarBaseDlg
+{
+    Q_OBJECT
+
+public:
+    VisuGUI_ScalarMapOnDeformedShapeDlg (SalomeApp_Module* theModule);
+    ~VisuGUI_ScalarMapOnDeformedShapeDlg();
+
+    double getFactor()
+      { return ScalFact->value(); }
+    void setFactor(double theFactor)
+      { ScalFact->setValue(theFactor); }
+    
+    virtual void initFromPrsObject( VISU::ColoredPrs3d_i* thePrs,
+                                   bool theInit );
+
+    virtual int  storeToPrsObject(VISU::ColoredPrs3d_i* thePrs);
+
+    int getCurrentScalarFieldNamePos();
+    QString getCurrentScalarFieldName();
+    int getCurrentScalarNbIterations();
+    VISU::Entity getCurrentScalarEntity();
+    void SetScalarField(int theIter,QString theFieldName=QString(""), const bool = true );
+
+protected:
+  virtual QString GetContextHelpFilePath();
+
+protected slots:
+  void accept();
+  void reject();
+
+private slots:
+  void onFieldChanged(int i=0);
+  void onTimeStampChanged(int i=0);
+
+private:
+ QtxDblSpinBox* ScalFact;
+ QTabWidget* myTabBox;
+ VisuGUI_ScalarBarPane* myScalarPane;
+ VisuGUI_InputPane*     myInputPane;
+ QComboBox *myFieldsCombo;
+ QComboBox *myTimeStampsCombo;
+ typedef std::map<int, QString> TTimeStampNumber2Time; // Times map definition (iteration time, real value of time)
+ typedef std::map<QString, TTimeStampNumber2Time> TFieldName2TimeStamps; // Field name and enity to Times
+ typedef std::map<VISU::Entity, TFieldName2TimeStamps> TEntity2Fields; // Mesh to fields map
+ TEntity2Fields myEntity2Fields;
+ int myCurrScalarIter;
+ bool myIsAnimation;
+ bool myUpdateScalars;
+ std::vector<int> myTimeStampID;
+ _PTR(SObject) mySelectionObj;
+ SALOME::GenericObjPtr<VISU::ScalarMapOnDeformedShape_i> myPrsCopy;
+ SalomeApp_Module* myVisuGUI;
+protected:
+ void UpdateScalarField();
+ void SetScalarField( const bool = true );
+ void AddAllFieldNames();
+ void AddAllTimes(const QString& theFieldName);
+ QString GetFloatValueOfTimeStamp(VISU::Entity theEntity,
+                                 const std::string& theFieldName,
+                                 int theTimeStampNumber);
+};
+
+#endif // VISUGUI_DEFORMEDSHAPEDLS_H
index c4b6d44e20b8a21ebe181d267c8964075c86e907..23544b40bb819a6946836d63c6f1e1e184bcd8d1 100644 (file)
 //  VISU VISUGUI : GUI of VISU component
 //
-//  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
-//
+//  Copyright (C) 2005  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   : VisuGUI_Selection.cxx
-//  Author : Laurent CORNABE & Hubert ROLLAND
+//  Author : Sergey Anikin 
 //  Module : VISU
-//  $Header$
 
 #include "VisuGUI_Selection.h"
 
-#include "VisuGUI.h"
-#include "VisuGUI_Tools.h"
 #include "VisuGUI_ViewTools.h"
+#include "VisuGUI_Tools.h"
+
+#include "VISU_Result_i.hh"
+#include "VISU_Gen_i.hh"
 
 #include "VISU_Actor.h"
-#include "VISU_PrsObject_i.hh"
-#include "VISU_Prs3d_i.hh"
-#include "VISU_PipeLine.hxx"
+#include "VISU_ScalarMapAct.h"
 
 #include "SalomeApp_Study.h"
-#include "SalomeApp_Application.h"
-#include "LightApp_Application.h"
-#include "LightApp_SelectionMgr.h"
-#include "LightApp_VTKSelector.h"
-
-#include "SUIT_Desktop.h"
-#include "SUIT_MessageBox.h"
-#include "SUIT_ViewWindow.h"
-#include "SUIT_Session.h"
-#include "SUIT_ResourceMgr.h"
-
-#include "SALOME_ListIO.hxx"
-#include "SALOME_ListIteratorOfListIO.hxx"
-
-#include "SVTK_ViewWindow.h"
-#include "SVTK_Selector.h"
-
-#include "VISU_ConvertorUtils.hxx"
-
-#include "utilities.h"
-
-// OCCT Includes
-#include <TColStd_IndexedMapOfInteger.hxx>
-#include <TColStd_MapOfInteger.hxx>
-
-// QT Includes
-#include <QLabel>
-#include <QSpinBox>
-#include <QListWidget>
-#include <QLayout>
-#include <QButtonGroup>
-#include <QRadioButton>
-#include <QValidator>
-#include <QPushButton>
-#include <QStackedWidget>
-#include <QGroupBox>
-#include <QLineEdit>
-#include <QValidator>
-#include <QTableWidget>
-#include <QVBoxLayout>
-#include <QHBoxLayout>
-#include <QKeyEvent>
-#include <QHeaderView>
-
-// VTK Includes
-#include <vtkDataSetMapper.h>
-#include <vtkDataSet.h>
-#include <vtkPointData.h>
-#include <vtkCellData.h>
-#include <vtkCell.h>
-
-// STL Includes
-#include <map>
-
-using namespace std;
-
-
-inline
-QString
-GetNumber( const VISU::TStructuredId& theStructuredId,
-          size_t theId )
-{
-  if ( theStructuredId[theId] < 0 )
-    return "-";
-  
-  return QString::number( theStructuredId[theId] );
+#include "LightApp_Study.h"
+
+using namespace VISU;
+
+//////////////////////////////////////////////////
+// Class: VisuGUI_Selection
+//////////////////////////////////////////////////
+
+
+//---------------------------------------------------------------
+QVariant VisuGUI_Selection::parameter( const int ind, const QString& p ) const
+{
+  QVariant val( LightApp_Selection::parameter( ind, p ) );
+  if ( !val.isValid() ) {
+    if      ( p == "type"           ) val = QVariant( type( ind ) );
+    else if ( p == "nbComponents"   ) val = QVariant( nbComponents( ind ) );
+    else if ( p == "medEntity"   ) val = QVariant( medEntity( ind ) );
+    else if ( p == "medSource"   ) val = QVariant( medSource( ind ) );
+    else if ( p == "representation" ) val = QVariant( representation( ind ) );
+    else if ( p == "nbTimeStamps"   ) val = QVariant( nbTimeStamps( ind ) );
+    else if ( p == "nbChildren"     ) val = QVariant( nbChildren( ind ) );
+    else if ( p == "nbNamedChildren") val = QVariant( nbNamedChildren( ind ) );
+    else if ( p == "isVisible"      ) val = QVariant( isVisible( ind ) );
+    else if ( p == "isShrunk"       ) val = QVariant( isShrunk( ind ) );
+    else if ( p == "hasActor"       ) val = QVariant( hasActor( ind ) );
+    else if ( p == "isShading"      ) val = QVariant( isShading( ind ) );
+    else if ( p == "isScalarMapAct" ) val = QVariant( isScalarMapAct( ind ) );
+    else if ( p == "isVisuComponent") val = QVariant( isVisuComponent( ind ) );
+    else if ( p == "fullResolution"   ) val = QVariant( fullResolution( ind ) );
+    else if ( p == "mediumResolution"   ) val = QVariant( mediumResolution( ind ) );
+    else if ( p == "lowResolution"   ) val = QVariant( lowResolution( ind ) );
+    else if ( p == "resolutionState"   ) val = QVariant( resolutionState( ind ) );
+    else if ( p == "isValuesLabeled"  ) val = QVariant( isValuesLabeled( ind ) );
+  }
+
+  return val;
 }
 
 
-VisuGUI_SelectionDlg::VisuGUI_SelectionDlg (const SalomeApp_Module* theModule):
-  QDialog(VISU::GetDesktop(theModule), 
-         Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),//WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose),
-  mySelectionMgr(NULL),
-  myModule(theModule)
-{
-  setModal( false ); 
-  setAttribute( Qt::WA_DeleteOnClose, true );
-  setWindowTitle( tr("WINDOW_TITLE" ) );
-  setSizeGripEnabled(true);
-
-  QGridLayout* TopLayout = new QGridLayout (this);
-  TopLayout->setSpacing(6);
-  TopLayout->setMargin(11);
-  TopLayout->setRowStretch(0, 0);
-  TopLayout->setRowStretch(1, 0);
-  TopLayout->setRowStretch(2, 1);
-  TopLayout->setRowStretch(3, 0);
-
-  QGroupBox* aTypeBox = new QGroupBox (tr("MODE_TITLE"), this);
-  QHBoxLayout* aHBox = new QHBoxLayout();
-  QButtonGroup* aBtnGroup = new QButtonGroup();
-
-  QRadioButton* aBtn = new QRadioButton (tr("MODE_POINT"), aTypeBox);
-  aHBox->addWidget( aBtn );
-  aBtnGroup->addButton( aBtn, 0 );
-
-  aBtn = new QRadioButton (tr("MODE_CELL"), aTypeBox);
-  aHBox->addWidget( aBtn );
-  aBtnGroup->addButton( aBtn, 1 );
-
-  aBtn = new QRadioButton (tr("MODE_ACTOR"), aTypeBox);
-  aHBox->addWidget( aBtn );
-  aBtnGroup->addButton( aBtn, 2 );
-  
-  aBtnGroup->button(0)->setChecked(true);
+//---------------------------------------------------------------
+// Macro for converting VISU enumeration items into corresponding strings
+#define ENUM2STRING( x, y ) \
+  case y: \
+    x = QString( #y ); \
+    break
 
-  connect(aBtnGroup, SIGNAL(buttonClicked(int)), this, SLOT(onSelectionChange(int)));
+QString VisuGUI_Selection::type( const int ind ) const
+{
+  QString aResStr;
+  SalomeApp_Study* aStudy = GetStudy();
+  if ( !aStudy )
+    return aResStr;
+
+  VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, (const char*)entry( ind ).toLatin1());
+  VISU::Storable::TRestoringMap aMap = VISU::Storable::GetStorableMap(anObjectInfo.mySObject);
+
+  VISU::Base_i* aBase = anObjectInfo.myBase;
+  if(aBase){
+    VISU::VISUType aType = aBase->GetType();
+    if(aType == VISU::TCOLOREDPRS3DHOLDER){
+      CORBA::Object_var anObject = ClientSObjectToObject(anObjectInfo.mySObject);
+      VISU::ColoredPrs3dHolder_var aHolder = VISU::ColoredPrs3dHolder::_narrow(anObject);
+      aType = aHolder->GetPrsType();
+    }
+    switch (aType) {
+      ENUM2STRING( aResStr, VISU::TVISUGEN );
+      ENUM2STRING( aResStr, VISU::TRESULT );
+      ENUM2STRING( aResStr, VISU::TTABLE );
+      ENUM2STRING( aResStr, VISU::TCURVE );
+      ENUM2STRING( aResStr, VISU::TCONTAINER );
+      ENUM2STRING( aResStr, VISU::TMESH );
+      ENUM2STRING( aResStr, VISU::TSCALARMAP );
+      ENUM2STRING( aResStr, VISU::TISOSURFACES );
+      ENUM2STRING( aResStr, VISU::TDEFORMEDSHAPE );
+      ENUM2STRING( aResStr, VISU::TSCALARMAPONDEFORMEDSHAPE );
+      ENUM2STRING( aResStr, VISU::TCUTPLANES );
+      ENUM2STRING( aResStr, VISU::TCUTLINES );
+      ENUM2STRING( aResStr, VISU::TVECTORS );
+      ENUM2STRING( aResStr, VISU::TSTREAMLINES );
+      ENUM2STRING( aResStr, VISU::TPLOT3D );
+      ENUM2STRING( aResStr, VISU::TANIMATION );
+    }
+  }
 
-  aTypeBox->setLayout(aHBox);
-  TopLayout->addWidget(aTypeBox, 0, 0);
+  if(aResStr.isNull()){
+    VISU::VISUType aType = VISU::Storable::RestoringMap2Type(aMap);
+    switch (aType) {
+      ENUM2STRING( aResStr, VISU::TENTITY );
+      ENUM2STRING( aResStr, VISU::TFAMILY );
+      ENUM2STRING( aResStr, VISU::TGROUP );
+      ENUM2STRING( aResStr, VISU::TVIEW3D );
+      ENUM2STRING( aResStr, VISU::TFIELD );
+      ENUM2STRING( aResStr, VISU::TTIMESTAMP );
+    }
+  }
 
-  QWidget* aNamePane = new QWidget (this);
-  QGridLayout* aNameLay = new QGridLayout (aNamePane);
+  if(aResStr.isNull()){
+    bool anIsExist;
+    QString aVal = VISU::Storable::FindValue(aMap, "myComment", &anIsExist);
+    if ( anIsExist && aVal != "MESH" )
+      aResStr = "VISU::T" + aVal;
+  }
 
-  QLabel* aMeshLbl = new QLabel (tr("MESH_NAME_LBL"), aNamePane);
-  myMeshName = new QLabel (aNamePane);
+  return aResStr;
+}
 
-  QLabel* aFieldLbl = new QLabel (tr("FIELD_NAME_LBL"), aNamePane);
-  myFieldName = new QLabel (aNamePane);
 
-  aNameLay->addWidget(aMeshLbl, 0, 0);
-  aNameLay->addWidget(myMeshName, 0, 1);
-  aNameLay->addWidget(aFieldLbl, 1, 0);
-  aNameLay->addWidget(myFieldName, 1, 1);
+//---------------------------------------------------------------
+QString VisuGUI_Selection::nbComponents( const int ind ) const
+{
+  QString aResStr;
+  SalomeApp_Study* aStudy = GetStudy();
+  if ( !aStudy )
+    return aResStr;
+
+  VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, (const char*)entry( ind ).toLatin1());
+  VISU::Storable::TRestoringMap aMap = VISU::Storable::GetStorableMap(anObjectInfo.mySObject);
+
+  bool isExist;
+  QString aVal = VISU::Storable::FindValue(aMap,"myNumComponent",&isExist);
+  if ( isExist )
+    aResStr = aVal;
+  return aResStr;
+}
 
-  TopLayout->addWidget(aNamePane, 1, 0);
 
-  myWidgetStack = new QStackedWidget (this);
+//---------------------------------------------------------------
+QString VisuGUI_Selection::resolutions( const int ind ) const
+{
+  QString aResStr;
+  SalomeApp_Study* aStudy = GetStudy();
+  if ( !aStudy )
+    return aResStr;
 
-  // Create Points pane
-  myPointsPane = new QWidget (myWidgetStack);
-  QVBoxLayout* aVBoxLayout = new QVBoxLayout(myPointsPane);
+  VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, entry( ind ).toLatin1().data());
+  VISU::Storable::TRestoringMap aMap = VISU::Storable::GetStorableMap(anObjectInfo.mySObject);
 
-  QGroupBox* aDataGrp = new QGroupBox ( tr("POINT_DATA_TITLE"), myPointsPane);
-  QGridLayout* aGridLay = new QGridLayout (aDataGrp);
-  aGridLay->setSpacing(6);
+  bool isExist;
+  QString aVal = VISU::Storable::FindValue(aMap,"myResolutions",&isExist);
+  if ( isExist )
+    aResStr = aVal;
 
-  aGridLay->addWidget( new QLabel (tr("DATA_ID_LBL"), aDataGrp) , 0, 0 );
-  aGridLay->addWidget( new QLabel (tr("DATA_SCALAR_LBL"), aDataGrp), 1, 0 );
-  aGridLay->addWidget( new QLabel (tr("DATA_VECTOR_LBL"), aDataGrp), 2, 0 );
-  
-  myIDValLbl = new QLineEdit ("", aDataGrp);
-  aGridLay->addWidget( myIDValLbl, 0, 1 );
-  QIntValidator* aIntValidator = new QIntValidator (myIDValLbl);
-  aIntValidator->setBottom(0);
-  myIDValLbl->setValidator(aIntValidator);
-  connect(myIDValLbl, SIGNAL(textChanged(const QString&)), this, SLOT(onPointIdEdit(const QString&)));
-
-  myScalarValLbl = new QLabel ("", aDataGrp);
-  aGridLay->addWidget( myScalarValLbl, 1, 1 );  
-  
-  myVectorValLbl = new QLabel ("", aDataGrp);
-  myVectorValLbl->setMinimumWidth(150);
-  aGridLay->addWidget( myVectorValLbl, 2, 1 );  
-
-  aVBoxLayout->addWidget( aDataGrp );
-
-  QGroupBox* aCoordGrp = new QGroupBox ( tr("POINT_COORD_TITLE"), myPointsPane);
-  aGridLay = new QGridLayout (aCoordGrp);
-  aGridLay->setSpacing(6);
-
-  aGridLay->addWidget( new QLabel ("X:", aCoordGrp), 0, 0 );
-  myXValLbl = new QLabel ("", aCoordGrp);
-  aGridLay->addWidget( myXValLbl, 0, 1 );
-  //ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
-  aGridLay->addWidget( new QLabel ("I:", aCoordGrp), 0, 2 );
-  myIValLbl = new QLabel ("-", aCoordGrp);
-  aGridLay->addWidget( myIValLbl, 0, 3 );
-  //ENK: 23.11.2006
-  aGridLay->addWidget( new QLabel ("Y:", aCoordGrp), 1, 0 );
-  myYValLbl = new QLabel ("", aCoordGrp);
-  aGridLay->addWidget( myYValLbl, 1, 1 );
-  //ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
-  aGridLay->addWidget( new QLabel ("J:", aCoordGrp), 1, 2 );
-  myJValLbl = new QLabel ("-", aCoordGrp);
-  aGridLay->addWidget( myJValLbl, 1, 3 );
-  //ENK: 23.11.2006
-  aGridLay->addWidget( new QLabel ("Z:",aCoordGrp ), 2, 0 );
-  myZValLbl = new QLabel ("", aCoordGrp);
-  aGridLay->addWidget( myZValLbl, 2, 1 );
-  //ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
-  aGridLay->addWidget( new QLabel ("K:", aCoordGrp), 2, 2 );
-  myKValLbl = new QLabel ("-", aCoordGrp);
-  aGridLay->addWidget( myKValLbl, 2, 3 );
-  //ENK: 23.11.2006
-
-  aVBoxLayout->addWidget( aCoordGrp );
-
-  myWidgetStack->addWidget(myPointsPane);
-
-  // Create Cells pane
-  myCellsPane = new QWidget (myWidgetStack);
-  QGridLayout* aCellLayout = new QGridLayout (myCellsPane);
-  aCellLayout->setSpacing(6);
-  aCellLayout->setRowStretch(0, 0);
-  aCellLayout->setRowStretch(1, 1);
-
-  QGroupBox* aCellGrp = new QGroupBox( tr("CELL_DATA_TITLE"), myCellsPane);
-  aGridLay = new QGridLayout (aCellGrp);
-
-  aGridLay->addWidget( new QLabel (tr("DATA_ID_LBL"), aCellGrp), 0, 0);
-  myCellIDValLbl = new QLineEdit ("", aCellGrp);
-  myCellIDValLbl->setValidator(aIntValidator);
-  aGridLay->addWidget( myCellIDValLbl, 0, 1);
-  connect(myCellIDValLbl, SIGNAL(textChanged(const QString&)), this, SLOT(onCellIdEdit(const QString&)));
-
-  aGridLay->addWidget( new QLabel (tr("DATA_SCALAR_LBL"), aCellGrp), 1, 0);
-  myCellScalarValLbl = new QLabel ("", aCellGrp);
-  aGridLay->addWidget( myCellScalarValLbl, 1, 1);
-  aGridLay->addWidget( new QLabel (tr("DATA_VECTOR_LBL"), aCellGrp), 2, 0);
-  myCellVectorValLbl = new QLabel ("", aCellGrp);
-  aGridLay->addWidget(myCellVectorValLbl , 2, 1);
-
-  aCellLayout->addWidget(aCellGrp, 0, 0);
-
-  myListPoints = new QTableWidget (myCellsPane);
-  myListPoints->setEditTriggers( QAbstractItemView::NoEditTriggers );
-  myListPoints->setColumnCount(9);
-  myListPoints->setRowCount(0);
-  myListPoints->setColumnWidth(0, 40);
-  myListPoints->setColumnWidth(1, 40);
-  myListPoints->setColumnWidth(2, 40);
-  myListPoints->setColumnWidth(3, 40);
-  myListPoints->setColumnWidth(4, 40);//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
-  myListPoints->setColumnWidth(5, 40);//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
-  myListPoints->setColumnWidth(6, 40);//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
-  myListPoints->setSelectionMode(QAbstractItemView::NoSelection);
-
-  QStringList aLabels;
-  aLabels.append( "ID" );
-  aLabels.append( "X" );
-  aLabels.append( "Y" );
-  aLabels.append( "Z" );
-  aLabels.append( "I" );//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
-  aLabels.append( "J" );//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
-  aLabels.append( "K" );//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
-  aLabels.append( tr("CELL_DATA_SCALAR_HDR") );
-  aLabels.append( tr("CELL_DATA_VECTOR_HDR") );
-  myListPoints->setHorizontalHeaderLabels( aLabels );
-
-  aCellLayout->addWidget(myListPoints, 1, 0);
-
-  myWidgetStack->addWidget(myCellsPane);
-
-  // Actor Pane
-  myActorsPane = new QWidget (myWidgetStack);
-  aVBoxLayout = new QVBoxLayout(myActorsPane);  
-  aVBoxLayout->setSpacing(6);
-
-  QGroupBox* aPosGrp = new QGroupBox (tr("ACTOR_DATA_POSITION_TITLE"), myActorsPane);
-  aGridLay = new QGridLayout (aPosGrp);
-  aGridLay->setSpacing(6);
-  aGridLay->addWidget( new QLabel ("X:", aPosGrp), 0, 0);
-  myXPosLbl = new QLabel ("0", aPosGrp);
-  aGridLay->addWidget( myXPosLbl, 0, 1);
-  aGridLay->addWidget( new QLabel ("Y:", aPosGrp), 1, 0);
-  myYPosLbl = new QLabel ("0", aPosGrp);
-  aGridLay->addWidget( myYPosLbl, 1, 1);
-  aGridLay->addWidget( new QLabel ("Z:", aPosGrp), 2, 0);
-  myZPosLbl = new QLabel ("0", aPosGrp);
-  aGridLay->addWidget( myZPosLbl, 2, 1);
-
-  aVBoxLayout->addWidget( aPosGrp );
-
-  QGroupBox* aSizeGrp = new QGroupBox ( tr("ACTOR_DATA_SIZE_TITLE"), myActorsPane);
-  aGridLay = new QGridLayout (aSizeGrp);
-  aGridLay->setSpacing(6);
-  aGridLay->addWidget( new QLabel ("dX:", aSizeGrp ), 0, 0);
-  myDXLbl = new QLabel ("0", aSizeGrp);
-  aGridLay->addWidget( myDXLbl, 0, 1);
-  aGridLay->addWidget( new QLabel ("dY:", aSizeGrp ), 1, 0);
-  myDYLbl = new QLabel ("0", aSizeGrp);
-  aGridLay->addWidget( myDYLbl, 1, 1);
-  aGridLay->addWidget( new QLabel ("dZ:", aSizeGrp ), 2, 0);
-  myDZLbl = new QLabel ("0", aSizeGrp);
-  aGridLay->addWidget( myDZLbl, 2, 1);
-
-  aVBoxLayout->addWidget( aSizeGrp );
-
-  myWidgetStack->addWidget(myActorsPane);
-
-
-  TopLayout->addWidget(myWidgetStack, 2, 0);
-
-  // Create buttons group
-  QWidget* aBtnBox = new QWidget (this);  
-  QHBoxLayout* aBtnLayout = new QHBoxLayout( aBtnBox);
-  aBtnLayout->addStretch();
-
-  QPushButton* aCloseBtn = new QPushButton (tr("BUT_CLOSE"), aBtnBox);
-  aBtnLayout->addWidget(aCloseBtn);
-  connect(aCloseBtn, SIGNAL(clicked()), this, SLOT(close()));
-
-  QPushButton* aHelpBtn = new QPushButton (tr("BUT_HELP"), aBtnBox);
-  aBtnLayout->addWidget(aHelpBtn);
-  connect(aHelpBtn, SIGNAL(clicked()), this, SLOT(onHelp()));
-
-  TopLayout->addWidget(aBtnBox, 3, 0);
-
-  SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>
-    (SUIT_Session::session()->activeApplication());
-  mySelectionMgr = anApp->selectionMgr();
-  connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(onSelectionEvent()));
-
-  //connect(visuGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(close()));
-
-  myFl = false;
-
-  // Activate Points pane
-  myWidgetStack->setCurrentWidget(myPointsPane);
-  if (SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>(myModule))
-    aViewWindow->SetSelectionMode(NodeSelection);
-  onSelectionEvent();
+  return aResStr;
 }
 
-VisuGUI_SelectionDlg::~VisuGUI_SelectionDlg()
+
+//---------------------------------------------------------------
+QString VisuGUI_Selection::resolution( const int ind, char theResoltuion ) const
 {
-  SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>(myModule);
-  if ( !aViewWindow )
-    return;
+  QString aResStr;
 
-  switch ( aViewWindow->SelectionMode() ) {
-  case NodeSelection:
-  case CellSelection:
-    aViewWindow->SetSelectionMode(ActorSelection);
-    break;
-  }
+  QString aResolutions = resolutions( ind );
+  if(aResolutions.isEmpty())
+    return aResStr;
+  
+  if(aResolutions.indexOf(theResoltuion) != -1)
+    aResStr = "1";
+  else
+    aResStr = "0";
+
+  return aResStr;
 }
 
-void VisuGUI_SelectionDlg::onSelectionChange (int theId)
-{
-  SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>(myModule);
-  if (!aViewWindow) return;
-
-  switch (theId) {
-  case 0: // Points
-    myWidgetStack->setCurrentWidget(myPointsPane);
-    aViewWindow->SetSelectionMode(NodeSelection);
-    onPointIdEdit(myIDValLbl->text());
-    break;
-  case 1: // Cells
-    myWidgetStack->setCurrentWidget(myCellsPane);
-    aViewWindow->SetSelectionMode(CellSelection);
-    onCellIdEdit(myCellIDValLbl->text());
-    break;
-  case 2: // Actor
-    myWidgetStack->setCurrentWidget(myActorsPane);
-    aViewWindow->SetSelectionMode(ActorSelection);
-    onSelectionEvent();
-  }
+
+//---------------------------------------------------------------
+QString VisuGUI_Selection::fullResolution( const int ind ) const
+{
+  return resolution( ind, 'F');
 }
 
 
-void VisuGUI_SelectionDlg::closeEvent (QCloseEvent* theEvent)
+//---------------------------------------------------------------
+QString VisuGUI_Selection::mediumResolution( const int ind ) const
 {
-  QDialog::closeEvent(theEvent);
+  return resolution( ind, 'M');
 }
 
-template<class TData> QString getValue(TData* theData, int theId){
-  if (vtkDataArray *aScalar = theData->GetScalars()){
-    vtkFloatingPointType aVal = aScalar->GetTuple1(theId);
-    return QString::number(aVal);
-  } else {
-    return QString("No data");
+
+//---------------------------------------------------------------
+QString VisuGUI_Selection::lowResolution( const int ind ) const
+{
+  return resolution( ind, 'L');
+}
+
+
+//---------------------------------------------------------------
+QString VisuGUI_Selection::resolutionState( const int ind ) const
+{
+  QString aResStr;
+  SalomeApp_Study* aStudy = GetStudy();
+  if ( !aStudy )
+    return aResStr;
+
+  VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, entry( ind ).toLatin1().data());
+  VISU::Storable::TRestoringMap aMap = VISU::Storable::GetStorableMap(anObjectInfo.mySObject);
+
+  bool isExist;
+  QString aVal = VISU::Storable::FindValue(aMap,"myState",&isExist);
+  if ( isExist ) {
+    if ( aVal.toInt() == VISU::Result::FULL )
+      aResStr = "F";
+    if ( aVal.toInt() == VISU::Result::MEDIUM )
+      aResStr = "M";
+    if ( aVal.toInt() == VISU::Result::LOW )
+      aResStr = "L";
+    if ( aVal.toInt() == VISU::Result::HIDDEN )
+      aResStr = "H";
   }
+
+  return aResStr;
 }
 
-template<class TData> QString getVector(TData* theData, int theId){
-  if (vtkDataArray *aVector = theData->GetVectors()) {
-    vtkFloatingPointType *aVal = aVector->GetTuple3(theId);
-    return QString("%1; %2; %3").arg(aVal[0]).arg(aVal[1]).arg(aVal[2]);
-  } else {
-    return QString("No data");
+
+//---------------------------------------------------------------
+QString VisuGUI_Selection::medEntity( const int ind ) const
+{
+  SalomeApp_Study* aStudy = GetStudy();
+  if ( !aStudy )
+    return QString();
+
+  VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, (const char*)entry( ind ).toLatin1());
+  VISU::Storable::TRestoringMap aMap = VISU::Storable::GetStorableMap(anObjectInfo.mySObject);
+
+  bool isExist;
+  QString aVal = VISU::Storable::FindValue(aMap,"myEntityId",&isExist);
+  if ( isExist ) {
+    using namespace VISU;
+    TEntity anEntityId = TEntity(aVal.toInt());
+    switch(anEntityId){
+    case NODE_ENTITY :
+      return "NODE_ENTITY";
+    case EDGE_ENTITY :
+      return "EDGE_ENTITY";
+    case FACE_ENTITY :
+      return "FACE_ENTITY";
+    case CELL_ENTITY :
+      return "CELL_ENTITY";
+    default:
+      return QString();
+    }
   }
+  return QString();
 }
 
-#define ABS(a) (a>=0)?a:-a
-
-void VisuGUI_SelectionDlg::onSelectionEvent() {
-  SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>(myModule);
-  if (!aViewWindow)
-    return;
-
-  switch (aViewWindow->SelectionMode()) {
-  case NodeSelection:
-  case CellSelection:
-  case ActorSelection:
-    break;
-  default:
-    close();
-    delete this;
-    return;
+QString VisuGUI_Selection::medSource( const int ind ) const
+{
+  _PTR(Study) aStudyDS = GetStudy()->studyDS();
+  if(_PTR(SObject) aSObject = aStudyDS->FindObjectID((const char*)entry(ind).toLatin1())){
+    VISU::Result_var aRes;
+    if(VISU::Result_i* aResult = CheckResult(myModule,aSObject,aRes)){
+      using namespace VISU;
+      Result_i::ECreationId aCreationId = aResult->GetCreationId();
+      switch(aCreationId){
+      case Result_i::eImportFile :
+       return "eImportFile";
+      case Result_i::eCopyAndImportFile :
+       return "eCopyAndImportFile";
+      case Result_i::eImportMed :
+       return "eImportMed";
+      case Result_i::eImportMedField :
+       return "eImportMedField";
+      default:
+       return QString();
+      }      
+    }
   }
+  return QString();
+}
 
-  if (myFl)
-    return;
-  myFl = true;
+QString VisuGUI_Selection::nbTimeStamps( const int ind ) const
+{
+  QString aResStr;
+  SalomeApp_Study* aStudy = GetStudy();
+  if ( !aStudy )
+    return aResStr;
+
+  VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, (const char*)entry( ind ).toLatin1());
+  VISU::Storable::TRestoringMap aMap = VISU::Storable::GetStorableMap(anObjectInfo.mySObject);
+
+  bool isExist;
+  const QString& aVal = VISU::Storable::FindValue(aMap,"myNbTimeStamps",&isExist);
+  if ( isExist )
+    aResStr = aVal;
+  return aResStr;
+}
 
-  int aType = myWidgetStack->indexOf(myWidgetStack->currentWidget());
 
-  SVTK_Selector* aSelector = aViewWindow->GetSelector();
+//----------------------------------------------------------------------------
+template<class TPopupFunctor>
+struct TPopupDispatcher
+{
+  QString
+  operator()(const SalomeApp_Module* theModule, 
+            const QString& theEntry)
+  {
+    if(SUIT_ViewManager* aViewManager = theModule->getApp()->activeViewManager()){
+      QString aType = aViewManager->getType();
+      TPopupFunctor aFunctor;
+      if(aType == SVTK_Viewer::Type())
+       return aFunctor.template Get<SVTK_Viewer>(theModule, theEntry);
+      //else if(aType == VVTK_Viewer::Type())
+      //return aFunctor.template Get<VVTK_Viewer>(theModule, theEntry);
+    }
+    return QString();
+  }    
+};
+
+
+//----------------------------------------------------------------------------
+template<class TViewer>
+bool
+GetPrs3dSelectionInfo(const SalomeApp_Module* theModule,
+                     const QString& theEntry,
+                     VISU::Prs3d_i*& thePrs3d,
+                     SVTK_ViewWindow*& theViewWindow,
+                     VISU_Actor*& thenActor)
+{
+  VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(GetAppStudy(theModule), (const char*)theEntry.toLatin1());
+  thePrs3d = GetPrs3dFromBase(anObjectInfo.myBase);
+  if(!thePrs3d)
+    return false;
+  
+  typedef typename TViewer::TViewWindow TViewWindow;
+  theViewWindow = GetActiveViewWindow<TViewWindow>(theModule);
+  if(!theViewWindow)
+    return false;
+  
+  thenActor = FindActor(theViewWindow, thePrs3d);
+  if(!thenActor)
+    return false;
+  
+  return true;
+}
 
-  _PTR(SObject) aSObject;
-  VISU::Prs3d_i* aPrs3d = NULL;
-  Handle(SALOME_InteractiveObject) anIO;
 
-  VISU::TSelectionInfo aSelectionInfo = VISU::GetSelectedObjects(myModule);
-  if(aSelectionInfo.size() == 1){
-    // Get selected SObject
-    VISU::TSelectionItem aSelectionItem = aSelectionInfo.front();
-    VISU::TObjectInfo anObjectInfo = aSelectionItem.myObjectInfo;
-    aPrs3d = GetPrs3dFromBase(anObjectInfo.myBase);
-    if(aPrs3d){
-      anIO = aSelectionItem.myIO;
-      aSObject = anObjectInfo.mySObject;
-    }
+//----------------------------------------------------------------------------
+struct TViewFunctor
+{
+  template<class TViewer>
+  QString
+  Get(const SalomeApp_Module* theModule, 
+      const QString& theEntry)
+  {
+    VISU_Actor* anActor = NULL;
+    VISU::Prs3d_i* aPrs3d = NULL;
+    SVTK_ViewWindow* aViewWindow = NULL;
+    if(!GetPrs3dSelectionInfo<TViewer>(theModule, theEntry, aPrs3d, aViewWindow, anActor))
+      return QString();
+    
+    return get(aPrs3d, aViewWindow, anActor);
   }
   
+  QString
+  virtual
+  get(VISU::Prs3d_i* thePrs3d,
+      SVTK_ViewWindow* theViewWindow,
+      VISU_Actor* theActor)
+  {
+    return QString();
+  }
+};
 
-  if (aPrs3d) {
-    QString aMeshName("NULL"), aFieldName("NULL");
-    if (aSObject) {
-      VISU::Storable::TRestoringMap aMap = VISU::Storable::GetStorableMap(aSObject);
-      if (!aMap.empty()) {
-       aMeshName  = VISU::Storable::FindValue(aMap, "myMeshName");
-       aFieldName = VISU::Storable::FindValue(aMap, "myFieldName");
-      }
-    }
 
-    myMeshName ->setText((aMeshName  == "NULL") ? QString("No name") : aMeshName);
-    myFieldName->setText((aFieldName == "NULL") ? QString("No name") : aFieldName);
-
-    VISU_Actor* anVISUActor =
-      VISU::FindActor(VISU::GetAppStudy(myModule), aViewWindow, aSObject->GetID().c_str());
-    if (anVISUActor) {
-      vtkFloatingPointType aCoord[6];
-      anVISUActor->GetBounds(aCoord);
-      myXPosLbl->setText(QString::number( aCoord[0] ));
-      myYPosLbl->setText(QString::number( aCoord[2] ));
-      myZPosLbl->setText(QString::number( aCoord[4] ));
-
-      myDXLbl->setText(QString::number( ABS(aCoord[1]-aCoord[0]) ));
-      myDYLbl->setText(QString::number( ABS(aCoord[3]-aCoord[2]) ));
-      myDZLbl->setText(QString::number( ABS(aCoord[5]-aCoord[4]) ));
-
-      TColStd_IndexedMapOfInteger aMapIndex;
-      typedef std::vector<vtkFloatingPointType> TCoordArray;
-      typedef map<int, TCoordArray> TPointCoordsMap;
-      TPointCoordsMap aPointCoordsMap;
-
-      aSelector->GetIndex(anIO, aMapIndex);
-
-      vtkDataSet* aDataSet = anVISUActor->GetMapper()->GetInput();
-      vtkPointData* aPntData = aDataSet->GetPointData();
-
-      for (int ind = 1; ind <= aMapIndex.Extent(); ind++) {
-        int anID = aMapIndex(ind);
-
-        switch (aType) {
-        case 0:
-          {
-           int aVTKID = anVISUActor->GetNodeVTKID(anID);
-           if(aVTKID >= 0){
-           if ( aVTKID >= 0 ) {
-             vtkFloatingPointType* aCoord = anVISUActor->GetNodeCoord(anID);
-             myXValLbl->setText( QString::number( aCoord[0] ) );
-             myYValLbl->setText( QString::number( aCoord[1] ) );
-             myZValLbl->setText( QString::number( aCoord[2] ) );
-             myIDValLbl->setText( QString::number( anID ) );
-             
-              if ( !VISU::IsElnoData( aDataSet ) ) {
-               myScalarValLbl->setText( getValue( aPntData, aVTKID ) );
-               myVectorValLbl->setText( getVector( aPntData, aVTKID ) );
-             } else {
-               myScalarValLbl->setText( "< ELNO data >" );
-               myVectorValLbl->setText( "< ELNO data >" );
-             }
-
-             const VISU::PIDMapper& aMapper = aPrs3d->GetPipeLine()->GetIDMapper();
-             VISU::TStructuredId aStructuredId = aMapper->GetIndexesOfNode( anID );
-             myKValLbl->setText( GetNumber( aStructuredId, 2 ) );
-             myJValLbl->setText( GetNumber( aStructuredId, 1 ) );
-             myIValLbl->setText( GetNumber( aStructuredId, 0 ) );
-            }
-          }
-          break;
-         }
-        case 1:
-          {
-            vtkCellData* aCellData = aDataSet->GetCellData();
-            vtkCell* aCell = anVISUActor->GetElemCell(anID);
-           int aVTKID = anVISUActor->GetElemVTKID(anID);
-            if (aCell != NULL) {
-              int aNbOfPoints = aCell->GetNumberOfPoints();
-              if ( aNbOfPoints > 0 ) {
-                myCellIDValLbl->setText( QString::number(anID) );
-                myCellScalarValLbl->setText(getValue(aCellData, aVTKID));
-                myCellVectorValLbl->setText(getVector(aCellData, aVTKID));
-
-                vtkIdList *aPointList = aCell->GetPointIds();
-                for (int i = 0; i < aNbOfPoints; i++) {
-                  int aNodeVTKId = aPointList->GetId(i);
-                  vtkFloatingPointType* aCoord = aDataSet->GetPoint(aNodeVTKId);
-                 vtkIdType aNodeObjId = anVISUActor->GetNodeObjId(aNodeVTKId);
-                 TCoordArray aCoordArray(aCoord, aCoord + 3);
-                  aPointCoordsMap[aNodeObjId] = aCoordArray;
-                }
-              }
-            }
-          }
-          break;
-        }
-      }
+//----------------------------------------------------------------------------
+struct TGetRepesentationFunctor: TViewFunctor
+{
+  QString
+  virtual
+  get(VISU::Prs3d_i* thePrs3d,
+      SVTK_ViewWindow* theViewWindow,
+      VISU_Actor* theActor)
+  {
+    QString aResStr;
+    switch (theActor->GetRepresentation()) {
+      ENUM2STRING( aResStr, VISU::POINT );
+      ENUM2STRING( aResStr, VISU::WIREFRAME );
+      ENUM2STRING( aResStr, VISU::SHADED );
+      ENUM2STRING( aResStr, VISU::INSIDEFRAME );
+      ENUM2STRING( aResStr, VISU::SURFACEFRAME );
+      ENUM2STRING( aResStr, VISU::FEATURE_EDGES );
+    }      
+    return aResStr;
+  }
+};
+
+QString VisuGUI_Selection::representation( const int ind ) const
+{
+  return TPopupDispatcher<TGetRepesentationFunctor>()(myModule, entry(ind));
+}
+
+//----------------------------------------------------------------------------
+SalomeApp_Study* VisuGUI_Selection::GetStudy() const
+  
+{
+  LightApp_Study* aLightStudy = const_cast<LightApp_Study*>( study() );
+  return dynamic_cast<SalomeApp_Study*>( aLightStudy );
+}
 
-      myListPoints->setRowCount(aPointCoordsMap.size());
-      TPointCoordsMap::const_iterator anIter = aPointCoordsMap.begin();
-
-      const VISU::PIDMapper& aMapper = aPrs3d->GetPipeLine()->GetIDMapper();
-      for (int i = 0; anIter != aPointCoordsMap.end() && i < myListPoints->rowCount(); anIter++, i++) {
-       myListPoints->model()->setHeaderData( i, Qt::Vertical, QVariant(QString::number( i )), Qt::DisplayRole );
-        vtkIdType aNodeObjId = anIter->first;
-       //ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
-       VISU::TStructuredId aStructuredId = aMapper->GetIndexesOfNode(aNodeObjId);
-       QString aI = GetNumber(aStructuredId, 0);
-       QString aJ = GetNumber(aStructuredId, 1);
-       QString aK = GetNumber(aStructuredId, 2);
-       //ENK: 23.11.2006
-
-       QAbstractItemModel* aModel = myListPoints->model();
-       aModel->setData( aModel->index(i,0), QVariant(QString::number( aNodeObjId )), Qt::DisplayRole );
-        const TCoordArray& aCoordArray = anIter->second;
-       aModel->setData( aModel->index(i,1), QVariant(QString::number( aCoordArray[0] )), Qt::DisplayRole );
-       aModel->setData( aModel->index(i,2), QVariant(QString::number( aCoordArray[1] )), Qt::DisplayRole );
-       aModel->setData( aModel->index(i,3), QVariant(QString::number( aCoordArray[2] )), Qt::DisplayRole );
-       aModel->setData( aModel->index(i,4), QVariant( aI ), Qt::DisplayRole );//ENK: 23.11.2006 - PAL13176
-       aModel->setData( aModel->index(i,5), QVariant( aJ ), Qt::DisplayRole );//ENK: 23.11.2006 - PAL13176
-       aModel->setData( aModel->index(i,6), QVariant( aK ), Qt::DisplayRole );//ENK: 23.11.2006 - PAL13176
-
-       vtkIdType aNodeVTKId = anVISUActor->GetNodeVTKID(aNodeObjId);
-       aModel->setData( aModel->index(i,7), QVariant(getValue(aPntData, aNodeVTKId)), Qt::DisplayRole );
-       aModel->setData( aModel->index(i,8), QVariant(getVector(aPntData, aNodeVTKId)), Qt::DisplayRole );
+//----------------------------------------------------------------------------
+int VisuGUI_Selection::nbChild( const int ind, const bool named ) const
+{
+  int cnt = 0;
+  SalomeApp_Study* aSStudy = GetStudy();
+  if ( !aSStudy )
+    return cnt;
+  _PTR(Study) aStudy =  GetCStudy( aSStudy );
+  if ( aStudy ){
+    _PTR(SObject) SO = aStudy->FindObjectID( (const char*)entry( ind ).toLatin1() );
+    if ( SO ){
+      for ( _PTR(ChildIterator) Iter = aStudy->NewChildIterator( SO ); Iter->More(); Iter->Next() ) {
+       _PTR(SObject) refSO;
+       if ( !Iter->Value()->ReferencedObject( refSO ) && ( !named || Iter->Value()->GetName().size() ) )
+         cnt++;
       }
-      //for(int aColumnId = 0; aColumnId < 9; aColumnId++)
-      myListPoints->resizeColumnsToContents();
     }
-  } else {
-    clearFields();
   }
-  myFl = false;
+  return cnt;
 }
-#undef ABS
-
-
-void VisuGUI_SelectionDlg::clearFields() {
-  int aType = myWidgetStack->indexOf(myWidgetStack->currentWidget());
-  switch (aType) {
-  case 0:
-    myXValLbl->setText( "" );
-    myYValLbl->setText( "" );
-    myZValLbl->setText( "" );
-    myIValLbl->setText( "-" );//ENK: 23.11.2006 - PAL13176
-    myJValLbl->setText( "-" );//ENK: 23.11.2006 - PAL13176
-    myKValLbl->setText( "-" );//ENK: 23.11.2006 - PAL13176
-    myScalarValLbl->setText("");
-    myVectorValLbl->setText("");
-    break;
-  case 1:
-    myCellScalarValLbl->setText("");
-    myCellVectorValLbl->setText("");
-    myListPoints->setRowCount(0);
-    break;
-  case 2:
-    myXPosLbl->setText("");
-    myYPosLbl->setText("");
-    myZPosLbl->setText("");
-    myDXLbl->setText("");
-    myDYLbl->setText("");
-    myDZLbl->setText("");
-  }
+
+//----------------------------------------------------------------------------
+QString VisuGUI_Selection::nbChildren( const int ind ) const
+{
+  QString aResStr;
+  aResStr.setNum( nbChild( ind, false ) );
+  return aResStr;
+}
+
+//----------------------------------------------------------------------------
+QString VisuGUI_Selection::nbNamedChildren( const int ind ) const
+{
+  QString aResStr;
+  aResStr.setNum( nbChild( ind, true ) );
+  return aResStr;
 }
 
-typedef  vtkIdType (VISU_PipeLine::* TGetVTKIdMethod)(vtkIdType theID);
 
-bool onIdEdit (const QString& theText,
-               TGetVTKIdMethod theMethod,
-               bool theIsCell,
-              const SalomeApp_Module* theModule,
-               QLabel* theMeshName,
-               QString theValue,
-               QLabel* theFieldName)
+//----------------------------------------------------------------------------
+struct TIsVisibleFunctor: TViewFunctor
 {
-  SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>(theModule);
-  if (!aViewWindow) 
-    return false;
-  SVTK_Selector* aSelector = aViewWindow->GetSelector();
-
-  _PTR(SObject) aSObject;
-  VISU::Prs3d_i* aPrs3d = NULL;
-  Handle(SALOME_InteractiveObject) anIO;
-
-  VISU::TSelectionInfo aSelectionInfo = VISU::GetSelectedObjects(theModule);
-  if(aSelectionInfo.size() == 1){
-    // Get selected SObject
-    VISU::TSelectionItem aSelectionItem = aSelectionInfo.front();
-    VISU::TObjectInfo anObjectInfo = aSelectionItem.myObjectInfo;
-    aPrs3d = GetPrs3dFromBase(anObjectInfo.myBase);
-    if(aPrs3d){
-      anIO = aSelectionItem.myIO;
-      aSObject = anObjectInfo.mySObject;
-    }
+  QString
+  virtual
+  get(VISU::Prs3d_i* thePrs3d,
+      SVTK_ViewWindow* theViewWindow,
+      VISU_Actor* theActor)
+  {
+    return theActor->GetVisibility() ? "true" : "false";
   }
-  if (aPrs3d) {
-    int anObjId = theText.toInt();
-    VISU_PipeLine* aPipeLine = aPrs3d->GetPipeLine();
-    int aVTKId = (aPipeLine->*theMethod)(anObjId);
-    if(aVTKId < 0)
-      return false;
-
-    TColStd_MapOfInteger newIndices;
-    newIndices.Add(anObjId);
-    aSelector->AddOrRemoveIndex(anIO, newIndices, false);
-    aViewWindow->highlight(anIO, true, true);
-
-    return true;
-
-  } else {
-    theMeshName->setText(theValue);
-    theFieldName->setText("");
+};
+
+QString VisuGUI_Selection::isVisible( const int ind ) const
+{
+  return TPopupDispatcher<TIsVisibleFunctor>()(myModule, entry(ind));
+}
+
+
+//----------------------------------------------------------------------------
+struct TIsShrunkFunctor: TViewFunctor
+{
+  QString
+  virtual
+  get(VISU::Prs3d_i* thePrs3d,
+      SVTK_ViewWindow* theViewWindow,
+      VISU_Actor* theActor)
+  {
+    return theActor->IsShrunk() ? "1" : "0";
   }
-  return false;
+};
+
+QString VisuGUI_Selection::isShrunk( const int ind ) const
+{
+  return TPopupDispatcher<TIsShrunkFunctor>()(myModule, entry(ind));
 }
 
-void VisuGUI_SelectionDlg::onPointIdEdit (const QString& theText)
-{
-  if (myFl) return;
-  TGetVTKIdMethod aMethod = &VISU_PipeLine::GetNodeVTKID;
-  bool anIsSelected = onIdEdit(theText,
-                              aMethod,
-                              false,
-                              myModule,
-                              myMeshName,
-                              tr("WRN_NO_AVAILABLE_DATA"),
-                              myFieldName);
-  if (anIsSelected)
-    // as selection manager doesn't send signal currentSelectionChanged()
-    onSelectionEvent();
-  else
-    clearFields();
+
+//----------------------------------------------------------------------------
+QString VisuGUI_Selection::hasActor( const int ind ) const
+{
+  return representation( ind ).isEmpty() ? "0" : "1";
 }
 
-void VisuGUI_SelectionDlg::onCellIdEdit (const QString& theText)
-{
-  if (myFl) return;
-  TGetVTKIdMethod aMethod = &VISU_PipeLine::GetElemVTKID;
-  bool anIsSelected = onIdEdit(theText,
-                              aMethod,
-                              true,
-                              myModule,
-                              myMeshName,
-                              tr("WRN_NO_AVAILABLE_DATA"),
-                              myFieldName);
-  if (anIsSelected)
-    // as selection manager doesn't send signal currentSelectionChanged()
-    onSelectionEvent();
-  else
-    clearFields();
+
+//----------------------------------------------------------------------------
+struct TIsShadingFunctor: TViewFunctor
+{
+  QString
+  virtual
+  get(VISU::Prs3d_i* thePrs3d,
+      SVTK_ViewWindow* theViewWindow,
+      VISU_Actor* theActor)
+  {
+    if(VISU_ScalarMapAct* anActor = dynamic_cast<VISU_ScalarMapAct*>(theActor))
+      return anActor->IsShading() ? "1" : "0";
+    return QString();
+  }
+};
+
+QString VisuGUI_Selection::isShading( const int ind ) const
+{
+  return TPopupDispatcher<TIsShadingFunctor>()(myModule, entry(ind));
 }
 
-void VisuGUI_SelectionDlg::onHelp()
-{
-  QString aHelpFileName = "selection_info_page.html";
-  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
-  if (app)
-    app->onHelpContextModule(myModule ? app->moduleName(myModule->moduleName()) : QString(""), aHelpFileName);
-  else {
-    QString platform;
-#ifdef WIN32
-    platform = "winapplication";
-#else
-    platform = "application";
-#endif
-    SUIT_MessageBox::warning(0, QObject::tr("WRN_WARNING"),
-                             QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                             arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName) );
+
+//----------------------------------------------------------------------------
+struct TIsScalarMapActFunctor: TViewFunctor
+{
+  QString
+  virtual
+  get(VISU::Prs3d_i* thePrs3d,
+      SVTK_ViewWindow* theViewWindow,
+      VISU_Actor* theActor)
+  {
+    return dynamic_cast<VISU_ScalarMapAct*>(theActor)? "1" : "0";
   }
+};
+
+
+//---------------------------------------------------------------
+QString VisuGUI_Selection::isScalarMapAct( const int ind ) const
+{
+  return TPopupDispatcher<TIsScalarMapActFunctor>()(myModule, entry(ind));
 }
 
-void VisuGUI_SelectionDlg::keyPressEvent( QKeyEvent* e )
+
+//----------------------------------------------------------------------------
+bool VisuGUI_Selection::isVisuComponent( const int ind ) const
 {
-  QDialog::keyPressEvent( e );
-  if ( e->isAccepted() )
-    return;
+  SalomeApp_Study* study = GetStudy();
+  if ( !study )
+    return false;
+  
+  _PTR(SObject) obj = study->studyDS()->FindObjectID( (const char*)entry( ind ).toLatin1() );
+  if ( !obj )
+    return false;
+  CORBA::Object_var anObj = VISU::ClientSObjectToObject( obj );
+  if( CORBA::is_nil( anObj ) )
+    return false;
 
-  if ( e->key() == Qt::Key_F1 )
-    {
-      e->accept();
-      onHelp();
-    }
+  return dynamic_cast<VISU::VISU_Gen_i*>( VISU::GetServant( anObj ).in() );
 }
+
+//----------------------------------------------------------------------------
+struct TIsValuesLabeled : TViewFunctor
+{
+  QString
+  virtual
+  get(VISU::Prs3d_i* thePrs3d,
+      SVTK_ViewWindow* theViewWindow,
+      VISU_Actor* theActor)
+  {
+    return theActor && theActor->GetValuesLabeled() ? "true" : "false";
+  }
+};
+
+QString VisuGUI_Selection::isValuesLabeled( const int ind ) const
+{
+  return TPopupDispatcher<TIsValuesLabeled>()(myModule, entry(ind));
+}
+
index 0e6d2de1ee8be013a8d0be274b818b01b6e583be..2dcaf666a03226285a2eb565068c6c68cbaf5f9f 100644 (file)
@@ -1,6 +1,6 @@
 //  VISU VISUGUI : GUI of VISU component
 //
-//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  Copyright (C) 2005  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 
 //
 //
 //  File   : VisuGUI_Selection.h
-//  Author : Laurent CORNABE & Hubert ROLLAND 
+//  Author : Sergey Anikin 
 //  Module : VISU
-//  $Header$
 
 #ifndef VisuGUI_Selection_HeaderFile
 #define VisuGUI_Selection_HeaderFile
 
-#include <QDialog>
+#include <LightApp_Selection.h>
 
-class QLabel;
-class QStackedWidget;
-//class QVBox;
-class QLineEdit;
-class QTableWidget;
-class LightApp_SelectionMgr;
-class SalomeApp_Application;
-class SalomeApp_Module;
+//////////////////////////////////////////////////
+// Class: VisuGUI_Selection
+//////////////////////////////////////////////////
 
-class VisuGUI_SelectionDlg: public QDialog {
-  Q_OBJECT
+class SalomeApp_Module;
+class SalomeApp_Study;
 
+class VisuGUI_Selection : public LightApp_Selection
+{
 public:
-  VisuGUI_SelectionDlg (const SalomeApp_Module* theModule);
-  virtual ~VisuGUI_SelectionDlg ();
-
-private:
-  void keyPressEvent( QKeyEvent* e );
-
-protected:
-  void closeEvent (QCloseEvent* theEvent);
-
-private slots:
-  void onSelectionChange (int theId);
-  void onSelectionEvent ();
-  void onPointIdEdit (const QString& theText);
-  void onCellIdEdit (const QString& theText);
-  void onHelp();
+  VisuGUI_Selection( SalomeApp_Module* theModule )
+    : LightApp_Selection(), myModule( theModule ) {};
+  virtual ~VisuGUI_Selection() {};
 
- private:
-  void clearFields ();
+  virtual QVariant parameter( const int, const QString& ) const;
 
-  QLabel* myMeshName;
-  QLabel* myFieldName;
-
-  QStackedWidget* myWidgetStack;
-  QWidget* myPointsPane;
-  QWidget* myCellsPane;
-  QLabel* myXValLbl;
-  QLabel* myYValLbl;
-  QLabel* myZValLbl;
-  //ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
-  QLabel* myIValLbl; //!< used for structured mesh selection
-  QLabel* myJValLbl; //!< used for structured mesh selection
-  QLabel* myKValLbl; //!< used for structured mesh selection
-  //ENK: 23.11.2006
-
-  QLineEdit* myIDValLbl;
-  QLabel* myScalarValLbl;
-  QLabel* myVectorValLbl;
+private:
+  QString          type( const int ) const;
+  QString          nbComponents( const int ) const;
+  QString          medEntity( const int ) const;
+  QString          medSource( const int ) const;
+  QString          nbTimeStamps( const int ) const;
+  QString          representation( const int ) const;
+  QString          nbChildren( const int ) const;
+  QString          nbNamedChildren( const int ) const;
+  QString          isVisible( const int ) const;
+  QString          isShrunk( const int ) const;
+  QString          hasActor( const int ) const;
+  QString          isShading( const int ) const;
+  QString          isScalarMapAct( const int ) const;
+  bool             isVisuComponent( const int ) const;
+  QString          isValuesLabeled( const int ) const;
+
+  QString          fullResolution( const int ) const;
+  QString          mediumResolution( const int ) const;
+  QString          lowResolution( const int ) const;
+  QString          resolutionState( const int ) const;
 
-  QTableWidget* myListPoints;
-  QLineEdit* myCellIDValLbl;
-  QLabel* myCellScalarValLbl;
-  QLabel* myCellVectorValLbl;
+private:
+  int              nbChild( const int, const bool ) const;
+  SalomeApp_Study* GetStudy() const;
 
-  QWidget* myActorsPane;
-  QLabel* myXPosLbl;
-  QLabel* myYPosLbl;
-  QLabel* myZPosLbl;
-  QLabel* myDXLbl;
-  QLabel* myDYLbl;
-  QLabel* myDZLbl;
+  QString          resolutions( const int ) const;
+  QString          resolution( const int, char theResoltuion ) const;
 
-  const SalomeApp_Module* myModule;
-  LightApp_SelectionMgr* mySelectionMgr;
-  bool myFl;
+private:
+  SalomeApp_Module* myModule;
 };
 
 #endif
index 64379d60b13ed6b4b51d360e32eef9e76f4364e1..8db0a28c687a87b72abcef62bca50316af35a780 100644 (file)
 
 #include "VISU_Actor.h"
 
-#include "VVTK_MainWindow.h"
-#include "VVTK_ViewWindow.h"
-
 #include "VISU_Gen_i.hh"
-#include "VisuGUI_Module.h"
+#include "VisuGUI.h"
 #include "VisuGUI_Tools.h"
 #include "VisuGUI_Prs3dTools.h"
 
 #include "VTKViewer_Algorithm.h"
 #include "SVTK_Functor.h"
 
+#include "QtxDockWidget.h"
+#include "QtxDoubleSpinBox.h"
+
 #include <vtkActorCollection.h>
 #include <vtkRenderer.h>
 
+#include <QMainWindow>
 #include <QComboBox>
 #include <QFont>
 #include <QLabel>
 #include <QToolTip>
 #include <QSlider>
 #include <QSpinBox>
+#include <QGroupBox>
+#include <QCheckBox>
+#include <QRadioButton>
 #include <QTimer>
+#include <QAction>
+
+using namespace std;
 
 /*!
   Constructor
 */
-VisuGUI_Slider::VisuGUI_Slider( VisuGUI_Module* theModule, 
-                               VVTK_ViewWindow* theViewWindow,
+VisuGUI_Slider::VisuGUI_Slider( VisuGUI* theModule, 
+                               QMainWindow* theParent,
                                LightApp_SelectionMgr* theSelectionMgr )
-  : QtxToolBar( tr("TOOLBAR_TITLE"), theViewWindow->getMainWindow1() ),
-    myModule( theModule ),
-    myMainWindow( theViewWindow->getMainWindow1() ),
-    mySelectionMgr( theSelectionMgr )
+  : QWidget( theParent )
+  , myViewManager( VISU::GetVisuGen( theModule )->GetViewManager() )
+  , mySelectionMgr( theSelectionMgr )
+  , myModule( theModule )
 {
-  //setLabel();
-  //setCloseMode(QDockWindow::Undocked);
-  setMovable( true );
-
-  VISU::ViewManager_var aViewManager = VISU::GetVisuGen( myModule )->GetViewManager();
-  VISU::View_var aView = aViewManager->GetCurrentView();
-  if(!CORBA::is_nil(aView.in()))
-    myView3D = VISU::View3D::_narrow(aView);
+  setWindowTitle( tr("TITLE") );
+  setObjectName( tr("TITLE") );
 
   SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
 
-  //setHorizontallyStretchable( true );
-
-  QWidget* aWidget = new QWidget( this );
-  aWidget->setFocusPolicy(Qt::StrongFocus);
-  myWidgetAction = addWidget( aWidget );
-
-  QGridLayout* aLayout = new QGridLayout( aWidget );
-  aLayout->setMargin( 11 );
-  aLayout->setSpacing( 6 );
-
-  // Slider and time stamps
-  myFirstTimeStamp = new QLabel( aWidget );
-  myFirstTimeStamp->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
-  aLayout->addWidget( myFirstTimeStamp, 0, 0, Qt::AlignHCenter );
-
-  mySlider = new QSlider( aWidget );
-  mySlider->setMinimum( 0 );
-  mySlider->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
-  mySlider->setOrientation( Qt::Horizontal );
-  mySlider->setTracking( false );
-  mySlider->setFocusPolicy(Qt::StrongFocus);
-  aLayout->addWidget( mySlider, 0, 1, 1, 8 );
-
-  myLastTimeStamp = new QLabel( aWidget );
-  myLastTimeStamp->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
-  aLayout->addWidget( myLastTimeStamp, 0, 9, Qt::AlignHCenter );
-
-  myTimeStampsNumber = new QLabel( aWidget );
-  myTimeStampsNumber->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
-  aLayout->addWidget( myTimeStampsNumber, 0, 10, Qt::AlignHCenter );
-
-  QLabel* aCacheMemoryLabel = new QLabel( tr( "CACHE_MEMORY" ), aWidget );
-  aCacheMemoryLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
-  aLayout->addWidget( aCacheMemoryLabel, 0, 11 );
-
-  myCacheMemory = new QLabel( aWidget );
-  myCacheMemory->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
-  QFontMetrics fm( myCacheMemory->font() );
-  myCacheMemory->setFixedWidth( fm.width( "9.99E+99 Mb" ) );
-
-  aLayout->addWidget( myCacheMemory, 0, 12 );
-
-  // Buttons
-#ifdef ENABLE_AVI_AND_MORE_BUTTONS
-  myMoreButton = new QToolButton( aWidget );
-  myMoreButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
-  myMoreButton->setEnabled( false );
-  myMoreButton->setCheckble( true );
-  myMoreButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_MORE" ) ) );
-  QToolTip::add( myMoreButton, tr( "MORE" ) );
-  aLayout->addWidget( myMoreButton, 1, 0 );
-
-  myAVIButton = new QToolButton( aWidget );
-  myAVIButton->setEnabled( false );
-  myAVIButton->setCheckble( true );
-  myAVIButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_AVI" ) ) );
-  QToolTip::add( myAVIButton, tr( "AVI" ) );
-  aLayout->addWidget( myAVIButton, 1, 1 );
-#endif
-
-  aLayout->addItem( new QSpacerItem( 24, 24, QSizePolicy::Expanding, QSizePolicy::Minimum ), 1, 2 );
-
-  myFirstButton = new QToolButton( aWidget );
-  myFirstButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_FIRST" ) ) );
-  aLayout->addWidget( myFirstButton, 1, 3 );
-
-  myPreviousButton = new QToolButton( aWidget );
-  myPreviousButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PREVIOUS" ) ) );
-  aLayout->addWidget( myPreviousButton, 1, 4 );
-
-  myPlayButton = new QToolButton( aWidget );
-  myPlayButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PLAY" ) ) );
-  myPlayButton->setCheckable( true );
-  aLayout->addWidget( myPlayButton, 1, 5 );
-
-  myNextButton = new QToolButton( aWidget );
-  myNextButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_NEXT" ) ) );
-  aLayout->addWidget( myNextButton, 1, 6 );
-
-  myLastButton = new QToolButton( aWidget );
-  myLastButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_LAST" ) ) );
-  aLayout->addWidget( myLastButton, 1, 7 );
-
-  aLayout->addItem( new QSpacerItem( 24, 24, QSizePolicy::Expanding, QSizePolicy::Minimum ), 1, 8 );
-
-  myTimeStampStrings = new QComboBox( aWidget );
-  myTimeStampStrings->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
-  myTimeStampStrings->setFocusPolicy(Qt::StrongFocus);
-  aLayout->addWidget( myTimeStampStrings, 1, 9 );
-
-  myTimeStampIndices = new QComboBox( aWidget );
-  myTimeStampIndices->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
-  myTimeStampIndices->setFocusPolicy(Qt::StrongFocus);
-  aLayout->addWidget( myTimeStampIndices, 1, 10 );
-
-  // Speed
-  QLabel* aSpeedLabel = new QLabel( tr( "SPEED" ), aWidget );
-  aSpeedLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
-  aLayout->addWidget( aSpeedLabel, 1, 11 );
-
-  mySpeedBox = new QSpinBox( aWidget );
-  mySpeedBox->setMinimum( 1 );
-  mySpeedBox->setMaximum( 100 );
-  mySpeedBox->setSingleStep( 1 );
-  mySpeedBox->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
-  mySpeedBox->setFocusPolicy(Qt::StrongFocus);
-  mySpeedBox->setValue( 50 );
-  aLayout->addWidget( mySpeedBox, 1, 12 );
+  //----------------------------------------------------------------------------
+  QVBoxLayout* aVBoxLayout = new QVBoxLayout( this );
+
+  QTabWidget* aTabWidget = new QTabWidget( this );
+  aTabWidget->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed );
+
+  aVBoxLayout->addWidget( aTabWidget );
+
+  {
+    QWidget* aParent = new QWidget();
+    {
+      QGridLayout* aGridLayout = new QGridLayout( aParent );
+      {
+       myFirstTimeStamp = new QLabel( aParent );
+       myFirstTimeStamp->setAlignment( Qt::AlignRight | Qt::AlignTrailing | Qt::AlignVCenter );
+       myFirstTimeStamp->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+       aGridLayout->addWidget( myFirstTimeStamp, 0, 0, 1, 1 );
+       
+       mySlider = new QSlider( aParent );
+       mySlider->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
+       mySlider->setFocusPolicy( Qt::StrongFocus );
+       mySlider->setOrientation( Qt::Horizontal );
+       mySlider->setTracking( false );
+       mySlider->setMinimum( 0 );
+       aGridLayout->addWidget( mySlider, 0, 1, 1, 3 );
+       
+       myLastTimeStamp = new QLabel( aParent );
+       aGridLayout->addWidget( myLastTimeStamp, 0, 4, 1, 1 );
+      }     
+      {
+       myFirstButton = new QToolButton( aParent );
+       myFirstButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_FIRST" ) ) );
+       myFirstButton->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
+       aGridLayout->addWidget( myFirstButton, 1, 0, 1, 1 );
+
+       myPreviousButton = new QToolButton( aParent );
+       myPreviousButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PREVIOUS" ) ) );
+       myPreviousButton->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
+       aGridLayout->addWidget( myPreviousButton, 1, 1, 1, 1 );
+
+       myPlayButton = new QToolButton( aParent );
+       myPlayButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PLAY" ) ) );
+       myPlayButton->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
+       myPlayButton->setCheckable( true );
+       aGridLayout->addWidget( myPlayButton, 1, 2, 1, 1 );
+
+       myNextButton = new QToolButton( aParent );
+       myNextButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_NEXT" ) ) );
+       myNextButton->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
+       aGridLayout->addWidget( myNextButton, 1, 3, 1, 1 );
+
+       myLastButton = new QToolButton( aParent );
+       myLastButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_LAST" ) ) );
+       myLastButton->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
+       aGridLayout->addWidget( myLastButton, 1, 4, 1, 1 );
+      }
+      {
+       myTimeStampIndexes = new QComboBox( aParent );
+       myTimeStampIndexes->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
+       myTimeStampIndexes->setFocusPolicy( Qt::StrongFocus );
+       aGridLayout->addWidget( myTimeStampIndexes, 2, 0, 1, 2 );
+
+       myIsCycled = new QToolButton( aParent );
+       myIsCycled->setText( tr( "IS_CYCLED" ) );
+       myIsCycled->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
+       myIsCycled->setLayoutDirection( Qt::LeftToRight );
+       myIsCycled->setCheckable( true );
+       //myIsCycled->setEnabled( false );
+       aGridLayout->addWidget( myIsCycled, 2, 2, 1, 1 );
+
+       myTimeStampStrings = new QComboBox( aParent );
+       myTimeStampStrings->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
+       myTimeStampStrings->setFocusPolicy( Qt::StrongFocus );
+       aGridLayout->addWidget( myTimeStampStrings, 2, 3, 1, 2 );
+      }
+    }
+
+    aTabWidget->addTab( aParent, tr( "NAVIGATION_TAB" ) );
+    myPlayTab = aParent;
+  }
+
+  {
+    QWidget* aParent = new QWidget();
+    {
+      QVBoxLayout* aVBoxLayout = new QVBoxLayout( aParent );
+      {
+       QHBoxLayout* aHBoxLayout = new QHBoxLayout();
+       
+       myMinimalMemoryButton = new QRadioButton( tr( "MINIMAL_MEMORY" ), aParent );
+       aHBoxLayout->addWidget( myMinimalMemoryButton );        
+
+       QSpacerItem* aSpacerItem = new QSpacerItem( 16, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );     
+       aHBoxLayout->addItem( aSpacerItem );
+
+       myLimitedMemoryButton = new QRadioButton( tr( "LIMITED_MEMORY" ), aParent );
+       myLimitedMemoryButton->setChecked( true );
+       aHBoxLayout->addWidget( myLimitedMemoryButton );
+       
+       myLimitedMemory = new QtxDoubleSpinBox( aParent );
+       myLimitedMemory->setMaximum( 10000 );
+       myLimitedMemory->setValue( 512 );
+       aHBoxLayout->addWidget( myLimitedMemory );
+       
+       QLabel* aMemoryDimensionLabel = new QLabel( aParent );
+       aMemoryDimensionLabel->setText( tr( "MEMORY_UNITS" ) );
+       aHBoxLayout->addWidget( aMemoryDimensionLabel );
+       
+       aVBoxLayout->addLayout( aHBoxLayout );
+      }
+      {
+       QHBoxLayout* aHBoxLayout = new QHBoxLayout();
+           
+       QLabel* aUsedMemoryLabel = new QLabel( tr( "USED_BY_CACHE" ), aParent );
+       aUsedMemoryLabel->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+       aHBoxLayout->addWidget( aUsedMemoryLabel );
+       
+       myUsedMemory = new QLineEdit( aParent );
+       myUsedMemory->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed );
+       //myUsedMemory->setEnabled( false );
+       aHBoxLayout->addWidget( myUsedMemory );
+           
+       QSpacerItem* aSpacerItem = new QSpacerItem( 16, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );     
+       aHBoxLayout->addItem( aSpacerItem );
+
+       QLabel* aFreeMemoryLabel = new QLabel( tr( "AVAILABLE_MEMORY" ), aParent );
+       aHBoxLayout->addWidget( aFreeMemoryLabel );
+    
+       myFreeMemory = new QLineEdit( aParent );
+       myFreeMemory->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed );
+       //myFreeMemory->setEnabled( false );
+       aHBoxLayout->addWidget( myFreeMemory );
+
+       aVBoxLayout->addLayout( aHBoxLayout );
+      }
+      {
+       QHBoxLayout* aHBoxLayout = new QHBoxLayout();
+       
+       QLabel* aLabel = new QLabel( tr( "SPEED" ), aParent );
+       aLabel->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+       aHBoxLayout->addWidget( aLabel );   
+      
+       mySpeedSlider = new QSlider( aParent );
+       mySpeedSlider->setMinimum( 1 );
+       mySpeedSlider->setMaximum( 100 );
+       mySpeedSlider->setValue( mySpeedSlider->maximum() / 2 );
+       mySpeedSlider->setPageStep( mySpeedSlider->maximum() / 5 );
+       mySpeedSlider->setTickInterval( mySpeedSlider->pageStep() );    
+       mySpeedSlider->setOrientation( Qt::Horizontal );
+       mySpeedSlider->setTickPosition( QSlider::TicksBelow );
+       aHBoxLayout->addWidget( mySpeedSlider );   
+       
+       aVBoxLayout->addLayout( aHBoxLayout );
+      }
+      
+      aTabWidget->addTab( aParent, tr( "PROPERTIES_TAB" ) );
+    }
+  }
+
+  {
+    QSpacerItem* aSpacerItem = new QSpacerItem( 16, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
+    aVBoxLayout->addItem( aSpacerItem );
+  }
+
+
+  //----------------------------------------------------------------------------
+  myPlayPixmap = aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PLAY" ) );
+  myPausePixmap = aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PAUSE" ) );
 
   myTimer = new QTimer( this );
 
   // Common
+  connect( theModule, SIGNAL( moduleDeactivated() ), SLOT( onModuleDeactivated() ) );
+
+  connect( theModule, SIGNAL( moduleActivated() ), SLOT( onModuleActivated() ) );
+
   connect( mySelectionMgr, SIGNAL( currentSelectionChanged() ), SLOT( onSelectionChanged() ) );
 
   connect( myTimeStampStrings, SIGNAL( activated( int ) ),    SLOT( onTimeStampActivated( int ) ) );
-  connect( myTimeStampIndices, SIGNAL( activated( int ) ),    SLOT( onTimeStampActivated( int ) ) );
+  connect( myTimeStampIndexes, SIGNAL( activated( int ) ),    SLOT( onTimeStampActivated( int ) ) );
 
   connect( myFirstButton,      SIGNAL( clicked() ),           SLOT( onFirst() ) );
   connect( myPreviousButton,   SIGNAL( clicked() ),           SLOT( onPrevious() ) );
@@ -213,22 +277,85 @@ VisuGUI_Slider::VisuGUI_Slider( VisuGUI_Module* theModule,
 
   connect( mySlider,           SIGNAL( valueChanged( int ) ), SLOT( onValueChanged( int ) ) );
 
-  connect( mySpeedBox,         SIGNAL( valueChanged( int ) ), SLOT( onSpeedChanged( int ) ) );
+  connect( mySpeedSlider,      SIGNAL( valueChanged( int ) ), SLOT( onSpeedChanged( int ) ) );
 
   connect( myTimer,            SIGNAL( timeout() ),           SLOT( onTimeout() ) );
 
+  //----------------------------------------------------------------------------
+  connect( myLimitedMemoryButton, SIGNAL( toggled( bool ) ), this, SLOT( onMemoryModeChanged( bool ) ) );
+  connect( myLimitedMemory, SIGNAL( valueChanged( double ) ), this, SLOT( onMemorySizeChanged( double ) ) );
+
+  //----------------------------------------------------------------------------
   enableControls( false );
 
-  myMainWindow->addToolBar( Qt::BottomToolBarArea, this );
+  QtxDockWidget* aQtxDockWidget = new QtxDockWidget( true, theParent );
+  theParent->addDockWidget( Qt::BottomDockWidgetArea , aQtxDockWidget );
+  aQtxDockWidget->setObjectName( objectName() );
+  aQtxDockWidget->setWidget( this );
+  
+  myToggleViewAction = aQtxDockWidget->toggleViewAction();
+  myToggleViewAction->setIcon( QIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PANEL" ) ) ) );
+  myToggleViewAction->setToolTip( tr( "MEN_SLIDER_PANE" ) );
+  myToggleViewAction->setText( tr( "MEN_SLIDER_PANE" ) );
+  myToggleViewAction->setCheckable( true );
+  aQtxDockWidget->setVisible( false );
+
+  connect( myToggleViewAction, SIGNAL( toggled( bool ) ), this, SLOT( onToggleView( bool ) ) );
 }
 
-/*!
-  Destructor
-*/
+
+//----------------------------------------------------------------------------
 VisuGUI_Slider::~VisuGUI_Slider()
 {
 }
 
+
+//----------------------------------------------------------------------------
+QAction* VisuGUI_Slider::toggleViewAction()
+{
+  return myToggleViewAction;
+}
+
+
+//----------------------------------------------------------------------------
+void VisuGUI_Slider::onModuleDeactivated()
+{
+  setHidden( true );
+}
+
+
+//----------------------------------------------------------------------------
+void VisuGUI_Slider::onModuleActivated()
+{
+  setHidden( false );
+}
+
+
+//----------------------------------------------------------------------------
+void VisuGUI_Slider::onMemoryModeChanged( bool )
+{
+  using namespace VISU;
+  SALOMEDS::Study_var aStudy = GetDSStudy( GetCStudy( GetAppStudy( myModule ) ) );
+  VISU::ColoredPrs3dCache_var aCache = GetVisuGen( myModule )->GetColoredPrs3dCache( aStudy );
+
+  if ( myLimitedMemoryButton->isChecked() ) {
+    aCache->SetMemoryMode( VISU::ColoredPrs3dCache::LIMITED );
+    aCache->SetLimitedMemory( myLimitedMemory->value() );
+  } else
+    aCache->SetMemoryMode( VISU::ColoredPrs3dCache::MINIMAL );
+
+  myLimitedMemory->setEnabled( myLimitedMemoryButton->isChecked() );
+}
+
+
+//----------------------------------------------------------------------------
+void VisuGUI_Slider::onMemorySizeChanged( double )
+{
+  onMemoryModeChanged( myLimitedMemoryButton->isChecked() );
+}
+
+
+//----------------------------------------------------------------------------
 bool VisuGUI_Slider::checkHolderList()
 {
   THolderList aHolderList;
@@ -243,16 +370,19 @@ bool VisuGUI_Slider::checkHolderList()
   return myHolderList.empty();
 }
 
+
+//----------------------------------------------------------------------------
 void VisuGUI_Slider::enableControls( bool on )
 {
-  widgetForAction( myWidgetAction  )->setEnabled( on );
+  myPlayTab->setEnabled( on );
+
   if( on )
   {
     if( checkHolderList() )
       return;
 
     myTimeStampStrings->clear();
-    myTimeStampIndices->clear();
+    myTimeStampIndexes->clear();
 
     VISU::ColoredPrs3dHolder_var aHolder = myHolderList.front();
 
@@ -264,7 +394,6 @@ void VisuGUI_Slider::enableControls( bool on )
 
     myFirstTimeStamp->setText( aTimeStampsRange[0].myTime.in() );
     myLastTimeStamp->setText( aTimeStampsRange[aLength-1].myTime.in() );
-    myTimeStampsNumber->setText( QString("(") + QString::number( aLength ) + ")" );
 
     int aPageStep = aLength / 10;
     aPageStep = std::max(aPageStep, 1);
@@ -278,7 +407,7 @@ void VisuGUI_Slider::enableControls( bool on )
       QString aTime = anInfo.myTime.in();
 
       myTimeStampStrings->addItem( aTime );
-      myTimeStampIndices->addItem( QString::number( aNumber ) );
+      myTimeStampIndexes->addItem( QString::number( aNumber ) );
 
       if( aNumber == aTimeStampNumber )
        a_current_index = an_index;
@@ -287,18 +416,31 @@ void VisuGUI_Slider::enableControls( bool on )
     myTimeStampStrings->setFont(myTimeStampStrings->font());
     myTimeStampStrings->updateGeometry();
     
-    myTimeStampIndices->setFont(myTimeStampStrings->font());
-    myTimeStampIndices->updateGeometry();
+    myTimeStampIndexes->setFont(myTimeStampStrings->font());
+    myTimeStampIndexes->updateGeometry();
 
     if( a_current_index > mySlider->maximum() )
       mySlider->setMaximum( aLength-1 );
 
     myTimeStampStrings->setCurrentIndex( a_current_index );
-    myTimeStampIndices->setCurrentIndex( a_current_index );
+    myTimeStampIndexes->setCurrentIndex( a_current_index );
     mySlider->setValue( a_current_index );
 
     if( a_current_index <= mySlider->maximum() )
       mySlider->setMaximum( aLength-1 );
+
+    using namespace VISU;
+    SALOMEDS::Study_var aStudy = GetDSStudy( GetCStudy( GetAppStudy( myModule ) ) );
+    VISU::ColoredPrs3dCache_var aCache = GetVisuGen( myModule )->GetColoredPrs3dCache( aStudy );
+
+    long aMb = 1024 * 1024;
+    double aLimitedMemory = aCache->GetLimitedMemory();
+    myLimitedMemory->setValue( aLimitedMemory );
+
+    double aFreeMemory = (double)VISU_PipeLine::GetAvailableMemory( 2048 * aMb ) / (double)aMb;
+    double anUsedMemory = aCache->GetMemorySize();
+    double aLimitedMemoryMax = max( anUsedMemory + aFreeMemory, aLimitedMemory );
+    myLimitedMemory->setMaximum( aLimitedMemoryMax );
   }
   else
   {
@@ -307,18 +449,31 @@ void VisuGUI_Slider::enableControls( bool on )
 
 }
 
+
+//----------------------------------------------------------------------------
 void VisuGUI_Slider::updateMemoryState()
 {
   if( checkHolderList() )
     return;
 
   VISU::ColoredPrs3dHolder_var aHolder = myHolderList.front();
-
   VISU::ColoredPrs3dCache_var aCache = aHolder->GetCache();
+
   CORBA::Float aCacheMemory = aCache->GetMemorySize();
-  myCacheMemory->setText( QString::number( double( aCacheMemory ), 'E', 2 ) + " Mb" );
+  myUsedMemory->setText( QString::number( double( aCacheMemory ), 'E', 2 ) + " Mb" );
+  myUsedMemory->setFont( myUsedMemory->font() );
+  myUsedMemory->updateGeometry();
+    
+
+  long aMb = 1024 * 1024;
+  double aFreeMemory = (double)VISU_PipeLine::GetAvailableMemory( 2048 * aMb ) / (double)aMb;
+  myFreeMemory->setText( QString::number( double( aFreeMemory ), 'E', 2 ) + " Mb" );
+  myFreeMemory->setFont( myFreeMemory->font() );
+  myFreeMemory->updateGeometry();
 }
 
+
+//----------------------------------------------------------------------------
 void VisuGUI_Slider::onSelectionChanged()
 {
   //cout << "VisuGUI_Slider::onSelectionChanged()" << endl;
@@ -354,22 +509,31 @@ void VisuGUI_Slider::onSelectionChanged()
     }
   }
 
-  enableControls( !checkHolderList() );
+  VISU::View_var aView = myViewManager->GetCurrentView();
+
+  enableControls( !checkHolderList() && !CORBA::is_nil( aView.in() ) );
+
   updateMemoryState();
 }
 
+
+//----------------------------------------------------------------------------
 void VisuGUI_Slider::onTimeStampActivated( int value )
 {
   mySlider->setValue( value );
   onValueChanged( value );
 }
 
+
+//----------------------------------------------------------------------------
 void VisuGUI_Slider::onFirst()
 {
   int value = mySlider->minimum();
   mySlider->setValue( value );
 }
 
+
+//----------------------------------------------------------------------------
 void VisuGUI_Slider::onPrevious()
 {
   int value = mySlider->value() - 1;
@@ -377,23 +541,35 @@ void VisuGUI_Slider::onPrevious()
     mySlider->setValue( value );
 }
 
+
+//----------------------------------------------------------------------------
 void VisuGUI_Slider::onPlay( bool on )
 {
-  SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
   if( on )
   {
-    myPlayButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PAUSE" ) ) );
+    myPlayButton->setIcon( myPausePixmap );
 
-    int delay = int(5000.0 / double(mySpeedBox->value()));
+    int delay = int( 50.0 * mySpeedSlider->maximum() / mySpeedSlider->value() );
     myTimer->start( delay );
   }
   else
   {
     myTimer->stop();
-    myPlayButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PLAY" ) ) );
+    myPlayButton->setIcon( myPlayPixmap );
+  }
+}
+
+
+//----------------------------------------------------------------------------
+void VisuGUI_Slider::onToggleView( bool on )
+{
+  if ( !on ) {
+    onPlay( on );
   }
 }
 
+
+//----------------------------------------------------------------------------
 void VisuGUI_Slider::onNext()
 {
   int value = mySlider->value() + 1;
@@ -401,34 +577,46 @@ void VisuGUI_Slider::onNext()
     mySlider->setValue( value );
 }
 
+
+//----------------------------------------------------------------------------
 void VisuGUI_Slider::onLast()
 {
   int value = mySlider->maximum();
   mySlider->setValue( value );
 }
 
+
+//----------------------------------------------------------------------------
 void VisuGUI_Slider::onValueChanged( int value )
 {
-  if( checkHolderList() ){
+  if ( checkHolderList() ) {
     enableControls( false );
     return;
   }
 
   myTimeStampStrings->setCurrentIndex( value );
-  myTimeStampIndices->setCurrentIndex( value );
+  myTimeStampIndexes->setCurrentIndex( value );
 
   VISU::ColoredPrs3dHolder_var aHolder = myHolderList.front();
 
   VISU::ColoredPrs3dHolder::TimeStampsRange_var aTimeStampsRange = aHolder->GetTimeStampsRange();
   CORBA::Long aLength = aTimeStampsRange->length();
-  if(value < 0 || aLength <= value)
+  if ( value < 0 || aLength <= value )
     return;
 
   VISU::ColoredPrs3dHolder::BasicInput_var anInput = aHolder->GetBasicInput();
   CORBA::Long aTimeStampNumber = anInput->myTimeStampNumber;
   CORBA::Long aNumber = aTimeStampsRange[ value ].myNumber;
-  if(aNumber == aTimeStampNumber)
+  if ( aNumber == aTimeStampNumber )
+    return;
+
+  VISU::View_var aView = myViewManager->GetCurrentView();
+  if ( CORBA::is_nil( aView.in() ) ) {
+    enableControls( false );
     return;
+  }
+
+  VISU::View3D_var aView3D = VISU::View3D::_narrow( aView );
 
   THolderList::const_iterator anIter = myHolderList.begin();
   THolderList::const_iterator anIterEnd = myHolderList.end();
@@ -444,27 +632,40 @@ void VisuGUI_Slider::onValueChanged( int value )
 
     QApplication::setOverrideCursor(Qt::WaitCursor);
     
-    aHolder->Apply( aPrs3d, anInput, myView3D );
+    aHolder->Apply( aPrs3d, anInput, aView3D );
     
     QApplication::restoreOverrideCursor();
   }
 
+  aView3D->Destroy();
+
   updateMemoryState();
 }
 
+
+//----------------------------------------------------------------------------
 void VisuGUI_Slider::onSpeedChanged( int value )
 {
   if(myPlayButton->isChecked()){
-    int delay = int(5000.0 / double(mySpeedBox->value()));
+    int delay = int( 50.0 * mySpeedSlider->maximum() / mySpeedSlider->value() );
     myTimer->start( delay );
   }
 }
 
+
+//----------------------------------------------------------------------------
 void VisuGUI_Slider::onTimeout()
 {
   int value = mySlider->value();
-  if( value < mySlider->maximum() )
+  if ( value < mySlider->maximum() ) {
     onNext();
-  else
-    myPlayButton->setChecked( false );
+  } else {
+    if ( myIsCycled->isChecked() )
+      onFirst();
+    else
+      myPlayButton->setChecked( false );
+  }
 }
+
+
+//----------------------------------------------------------------------------
index 1347b6503022db9dac9eb4fb27c19cede443c7d1..9bf08483b90b9c00881cb4127cc757d040e0d49a 100644 (file)
@@ -28,7 +28,9 @@
 #ifndef VisuGUI_Slider_HeaderFile
 #define VisuGUI_Slider_HeaderFile
 
-#include "QtxToolBar.h"
+#include <QWidget>
+#include <QPixmap>
+
 #include <vector>
 
 #include "SALOMEconfig.h"
@@ -45,24 +47,28 @@ class QLineEdit;
 class QToolButton;
 class QSlider;
 class QSpinBox;
+class QCheckBox;
+class QRadioButton;
+class QMainWindow;
 class QTimer;
 class QAction;
 
-class VVTK_ViewWindow;
-class VVTK_MainWindow;
+class QtxDoubleSpinBox;
 class LightApp_SelectionMgr;
+class VisuGUI;
 
-class VisuGUI_Module;
-
-class VisuGUI_Slider : public QtxToolBar
+class VisuGUI_Slider : public QWidget
 {
-  Q_OBJECT
+  Q_OBJECT;
 
 public:
-  VisuGUI_Slider( VisuGUI_Module* theModule, 
-                 VVTK_ViewWindow* theViewWindow,
+  VisuGUI_Slider( VisuGUI* theModule, 
+                 QMainWindow* theParent,
                  LightApp_SelectionMgr* theSelectionMgr );
+
   virtual ~VisuGUI_Slider();
+  
+  QAction* toggleViewAction();
 
 public slots:
   virtual void     onSelectionChanged();
@@ -81,29 +87,32 @@ public slots:
 
   virtual void     onTimeout();
 
+  virtual void     onToggleView( bool );
+
+  void onMemoryModeChanged( bool );
+  void onMemorySizeChanged( double );
+
+protected slots:
+  void onModuleDeactivated();
+  void onModuleActivated();
+
 protected:
   virtual void     enableControls( bool );
   virtual void     updateMemoryState();
   virtual bool     checkHolderList();
 
 private:
-  VisuGUI_Module*  myModule;
-  VVTK_MainWindow* myMainWindow;
   LightApp_SelectionMgr* mySelectionMgr;
-  VISU::View3D_var myView3D;
+  VISU::ViewManager_var  myViewManager;
+  VisuGUI*               myModule;
 
   QSlider*         mySlider;
   QLabel*          myFirstTimeStamp;
   QLabel*          myLastTimeStamp;
-  QLabel*          myTimeStampsNumber;
 
-  QLabel*          myCacheMemory;
-
-#ifdef ENABLE_AVI_AND_MORE_BUTTONS
-  QToolButton*     myMoreButton;
-  QToolButton*     myAVIButton;
-#endif
+  QWidget* myPlayTab;
 
+  QToolButton*     myIsCycled;
   QToolButton*     myFirstButton;
   QToolButton*     myPreviousButton;
   QToolButton*     myPlayButton;
@@ -111,16 +120,24 @@ private:
   QToolButton*     myLastButton;
 
   QComboBox*       myTimeStampStrings;
-  QComboBox*       myTimeStampIndices;
+  QComboBox*       myTimeStampIndexes;
+
+  QSlider*         mySpeedSlider;
 
-  QSpinBox*        mySpeedBox;
+  QRadioButton*     myMinimalMemoryButton;
+  QRadioButton*     myLimitedMemoryButton;
+  QtxDoubleSpinBox* myLimitedMemory;
 
-  QTimer*          myTimer;
+  QLineEdit*      myUsedMemory;
+  QLineEdit*      myFreeMemory;
 
   typedef std::vector<VISU::ColoredPrs3dHolder_var> THolderList;
-  THolderList      myHolderList;
+  THolderList     myHolderList;
   
-  QAction*         myWidgetAction;
+  QTimer*         myTimer;
+  QPixmap         myPlayPixmap;
+  QPixmap         myPausePixmap;
+  QAction*        myToggleViewAction;
 };
 
 #endif
diff --git a/src/VISUGUI/VisuGUI_Table3dDlg.cxx b/src/VISUGUI/VisuGUI_Table3dDlg.cxx
deleted file mode 100644 (file)
index 72d1ca1..0000000
+++ /dev/null
@@ -1,829 +0,0 @@
-// VISU VISUGUI : GUI of VISU component
-//
-// 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   : VisuGUI_Table3dDlg.cxx
-// Author : Laurent CORNABE & Hubert ROLLAND
-//
-
-#include "VisuGUI_Table3dDlg.h"
-
-#include "VisuGUI.h"
-#include "VisuGUI_Tools.h"
-#include "VisuGUI_ViewTools.h"
-#include "VisuGUI_InputPane.h"
-
-#include "VISU_ColoredPrs3dFactory.hh"
-#include "VISU_ViewManager_i.hh"
-
-#include <SVTK_ViewWindow.h>
-#include <SALOME_Actor.h>
-#include <SUIT_Desktop.h>
-#include <SUIT_Session.h>
-#include <SUIT_MessageBox.h>
-#include <SUIT_ResourceMgr.h>
-#include <LightApp_Application.h>
-#include <SVTK_FontWidget.h>
-#include <QtxDoubleSpinBox.h>
-
-#include <QGridLayout>
-#include <QHBoxLayout>
-#include <QVBoxLayout>
-#include <QTabWidget>
-#include <QRadioButton>
-#include <QSpinBox>
-#include <QCheckBox>
-#include <QLabel>
-#include <QPushButton>
-#include <QButtonGroup>
-#include <QGroupBox>
-#include <QLineEdit>
-
-#define SURFACE_PRS_ID 0
-#define CONTOUR_PRS_ID 1
-
-//=======================================================================
-//function : VisuGUI_Table3DPane
-//purpose  :
-//=======================================================================
-VisuGUI_Table3DPane::VisuGUI_Table3DPane( QWidget* parent )
-  : QWidget( parent ),
-    myViewWindow( VISU::GetActiveViewWindow<SVTK_ViewWindow>() ),
-    myPrs( 0 ),
-    myInitFromPrs( false )
-{
-  QGridLayout* topLayout = new QGridLayout( this );
-  topLayout->setMargin( 11 );
-  topLayout->setSpacing( 6 );
-
-  // scale
-  QLabel* scaleLabel = new QLabel( tr( "SCALE" ), this );
-  ScaleSpn = new QtxDoubleSpinBox( -1.e6, 1.e6, 0.1, this );
-  // Presentation type
-  GBPrsTypeBox = new QGroupBox( tr( "PRESENTATION_TYPE" ), this );
-  GBPrsType = new QButtonGroup( GBPrsTypeBox );
-  QRadioButton* rb1 = new QRadioButton( tr( "SURFACE" ), GBPrsTypeBox );
-  QRadioButton* rb2 = new QRadioButton( tr( "CONTOUR" ), GBPrsTypeBox );
-  GBPrsType->addButton( rb1, SURFACE_PRS_ID );
-  GBPrsType->addButton( rb2, CONTOUR_PRS_ID );
-  QHBoxLayout* GBPrsTypeBoxLayout = new QHBoxLayout( GBPrsTypeBox );
-  GBPrsTypeBoxLayout->setMargin( 11 );
-  GBPrsTypeBoxLayout->setSpacing( 6 );
-  GBPrsTypeBoxLayout->addWidget( rb1 );
-  GBPrsTypeBoxLayout->addWidget( rb2 );
-  
-  // nb Contours
-  QLabel* nbContLabel = new QLabel( tr( "NUMBER_CONTOURS" ), this );
-  NbContoursSpn = new QSpinBox( this );
-  NbContoursSpn->setMinimum( 1 );
-  NbContoursSpn->setMaximum( 999 );
-  NbContoursSpn->setSingleStep( 1 );
-
-  topLayout->addWidget( scaleLabel,    0, 0 );
-  topLayout->addWidget( ScaleSpn,      0, 1 );
-  topLayout->addWidget( GBPrsTypeBox,  1, 0, 1, 2 );
-  topLayout->addWidget( nbContLabel,   2, 0 );
-  topLayout->addWidget( NbContoursSpn, 2, 1 );
-  topLayout->setRowStretch( 3, 5 );
-
-  // signals and slots connections
-
-  connect( GBPrsType, SIGNAL( buttonClicked( int ) ), this, SLOT( onPrsType( int ) ) );
-}
-
-//=======================================================================
-//function : destructor
-//purpose  :
-//=======================================================================
-VisuGUI_Table3DPane::~VisuGUI_Table3DPane()
-{
-}
-
-//=======================================================================
-//function : onPrsType
-//purpose  :
-//=======================================================================
-void VisuGUI_Table3DPane::onPrsType( int id )
-{
-  NbContoursSpn->setEnabled( id == CONTOUR_PRS_ID );
-}
-
-//=======================================================================
-//function : storeToPrsObject
-//purpose  :
-//=======================================================================
-int VisuGUI_Table3DPane::storeToPrsObject( VISU::PointMap3d_i* thePrs )
-{
-  // scale
-  thePrs->SetScaleFactor( ScaleSpn->value() );
-
-  // prs type
-  thePrs->SetContourPrs( GBPrsType->checkedId() == CONTOUR_PRS_ID );
-
-  // nb contours
-  thePrs->SetNbOfContours( NbContoursSpn->value() );
-
-  return 1;
-}
-
-//=======================================================================
-//function : GetPrs
-//purpose  :
-//=======================================================================
-VISU::PointMap3d_i* VisuGUI_Table3DPane::GetPrs()
-{
-  return myPrs;
-}
-
-//=======================================================================
-//function : initFromPrsObject
-//purpose  :
-//=======================================================================
-void VisuGUI_Table3DPane::initFromPrsObject( VISU::PointMap3d_i* thePrs )
-{
-  myInitFromPrs = true;
-  myPrs = thePrs;
-
-  // scale
-  double aScale = thePrs->GetScaleFactor();
-  if (aScale<0)
-    aScale = 0;
-  ScaleSpn->setValue( aScale );
-
-  // prs type
-  int id = thePrs->GetIsContourPrs() ? CONTOUR_PRS_ID : SURFACE_PRS_ID;
-  GBPrsType->button( id )->setChecked( true );
-  onPrsType( id );
-
-  // nb contours
-  NbContoursSpn->setValue( thePrs->GetNbOfContours() );
-}
-
-//=======================================================================
-//function : Table Scalar Bar
-//purpose  :
-//=======================================================================
-
-VisuGUI_TableScalarBarPane::VisuGUI_TableScalarBarPane( QWidget* parent )
-  : QWidget( parent ), 
-    myBarPrs( 0 )
-{
-  QGridLayout* topLayout = new QGridLayout( this );
-  topLayout->setSpacing( 6 );
-  topLayout->setMargin( 11 );
-
-  SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
-  QString propertyName;
-  propertyName = QString( "scalar_bar_vertical_" );
-  myVerX  = aResourceMgr->doubleValue(  "VISU", propertyName + "x", 0. );
-  myVerY  = aResourceMgr->doubleValue(  "VISU", propertyName + "y", 0. );
-  myVerW  = aResourceMgr->doubleValue(  "VISU", propertyName + "width",  0. );
-  myVerH  = aResourceMgr->doubleValue(  "VISU", propertyName + "height", 0. );
-  myVerTW = aResourceMgr->integerValue( "VISU", propertyName + "title_width",  0 );
-  myVerTH = aResourceMgr->integerValue( "VISU", propertyName + "title_height", 0 );
-  myVerLW = aResourceMgr->integerValue( "VISU", propertyName + "label_width",  0 );
-  myVerLH = aResourceMgr->integerValue( "VISU", propertyName + "label_height", 0 );
-  myVerBW = aResourceMgr->integerValue( "VISU", propertyName + "bar_width",  0 );
-  myVerBH = aResourceMgr->integerValue( "VISU", propertyName + "bar_height", 0 );
-
-  propertyName = QString( "scalar_bar_horizontal_" );
-  myHorX  = aResourceMgr->doubleValue(  "VISU", propertyName + "x", 0. );
-  myHorY  = aResourceMgr->doubleValue(  "VISU", propertyName + "y", 0. );
-  myHorW  = aResourceMgr->doubleValue(  "VISU", propertyName + "width",  0. );
-  myHorH  = aResourceMgr->doubleValue(  "VISU", propertyName + "height", 0. );
-  myHorTW = aResourceMgr->integerValue( "VISU", propertyName + "title_width",  0 );
-  myHorTH = aResourceMgr->integerValue( "VISU", propertyName + "title_height", 0 );
-  myHorLW = aResourceMgr->integerValue( "VISU", propertyName + "label_width",  0 );
-  myHorLH = aResourceMgr->integerValue( "VISU", propertyName + "label_height", 0 );
-  myHorBW = aResourceMgr->integerValue( "VISU", propertyName + "bar_width",  0 );
-  myHorBH = aResourceMgr->integerValue( "VISU", propertyName + "bar_height", 0 );
-
-  // Range ============================================================
-  RangeGroup = new QGroupBox( tr( "SCALAR_RANGE_GRP" ), this );
-  QButtonGroup* RangeRB = new QButtonGroup( RangeGroup );
-  QGridLayout* RangeGroupLayout = new QGridLayout( RangeGroup );
-  RangeGroupLayout->setSpacing( 6 );
-  RangeGroupLayout->setMargin( 11 );
-
-  CBLog = new QCheckBox( tr( "LOGARITHMIC_SCALING" ), RangeGroup );
-
-  RBFrange = new QRadioButton( tr( "FIELD_RANGE_BTN" ),   RangeGroup );
-  RBIrange = new QRadioButton( tr( "IMPOSED_RANGE_BTN" ), RangeGroup );
-  RangeRB->addButton( RBFrange, 0 );
-  RangeRB->addButton( RBIrange, 1 );
-  RBFrange->setChecked( true );
-
-  MinEdit = new QLineEdit( RangeGroup );
-  MinEdit->setMinimumWidth( 70 );
-  MinEdit->setValidator( new QDoubleValidator( this ) );
-  MinEdit->setText( "0.0" );
-  QLabel* MinLabel = new QLabel( tr( "LBL_MIN" ), RangeGroup );
-  MinLabel->setBuddy( MinEdit );
-
-  MaxEdit = new QLineEdit( RangeGroup );
-  MaxEdit->setMinimumWidth( 70 );
-  MaxEdit->setValidator( new QDoubleValidator( this ) );
-  MaxEdit->setText( "0.0" );
-  QLabel* MaxLabel = new QLabel( tr( "LBL_MAX" ), RangeGroup );
-  MaxLabel->setBuddy( MaxEdit );
-
-  RangeGroupLayout->addWidget( CBLog,    1, 0, 1, 4 );
-  RangeGroupLayout->addWidget( RBFrange, 2, 0, 1, 2 );
-  RangeGroupLayout->addWidget( RBIrange, 2, 2, 1, 2 );
-  RangeGroupLayout->addWidget( MinLabel, 3, 0 );
-  RangeGroupLayout->addWidget( MinEdit,  3, 1 );
-  RangeGroupLayout->addWidget( MaxLabel, 3, 2 );
-  RangeGroupLayout->addWidget( MaxEdit,  3, 3 );
-
-  // Colors and Labels ========================================================
-  QGroupBox* ColLabGroup = new QGroupBox( tr( "COLORS_LABELS_GRP" ), this );
-  QHBoxLayout* ColLabGroupLayout = new QHBoxLayout( ColLabGroup );
-  ColLabGroupLayout->setSpacing( 6 );
-  ColLabGroupLayout->setMargin( 11 );
-
-  QLabel* ColorLabel = new QLabel( tr( "LBL_NB_COLORS" ), ColLabGroup );
-  ColorSpin = new QSpinBox( ColLabGroup );
-  ColorSpin->setMinimum( 2 );
-  ColorSpin->setMaximum( 256 );
-  ColorSpin->setSingleStep( 1 );
-  ColorSpin->setMinimumWidth( 70 );
-  ColorSpin->setValue( 64 );
-
-  QLabel* LabelLabel = new QLabel( tr( "LBL_NB_LABELS" ), ColLabGroup );
-  LabelSpin = new QSpinBox( ColLabGroup );
-  LabelSpin->setMinimum( 2 );
-  LabelSpin->setMaximum( 65 );
-  LabelSpin->setSingleStep( 1 );
-  LabelSpin->setMinimumWidth( 70 );
-  LabelSpin->setValue( 5 );
-
-  ColLabGroupLayout->addWidget( ColorLabel );
-  ColLabGroupLayout->addWidget( ColorSpin );
-  ColLabGroupLayout->addWidget( LabelLabel );
-  ColLabGroupLayout->addWidget( LabelSpin );
-
-  // Orientation ==========================================================
-  QGroupBox* OrientGroup = new QGroupBox( tr( "ORIENTATION_GRP" ), this );
-  QButtonGroup* OrientRB = new QButtonGroup( OrientGroup );
-  QHBoxLayout* OrientGroupLayout = new QHBoxLayout( OrientGroup );
-  OrientGroupLayout->setSpacing( 6 );
-  OrientGroupLayout->setMargin( 11 );
-
-  RBvert = new QRadioButton( tr( "VERTICAL_BTN" ), OrientGroup );
-  RBhori = new QRadioButton( tr( "HORIZONTAL_BTN" ), OrientGroup );
-  OrientRB->addButton( RBvert, 0 );
-  OrientRB->addButton( RBhori, 1 );
-  RBvert->setChecked( true );
-  OrientGroupLayout->addWidget( RBvert );
-  OrientGroupLayout->addWidget( RBhori );
-
-  // Origin ===============================================================
-  QGroupBox* OriginGroup = new QGroupBox( tr( "ORIGIN_GRP" ), this );
-  QHBoxLayout* OriginGroupLayout = new QHBoxLayout( OriginGroup );
-  OriginGroupLayout->setSpacing( 6 );
-  OriginGroupLayout->setMargin( 11 );
-
-  QLabel* XLabel = new QLabel( tr( "LBL_X" ), OriginGroup );
-  XSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, OriginGroup );
-  XSpin->setMinimumWidth( 70 );
-  XSpin->setValue( 0.01 );
-
-  QLabel* YLabel = new QLabel( tr( "LBL_Y" ), OriginGroup );
-  YSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, OriginGroup );
-  YSpin->setMinimumWidth( 70 );
-  YSpin->setValue( 0.01 );
-
-  OriginGroupLayout->addWidget( XLabel );
-  OriginGroupLayout->addWidget( XSpin );
-  OriginGroupLayout->addWidget( YLabel );
-  OriginGroupLayout->addWidget( YSpin );
-
-  // Dimensions =========================================================
-  QGroupBox* DimGroup = new QGroupBox( tr( "DIMENSIONS_GRP" ), this );
-  QHBoxLayout* DimGroupLayout = new QHBoxLayout( DimGroup );
-  DimGroupLayout->setSpacing( 6 );
-  DimGroupLayout->setMargin( 11 );
-
-  QLabel* WidthLabel = new QLabel( tr( "LBL_WIDTH" ), DimGroup );
-  WidthSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, DimGroup );
-  WidthSpin->setMinimumWidth( 70 );
-  WidthSpin->setValue( 0.1 );
-
-  QLabel* HeightLabel = new QLabel( tr( "LBL_HEIGHT" ), DimGroup );
-  HeightSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, DimGroup );
-  HeightSpin->setMinimumWidth( 70 );
-  HeightSpin->setValue( 0.8 );
-
-  DimGroupLayout->addWidget( WidthLabel );
-  DimGroupLayout->addWidget( WidthSpin );
-  DimGroupLayout->addWidget( HeightLabel );
-  DimGroupLayout->addWidget( HeightSpin );
-
-  myTextBtn = new QPushButton( tr( "Text properties..." ), this );
-  myBarBtn  = new QPushButton( tr( "Bar properties..." ), this );
-
-  // main layout =========================================================
-
-  topLayout->addWidget( RangeGroup,  0, 0, 1, 2 );
-  topLayout->addWidget( ColLabGroup, 1, 0, 1, 2 );
-  topLayout->addWidget( OrientGroup, 2, 0, 1, 2 );
-  topLayout->addWidget( OriginGroup, 3, 0, 1, 2 );
-  topLayout->addWidget( DimGroup,    4, 0, 1, 2 );
-  topLayout->addWidget( myTextBtn,   5, 0 );
-  topLayout->addWidget( myBarBtn,    5, 1 );
-
-  // init ================================================================
-
-  myTextDlg = new VisuGUI_TextPrefDlg( this );
-  myTextDlg->setTitleVisible( true );
-  myBarDlg = new VisuGUI_BarPrefDlg( this );
-
-  if ( RBvert->isChecked() ) {
-    myBarDlg->setRatios( myVerTW, myVerTH, myVerLW, myVerLH, myVerBW, myVerBH );
-  } else {
-    myBarDlg->setRatios( myHorTW, myHorTH, myHorLW, myHorLH, myHorBW, myHorBH );
-  }
-
-  myBarDlg->setLabelsFormat( aResourceMgr->stringValue(  "VISU", propertyName + "label_format", "%-#6.3g" ) );
-  myBarDlg->setUnitsVisible( aResourceMgr->booleanValue( "VISU", propertyName + "display_units", true ) );
-
-  // signals and slots connections ===========================================
-  connect( RangeRB,      SIGNAL( buttonClicked( int ) ),   this, SLOT( changeRange( int ) ) );
-  connect( OrientRB,     SIGNAL( buttonClicked( int ) ),   this, SLOT( changeDefaults( int ) ) );
-  connect( XSpin,        SIGNAL( valueChanged( double ) ), this, SLOT( XYChanged( double ) ) );
-  connect( YSpin,        SIGNAL( valueChanged( double ) ), this, SLOT( XYChanged( double ) ) );
-  connect( myTextBtn,    SIGNAL( clicked() ), this, SLOT( onTextPref() ) );
-  connect( myBarBtn,     SIGNAL( clicked() ), this, SLOT( onBarPref() ) );
-  changeDefaults( 0 );
-  myIsStoreTextProp = true;
-  myBusy = false;
-}
-
-//----------------------------------------------------------------------------
-
-void VisuGUI_TableScalarBarPane::onBarPref()
-{
-  if ( RBvert->isChecked() )
-    myBarDlg->setRatios( myVerTW, myVerTH, myVerLW, myVerLH, myVerBW, myVerBH );
-  else
-    myBarDlg->setRatios( myHorTW, myHorTH, myHorLW, myHorLH, myHorBW, myHorBH );
-  if ( myBarDlg->exec() ) {
-    if ( RBvert->isChecked() )
-      myBarDlg->getRatios( myVerTW, myVerTH, myVerLW, myVerLH, myVerBW, myVerBH );
-    else
-      myBarDlg->getRatios( myHorTW, myHorTH, myHorLW, myHorLH, myHorBW, myHorBH );
-  }
-}
-
-//----------------------------------------------------------------------------
-/**
- * Initialise dialog box from presentation object
- */
-void VisuGUI_TableScalarBarPane::initFromPrsObject( VISU::PointMap3d_i* thePrs )
-{
-  myBarPrs = dynamic_cast<VISU::PointMap3d_i*>( thePrs );
-  
-  if ( !myBarPrs )
-    return;
-
-  switch ( myBarPrs->GetScaling() ) {
-  case VISU::LOGARITHMIC:
-    CBLog->setChecked( true );
-    break;
-  default:
-    CBLog->setChecked( false );
-  }
-
-  setRange( myBarPrs->GetMin(), myBarPrs->GetMax(), myBarPrs->IsRangeFixed() );
-
-  setScalarBarData( myBarPrs->GetNbColors(), myBarPrs->GetLabels() );
-
-  // "Title"
-  CORBA::String_var aTitle = myBarPrs->GetTitle();
-  myTextDlg->setTitleText( aTitle.in() );
-  myTitle = aTitle.in();
-
-  vtkFloatingPointType R, G, B;
-  myBarPrs->GetTitleColor( R, G, B );
-
-  setPosAndSize( myBarPrs->GetPosX(),
-                myBarPrs->GetPosY(),
-                myBarPrs->GetWidth(),
-                myBarPrs->GetHeight(),
-                myBarPrs->GetBarOrientation() );
-  
-  myVerTW = myBarPrs->GetTitleWidth();
-  myVerTH = myBarPrs->GetTitleHeight();
-  myVerLW = myBarPrs->GetLabelWidth();
-  myVerLH = myBarPrs->GetLabelHeight();
-  myVerBW = myBarPrs->GetBarWidth();
-  myVerBH = myBarPrs->GetBarHeight();
-  myBarDlg->setRatios( myVerTW, myVerTH, myVerLW, myVerLH, myVerBW, myVerBH );
-
-  myBarDlg->setLabelsFormat( myBarPrs->GetLabelsFormat() );
-  myBarDlg->setUnitsVisible( myBarPrs->IsUnitsVisible() );
-
-  myTextDlg->myTitleFont->SetData( QColor( (int)(R*255.), (int)(G*255.), (int)(B*255.) ),
-                                  myBarPrs->GetTitFontType(),
-                                  myBarPrs->IsBoldTitle(),
-                                  myBarPrs->IsItalicTitle(),
-                                  myBarPrs->IsShadowTitle() );
-
-  // "Labels"
-  myBarPrs->GetLabelColor( R, G, B );
-
-  myTextDlg->myLabelFont->SetData( QColor( (int)(R*255.), (int)(G*255.), (int)(B*255.) ),
-                                   myBarPrs->GetLblFontType(),
-                                  myBarPrs->IsBoldLabel(),
-                                  myBarPrs->IsItalicLabel(),
-                                  myBarPrs->IsShadowLabel() );
-}
-
-//----------------------------------------------------------------------------
-/**
- * Store values to presentation object
- */
-int VisuGUI_TableScalarBarPane::storeToPrsObject( VISU::PointMap3d_i* thePrs ) {
-  if( !myBarPrs )
-    return 0;
-
-  myBarPrs->SetPosition( XSpin->value(), YSpin->value() );
-  myBarPrs->SetSize( WidthSpin->value(), HeightSpin->value() );
-
-  myBarPrs->SetRatios( myVerTW, myVerTH, myVerLW, myVerLH, myVerBW, myVerBH );
-
-  myBarPrs->SetLabelsFormat( myBarDlg->getLabelsFormat().toLatin1().constData() );
-  myBarPrs->SetUnitsVisible( myBarDlg->isUnitsVisible() );
-
-  myBarPrs->SetBarOrientation( ( RBvert->isChecked() )? VISU::ColoredPrs3dBase::VERTICAL : VISU::ColoredPrs3dBase::HORIZONTAL );
-  if ( CBLog->isChecked() )
-    myBarPrs->SetScaling( VISU::LOGARITHMIC );
-  else
-    myBarPrs->SetScaling( VISU::LINEAR );
-
-  if ( RBFrange->isChecked() ) {
-    myBarPrs->SetSourceRange();
-  } else {
-    myBarPrs->SetRange( MinEdit->text().toDouble(), MaxEdit->text().toDouble() );
-  }
-  myBarPrs->SetNbColors( ColorSpin->value() );
-  myBarPrs->SetLabels( LabelSpin->value() );
-
-  if ( myIsStoreTextProp ) {
-    // "Title"
-    myBarPrs->SetTitle( myTextDlg->getTitleText().toLatin1().constData() );
-
-    QColor aTitColor( 255, 255, 255 );
-    int aTitleFontFamily = VTK_ARIAL;
-    bool isTitleBold = false;
-    bool isTitleItalic = false;
-    bool isTitleShadow = false;
-
-    myTextDlg->myTitleFont->GetData( aTitColor, aTitleFontFamily, isTitleBold, isTitleItalic, isTitleShadow );
-
-    myBarPrs->SetBoldTitle( isTitleBold );
-    myBarPrs->SetItalicTitle( isTitleItalic );
-    myBarPrs->SetShadowTitle( isTitleShadow );
-    myBarPrs->SetTitFontType( aTitleFontFamily );
-    myBarPrs->SetTitleColor( aTitColor.red()/255.,
-                            aTitColor.green()/255.,
-                            aTitColor.blue()/255. );
-
-    // "Label"
-    QColor aLblColor( 255, 255, 255 );
-    int aLabelFontFamily = VTK_ARIAL;
-    bool isLabelBold = false;
-    bool isLabelItalic = false;
-    bool isLabelShadow = false;
-
-    myTextDlg->myLabelFont->GetData( aLblColor, aLabelFontFamily, isLabelBold, isLabelItalic, isLabelShadow );
-
-    myBarPrs->SetBoldLabel( isLabelBold);
-    myBarPrs->SetItalicLabel( isLabelItalic );
-    myBarPrs->SetShadowLabel( isLabelShadow );
-    myBarPrs->SetLblFontType( aLabelFontFamily );
-    myBarPrs->SetLabelColor( aLblColor.red()/255.,
-                            aLblColor.green()/255.,
-                            aLblColor.blue()/255. );
-    //    myIsStoreTextProp = false;
-  }
-  return 1;
-}
-
-//----------------------------------------------------------------------------
-/*!
-  Sets default values and range mode
-*/
-void VisuGUI_TableScalarBarPane::setRange( double imin, double imax, bool sbRange )
-{
-  MinEdit->setText( QString::number( imin ) );
-  MaxEdit->setText( QString::number( imax ) );
-
-  if ( sbRange )
-    RBIrange->setChecked( true );
-  else
-    RBFrange->setChecked( true );
-
-  changeRange( sbRange );
-}
-
-//----------------------------------------------------------------------------
-/*!
-  Called when Range mode is changed
-*/
-void VisuGUI_TableScalarBarPane::changeRange( int )
-{
-  if ( RBFrange->isChecked() ) {
-    myBarPrs->SetSourceRange();
-    MinEdit->setEnabled( false );
-    MaxEdit->setEnabled( false );
-  } else {
-    myBarPrs->SetRange( myBarPrs->GetMin(), myBarPrs->GetMax() );
-    myBarPrs->SetRange( MinEdit->text().toDouble(), MaxEdit->text().toDouble() );
-    MinEdit->setEnabled( true );
-    MaxEdit->setEnabled( true );
-  }
-
-  MinEdit->setText( QString::number( myBarPrs->GetMin() ) );
-  MaxEdit->setText( QString::number( myBarPrs->GetMax() ) );
-}
-
-//----------------------------------------------------------------------------
-/*!
-  Called when X,Y position is changed
-*/
-void VisuGUI_TableScalarBarPane::XYChanged( double )
-{
-  QtxDoubleSpinBox* snd = (QtxDoubleSpinBox*)sender();
-  if ( snd == XSpin ) {
-    WidthSpin->setMaximum( 1.0 - XSpin->value() );
-  }
-  if ( snd == YSpin ) {
-    HeightSpin->setMaximum( 1.0 - YSpin->value() );
-  }
-}
-
-//----------------------------------------------------------------------------
-/*!
-  
-*/
-void VisuGUI_TableScalarBarPane::changeScalarMode( int )
-{
-//do nothing
-}
-
-//----------------------------------------------------------------------------
-/*!
-  Sets size and position
-*/
-void VisuGUI_TableScalarBarPane::setPosAndSize( double x, double y, double w, double h, bool vert )
-{
-  if ( vert ) {
-    myVerX = x;
-    myVerY = y;
-    myVerW = w;
-    myVerH = h;
-    RBvert->setChecked( true );
-  }
-  else {
-    myHorX = x;
-    myHorY = y;
-    myHorW = w;
-    myHorH = h;
-    RBhori->setChecked( true );
-  }
-  changeDefaults( 0 );
-}
-
-//----------------------------------------------------------------------------
-/*!
-  Sets colors and labels number
-*/
-void VisuGUI_TableScalarBarPane::setScalarBarData( int colors, int labels )
-{
-  ColorSpin->setValue( colors );
-  LabelSpin->setValue( labels );
-}
-
-//----------------------------------------------------------------------------
-void VisuGUI_TableScalarBarPane::onTextPref()
-{
-  myTextDlg->storeBeginValues();
-  myIsStoreTextProp = myTextDlg->exec() || myIsStoreTextProp;
-}
-
-//----------------------------------------------------------------------------
-VisuGUI_TableScalarBarPane::~VisuGUI_TableScalarBarPane()
-{
-}
-
-//----------------------------------------------------------------------------
-/*!
-  Called when orientation is changed
-*/
-void VisuGUI_TableScalarBarPane::changeDefaults( int )
-{
-  if ( RBvert->isChecked() ) {
-    XSpin->setValue( myVerX );
-    YSpin->setValue( myVerY );
-    WidthSpin->setValue( myVerW );
-    HeightSpin->setValue( myVerH );
-  }
-  else {
-    XSpin->setValue( myHorX );
-    YSpin->setValue( myHorY );
-    WidthSpin->setValue( myHorW );
-    HeightSpin->setValue( myHorH );
-  }
-}
-
-//=======================================================================
-//function : Check
-//purpose  : Called when <OK> button is clicked, validates data and closes dialog
-//=======================================================================
-bool VisuGUI_TableScalarBarPane::check()
-{
-  double minVal = MinEdit->text().toDouble();
-  double maxVal = MaxEdit->text().toDouble();
-  if ( RBIrange->isChecked() ) {
-    if (minVal >= maxVal) {
-      SUIT_MessageBox::warning( this,tr("WRN_VISU"),
-                               tr("MSG_MINMAX_VALUES") );
-      return false;
-    }
-  }
-
-  // check if logarithmic mode is on and check imposed range to not contain negative values
-  if ( CBLog->isChecked() ) {
-    if ( minVal <= 0.0 ) {
-      if ( RBIrange->isChecked() ) {
-       SUIT_MessageBox::warning( this,
-                                 tr("WRN_VISU"),
-                                 tr("WRN_LOGARITHMIC_RANGE") );
-      } else {
-       if ( minVal == 0)
-         SUIT_MessageBox::warning( this,
-                                   tr("WRN_VISU"),
-                                   tr("WRN_LOGARITHMIC_RANGE") );
-       else
-         SUIT_MessageBox::warning( this,
-                                   tr("WRN_VISU"),
-                                   tr("WRN_LOGARITHMIC_FIELD_RANGE") );
-       RBIrange->setChecked(true);
-       changeRange(1);
-      }
-      return false;
-    }
-  }
-  return true;
-}
-
-//=======================================================================
-//function : Constructor
-//purpose  :
-//=======================================================================
-VisuGUI_Table3DDlg::VisuGUI_Table3DDlg ( SalomeApp_Module* theModule )
-  : QDialog ( VISU::GetDesktop( theModule ) )
-{
-  setModal( false );
-  setWindowTitle( tr( "Point Map 3D Definition" ) );
-  setSizeGripEnabled( true );
-
-  QVBoxLayout* TopLayout = new QVBoxLayout( this );
-  TopLayout->setSpacing( 6 );
-  TopLayout->setMargin( 11 );
-
-  myTabBox = new QTabWidget( this );
-  myIsoPane = new VisuGUI_Table3DPane( this );
-  myScalarBarPane = new VisuGUI_TableScalarBarPane( this );
-
-  myTabBox->addTab( myIsoPane,       tr( "DLG_PREF_TITLE" ) );
-  myTabBox->addTab( myScalarBarPane, tr( "DLG_PROP_TITLE" ) );
-
-  QGroupBox* GroupButtons = new QGroupBox( this );
-  QHBoxLayout* GroupButtonsLayout = new QHBoxLayout( GroupButtons );
-  GroupButtonsLayout->setSpacing( 6 );
-  GroupButtonsLayout->setMargin( 11 );
-
-  QPushButton* buttonOk = new QPushButton( tr( "&OK" ), GroupButtons );
-  buttonOk->setAutoDefault( true );
-  buttonOk->setDefault( true );
-  QPushButton* buttonApply = new QPushButton( tr( "&Apply" ), GroupButtons );
-  buttonApply->setAutoDefault( true );
-  QPushButton* buttonCancel = new QPushButton( tr( "&Cancel" ), GroupButtons );
-  buttonCancel->setAutoDefault( true );
-  QPushButton* buttonHelp = new QPushButton( tr( "&Help" ), GroupButtons );
-  buttonHelp->setAutoDefault( true );
-
-  GroupButtonsLayout->addWidget( buttonOk );
-  GroupButtonsLayout->addWidget( buttonApply );
-  GroupButtonsLayout->addSpacing( 10 );
-  GroupButtonsLayout->addStretch();
-  GroupButtonsLayout->addWidget( buttonCancel );
-  GroupButtonsLayout->addWidget( buttonHelp );
-
-  TopLayout->addWidget( myTabBox );
-  TopLayout->addWidget( GroupButtons );
-
-  // signals and slots connections
-  connect( buttonOk,     SIGNAL( clicked() ), this, SLOT( accept() ) );
-  connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
-  connect( buttonHelp,   SIGNAL( clicked() ), this, SLOT( onHelp() ) );
-  connect( buttonApply,  SIGNAL( clicked() ), this, SLOT( onApply() ) );
-}
-
-//=======================================================================
-//function : Destructor
-//purpose  :
-//=======================================================================
-VisuGUI_Table3DDlg::~VisuGUI_Table3DDlg()
-{
-}
-
-//=======================================================================
-//function : accept
-//purpose  :
-//=======================================================================
-void VisuGUI_Table3DDlg::accept()
-{
-  if (myScalarBarPane->check())
-    QDialog::accept();
-}
-
-//=======================================================================
-//function : onApply
-//purpose  :
-//=======================================================================
-void VisuGUI_Table3DDlg::onApply()
-{
-  if (myScalarBarPane->check()) {
-    storeToPrsObject( myPrsCopy );
-    myPrsCopy->UpdateActors();
-  }
-}
-
-//=======================================================================
-//function : onHelp
-//purpose  :
-//=======================================================================
-void VisuGUI_Table3DDlg::onHelp()
-{
-  QString aHelpFileName = "table_3d_page.html";
-  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
-  if (app) {
-    VisuGUI* aVisuGUI = dynamic_cast<VisuGUI*>( app->activeModule() );
-    app->onHelpContextModule(aVisuGUI ? app->moduleName(aVisuGUI->moduleName()) : QString(""), aHelpFileName);
-  }
-  else {
-    QString platform;
-#ifdef WIN32
-    platform = "winapplication";
-#else
-    platform = "application";
-#endif
-    SUIT_MessageBox::warning( this, QObject::tr("WRN_WARNING"),
-                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                             arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName) );
-  }
-
-}
-
-//=======================================================================
-//function : storeToPrsObject
-//purpose  :
-//=======================================================================
-int VisuGUI_Table3DDlg::storeToPrsObject( VISU::PointMap3d_i* thePrs )
-{
-  int anIsOk = myIsoPane->storeToPrsObject( thePrs );
-  anIsOk &= myScalarBarPane->storeToPrsObject( thePrs );
-
-  return anIsOk;
-}
-
-//=======================================================================
-//function : initFromPrsObject
-//purpose  :
-//=======================================================================
-void VisuGUI_Table3DDlg::initFromPrsObject( VISU::PointMap3d_i* thePrs )
-{
-  myPrsCopy = thePrs;
-  myIsoPane->initFromPrsObject( thePrs );
-  myScalarBarPane->initFromPrsObject( thePrs );
-}
diff --git a/src/VISUGUI/VisuGUI_Table3dDlg.h b/src/VISUGUI/VisuGUI_Table3dDlg.h
deleted file mode 100644 (file)
index 2257b48..0000000
+++ /dev/null
@@ -1,188 +0,0 @@
-// VISU VISUGUI : GUI of VISU component
-//
-// 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   : VisuGUI_Table3dDlg.h
-// Author : Laurent CORNABE & Hubert ROLLAND
-//
-
-#ifndef VISUGUI_TABLE3D_H
-#define VISUGUI_TABLE3D_H
-
-#include "VisuGUI_Prs3dDlg.h"
-
-#include <QWidget>
-#include <string>
-
-class QTabWidget;
-class QButtonGroup;
-class QGroupBox;
-class QComboBox;
-class QCheckBox;
-class QLineEdit;
-class QRadioButton;
-class QPushButton;
-class QSpinBox;
-class QtxDoubleSpinBox;
-class VisuGUI_TextPrefDlg;
-class VisuGUI_BarPrefDlg;
-class SVTK_ViewWindow;
-class SalomeApp_Module;
-
-namespace VISU 
-{
-  class PointMap3d_i;
-};
-
-class VisuGUI_Table3DPane : public QWidget
-{
-  Q_OBJECT
-
-public:
-  VisuGUI_Table3DPane( QWidget* );
-  ~VisuGUI_Table3DPane();
-
-  void                 initFromPrsObject( VISU::PointMap3d_i* );
-  int                  storeToPrsObject( VISU::PointMap3d_i* );
-
-  VISU::PointMap3d_i*  GetPrs();
-
-private slots:
-  void                 onPrsType( int );
-
-private:
-  bool                 myInitFromPrs;
-
-  SVTK_ViewWindow*     myViewWindow;
-  VISU::PointMap3d_i*  myPrs;
-
-  QtxDoubleSpinBox*    ScaleSpn;
-  QGroupBox*           GBPrsTypeBox;
-  QButtonGroup*        GBPrsType;
-  QSpinBox*            NbContoursSpn;
-};
-
-class VisuGUI_TableScalarBarPane : public QWidget
-{
-  Q_OBJECT
-
-public:
-  VisuGUI_TableScalarBarPane( QWidget* );
-  ~VisuGUI_TableScalarBarPane();
-
-  void                 setRange( double, double, bool );
-  void                 setDefaultRange( double, double );
-  int                  getOrientation();
-  void                 setPosAndSize( double, double, double, double, bool );
-  void                 setScalarBarData( int, int );
-  bool                 isIRange();
-  double               getMin();
-  double               getMax();
-  double               getX();
-  double               getY();
-  double               getWidth();
-  double               getHeight();
-  int                  getNbColors();
-  int                  getNbLabels();
-  bool                 isLogarithmic();
-  void                 setLogarithmic( bool on );
-  //  bool    isToSave() {return CBSave ? CBSave->isChecked() : false;}
-
-  void                 storeToResources();
-
-  void                 initFromPrsObject( VISU::PointMap3d_i* );
-  int                  storeToPrsObject( VISU::PointMap3d_i* );
-
-  bool                 check();
-
-private slots:
-  void                 changeDefaults( int );
-  void                 changeRange( int );
-  void                 XYChanged( double );
-  void                 changeScalarMode( int );
-  void                 onTextPref();
-  void                 onBarPref();
-
-private:
-  QGroupBox*           RangeGroup;
-  QRadioButton*        RBFrange;
-  QRadioButton*        RBIrange;
-  QLineEdit*           MinEdit;
-  QLineEdit*           MaxEdit;
-
-  QRadioButton*        RBhori;
-  QRadioButton*        RBvert;
-
-  QtxDoubleSpinBox*    XSpin;
-  QtxDoubleSpinBox*    YSpin;
-
-  QtxDoubleSpinBox*    WidthSpin;
-  QtxDoubleSpinBox*    HeightSpin;
-
-  QSpinBox*            ColorSpin;
-  QSpinBox*            LabelSpin;
-
-  QCheckBox*           CBSave;
-  QCheckBox*           CBLog;
-  QComboBox*           myModeCombo;
-  QPushButton*         myTextBtn;
-  QPushButton*         myBarBtn;
-  VisuGUI_TextPrefDlg* myTextDlg;
-  VisuGUI_BarPrefDlg*  myBarDlg;
-
-  double               myHorX, myHorY, myHorW, myHorH;
-  double               myVerX, myVerY, myVerW, myVerH;
-  int                  myHorTW, myHorTH, myHorLW, myHorLH, myHorBW, myHorBH;
-  int                  myVerTW, myVerTH, myVerLW, myVerLH, myVerBW, myVerBH;
-  bool                 myIsStoreTextProp;
-
-  std::string          myTitle;
-  VISU::PointMap3d_i*  myBarPrs;
-
-  bool                 myBusy;
-};
-
-///////////////////////////////////////////////////////
-
-class VisuGUI_Table3DDlg : public QDialog
-{
-  Q_OBJECT
-
-public:
-  VisuGUI_Table3DDlg( SalomeApp_Module* );
-  ~VisuGUI_Table3DDlg();
-
-  virtual void initFromPrsObject( VISU::PointMap3d_i* );
-  virtual int  storeToPrsObject( VISU::PointMap3d_i* );
-
-protected slots:
-  void         accept();
-  void         onHelp();
-  void         onApply();
-
-private:
-  QTabWidget*                    myTabBox;
-  VisuGUI_Table3DPane*           myIsoPane;
-  VisuGUI_TableScalarBarPane*    myScalarBarPane;
-
-  SALOME::GenericObjPtr<VISU::PointMap3d_i> myPrsCopy;
-};
-
-#endif // VISUGUI_TABLE3D_H
index 6df04f65092323dc0e5d3a51220737a7fe6d4dca..65535af7fb5b3b140405c40cc0461dab319426db 100644 (file)
@@ -37,7 +37,7 @@
 #include "VISU_Prs3d_i.hh"
 #include "VISU_Result_i.hh"
 #include "VISU_Table_i.hh"
-#include "VISU_Mesh_i.hh"
+//#include "VISU_Mesh_i.hh"
 #include "VISU_ViewManager_i.hh"
 
 #include "VISU_Actor.h"
@@ -79,6 +79,7 @@
 #include <QSpinBox>
 #include <QDoubleSpinBox>
 
+using namespace std;
 
 //=============================================================================
 namespace VISU
@@ -415,6 +416,15 @@ namespace VISU
         _PTR(GenericAttribute) anAttr;
         _PTR(AttributeString) aComment;
 
+       _PTR(SObject) aRefSObject;
+       if (aSObject->ReferencedObject(aRefSObject)) {
+         // It can be a reference on curve, published under a container. IPAL 20317
+         VISU::TObjectInfo aRefObjectInfo = GetObjectByEntry(GetAppStudy(theModule), aRefSObject->GetID());
+         VISU::Base_i* aRefBase = aRefObjectInfo.myBase;
+         if( (aRefBase && aRefBase->GetType() == VISU::TCURVE) || (aRefBase && aRefBase->GetType() == VISU::TMESH) )
+           return true;
+       }
+
         bool isUnderVISU = false;
         _PTR(SObject) aFatherSObject = aSObject->GetFather();
         if (aFatherSObject->FindAttribute(anAttr, "AttributeName")) {
@@ -587,10 +597,13 @@ namespace VISU
     switch (theType) {
     case VISU::SHRINK:
       if (aPrs3d) {
-      if (anActor->IsShrunk())
-       anActor->UnShrink();
-      else
-       anActor->SetShrink();
+       if (anActor->IsShrunk())
+         anActor->UnShrink();
+       else
+         anActor->SetShrink();
+       if (VISU::Mesh_i* aMesh = dynamic_cast<VISU::Mesh_i*>(aPrs3d)) {
+         aMesh->SetShrink(true);
+       }
       } else if (aTable) {
        if (anActorBase->IsShrunk())
          anActorBase->UnShrink();
@@ -1050,7 +1063,7 @@ namespace VISU
       for (int i = 0; i < clist.count(); i++) {
         tmpCurve = dynamic_cast<SPlot2d_Curve*>(clist.at(i));
         if (tmpCurve && tmpCurve->hasIO() &&
-            theCurve->GetEntry() != tmpCurve->getIO()->getEntry()) {
+            theCurve->GetEntry() == tmpCurve->getIO()->getEntry()) {
           plotCurve = tmpCurve;
         }
         else if (theDisplaying == VISU::eDisplayOnly) {
@@ -1168,8 +1181,7 @@ namespace VISU
 
   //************************************************************
   // Others
-
-  void
+  VISU::Mesh_i*
   CreateMesh(VisuGUI* theModule,
             const Handle(SALOME_InteractiveObject)& theIO,
             SVTK_ViewWindow* theViewWindow)
@@ -1184,11 +1196,11 @@ namespace VISU
     VISU::Result_var aResult;
     VISU::Result_i* pResult = CheckResult(theModule, aResultSObj, aResult);
     if (pResult == NULL)
-      return;
+      return NULL;
 
     Storable::TRestoringMap aMap = Storable::GetStorableMap(aResultSObj);
     if (aMap.empty())
-      return;
+      return NULL;
 
     CORBA::Object_var aMesh;
     string aComment = Storable::FindValue(aMap,"myComment").toLatin1().data();
@@ -1226,7 +1238,7 @@ namespace VISU
       SUIT_MessageBox::warning (GetDesktop(theModule),
                                 QObject::tr("WRN_VISU"),
                                 QObject::tr("ERR_CANT_BUILD_PRESENTATION") );
-      return;
+      return NULL;
     }
 
     if (theViewWindow) {
@@ -1260,6 +1272,7 @@ namespace VISU
     theModule->application()->putInfo(QObject::tr("INF_DONE"));
     // Make "Save" button active
     theModule->getApp()->updateActions();
+    return pPresent;
   }
 
   // ========================================================================================
@@ -1302,6 +1315,7 @@ namespace VISU
         case VISU::TPLOT3D:
        case VISU::TSCALARMAPONDEFORMEDSHAPE:
        case VISU::TDEFORMEDSHAPEANDSCALARMAP:
+       case VISU::TMESH:
           {
             PortableServer::ServantBase_var aServant = VISU::GetServant(aCORBAObject);
             if (aServant.in()) {
@@ -1438,4 +1452,21 @@ namespace VISU
     spinBox->setDecimals( decimals );
   }
   //------------------------------------------------------------
+  bool getClippingPlanesFolder(_PTR(Study) theStudy, _PTR(SObject)& theSObject)
+  {
+    _PTR(SComponent) aVisuSO = theStudy->FindComponent("VISU");
+    if (!aVisuSO) return false;
+    _PTR(SObject) aFolder = theStudy->FindObject(CLIP_PLANES_FOLDER);
+    if (!aFolder) {
+      _PTR(StudyBuilder) aBuilder = theStudy->NewBuilder();
+      aFolder = aBuilder->NewObject(aVisuSO);
+      
+      _PTR(GenericAttribute) anAttr;
+      anAttr = aBuilder->FindOrCreateAttribute(aFolder,"AttributeName");
+      _PTR(AttributeName) aName(anAttr);
+      aName->SetValue(CLIP_PLANES_FOLDER);
+    }
+    theSObject = aFolder;
+    return true;
+  }
 }
index e5d8510b97b03ae2b32d713aab757db9a1cc4e52..156b9a3611d11b3dbe62cfe4818f3f102810f456 100644 (file)
@@ -58,6 +58,7 @@ class VisuGUI;
 
 #include <vector>
 #include <utility>
+#include "VISU_Mesh_i.hh"
 
 namespace VISU 
 {
@@ -121,6 +122,11 @@ namespace VISU
 
   VISU::Prs3d_i*                       GetPrs3dFromBase(Base_i* theBase);
 
+  bool                                 GetPrs3dSelectionInfo( const SalomeApp_Module* theModule,
+                                                             VISU::Prs3d_i*& thePrs3d,
+                                                             SVTK_ViewWindow*& theViewWindow,
+                                                             VISU_Actor*& thenActor );
+
   //----------------------------------------------------------------------------
   void                                 Add(LightApp_SelectionMgr* theSelectionMgr,
                                           const Handle(SALOME_InteractiveObject)& theIO);
@@ -215,9 +221,9 @@ namespace VISU
   /*! Create mesh presentation and display it in \a theViewWindow.
    *  If \a theViewWindow is NULL, no displaying will be done.
    */
-  void CreateMesh(VisuGUI* theModule,
-                 const Handle(SALOME_InteractiveObject)& theIO,
-                 SVTK_ViewWindow* theViewWindow);
+  VISU::Mesh_i* CreateMesh(VisuGUI* theModule,
+                          const Handle(SALOME_InteractiveObject)& theIO,
+                          SVTK_ViewWindow* theViewWindow);
   
   // Others
   std::vector<VISU::Prs3d_i*> GetPrs3dList (const SalomeApp_Module* theModule,
@@ -232,6 +238,10 @@ namespace VISU
                               VISU::Prs3d_i* thePrs3d);
   void initSpinBox( QSpinBox*, int, int, int = 1 );
   void initSpinBox( QDoubleSpinBox*, double, double, double = 0.1, int = 6 );
+
+#define CLIP_PLANES_FOLDER "Clipping Planes"
+
+  bool getClippingPlanesFolder(_PTR(Study) theStudy, _PTR(SObject)& theSObject);
 }
 
 #endif
index 1f624abbcb491f023d206f6a8edc7f260c21ec18..10b210c9b84b4a093e0fb0f65250c4f08d2ff99b 100644 (file)
@@ -90,13 +90,10 @@ VisuGUI_VectorsDlg::VisuGUI_VectorsDlg (SalomeApp_Module* theModule)
   // Scale factor
   ScaleLabel = new QLabel (tr("LBL_SCALE_FACTOR"), TopGroup );
 
-  ScalFact = new QtxDoubleSpinBox( 1e-20, 1.0E+38, 0.1, TopGroup );
-
   SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
   int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 );
 
-  ScalFact->setPrecision( aPrecision*(-1) );
-  ScalFact->setDecimals( 32 );
+  ScalFact = new QtxDoubleSpinBox( 0, 1.0E+38, 0.1, aPrecision*(-1), 32, TopGroup );
   ScalFact->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   ScalFact->setValue( 0.1 );
 
@@ -330,16 +327,16 @@ void VisuGUI_VectorsDlg::enableSetColor()
 void VisuGUI_VectorsDlg::setScaleFactor( double theFactor )
 {
   double i=0.1;
-  while (1) { // Calculate Step & Precission
-    if ( int (theFactor/i) > 0)
-      break;
-    else {
-      i = i*0.1;
+  if (theFactor > 0) { // Calculate Step & Precission
+    while (1) { 
+      if ( int (theFactor/i) > 0)
+       break;
+      else
+       i = i*0.1;
     }
   }
   
   ScalFact->setSingleStep(i);
-
   ScalFact->setValue( theFactor );
 }
 
index d61e29bb7927256864455d53adae904a3ba5cbfa..55e733fa86b92b15dfabc0a67f2057ea01760f68 100644 (file)
@@ -42,8 +42,8 @@
 #include "SalomeApp_Module.h"
 #include "SalomeApp_Application.h"
 
-#include "VVTK_ViewModel.h"
-#include "VVTK_ViewWindow.h"
+//#include "VVTK_ViewModel.h"
+//#include "VVTK_ViewWindow.h"
 
 #include "SVTK_Functor.h"
 #include "SVTK_ViewModel.h"
@@ -65,7 +65,7 @@
 #include <vtkActorCollection.h>
 #include <vtkRenderer.h>
 
-class VVTK_Viewer;
+//class VVTK_Viewer;
 
 namespace VISU 
 {
index 0bc6b6ac445f88049b3f9c10aa000c2807d48361..b6b07c848f9a66bc586c2d31307480288fdcba51 100644 (file)
@@ -34,16 +34,19 @@ salomeinclude_HEADERS = \
        VISU_MultiResult_i.hh \
        VISU_PrsObject_i.hh \
        VISU_Table_i.hh \
+       VISU_ResultUtils.hh \
        VISU_PointMap3d_i.hh \
        VISU_Prs3d_i.hh \
        VISU_Mesh_i.hh \
        VISU_ColoredPrs3d_i.hh \
+       VISU_CorbaMedConvertor.hxx \
        VISU_ScalarMap_i.hh \
        VISU_IsoSurfaces_i.hh \
        VISU_DeformedShape_i.hh \
        VISU_Plot3D_i.hh \
        VISU_CutPlanes_i.hh \
        VISU_CutLines_i.hh \
+       VISU_Prs3dUtils.hh \
        VISU_Vectors_i.hh \
        VISU_StreamLines_i.hh \
        VISU_GaussPoints_i.hh \
@@ -51,11 +54,14 @@ salomeinclude_HEADERS = \
        VISU_View_i.hh \
        VISU_TimeAnimation.h \
        VISU_DeformedShapeAndScalarMap_i.hh \
+       VISU_ColoredPrs3dCache_i.hh \
+       VISU_ColoredPrs3dHolder_i.hh \
        VISU_ColoredPrs3dFactory.hh \
        VISU_MonoColorPrs_i.hh \
        VISU_Deformation_i.hh \
        VISU_OptionalDeformation_i.hh \
-       SALOME_GenericObjPointer.hh
+       SALOME_GenericObjPointer.hh \
+       VISU_ClippingPlaneMgr.hxx
 
 
 libVISUEngineImpl_la_SOURCES = \
@@ -92,7 +98,8 @@ libVISUEngineImpl_la_SOURCES = \
        VISU_MonoColorPrs_i.cc \
        VISU_Deformation_i.cc \
        VISU_OptionalDeformation_i.cc \
-       SALOME_GenericObjPointer.cc
+       SALOME_GenericObjPointer.cc \
+       VISU_ClippingPlaneMgr.cxx
 
 MOC_FILES = VISU_TimeAnimation_moc.cxx
 nodist_libVISUEngineImpl_la_SOURCES= $(MOC_FILES)
@@ -114,7 +121,6 @@ libVISUEngineImpl_la_CPPFLAGS= \
        -I$(srcdir)/../CONVERTOR \
        -I$(srcdir)/../PIPELINE \
        -I$(srcdir)/../OBJECT \
-       -I$(srcdir)/../VVTK \
        -I$(srcdir)/../GUITOOLS \
        -I$(top_builddir)/idl \
        -I$(top_builddir)/salome_adm/unix
@@ -149,7 +155,6 @@ libVISUEngineImpl_la_LIBADD= \
        ../CONVERTOR/libVisuConvertor.la \
        ../PIPELINE/libVisuPipeLine.la \
        ../OBJECT/libVisuObject.la \
-       ../VVTK/libVVTK.la \
        ../GUITOOLS/libVISUGUITOOLS.la
 
 if MED_ENABLE_MULTIPR
index 073d07c895fef1e0f0119587355241f384d2ad0e..c8f788b9f447d4b8de2ffdfd640d56f68ee5b853 100644 (file)
@@ -47,6 +47,7 @@ static int MYDEBUG = 0;
 static int MYDEBUG = 0;
 #endif
 
+using namespace std;
 
 namespace VISU
 {
index 9e833c82d6324beb75a27722a235efe4217107a7..547a4f3ab69f0dca3221f8db9fb2f70dc4fcf971 100644 (file)
@@ -39,8 +39,8 @@
 
 #include "VTKViewer_Algorithm.h"
 #include "SVTK_Functor.h"
+#include "SVTK_ViewWindow.h"
 
-#include "VVTK_ViewWindow.h"
 #include "SUIT_ResourceMgr.h"
 
 #include <vtkRenderWindow.h>
@@ -55,6 +55,8 @@ static int MYDEBUG = 0;
 static int MYDEBUG = 0;
 #endif
 
+using namespace std;
+
 namespace
 {
   //----------------------------------------------------------------------------
@@ -365,6 +367,15 @@ VISU::ColoredPrs3dCache_i
 {
   std::string aFolderName = VISU::ColoredPrs3dCache_i::GetFolderName();
   SALOMEDS::SObject_var aSObject = theStudy->FindObject(aFolderName.c_str());
+  if (CORBA::is_nil(aSObject)) {
+    aSObject = theStudy->FindObject("3D Cache System");
+    if (!CORBA::is_nil(aSObject)) {
+      SALOMEDS::StudyBuilder_var aBuilder = theStudy->NewBuilder();
+      SALOMEDS::GenericAttribute_var anAttr = aBuilder->FindOrCreateAttribute( aSObject, "AttributeName" );
+      SALOMEDS::AttributeName_var aNameAttr = SALOMEDS::AttributeName::_narrow( anAttr );
+      aNameAttr->SetValue( GetFolderName().c_str() );
+    }
+  }
   if(!CORBA::is_nil(aSObject)){
     CORBA::Object_var anObject = aSObject->GetObject();
     VISU::ColoredPrs3dCache_var aCache = VISU::ColoredPrs3dCache::_narrow(anObject);
@@ -477,7 +488,8 @@ std::string
 VISU::ColoredPrs3dCache_i
 ::GetFolderName() 
 { 
-  return "3D Cache System"; 
+  //return "3D Cache System"; 
+  return "Presentations"; 
 }
 
 //----------------------------------------------------------------------------
index ead208074d4678cd5cc7cef1a1b6cdd7829908e4..dc08a93898bbb3a6ab6431a7159a3211ba9da852 100644 (file)
@@ -27,6 +27,8 @@
 #ifndef VISU_ColoredPrs3dCache_i_HeaderFile
 #define VISU_ColoredPrs3dCache_i_HeaderFile
 
+#include "VISU_I.hxx"
+
 #include "VISU_ColoredPrs3dFactory.hh"
 
 #include "SALOME_GenericObjPointer.hh"
@@ -103,7 +105,7 @@ namespace VISU
    * This interface is responsible for memory management of 3d presentations.
    * One cache corresponds to one study.
    */
-  class ColoredPrs3dCache_i : public virtual POA_VISU::ColoredPrs3dCache,
+  class VISU_I_EXPORT ColoredPrs3dCache_i : public virtual POA_VISU::ColoredPrs3dCache,
                              public virtual SALOME::GenericObj_i,
                              public virtual RemovableObject_i
   {
index 0aee75f247d1f5af53a019b22c26f816a43787bd..69e33eb6d09aa0f8c28246262d01f4cdc0e6054e 100644 (file)
@@ -44,6 +44,7 @@
 //static int MYDEBUG = 0;
 #endif
 
+using namespace std;
 
 namespace VISU
 {
index 98b54763fad7180c55497c37c426d23852674627..8a76cd0672c203008a9316b61b08441fecfcabd5 100644 (file)
@@ -40,6 +40,8 @@ static int MYDEBUG = 0;
 static int MYDEBUG = 0;
 #endif
 
+using namespace std;
+
 //---------------------------------------------------------------
 int VISU::ColoredPrs3dHolder_i::myNbHolders = 0;
 
index 840d537e459a190d94a7d2fbd1d2484a059876d2..dd28b077bf1f38c0990e5aea51e36abca8bcf73b 100644 (file)
@@ -27,6 +27,7 @@
 #ifndef VISU_ColoredPrs3dHolder_i_HeaderFile
 #define VISU_ColoredPrs3dHolder_i_HeaderFile
 
+#include "VISU_I.hxx"
 #include "VISU_PrsObject_i.hh"
 
 #include "SALOME_GenericObj_i.hh"
@@ -41,7 +42,7 @@ namespace VISU
    * created on fields. It is publishing in the object browser in a separate folder
    * and can be controled by viewer's slider.
    */
-  class ColoredPrs3dHolder_i : public virtual POA_VISU::ColoredPrs3dHolder,
+  class VISU_I_EXPORT ColoredPrs3dHolder_i : public virtual POA_VISU::ColoredPrs3dHolder,
                               public virtual SALOME::GenericObj_i,
                               public virtual PrsObject_i
   {
index 1f153a755e49979edb4e88f7df6c6e989769d0e3..9a9f742d04237e695e7a2f5beb2d4fa4d62cff21 100644 (file)
@@ -46,6 +46,7 @@ static int MYDEBUG = 0;
 static int MYDEBUG = 0;
 #endif
 
+using namespace std;
 
 //---------------------------------------------------------------
 namespace
@@ -180,7 +181,8 @@ ColoredPrs3d_i(EPublishInStudyMode thePublishInStudyMode) :
   myOrientation( VISU::ColoredPrs3dBase::HORIZONTAL ),
   myColoredPL(NULL),
   myIsFixedRange(false),
-  myIsRestored(true)
+  myIsRestored(true)/* RKV : Begin*/,
+  myIsDistributionVisible(false)/* RKV : End*/
 {}
 
 //---------------------------------------------------------------
@@ -694,21 +696,24 @@ VISU::ColoredPrs3d_i
     SetNbColors(anOrigin->GetNbColors());
     
     SetUnitsVisible(anOrigin->IsUnitsVisible());
-    SetLabelsFormat(anOrigin->GetLabelsFormat());
-
+    SetIsDistributionVisible(anOrigin->GetIsDistributionVisible());
+    SetLabelsFormat( anOrigin->GetLabelsFormat() );
+    
     SetBarOrientation(anOrigin->GetBarOrientation());
     
     SetMinMaxController( anOrigin );
 
-    if(anOrigin->IsRangeFixed())
-      SetRange(anOrigin->GetMin(), anOrigin->GetMax());
+    if ( anOrigin->IsRangeFixed() )
+      SetRange( anOrigin->GetMin(), anOrigin->GetMax() );
     else
       SetSourceRange();
 
+    SetScalarFilterRange( anOrigin->GetScalarFilterMin(), anOrigin->GetScalarFilterMax() );
+    UseScalarFiltering( anOrigin->IsScalarFilterUsed() );
+
     SetPosition(anOrigin->GetPosX(), anOrigin->GetPosY());
     SetSize(anOrigin->GetWidth(), anOrigin->GetHeight());
-    SetRatios(anOrigin->GetTitleWidth(), anOrigin->GetTitleHeight(),
-             anOrigin->GetLabelWidth(), anOrigin->GetLabelHeight(),
+    SetRatios(anOrigin->GetTitleSize(), anOrigin->GetLabelSize(),
              anOrigin->GetBarWidth(), anOrigin->GetBarHeight());
     SetLabels(anOrigin->GetLabels());
 
@@ -778,21 +783,74 @@ VISU::ColoredPrs3d_i
   return myColoredPL->GetScalarRange()[1];
 }
 
+
 //----------------------------------------------------------------------------
 void
 VISU::ColoredPrs3d_i
-::SetRange(CORBA::Double theMin, CORBA::Double theMax)
+::SetRange( CORBA::Double theMin, CORBA::Double theMax )
 {
   VISU::TSetModified aModified(this);
 
   vtkFloatingPointType aScalarRange[2] = {theMin, theMax};
   ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_ColoredPL, vtkFloatingPointType*>
                   (GetSpecificPL(), &VISU_ColoredPL::SetScalarRange, aScalarRange));
-
   UseFixedRange(true);
 }
 
 
+//----------------------------------------------------------------------------
+void
+VISU::ColoredPrs3d_i
+::SetScalarFilterRange( CORBA::Double theMin, CORBA::Double theMax )
+{
+  VISU::TSetModified aModified(this);
+
+  vtkFloatingPointType aScalarRange[ 2 ] = { theMin, theMax };
+  ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_ColoredPL, vtkFloatingPointType*>
+                  (GetSpecificPL(), &VISU_ColoredPL::SetScalarFilterRange, aScalarRange) );
+}
+
+
+//----------------------------------------------------------------------------
+CORBA::Double
+VISU::ColoredPrs3d_i
+::GetScalarFilterMin()
+{
+  vtkFloatingPointType aScalarRange[ 2 ];
+  GetSpecificPL()->GetScalarFilterRange( aScalarRange );
+
+  return aScalarRange[ 0 ];
+}
+
+
+//----------------------------------------------------------------------------
+CORBA::Double
+VISU::ColoredPrs3d_i
+::GetScalarFilterMax()
+{
+  vtkFloatingPointType aScalarRange[ 2 ];
+  GetSpecificPL()->GetScalarFilterRange( aScalarRange );
+
+  return aScalarRange[ 1 ];
+}
+
+
+//----------------------------------------------------------------------------
+CORBA::Boolean
+VISU::ColoredPrs3d_i
+::IsScalarFilterUsed()
+{
+  return myColoredPL->IsScalarFilterUsed();
+}
+
+//----------------------------------------------------------------------------
+void
+VISU::ColoredPrs3d_i
+::UseScalarFiltering( CORBA::Boolean theUseScalarFilter )
+{
+  return myColoredPL->UseScalarFiltering( theUseScalarFilter );
+}
+
 //----------------------------------------------------------------------------
 void
 VISU::ColoredPrs3d_i
@@ -805,7 +863,7 @@ VISU::ColoredPrs3d_i
     ProcessVoidEvent(new TVoidMemFunEvent<VISU_ColoredPL>
                     (GetSpecificPL(), &VISU_ColoredPL::SetSourceRange));
   }else{
-    vtkFloatingPointType aScalarRange[2] = {GetSourceMin(), GetSourceMax()};
+    vtkFloatingPointType aScalarRange[ 2 ] = {GetSourceMin(), GetSourceMax()};
     ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_ColoredPL, vtkFloatingPointType*>
                     (GetSpecificPL(), &VISU_ColoredPL::SetScalarRange, aScalarRange));
   }
@@ -949,14 +1007,11 @@ VISU::ColoredPrs3d_i
 //----------------------------------------------------------------------------
 void
 VISU::ColoredPrs3d_i
-::SetRatios(CORBA::Long theTitleWidth, CORBA::Long theTitleHeight,
-           CORBA::Long theLabelWidth, CORBA::Long theLabelHeight,
+::SetRatios(CORBA::Long theTitleSize, CORBA::Long theLabelSize, 
            CORBA::Long theBarWidth, CORBA::Long theBarHeight) 
 {
-  bool anIsSameValue = VISU::CheckIsSameValue(myTitleWidth, theTitleWidth);
-  anIsSameValue &= VISU::CheckIsSameValue(myTitleHeight, theTitleHeight);
-  anIsSameValue &= VISU::CheckIsSameValue(myLabelWidth, theLabelWidth);
-  anIsSameValue &= VISU::CheckIsSameValue(myLabelHeight, theLabelHeight);
+  bool anIsSameValue = VISU::CheckIsSameValue(myTitleSize, theTitleSize);
+  anIsSameValue &= VISU::CheckIsSameValue(myLabelSize, theLabelSize);
   anIsSameValue &= VISU::CheckIsSameValue(myBarWidth, theBarWidth);
   anIsSameValue &= VISU::CheckIsSameValue(myBarHeight, theBarHeight);
   if(anIsSameValue)
@@ -964,10 +1019,8 @@ VISU::ColoredPrs3d_i
 
   VISU::TSetModified aModified(this);
 
-  myTitleWidth = theTitleWidth; 
-  myTitleHeight = theTitleHeight;
-  myLabelWidth = theLabelWidth; 
-  myLabelHeight = theLabelHeight;
+  myTitleSize = theTitleSize; 
+  myLabelSize = theLabelSize; 
   myBarWidth = theBarWidth; 
   myBarHeight = theBarHeight;
   myParamsTime.Modified();
@@ -976,33 +1029,17 @@ VISU::ColoredPrs3d_i
 //----------------------------------------------------------------------------
 CORBA::Long
 VISU::ColoredPrs3d_i
-::GetTitleWidth() 
+::GetTitleSize() 
 {
-  return myTitleWidth;
-}
-
-//----------------------------------------------------------------------------
-CORBA::Long
-VISU::ColoredPrs3d_i
-::GetTitleHeight() 
-{ 
-  return myTitleHeight;
+  return myTitleSize;
 }
 
 //----------------------------------------------------------------------------
 CORBA::Long
 VISU::ColoredPrs3d_i
-::GetLabelWidth() 
+::GetLabelSize() 
 {
-  return myLabelWidth;
-}
-
-//----------------------------------------------------------------------------
-CORBA::Long
-VISU::ColoredPrs3d_i
-::GetLabelHeight() 
-{ 
-  return myLabelHeight;
+  return myLabelSize;
 }
 
 //----------------------------------------------------------------------------
@@ -1043,6 +1080,8 @@ VISU::ColoredPrs3d_i
   return myNumberOfLabels;
 }
 
+//----------------------------------------------------------------------------
+
 //----------------------------------------------------------------------------
 void
 VISU::ColoredPrs3d_i
@@ -1433,12 +1472,15 @@ VISU::ColoredPrs3d_i
 
   // Scalar Range
   int aRangeType = aResourceMgr->integerValue("VISU" , "scalar_range_type", 0);
-  if(aRangeType == 1){
+  if ( aRangeType == 1 ) {
     float aMin = aResourceMgr->doubleValue("VISU", "scalar_range_min", 0);
     float aMax = aResourceMgr->doubleValue("VISU", "scalar_range_max", 0);
-    SetRange(aMin, aMax);
+    SetRange( aMin, aMax );
   }
-  UseFixedRange(aRangeType == 1);
+  UseFixedRange( aRangeType == 1 );
+
+  bool isFiltered = aResourceMgr->booleanValue("VISU", "scalar_bar_filter_by_scalars", false);
+  UseScalarFiltering( isFiltered );
 
   int aNumberOfColors = aResourceMgr->integerValue( "VISU", "scalar_bar_num_colors", 64 );
   SetNbColors(aNumberOfColors);
@@ -1446,8 +1488,10 @@ VISU::ColoredPrs3d_i
   bool isUnits = aResourceMgr->booleanValue( "VISU", "scalar_bar_display_units", true );
   SetUnitsVisible(isUnits);
 
-  QString aLabelsFormat = aResourceMgr->stringValue( "VISU", "scalar_bar_label_format", "%-#6.3g" );
-  SetLabelsFormat(aLabelsFormat.toLatin1().data());
+  SetIsDistributionVisible( aResourceMgr->booleanValue("VISU", "scalar_bar_show_distribution", false) ); // RKV
+  
+  int lp = aResourceMgr->integerValue( "VISU", "scalar_bar_label_precision", 3 );
+  SetLabelsFormat( VISU::ToFormat( lp ).c_str() );
 
   // Orientation
   int anOrientation = aResourceMgr->integerValue("VISU", "scalar_bar_orientation", 0);
@@ -1459,32 +1503,26 @@ VISU::ColoredPrs3d_i
   // Scalar Bar origin
   QString propertyName = QString( "scalar_bar_%1_" ).arg( anOrientation == 0 ? "vertical" : "horizontal" );
 
-  vtkFloatingPointType aXorigin = (myOrientation == VISU::ColoredPrs3dBase::VERTICAL) ? 0.01 : 0.2;
+  vtkFloatingPointType aXorigin = (myOrientation == VISU::ColoredPrs3dBase::VERTICAL) ? 0.01 : 0.1;
   aXorigin = aResourceMgr->doubleValue("VISU", propertyName + "x", aXorigin);
   myPosition[0] = aXorigin;
 
-  vtkFloatingPointType aYorigin = (myOrientation == VISU::ColoredPrs3dBase::VERTICAL) ? 0.1 : 0.012;
+  vtkFloatingPointType aYorigin = (myOrientation == VISU::ColoredPrs3dBase::VERTICAL) ? 0.1 : 0.01;
   aYorigin = aResourceMgr->doubleValue("VISU", propertyName + "y", aYorigin);
   myPosition[1] = aYorigin;
 
   // Scalar Bar size
-  myWidth = (myOrientation == VISU::ColoredPrs3dBase::VERTICAL)? 0.1 : 0.6;
+  myWidth = (myOrientation == VISU::ColoredPrs3dBase::VERTICAL)? 0.08 : 0.8;
   myWidth = aResourceMgr->doubleValue("VISU", propertyName + "width", myWidth);
 
-  myHeight = (myOrientation == VISU::ColoredPrs3dBase::VERTICAL)? 0.8:0.12;
+  myHeight = (myOrientation == VISU::ColoredPrs3dBase::VERTICAL)? 0.8:0.08;
   myHeight = aResourceMgr->doubleValue("VISU", propertyName + "height", myHeight);
 
-  myTitleWidth = 0;
-  myTitleWidth = aResourceMgr->integerValue("VISU", propertyName + "title_width", myTitleWidth);
+  myTitleSize = 0;
+  myTitleSize = aResourceMgr->integerValue("VISU", propertyName + "title_size", myTitleSize);
 
-  myTitleHeight = 0;
-  myTitleHeight = aResourceMgr->integerValue("VISU", propertyName + "title_height", myTitleHeight);
-
-  myLabelWidth = 0;
-  myLabelWidth = aResourceMgr->integerValue("VISU", propertyName + "label_width", myLabelWidth);
-
-  myLabelHeight = 0;
-  myLabelHeight = aResourceMgr->integerValue("VISU", propertyName + "label_height", myLabelHeight);
+  myLabelSize = 0;
+  myLabelSize = aResourceMgr->integerValue("VISU", propertyName + "label_size", myLabelSize);
 
   myBarWidth = 0;
   myBarWidth = aResourceMgr->integerValue("VISU", propertyName + "bar_width", myBarWidth);
@@ -1522,7 +1560,7 @@ VISU::ColoredPrs3d_i
     
     myIsBoldTitle   = f.bold();
     myIsItalicTitle = f.italic();
-    myIsShadowTitle =  f.underline();
+    myIsShadowTitle =  f.overline();
   }
 
   QColor aTextColor = aResourceMgr->colorValue( "VISU", "scalar_bar_title_color", QColor( 255, 255, 255 ) );
@@ -1547,7 +1585,7 @@ VISU::ColoredPrs3d_i
     
     myIsBoldLabel   = f.bold();
     myIsItalicLabel = f.italic();
-    myIsShadowLabel =  f.underline();
+    myIsShadowLabel =  f.overline();
   }
 
   QColor aLabelColor = aResourceMgr->colorValue( "VISU", "scalar_bar_label_color", QColor( 255, 255, 255 ) );
@@ -1557,7 +1595,41 @@ VISU::ColoredPrs3d_i
   myLabelColor[0] = aLabelColor.red()   / 255.;
   myLabelColor[1] = aLabelColor.green() / 255.;
   myLabelColor[2] = aLabelColor.blue()  / 255.;
+  
+  // Parameters of labels displaed field values
 
+  myValLblFontType = VTK_ARIAL;
+  myIsBoldValLbl = true;
+  myIsItalicValLbl = myIsShadowValLbl = false;
+  myValLblFontSize = 12;
+  if( aResourceMgr->hasValue( "VISU", "values_labeling_font" ) )
+  {
+    // family
+    QFont f = aResourceMgr->fontValue( "VISU", "values_labeling_font" );
+    if ( f.family() == "Arial" )
+      myValLblFontType = VTK_ARIAL;
+    else if ( f.family() == "Courier" )
+      myValLblFontType = VTK_COURIER;
+    else if ( f.family() == "Times" )
+      myValLblFontType = VTK_TIMES;
+
+    // size
+    if ( f.pointSize() > -1 )
+      myValLblFontSize = f.pointSize();
+
+    // color
+    QColor aColor = aResourceMgr->colorValue( 
+      "VISU", "values_labeling_color", QColor( 255, 255, 255 ) );
+    myValLblFontColor[ 0 ] = aColor.red() / 255.;
+    myValLblFontColor[ 1 ] = aColor.green() / 255.;
+    myValLblFontColor[ 2 ] = aColor.blue()/ 255.;
+
+    // bold, italic, shadow
+    myIsBoldValLbl = f.bold();
+    myIsItalicValLbl = f.italic();
+    myIsShadowValLbl =  f.overline();
+  }
+  
   return this;
 }
 
@@ -1603,10 +1675,20 @@ VISU::ColoredPrs3d_i
 
   Build(ERestore);
 
-  SetScalarMode(VISU::Storable::FindValue(theMap,"myScalarMode").toInt());
-  float aMin = VISU::Storable::FindValue(theMap,"myScalarRange[0]").toDouble();
-  float aMax = VISU::Storable::FindValue(theMap,"myScalarRange[1]").toDouble();
-  SetRange(aMin, aMax);
+  SetScalarMode(VISU::Storable::FindValue( theMap,"myScalarMode" ).toInt() );
+  {
+    float aMin = VISU::Storable::FindValue( theMap, "myScalarRange[0]" ).toDouble();
+    float aMax = VISU::Storable::FindValue( theMap, "myScalarRange[1]" ).toDouble();
+    SetRange( aMin, aMax );
+  }
+  {
+    bool isFiltered = VISU::Storable::FindValue( theMap, "myIsFilteredByScalars", "0" ).toInt();
+    float aMin = VISU::Storable::FindValue( theMap, "myScalarFilterRange[0]" ).toDouble();
+    float aMax = VISU::Storable::FindValue( theMap, "myScalarFilterRange[1]" ).toDouble();
+    SetScalarFilterRange( aMin, aMax );
+    UseScalarFiltering( isFiltered );
+  }
+  SetIsDistributionVisible(VISU::Storable::FindValue(theMap,"myIsDistributionVisible", "0").toInt());
 
   UseFixedRange(VISU::Storable::FindValue(theMap,"myIsFixedRange", "0").toInt());
 
@@ -1621,10 +1703,8 @@ VISU::ColoredPrs3d_i
   myPosition[1] = VISU::Storable::FindValue(theMap,"myPosition[1]").toDouble();
   myWidth = VISU::Storable::FindValue(theMap,"myWidth").toDouble();
   myHeight = VISU::Storable::FindValue(theMap,"myHeight").toDouble();
-  myTitleWidth = VISU::Storable::FindValue(theMap,"myTitleWidth").toInt();
-  myTitleHeight = VISU::Storable::FindValue(theMap,"myTitleHeight").toInt();
-  myLabelWidth = VISU::Storable::FindValue(theMap,"myLabelWidth").toInt();
-  myLabelHeight = VISU::Storable::FindValue(theMap,"myLabelHeight").toInt();
+  myTitleSize = VISU::Storable::FindValue(theMap,"myTitleSize").toInt();
+  myLabelSize = VISU::Storable::FindValue(theMap,"myLabelSize").toInt();
   myBarWidth = VISU::Storable::FindValue(theMap,"myBarWidth").toInt();
   myBarHeight = VISU::Storable::FindValue(theMap,"myBarHeight").toInt();
 
@@ -1657,6 +1737,18 @@ VISU::ColoredPrs3d_i
       }
     }
   }
+  
+  // Parameters of labels displayed field values
+
+  myValLblFontType = VISU::Storable::FindValue( theMap, "myValLblFontType", "0"  ).toInt();
+  myIsBoldValLbl = VISU::Storable::FindValue( theMap, "myIsBoldValLbl", "1" ).toInt();
+  myIsItalicValLbl = VISU::Storable::FindValue( theMap, "myIsItalicValLbl", "0" ).toInt();
+  myIsShadowValLbl = VISU::Storable::FindValue( theMap, "myIsShadowValLbl", "0" ).toInt();
+  myValLblFontSize = VISU::Storable::FindValue( theMap, "myValLblFontSize", "12" ).toDouble();
+  myValLblFontColor[ 0 ] = VISU::Storable::FindValue( theMap, "myValLblFontColor[0]", "1" ).toFloat();
+  myValLblFontColor[ 1 ] = VISU::Storable::FindValue( theMap, "myValLblFontColor[1]", "1" ).toFloat();
+  myValLblFontColor[ 2 ] = VISU::Storable::FindValue( theMap, "myValLblFontColor[2]", "1" ).toFloat();
+  
   return this;
 }
 
@@ -1676,6 +1768,12 @@ VISU::ColoredPrs3d_i
   Storable::DataToStream( theStr, "myScalarRange[0]", GetMin() );
   Storable::DataToStream( theStr, "myScalarRange[1]", GetMax() );
   Storable::DataToStream( theStr, "myIsFixedRange",   IsRangeFixed() );
+  
+  Storable::DataToStream( theStr, "myIsFilteredByScalars",  IsScalarFilterUsed() );
+  Storable::DataToStream( theStr, "myScalarFilterRange[0]", GetScalarFilterMin() );
+  Storable::DataToStream( theStr, "myScalarFilterRange[1]", GetScalarFilterMax() );
+
+  Storable::DataToStream( theStr, "myIsDistributionVisible", GetIsDistributionVisible() ); // RKV
 
   Storable::DataToStream( theStr, "myNumberOfColors", int(GetNbColors()) );
   Storable::DataToStream( theStr, "myOrientation",    myOrientation );
@@ -1683,15 +1781,15 @@ VISU::ColoredPrs3d_i
   Storable::DataToStream( theStr, "myTitle",          myTitle.c_str() );
   Storable::DataToStream( theStr, "myUnitsVisible",   myIsUnits );
   Storable::DataToStream( theStr, "myNumberOfLabels", myNumberOfLabels );
+
   Storable::DataToStream( theStr, "myLabelsFormat",   myLabelsFormat.c_str() );
+
   Storable::DataToStream( theStr, "myPosition[0]",    myPosition[0] );
   Storable::DataToStream( theStr, "myPosition[1]",    myPosition[1] );
   Storable::DataToStream( theStr, "myWidth",          myWidth );
   Storable::DataToStream( theStr, "myHeight",         myHeight );
-  Storable::DataToStream( theStr, "myTitleWidth",     myTitleWidth );
-  Storable::DataToStream( theStr, "myTitleHeight",    myTitleHeight );
-  Storable::DataToStream( theStr, "myLabelWidth",     myLabelWidth );
-  Storable::DataToStream( theStr, "myLabelHeight",    myLabelHeight );
+  Storable::DataToStream( theStr, "myTitleSize",     myTitleSize );
+  Storable::DataToStream( theStr, "myLabelSize",     myLabelSize );
   Storable::DataToStream( theStr, "myBarWidth",       myBarWidth );
   Storable::DataToStream( theStr, "myBarHeight",      myBarHeight );
 
@@ -1710,6 +1808,18 @@ VISU::ColoredPrs3d_i
   Storable::DataToStream( theStr, "myLabelColor[0]",  myLabelColor[0] );
   Storable::DataToStream( theStr, "myLabelColor[1]",  myLabelColor[1] );
   Storable::DataToStream( theStr, "myLabelColor[2]",  myLabelColor[2] );
+  
+  // Parameters of labels displayed field values
+
+  Storable::DataToStream( theStr, "myValLblFontType", myValLblFontType );
+  Storable::DataToStream( theStr, "myIsBoldValLbl", myIsBoldValLbl );
+  Storable::DataToStream( theStr, "myIsItalicValLbl", myIsItalicValLbl );
+  Storable::DataToStream( theStr, "myIsShadowValLbl", myIsShadowValLbl );
+  Storable::DataToStream( theStr, "myValLblFontSize", myValLblFontSize );
+  Storable::DataToStream( theStr, "myValLblFontColor[0]", myValLblFontColor[ 0 ] );
+  Storable::DataToStream( theStr, "myValLblFontColor[1]", myValLblFontColor[ 1 ] );
+  Storable::DataToStream( theStr, "myValLblFontColor[2]", myValLblFontColor[ 2 ] );
+
 
   std::ostringstream aGeomNameList;
   std::string aMeshName = GetCMeshName();
@@ -1740,6 +1850,15 @@ VISU::ColoredPrs3d_i
 }
 
 
+//----------------------------------------------------------------------------
+void
+VISU::ColoredPrs3d_i
+::SetMapScale(double theMapScale)
+{
+  GetSpecificPL()->SetMapScale(theMapScale);
+}
+
+
 //----------------------------------------------------------------------------
 void
 VISU::ColoredPrs3d_i
@@ -1832,3 +1951,181 @@ VISU::ColoredPrs3d_i
     aStudyBuilder->CommitCommand();
   return this;
 }
+
+//----------------------------------------------------------------------------
+void
+VISU::ColoredPrs3d_i
+::SetIsDistributionVisible(CORBA::Boolean isVisible)
+{
+  if( myIsDistributionVisible != isVisible ){
+    VISU::TSetModified aModified(this);
+    myIsDistributionVisible = isVisible;
+    myParamsTime.Modified();
+  }
+}
+
+//----------------------------------------------------------------------------
+CORBA::Boolean
+VISU::ColoredPrs3d_i
+::GetIsDistributionVisible()
+{
+  return myIsDistributionVisible;
+}
+
+//----------------------------------------------------------------------------
+
+
+int
+VISU::ColoredPrs3d_i
+::GetValLblFontType() const
+{
+  return myValLblFontType;
+}
+
+//----------------------------------------------------------------------------
+
+void
+VISU::ColoredPrs3d_i
+::SetValLblFontType( const int theType )
+{
+  if ( myValLblFontType == theType )
+    return;
+
+  VISU::TSetModified aModified( this );
+
+  myValLblFontType = theType;
+  myParamsTime.Modified();
+}
+
+//----------------------------------------------------------------------------
+
+double
+VISU::ColoredPrs3d_i
+::GetValLblFontSize() const
+{
+  return myValLblFontSize;
+}
+
+//----------------------------------------------------------------------------
+
+void
+VISU::ColoredPrs3d_i
+::SetValLblFontSize( const double theSize )
+{
+  if ( VISU::CheckIsSameValue( myValLblFontSize, theSize ) )
+    return;
+
+  VISU::TSetModified aModified( this );
+
+  myValLblFontSize = theSize;
+  myParamsTime.Modified();
+}
+
+//----------------------------------------------------------------------------
+
+void
+VISU::ColoredPrs3d_i
+::GetValLblFontColor( vtkFloatingPointType& theR, 
+                      vtkFloatingPointType& theG, 
+                      vtkFloatingPointType& theB ) const
+{
+  theR = myValLblFontColor[ 0 ];
+  theG = myValLblFontColor[ 1 ];
+  theB = myValLblFontColor[ 2 ];
+}
+
+//----------------------------------------------------------------------------
+
+void
+VISU::ColoredPrs3d_i
+::SetValLblFontColor( const vtkFloatingPointType theR, 
+                      const vtkFloatingPointType theG, 
+                      const vtkFloatingPointType theB )
+{
+  if ( VISU::CheckIsSameValue( myValLblFontColor[ 0 ], theR ) &&
+       VISU::CheckIsSameValue( myValLblFontColor[ 1 ], theG ) &&
+       VISU::CheckIsSameValue (myValLblFontColor[ 2 ], theB ) )
+    return;
+
+  VISU::TSetModified aModified(this);
+
+  myValLblFontColor[ 0 ] = theR; 
+  myValLblFontColor[ 1 ] = theG; 
+  myValLblFontColor[ 2 ] = theB; 
+  myParamsTime.Modified();
+}
+
+//----------------------------------------------------------------------------
+
+bool
+VISU::ColoredPrs3d_i
+::IsBoldValLbl() const
+{
+  return myIsBoldValLbl;
+}
+
+//----------------------------------------------------------------------------
+
+void
+VISU::ColoredPrs3d_i
+::SetBoldValLbl( const bool theVal )
+{
+  if ( myIsBoldValLbl == theVal )
+    return;
+
+  VISU::TSetModified aModified( this );
+
+  myIsBoldValLbl =  theVal;
+  myParamsTime.Modified();
+}
+
+//----------------------------------------------------------------------------
+
+bool
+VISU::ColoredPrs3d_i
+::IsItalicValLbl() const
+{
+  return myIsItalicValLbl;
+}
+
+//----------------------------------------------------------------------------
+
+void
+VISU::ColoredPrs3d_i
+::SetItalicValLbl( const bool theVal )
+{
+  if ( myIsItalicValLbl == theVal )
+    return;
+
+  VISU::TSetModified aModified( this );
+
+  myIsItalicValLbl =  theVal;
+  myParamsTime.Modified();
+}
+
+//----------------------------------------------------------------------------
+
+bool
+VISU::ColoredPrs3d_i
+::IsShadowValLbl() const
+{
+  return myIsShadowValLbl;
+}
+
+//----------------------------------------------------------------------------
+
+void
+VISU::ColoredPrs3d_i
+::SetShadowValLbl( const bool theVal )
+{
+  if ( myIsShadowValLbl == theVal )
+    return;
+
+  VISU::TSetModified aModified( this );
+
+  myIsShadowValLbl =  theVal;
+  myParamsTime.Modified();
+}
+
+//----------------------------------------------------------------------------
+
index c2035a2125f7c68fb711d2d28f3e1fd5c07b46ac..d150f68618c3e2658308f5fbc0ab10685157dfae 100644 (file)
@@ -284,8 +284,7 @@ namespace VISU
     
     virtual 
     void
-    SetRatios(CORBA::Long theTitleWidth, CORBA::Long theTitleHeight,
-             CORBA::Long theLabelWidth, CORBA::Long theLabelHeight,
+    SetRatios(CORBA::Long theTitleSize, CORBA::Long theLabelSize, 
              CORBA::Long theBarWidth, CORBA::Long theBarHeight);
     
     virtual 
@@ -298,19 +297,11 @@ namespace VISU
 
     virtual 
     CORBA::Long
-    GetTitleWidth();
-
-    virtual
-    CORBA::Long
-    GetTitleHeight();
+    GetTitleSize();
 
     virtual 
     CORBA::Long
-    GetLabelWidth();
-
-    virtual
-    CORBA::Long
-    GetLabelHeight();
+    GetLabelSize();
 
     virtual 
     CORBA::Long
@@ -355,6 +346,40 @@ namespace VISU
     CORBA::Boolean
     IsUnitsVisible();
 
+    /*!  
+     * Set the visibility of a distribution curve.
+     * \param theIs is used to switch on/off the visibility of a distribution curve.
+     */
+    virtual void SetIsDistributionVisible(CORBA::Boolean theIs);
+    
+    //! Gets current visibility of a distribution curve
+    virtual CORBA::Boolean GetIsDistributionVisible();
+    
+    //! Gets current filtering by scalars mode
+    virtual CORBA::Boolean IsScalarFilterUsed();
+    
+    virtual void UseScalarFiltering( CORBA::Boolean theUseScalarFilter );
+
+    /*!
+     * Sets scalar range - min and max boundaries of the scalar bar.
+     * \param theMin  Min boundary of the scalar bar.
+     * \param theMax  Max boundary of the scalar bar.
+     * \param theIsFilter  if true then filter by scalars.
+     */
+    virtual
+    void
+    SetScalarFilterRange( CORBA::Double theMin, CORBA::Double theMax );
+
+    //----------------------------------------------------------------------------
+    virtual
+    CORBA::Double
+    GetScalarFilterMin();
+
+    //----------------------------------------------------------------------------
+    virtual
+    CORBA::Double
+    GetScalarFilterMax();
+
     //----------------------------------------------------------------------------
     //! Gets memory size actually used by the presentation (Mb).
     virtual
@@ -537,12 +562,68 @@ namespace VISU
                  vtkFloatingPointType theG, 
                  vtkFloatingPointType theB);
 
+    virtual
+    void
+    SetMapScale(double theMapScale = 1.0);
+
     VISU_ColoredPL* 
     GetSpecificPL() const
     { 
       return myColoredPL; 
     }
     
+        virtual 
+    int
+    GetValLblFontType() const;
+
+    virtual 
+    void
+    SetValLblFontType( const int theType );
+
+    virtual 
+    double
+    GetValLblFontSize() const;
+
+    virtual 
+    void
+    SetValLblFontSize( const double theSize );
+
+    virtual 
+    bool
+    IsBoldValLbl() const;
+
+    virtual
+    void
+    SetBoldValLbl( const bool theVal );
+
+    virtual 
+    bool
+    IsItalicValLbl() const;
+
+    virtual
+    void
+    SetItalicValLbl( const bool theVal );
+
+    virtual 
+    bool
+    IsShadowValLbl() const;
+
+    virtual
+    void
+    SetShadowValLbl( const bool theVal );
+
+    virtual 
+    void
+    GetValLblFontColor( vtkFloatingPointType& theR, 
+                      vtkFloatingPointType& theG, 
+                      vtkFloatingPointType& theB ) const;
+
+    virtual
+    void
+    SetValLblFontColor( const vtkFloatingPointType theR, 
+                       const vtkFloatingPointType theG, 
+                       const vtkFloatingPointType theB );
+    
     //----------------------------------------------------------------------------
   protected:
     /*!
@@ -650,11 +731,11 @@ namespace VISU
 
     int myNumberOfLabels;
     std::string myLabelsFormat;
+
     VISU::ColoredPrs3dBase::Orientation myOrientation;
     vtkFloatingPointType myPosition[2],
                          myWidth, myHeight,
-                         myTitleWidth, myTitleHeight,
-                         myLabelWidth, myLabelHeight,
+                         myTitleSize, myLabelSize,
                          myBarWidth, myBarHeight;
 
     //Font management
@@ -673,6 +754,15 @@ namespace VISU
     VISU_ColoredPL* myColoredPL;
     bool myIsFixedRange;
 
+    bool myIsDistributionVisible; // RKV
+
+    // Result labels 
+    int                  myValLblFontType;
+    double               myValLblFontSize;
+    bool                 myIsBoldValLbl;
+    bool                 myIsItalicValLbl;
+    bool                 myIsShadowValLbl;
+    vtkFloatingPointType myValLblFontColor[ 3 ];
   };
 
 
index 1bdcf0aee560b3ba0aafed51c8c8ed1a3961403a..367749deb3059d14955341adac90312e4928bcd6 100644 (file)
@@ -1194,8 +1194,16 @@ VISU_MEDConvertor
       
       vtkIdType aDataType = VTK_DOUBLE;
       SALOME_MED::FIELDDOUBLE_ptr aFieldDouble = SALOME_MED::FIELDDOUBLE::_narrow(aMEDField);
-      if(aFieldDouble->_is_nil())
-       aDataType = VTK_LONG;
+      if(aFieldDouble->_is_nil()){
+        if (sizeof(long) == 4 ) // Size of CORBA::Long is always 4 (see CORBA_basetypes.h)
+          //Fix for IPAL20325 Crash on create presentation for imported field 
+          aDataType = VTK_LONG;
+        else if (sizeof(int) == 4)
+          aDataType = VTK_INT;
+        else {
+          throw std::runtime_error("Can't map CORBA::Long to a VTK type");
+        }
+      }
       aField->Init(aMEDField->getNumberOfComponents(), aDataType);
 
       aFieldMap[aFieldName.in()] = aField;
index e329711ccbb78b8f87ea1835db776c6641a9fb0a..af64913306cb7eb5456e264b9facb2629a206729 100644 (file)
@@ -46,6 +46,7 @@ static int MYDEBUG = 0;
 static int MYDEBUG = 0;
 #endif
 
+using namespace std;
 
 //---------------------------------------------------------------
 size_t
index 4592dea6de4bfbb880dee0eb7d22542e1d2297de..dcd1acfc22f58a3dcd09dc3d48a43c227dd5c77b 100644 (file)
@@ -41,7 +41,7 @@ static int MYDEBUG = 0;
 static int MYDEBUG = 0;
 #endif
 
-
+using namespace std;
 
 //----------------------------------------------------------------------------
 size_t 
diff --git a/src/VISU_I/VISU_Deformation_i.cc b/src/VISU_I/VISU_Deformation_i.cc
deleted file mode 100755 (executable)
index 507a947..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-//  Copyright (C) 2008  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_Deformation_i.cc
-//  Author : 
-//  Module : VISU
-
-#include "VISU_Deformation_i.hh"
-#include "VISU_Result_i.hh"
-#include "VISU_Prs3dUtils.hh"
-
-#include "VISU_DeformationPL.hxx"
-#include "VISU_Convertor.hxx"
-#include "VISU_DeformationPL.hxx"
-#include "VISUConfig.hh"
-
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
-//---------------------------------------------------------------
-VISU::Deformation_i::Deformation_i(VISU::ColoredPrs3d_i *thePrs3d):
-  myColoredPrs3d(thePrs3d)
-{
-  if(MYDEBUG) MESSAGE("Deformation_i::Deformation_i()");
-}
-
-//---------------------------------------------------------------
-VISU::Deformation_i::~Deformation_i()
-{
-  if(MYDEBUG) MESSAGE("Deformation_i::~Deformation_i()");
-}
-
-//---------------------------------------------------------------
-void VISU::Deformation_i::SetScale(CORBA::Double theScale)
-{
-  if(MYDEBUG) MESSAGE("Deformation_i::SetScale()");
-
-  VISU::TSetModified aModified(GetColoredPrs3d());
-
-  ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_DeformationPL, vtkFloatingPointType>
-                  (GetSpecificDeformedPL(), &VISU_DeformationPL::SetScale, theScale));
-}
-
-//---------------------------------------------------------------
-void VISU::Deformation_i::InitDeformedPipeLine(VISU_DeformationPL* theDeformedPipeLine){
-  
-  if(MYDEBUG) MESSAGE("Deformation_i::InitDeformedPipeLine()");
-  myDeformationPL = theDeformedPipeLine;
-}
-
-//---------------------------------------------------------------
-CORBA::Double 
-VISU::Deformation_i
-::GetScale()
-{
-  if(MYDEBUG) MESSAGE("Deformation_i::GetScale()");
-  return GetSpecificDeformedPL()->GetScale();
-}
-
-//---------------------------------------------------------------
-VISU::Entity VISU::Deformation_i::GetVectorialFieldEntity(){
-  return myVectorialEntity;
-}
-
-//---------------------------------------------------------------
-char* VISU::Deformation_i::GetVectorialFieldName(){
-  return CORBA::string_dup(myVectorialFieldName.c_str());
-}
-
-//---------------------------------------------------------------
-void VISU::Deformation_i::
-DeformationToStream(std::ostringstream& theStr)
-{
-  Storable::DataToStream(theStr,"myScaleFactor", GetScale());
-  Storable::DataToStream(theStr,"myVectorialField", GetVectorialFieldName());
-  Storable::DataToStream(theStr,"myVectorialEntiry", GetVectorialFieldEntity());
-
-}
-
-//---------------------------------------------------------------
-void
-VISU::Deformation_i::RestoreDeformation(SALOMEDS::SObject_ptr theSObject,
-                                       const Storable::TRestoringMap& theMap)
-{
-  SetScale(VISU::Storable::FindValue(theMap,"myScaleFactor").toDouble());
-  VISU::Entity anEntity = VISU::Entity(VISU::Storable::FindValue(theMap, "myVectorialEntiry").toInt());
-  
-  SetVectorialField(anEntity,
-                   VISU::Storable::FindValue(theMap, "myVectorialField").toLatin1().constData()); 
-}
-
-//---------------------------------------------------------------
-void
-VISU::Deformation_i::SameAsDeformation(const Deformation_i *aDeformedPrs){
-  if(const Deformation_i* aPrs = dynamic_cast<const Deformation_i*>(aDeformedPrs)) {
-    Deformation_i* anOrigin = const_cast<Deformation_i*>(aPrs);
-    
-    CORBA::String_var aVectorialFieldName = anOrigin->GetVectorialFieldName();
-    VISU::Entity anEntity = anOrigin->GetVectorialFieldEntity();
-    this->SetVectorialField(anEntity,
-                           aVectorialFieldName);
-    this->SetScale(anOrigin->GetScale());
-  }
-}
-
-void VISU::Deformation_i::SetVectorialField(Entity theEntity, const char* theFieldName){
-  if(MYDEBUG) MESSAGE("CutPlanes_i::SetVectorialField()");
-
-  bool anIsModified = false;
-  if(!anIsModified)
-    anIsModified |= GetVectorialFieldEntity() != theEntity;
-  
-  if(!anIsModified)
-    anIsModified |= GetVectorialFieldName() != theFieldName;
-
-  if(!anIsModified)
-    return;
-
-  ColoredPrs3d_i *aColoredPrs = GetColoredPrs3d();
-  int aTimeStampNumber = aColoredPrs->GetTimeStampNumber();
-
-  VISU::TEntity aEntity = VISU::TEntity(theEntity);
-
-  VISU::Result_i::PInput anInput = aColoredPrs->GetCResult()->GetInput(aColoredPrs->GetCMeshName(),
-                                                                      theEntity,
-                                                                      theFieldName,
-                                                                      aTimeStampNumber);
-
-  PField aVectorialField = anInput->GetField(aColoredPrs->GetCMeshName(), aEntity, theFieldName);
-
-  VISU::PUnstructuredGridIDMapper anIDMapper = 
-    anInput->GetTimeStampOnMesh(aColoredPrs->GetCMeshName(),
-                               aEntity,
-                               theFieldName,
-                               aTimeStampNumber);
-  if(GetSpecificDeformedPL() && anIDMapper) {
-    ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_DeformationPL, VISU::PUnstructuredGridIDMapper>
-                    (GetSpecificDeformedPL(), &VISU_DeformationPL::SetVectorialField, anIDMapper));
-    
-    VISU::TSetModified aModified(GetColoredPrs3d());
-    
-    myVectorialEntity = theEntity;
-    myVectorialFieldName = theFieldName;
-    myVectorialField = anIDMapper;
-  }
-};
diff --git a/src/VISU_I/VISU_Deformation_i.hh b/src/VISU_I/VISU_Deformation_i.hh
deleted file mode 100755 (executable)
index 821b273..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-//  Copyright (C) 2008  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_Deformation_i.hxx
-//  Author : 
-//  Module : VISU
-
-#ifndef VISU_Deformation_i_HeaderFile
-#define VISU_Deformation_i_HeaderFile
-
-#include "VISU_I.hxx"
-#include "VISU_ColoredPrs3d_i.hh"
-#include "VISU_DeformationPL.hxx"
-
-
-
-namespace VISU{
-
-  class VISU_I_EXPORT Deformation_i : public virtual POA_VISU::Deformation
-  {
-    Deformation_i(const Deformation_i&);
-  public:
-    typedef VISU::Deformation TInterface;
-
-    Deformation_i(VISU::ColoredPrs3d_i* theColoredPrs3d);
-    virtual ~Deformation_i();
-
-    virtual 
-    void
-    SetScale(CORBA::Double theScale);
-
-    virtual
-    CORBA::Double 
-    GetScale();
-
-    virtual
-    void
-    DeformationToStream(std::ostringstream& theStr);
-
-    virtual
-    void
-    RestoreDeformation(SALOMEDS::SObject_ptr theSObject,
-           const Storable::TRestoringMap& theMap);
-
-    virtual 
-    void 
-    SameAsDeformation(const Deformation_i *aDeformedPrs);
-
-    virtual
-    VISU::Entity
-    GetVectorialFieldEntity();
-
-    virtual
-    char* 
-    GetVectorialFieldName();
-
-    virtual void SetVectorialField(Entity theEntity, const char* theFieldName);
-
-  protected:
-    virtual
-    void
-    InitDeformedPipeLine(VISU_DeformationPL* theDeformedPipeLine);
-
-    VISU_DeformationPL*
-    GetSpecificDeformedPL() const
-    { 
-      return myDeformationPL; 
-    }
-
-    ColoredPrs3d_i* GetColoredPrs3d(){
-      return myColoredPrs3d;
-    }
-    
-    
-  private:
-    VISU_DeformationPL *myDeformationPL;
-
-    PField myVectorialField;
-    VISU::Entity myVectorialEntity;
-    std::string myVectorialFieldName;
-    ColoredPrs3d_i *myColoredPrs3d;
-    
-  };
-}
-
-#endif
diff --git a/src/VISU_I/VISU_DeformedShapeAndScalarMap_i.cc b/src/VISU_I/VISU_DeformedShapeAndScalarMap_i.cc
deleted file mode 100644 (file)
index 9667e0c..0000000
+++ /dev/null
@@ -1,404 +0,0 @@
-//  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_DeformedShapeAndScalarMap_i.cc
-//  Author : Eugeny Nikolaev
-//  Module : VISU
-
-#include "VISU_DeformedShapeAndScalarMap_i.hh"
-#include "VISU_Prs3dUtils.hh"
-#include "VISU_Result_i.hh"
-
-#include "VISU_ScalarMapAct.h"
-#include "VISU_DeformedShapeAndScalarMapPL.hxx"
-#include "VISU_Convertor.hxx"
-
-#include "SUIT_ResourceMgr.h"
-#include "SALOME_Event.h"
-
-#include <vtkUnstructuredGrid.h>
-#include <vtkProperty.h>
-#include <vtkMapper.h>
-
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
-static int INCMEMORY = 4+12;
-
-
-//---------------------------------------------------------------
-size_t
-VISU::DeformedShapeAndScalarMap_i
-::IsPossible(Result_i* theResult, 
-            const std::string& theMeshName, 
-            VISU::Entity theEntity,
-            const std::string& theFieldName, 
-            CORBA::Long theTimeStampNumber,
-            bool theIsMemoryCheck)
-{
-  size_t aResult = 0;
-  try{
-    aResult = TSuperClass::IsPossible(theResult,
-                                     theMeshName,
-                                     theEntity,
-                                     theFieldName,
-                                     theTimeStampNumber,
-                                     false);
-    if(theIsMemoryCheck && aResult){
-      VISU::Result_i::PInput anInput = theResult->GetInput(theMeshName,
-                                                          theEntity,
-                                                          theFieldName,
-                                                          theTimeStampNumber);
-      VISU::PField aField = anInput->GetField(theMeshName,
-                                             (VISU::TEntity)theEntity,
-                                             theFieldName);
-      if(aField->myNbComp <= 1)
-       return 0;
-
-      bool anIsEstimated = true;
-      size_t aSize = anInput->GetTimeStampOnMeshSize(theMeshName,
-                                                    (VISU::TEntity)theEntity,
-                                                    theFieldName,
-                                                    theTimeStampNumber,
-                                                    anIsEstimated);
-      if(anIsEstimated)
-       aSize *= INCMEMORY;
-      aResult = VISU_PipeLine::CheckAvailableMemory(aSize);
-      if(MYDEBUG) 
-       MESSAGE("DeformedShapeAndScalarMap_i::IsPossible - CheckAvailableMemory = "<<float(aSize)<<"; aResult = "<<aResult);
-    }
-  }catch(std::exception& exc){
-    INFOS("Follow exception was occured :\n"<<exc.what());
-  }catch(...){
-    INFOS("Unknown exception was occured!");
-  }
-  return aResult;
-}
-
-//---------------------------------------------------------------
-int VISU::DeformedShapeAndScalarMap_i::myNbPresent = 0;
-
-//---------------------------------------------------------------
-QString
-VISU::DeformedShapeAndScalarMap_i
-::GenerateName() 
-{
-  return VISU::GenerateName("ScalarDef.Shape",myNbPresent++);
-}
-
-//---------------------------------------------------------------
-const string VISU::DeformedShapeAndScalarMap_i::myComment = "SCALARMAPONDEFORMEDSHAPE"; // It is obsolete. Use "DEFORMEDSHAPEANDSCALARMAP" instead.
-
-//---------------------------------------------------------------
-const char* 
-VISU::DeformedShapeAndScalarMap_i
-::GetComment() const
-{ 
-  return myComment.c_str();
-}
-
-//----------------------------------------------------------------------------
-const char*
-VISU::DeformedShapeAndScalarMap_i
-::GetIconName()
-{
-  if (!IsGroupsUsed())
-    return "ICON_TREE_SCALAR_MAP_ON_DEFORMED_SHAPE";
-  else
-    return "ICON_TREE_SCALAR_MAP_ON_DEFORMED_SHAPE_GROUPS";
-}
-
-//---------------------------------------------------------------
-VISU::DeformedShapeAndScalarMap_i
-::DeformedShapeAndScalarMap_i(EPublishInStudyMode thePublishInStudyMode) :
-  ColoredPrs3d_i(thePublishInStudyMode),
-  ScalarMap_i(thePublishInStudyMode),
-  myDeformedShapeAndScalarMapPL(NULL),
-  myScalarTimeStampNumber(1)
-{}
-
-
-//---------------------------------------------------------------
-VISU::Storable* 
-VISU::DeformedShapeAndScalarMap_i
-::Create(const std::string& theMeshName, 
-        VISU::Entity theEntity,
-        const std::string& theFieldName, 
-        CORBA::Long theTimeStampNumber)
-{
-  TSuperClass::Create(theMeshName,
-                            theEntity,
-                            theFieldName,
-                            theTimeStampNumber);
-  SetScalarField(theEntity,
-                theFieldName.c_str(),
-                theTimeStampNumber);
-  return this;
-}
-
-
-//---------------------------------------------------------------
-VISU::Storable*
-VISU::DeformedShapeAndScalarMap_i
-::Restore(SALOMEDS::SObject_ptr theSObject,
-         const Storable::TRestoringMap& theMap)
-{
-  if(!TSuperClass::Restore(theSObject, theMap))
-    return NULL;
-
-  QString aMeshName = VISU::Storable::FindValue(theMap,"myScalarMeshName");
-  VISU::Entity anEntity = VISU::Entity(VISU::Storable::FindValue(theMap,"myScalarEntity").toInt());
-
-  QString aFieldName = VISU::Storable::FindValue(theMap,"myScalarFieldName");
-  int aTimeStampNumber = VISU::Storable::FindValue(theMap,"myScalarIteration").toInt();
-
-  SetScalarField(anEntity,
-                aFieldName.toLatin1().constData(),
-                aTimeStampNumber);
-
-  SetScale(VISU::Storable::FindValue(theMap,"myFactor").toDouble());
-  
-  return this;
-}
-
-
-//---------------------------------------------------------------
-void
-VISU::DeformedShapeAndScalarMap_i
-::ToStream(std::ostringstream& theStr)
-{
-  TSuperClass::ToStream(theStr);
-  
-  Storable::DataToStream( theStr, "myScalarEntity",    int(myScalarEntity));
-  Storable::DataToStream( theStr, "myScalarFieldName", myScalarFieldName.c_str());
-  Storable::DataToStream( theStr, "myScalarIteration", int(myScalarTimeStampNumber));
-
-  Storable::DataToStream( theStr, "myFactor", GetScale() );
-}
-
-
-//---------------------------------------------------------------
-VISU::DeformedShapeAndScalarMap_i
-::~DeformedShapeAndScalarMap_i()
-{
-  if(MYDEBUG) MESSAGE("DeformedShapeAndScalarMap_i::~DeformedShapeAndScalarMap_i()");
-}
-
-
-//---------------------------------------------------------------
-void
-VISU::DeformedShapeAndScalarMap_i
-::SameAs(const Prs3d_i* theOrigin)
-{
-  TSuperClass::SameAs(theOrigin);
-  
-  if(const DeformedShapeAndScalarMap_i* aPrs3d = dynamic_cast<const DeformedShapeAndScalarMap_i*>(theOrigin)){
-    DeformedShapeAndScalarMap_i* anOrigin = const_cast<DeformedShapeAndScalarMap_i*>(aPrs3d);
-    CORBA::String_var aFieldName = anOrigin->GetScalarFieldName();
-    
-    SetScalarField(anOrigin->GetScalarEntity(),
-                  aFieldName,
-                  anOrigin->GetScalarTimeStampNumber());
-    Update();
-  }
-}
-
-
-//---------------------------------------------------------------
-void
-VISU::DeformedShapeAndScalarMap_i
-::SetScale(CORBA::Double theScale) 
-{ 
-  VISU::TSetModified aModified(this);
-
-  ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_DeformedShapeAndScalarMapPL, vtkFloatingPointType>
-                  (GetSpecificPL(), &VISU_DeformedShapeAndScalarMapPL::SetScale, theScale));
-}
-
-
-//---------------------------------------------------------------
-CORBA::Double
-VISU::DeformedShapeAndScalarMap_i
-::GetScale()
-{
-  return myDeformedShapeAndScalarMapPL->GetScale();
-}
-
-
-//---------------------------------------------------------------
-void
-VISU::DeformedShapeAndScalarMap_i
-::CreatePipeLine(VISU_PipeLine* thePipeLine)
-{
-  if(!thePipeLine){
-    myDeformedShapeAndScalarMapPL = VISU_DeformedShapeAndScalarMapPL::New();
-  }else
-    myDeformedShapeAndScalarMapPL = dynamic_cast<VISU_DeformedShapeAndScalarMapPL*>(thePipeLine);
-
-  myDeformedShapeAndScalarMapPL->GetMapper()->SetScalarVisibility(1);
-
-  TSuperClass::CreatePipeLine(myDeformedShapeAndScalarMapPL);
-}
-
-
-//---------------------------------------------------------------
-bool
-VISU::DeformedShapeAndScalarMap_i
-::CheckIsPossible() 
-{
-  return IsPossible(GetCResult(),GetCMeshName(),GetEntity(),GetCFieldName(),GetTimeStampNumber(),true);
-}
-
-
-//---------------------------------------------------------------
-VISU_Actor* 
-VISU::DeformedShapeAndScalarMap_i
-::CreateActor() 
-{
-  VISU_Actor* anActor = TSuperClass::CreateActor(true);
-  SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
-  int  aDispMode = aResourceMgr->integerValue("VISU", "scalar_def_represent", 2);
-  bool toShrink  = aResourceMgr->booleanValue("VISU", "scalar_def_shrink", false);
-  anActor->SetRepresentation(aDispMode);
-  if (toShrink) 
-    anActor->SetShrink();
-  anActor->SetVTKMapping(false);
-  return anActor;
-}
-
-
-//---------------------------------------------------------------
-void
-VISU::DeformedShapeAndScalarMap_i
-::UpdateActor(VISU_Actor* theActor) 
-{
-  if(VISU_ScalarMapAct* anActor = dynamic_cast<VISU_ScalarMapAct*>(theActor)){
-    anActor->SetBarVisibility(true);
-    GetPipeLine()->GetMapper()->SetScalarVisibility(1);
-  }
-  TSuperClass::UpdateActor(theActor);
-}
-
-
-//---------------------------------------------------------------
-void
-VISU::DeformedShapeAndScalarMap_i
-::SetField(VISU::PField theField)
-{
-  TSuperClass::SetField(theField);
-  
-  if(!myScalarField)
-    myScalarField = theField;
-}
-
-
-//---------------------------------------------------------------
-void
-VISU::DeformedShapeAndScalarMap_i
-::SetScalarField(VISU::Entity theEntity,
-                const char* theFieldName,
-                CORBA::Long theTimeStampNumber)
-{
-  bool anIsModified = false;
-
-  if(!anIsModified)
-    anIsModified |= myScalarEntity != theEntity;
-
-  if(!anIsModified)
-    anIsModified |= myScalarFieldName != theFieldName;
-
-  if(!anIsModified)
-    anIsModified |= myScalarTimeStampNumber != theTimeStampNumber;
-  
-  if(!anIsModified)
-    return;
-
-  VISU::TSetModified aModified(this);
-
-  VISU::TEntity aEntity = VISU::TEntity(theEntity);
-  VISU::Result_i::PInput anInput = GetCResult()->GetInput(GetCMeshName(),
-                                                         theEntity,
-                                                         theFieldName,
-                                                         theTimeStampNumber);
-  myScalarField = anInput->GetField(GetCMeshName(), aEntity, theFieldName);
-
-  VISU::PUnstructuredGridIDMapper anIDMapper = 
-    anInput->GetTimeStampOnMesh(GetCMeshName(),
-                               aEntity,
-                               theFieldName,
-                               theTimeStampNumber);
-
-  vtkUnstructuredGrid* anOutput = anIDMapper->GetUnstructuredGridOutput();
-  if(myDeformedShapeAndScalarMapPL && anOutput)
-    ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_DeformedShapeAndScalarMapPL, vtkDataSet*>
-                    (GetSpecificPL(), &VISU_DeformedShapeAndScalarMapPL::SetScalars, anOutput));
-  
-  myScalarEntity = theEntity;
-  myScalarFieldName = theFieldName;
-  myScalarTimeStampNumber = theTimeStampNumber;
-
-  SetTitle(theFieldName);
-  SetScalarMode(GetScalarMode());
-  if(!IsRangeFixed() && IsPipeLineExists())
-    SetSourceRange();
-
-  myParamsTime.Modified();
-}
-
-
-//---------------------------------------------------------------
-VISU::Entity 
-VISU::DeformedShapeAndScalarMap_i
-::GetScalarEntity()
-{
-  return myScalarEntity;
-}
-
-
-//---------------------------------------------------------------
-char* 
-VISU::DeformedShapeAndScalarMap_i
-::GetScalarFieldName()
-{
-  return CORBA::string_dup(myScalarFieldName.c_str());
-}
-
-
-//---------------------------------------------------------------
-CORBA::Long 
-VISU::DeformedShapeAndScalarMap_i
-::GetScalarTimeStampNumber()
-{
-  return myScalarTimeStampNumber;
-}
-
-
-//---------------------------------------------------------------
-VISU::PField
-VISU::DeformedShapeAndScalarMap_i
-::GetScalarField()
-{
-  return myScalarField;
-}
diff --git a/src/VISU_I/VISU_DeformedShapeAndScalarMap_i.hh b/src/VISU_I/VISU_DeformedShapeAndScalarMap_i.hh
deleted file mode 100644 (file)
index 35827d1..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-//  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_DeformedShapeAndScalarMap_i.hh
-// Author:  Eugeny Nikolaev
-// Module : VISU
-
-#ifndef VISU_DeformedShapeAndScalarMap_i_HeaderFile
-#define VISU_DeformedShapeAndScalarMap_i_HeaderFile
-
-#include "VISU_ScalarMap_i.hh"
-
-class VISU_DeformedShapeAndScalarMapPL;
-
-namespace VISU
-{
-  //----------------------------------------------------------------------------  
-  //! Class of Scalar Map on Deformed Shape presentation.
-  class VISU_I_EXPORT DeformedShapeAndScalarMap_i : public virtual POA_VISU::DeformedShapeAndScalarMap,
-                                                   public virtual ScalarMap_i
-  {
-    static int myNbPresent;
-    DeformedShapeAndScalarMap_i(const DeformedShapeAndScalarMap_i&);
-    
-  public:
-    //----------------------------------------------------------------------------     
-    typedef ScalarMap_i TSuperClass;
-    typedef VISU::DeformedShapeAndScalarMap TInterface;
-        
-    explicit
-    DeformedShapeAndScalarMap_i(EPublishInStudyMode thePublishInStudyModep);
-    
-    virtual
-    ~DeformedShapeAndScalarMap_i();
-
-    virtual
-    VISU::VISUType
-    GetType()
-    { 
-      return VISU::TDEFORMEDSHAPEANDSCALARMAP;
-    }
-    
-    virtual 
-    void
-    SetScale(CORBA::Double theScale);
-
-    virtual
-    CORBA::Double 
-    GetScale();
-
-    virtual 
-    void
-    SameAs(const Prs3d_i* theOrigin);
-
-    VISU_DeformedShapeAndScalarMapPL* 
-    GetSpecificPL()
-    { 
-      return myDeformedShapeAndScalarMapPL;
-    }
-   
-  protected:
-    //! Redefines VISU_ColoredPrs3d_i::SetField
-    virtual
-    void
-    SetField(VISU::PField theField);
-
-    //! Redefines VISU_ColoredPrs3d_i::CreatePipeLine
-    virtual
-    void
-    CreatePipeLine(VISU_PipeLine* thePipeLine);
-
-    //! Redefines VISU_ColoredPrs3d_i::CheckIsPossible
-    virtual 
-    bool 
-    CheckIsPossible();
-
-  public:
-    //! Redefines VISU_ColoredPrs3d_i::IsPossible
-    static
-    size_t
-    IsPossible(Result_i* theResult, 
-              const std::string& theMeshName, 
-              VISU::Entity theEntity,
-              const std::string& theFieldName, 
-              CORBA::Long theTimeStampNumber,
-              bool theIsMemoryCheck);
-
-    //! Redefines VISU_ColoredPrs3d_i::IsPossible
-    virtual
-    Storable* 
-    Create(const std::string& theMeshName, 
-          VISU::Entity theEntity,
-          const std::string& theFieldName, 
-          CORBA::Long theTimeStampNumber);
-
-    //! Redefines VISU_ColoredPrs3d_i::ToStream
-    virtual
-    void
-    ToStream(std::ostringstream& theStr);
-
-    //! Redefines VISU_ColoredPrs3d_i::Restore
-    virtual
-    Storable* 
-    Restore(SALOMEDS::SObject_ptr theSObject,
-           const Storable::TRestoringMap& theMap);
-    
-    static const std::string myComment;
-
-    virtual
-    const char* 
-    GetComment() const;
-
-    virtual
-    QString 
-    GenerateName();
-
-    virtual
-    const char* 
-    GetIconName();
-    
-    virtual
-    VISU_Actor* 
-    CreateActor();
-
-    virtual
-    void
-    UpdateActor(VISU_Actor* theActor) ;
-
-    virtual 
-    void
-    SetScalarField(VISU::Entity theEntity,
-                  const char* theFieldName,
-                  CORBA::Long theTimeStampNumber);
-
-    virtual
-    VISU::Entity
-    GetScalarEntity();
-
-    virtual
-    char* 
-    GetScalarFieldName();
-
-    virtual
-    CORBA::Long
-    GetScalarTimeStampNumber();
-
-    virtual 
-    VISU::PField
-    GetScalarField();
-
-  private:
-    VISU_DeformedShapeAndScalarMapPL *myDeformedShapeAndScalarMapPL;
-
-    PField myScalarField;
-    VISU::Entity myScalarEntity;
-    std::string myScalarFieldName;
-    CORBA::Long myScalarTimeStampNumber;
-  };
-}
-#endif
index a481198252600b70fc719c6325e101070786d38d..fd6ee897f20c0d1f8121455d5ec3045a407d5c3d 100644 (file)
@@ -45,6 +45,7 @@ static int MYDEBUG = 0;
 static int MYDEBUG = 0;
 #endif
 
+using namespace std;
 
 //---------------------------------------------------------------
 size_t
index 93da7d73de5e9c6ff0a6132542431448f491cd81..53922a9edbf78c507a5b07be6681aa556ea53171 100644 (file)
@@ -179,6 +179,28 @@ namespace VISU
 
 
   //---------------------------------------------------------------------------
+  void SetClippingPlane(Prs3d_i* thePrs, string theName,
+                       std::ostream& theStr,
+                       std::string thePrefix) 
+  {
+    VISU_CutPlaneFunction* aPlane;
+    VISU_Gen_i* aGen = VISU_Gen_i::GetVisuGenImpl();
+    VISU_ClippingPlaneMgr& aMgr = aGen->GetClippingPlaneMgr();
+    int aId;
+    for (int i = 0; i < thePrs->GetNumberOfClippingPlanes(); i++) {
+      aPlane = dynamic_cast<VISU_CutPlaneFunction*>(thePrs->GetClippingPlane(i));
+      if (aPlane) {
+       if (!aPlane->isAuto()) {
+         aId = aMgr.GetPlaneId(aPlane);
+         if (aId > -1) {
+           theStr<<thePrefix<<"aVisu.ApplyClippingPlane("<<theName<<", "<<aId<<")"<<endl;
+         }
+       }
+      }
+    }
+  }
+  
+
   void
   Prs3dToPython(VISU::Prs3d_i* theServant,
                std::ostream& theStr,
@@ -188,6 +210,7 @@ namespace VISU
     float x, y, z;
     theServant->GetOffset(x,y,z);
     theStr<<thePrefix<<theName<<".SetOffset("<<x<<", "<<y<<", "<<z<<")"<<endl;
+    SetClippingPlane(theServant, theName, theStr, thePrefix);
   }
 
   //---------------------------------------------------------------------------
@@ -411,7 +434,9 @@ namespace VISU
       aParam = "VISU.LOGARITHMIC";
       break;
     }
+    std::string aVisible = theServant->IsBarVisible()? "True" : "False";
     theStr<<thePrefix<<theName<<".SetScaling("<<aParam<<")"<<endl;
+    theStr<<thePrefix<<theName<<".SetBarVisible("<<aVisible<<")"<<endl;
 
     return thePrefix;
   }
@@ -997,7 +1022,7 @@ namespace VISU
     }
   }
 
-  
+
 
   //---------------------------------------------------------------------------
   void
@@ -1232,6 +1257,7 @@ namespace VISU
              break;
            }
            theStr<<thePrefix<<aName<<".SetPresentationType("<<aParam<<")"<<endl;
+           theStr<<thePrefix<<aName<<".SetShrink("<<(aServant->IsShrank()? "True" : "False")<<")"<<endl;
            theStr<<thePrefix<<endl;
 
            DumpChildrenToPython(theStudy,
@@ -1967,6 +1993,35 @@ namespace VISU
     theStr<<thePrefix<<endl;
   }
 
+
+  void
+  DumpClippingPlanesToPython(SALOMEDS::Study_ptr theStudy,
+                            CORBA::Boolean theIsPublished,
+                            CORBA::Boolean& theIsValidScript,
+                            SALOMEDS::SObject_ptr theSObject,
+                            std::ostream& theStr,
+                            std::string thePrefix,
+                            VISU_ClippingPlaneMgr& thePlaneMgr)
+  {
+
+    if(!theIsPublished) return;
+
+    VISU_CutPlaneFunction* aPlane;
+    double aOrigin[3], aDir[3];
+    for (int i = 0; i < thePlaneMgr.GetClippingPlanesNb(); i++) {
+      aPlane = thePlaneMgr.GetClippingPlane(i);
+      aPlane->GetOrigin(aOrigin);
+      aPlane->GetNormal(aDir);
+
+      theStr<<thePrefix<<"aVisu.CreateClippingPlane("<<
+       aOrigin[0]<<","<<aOrigin[1]<<","<<aOrigin[2]<<","<<
+       aDir[0]<<","<<aDir[1]<<","<<aDir[2]<<","<<
+       aPlane->isAuto()<<",\""<<aPlane->getName()<<"\")"<<endl;      
+    }
+    theStr<<endl;
+  }  
+
+
   //---------------------------------------------------------------------------
   Engines::TMPFile*
   VISU_Gen_i::
@@ -2007,6 +2062,16 @@ namespace VISU
     aStr<<endl;
 
     SALOMEDS::SComponent_var aComponent = FindOrCreateVisuComponent(aStudy);
+
+    VISU::DumpClippingPlanesToPython(aStudy,
+                                    theIsPublished,
+                                    theIsValidScript,
+                                    aComponent.in(),
+                                    aStr,
+                                    aPrefix, 
+                                    myClippingPlaneMgr);
+
+
     VISU::DumpChildrenToPython(aStudy,
                               theIsPublished,
                               theIsValidScript,
@@ -2044,6 +2109,7 @@ namespace VISU
                                 aStr,
                                 aPrefix);
 
+
     //Output the script that sets up the visul parameters.
     if(theIsPublished) {
       char* script = aStudy->GetDefaultScript("Post-Pro", aPrefix.c_str());
index 2fa9381553e457210e8ead41a852ce8c4c2fa56e..af6412b47ea4e3dcbb23c878933da31aead21457 100644 (file)
@@ -56,6 +56,8 @@ static int MYDEBUG = 0;
 
 static int INCMEMORY = 10;
 
+using namespace std;
+
 //----------------------------------------------------------------------------
 size_t
 VISU::GaussPoints_i
@@ -851,7 +853,11 @@ VISU_Actor*
 VISU::GaussPoints_i
 ::CreateActor() 
 {
-  return OnCreateActor1();
+  VISU_GaussPtsAct* anActor = VISU_GaussPtsAct::New();
+  if(OnCreateActor(anActor))
+    return anActor;
+  return NULL;
+  //  return OnCreateActor1();
 }
 
 //----------------------------------------------------------------------------
@@ -877,8 +883,7 @@ VISU::GaussPoints_i
   theScalarBar->SetTitle(GetScalarBarTitle().c_str());
   theScalarBar->SetOrientation(GetBarOrientation());
   theScalarBar->SetNumberOfLabels(GetLabels());
-  theScalarBar->SetRatios(GetTitleWidth(), GetTitleHeight(),
-                         GetLabelWidth(), GetLabelHeight(),
+  theScalarBar->SetRatios(GetTitleSize(), GetLabelSize(), 
                          GetBarWidth(), GetBarHeight());
   theScalarBar->SetLabelFormat(GetLabelsFormat());
 
@@ -994,7 +999,24 @@ VISU::GaussPoints_i
       theActor->SetRepresentation( VTK_POINTS );
     else
       theActor->SetRepresentation( VTK_SURFACE );
+      
+    // Update values labels
+
+    vtkTextProperty* aProp = anActor->GetsValLabelsProps();
+    if ( aProp )
+    {
+      aProp->SetFontFamily( GetValLblFontType() );
+      aProp->SetFontSize( GetValLblFontSize() );
+      aProp->SetBold( IsBoldValLbl() );
+      aProp->SetItalic( IsItalicValLbl() );
+      aProp->SetShadow( IsShadowValLbl() );
+
+      vtkFloatingPointType anRGB[ 3 ];
+      GetValLblFontColor( anRGB[ 0 ], anRGB[ 1 ], anRGB[ 2 ] );
+      aProp->SetColor( anRGB[ 0 ], anRGB[ 1 ], anRGB[ 2 ] );
+    }
   }
+  
   TSuperClass::UpdateActor(theActor);
 }
 
index 0732d55896f97f31208498c2fb378c061f1522f2..74c070678e4719372d5d053fd2e8bdae4a4b0bf4 100644 (file)
@@ -94,6 +94,8 @@ static int MYDEBUG = 0;
 static int MYDEBUG = 0;
 #endif
 
+using namespace std;
+
 extern "C" 
 VISU_I_EXPORT VISU::VISU_Gen_ptr
 GetImpl(CORBA::ORB_ptr theORB,
@@ -215,6 +217,7 @@ namespace VISU
     Storable::RegistryStorableEngine(ColoredPrs3dHolder_i::myComment.c_str(),&(ColoredPrs3dHolder_i::StorableEngine));
     Storable::RegistryStorableEngine(ColoredPrs3dCache_i::myComment.c_str(),&(ColoredPrs3dCache_i::StorableEngine));
 
+    Storable::RegistryStorableEngine(PointMap3d_i::myComment.c_str(),&(PointMap3d_i::StorableEngine));
     Storable::RegistryStorableEngine(Table_i::myComment.c_str(),&(Table_i::StorableEngine));
     Storable::RegistryStorableEngine(Curve_i::myComment.c_str(),&(Curve_i::StorableEngine));
     Storable::RegistryStorableEngine(Container_i::myComment.c_str(),&(Container_i::StorableEngine));
@@ -258,6 +261,7 @@ namespace VISU
       CORBA::String_var aStudyName = aListOfOpenStudies[0];
       //aFileInfo.setFile(aStudyName.in());
       myStudyDocument = aStudyManager->GetStudyByName(aStudyName/*aFileInfo.baseName()*/);
+      myClippingPlaneMgr.SetStudy(GetStudy(myStudyDocument));
     }else
       if(MYDEBUG) MESSAGE("VISU_Gen_i::VISU_Gen_i : there is no opened study in StudyManager !!!");
   }
@@ -538,6 +542,7 @@ namespace VISU
       std::string aStudyName (aName.in());
       if(MYDEBUG) MESSAGE("StudyId = " << theStudy->StudyId() << "; Name = '" << aName.in() << "'");
       myStudyDocument = SALOMEDS::Study::_duplicate(theStudy);
+      myClippingPlaneMgr.SetStudy(GetStudy(myStudyDocument));
 
       ProcessVoidEvent(new TEvent(aStudyName));
 
@@ -1430,4 +1435,74 @@ namespace VISU
   {
     return ColoredPrs3dCache_i::GetInstance(theStudy);
   }
+
+    
+  CORBA::Long VISU_Gen_i::CreateClippingPlane(CORBA::Double X,CORBA::Double  Y, CORBA::Double Z, 
+                                             CORBA::Double dX, CORBA::Double dY, CORBA::Double dZ, 
+                                             CORBA::Boolean isAuto, const char* name)
+  {
+    return myClippingPlaneMgr.CreateClippingPlane(X, Y, Z, dX, dY, dZ, isAuto, name);
+  }
+
+    
+  void VISU_Gen_i::EditClippingPlane(CORBA::Long id, CORBA::Double X,CORBA::Double  Y, CORBA::Double Z, 
+                                    CORBA::Double dX, CORBA::Double dY, CORBA::Double dZ, 
+                                    CORBA::Boolean isAuto, const char* name)
+  {
+    myClippingPlaneMgr.EditClippingPlane(id, X, Y, Z, dX, dY, dZ, isAuto, name);
+  }
+  
+    /* Returns clipping plane by its Id */
+  VISU::ClippingPlane* VISU_Gen_i::GetClippingPlane(CORBA::Long id)
+  {
+    VISU_CutPlaneFunction* aPlane = myClippingPlaneMgr.GetClippingPlane(id);
+    
+    if (aPlane != NULL) {
+      double aOrigin[3];
+      double aDir[3];
+      aPlane->GetOrigin(aOrigin);
+      aPlane->GetNormal(aDir);
+
+      VISU::ClippingPlane* aRetPlane = new VISU::ClippingPlane;
+      aRetPlane->X = aOrigin[0];
+      aRetPlane->Y = aOrigin[1];
+      aRetPlane->Z = aOrigin[2];
+      aRetPlane->dX = aDir[0];
+      aRetPlane->dY = aDir[1];
+      aRetPlane->dZ = aDir[2];
+      aRetPlane->isAuto = aPlane->isAuto();
+
+      aRetPlane->name = aPlane->getName().c_str();
+      return aRetPlane;
+    }
+    return NULL;
+  }
+    
+    /* Deletes clipping plane by its Id */
+  CORBA::Boolean VISU_Gen_i::DeleteClippingPlane(CORBA::Long id)
+  {
+    return myClippingPlaneMgr.DeleteClippingPlane(id);
+  }
+    
+    /* Applyes a clipping plane with Id to presentation thePrs */
+  CORBA::Boolean VISU_Gen_i::ApplyClippingPlane(Prs3d_ptr thePrs, CORBA::Long id)
+  {
+    VISU::Prs3d_i* aPrs = dynamic_cast<VISU::Prs3d_i*>(VISU::GetServant(thePrs).in());
+    return myClippingPlaneMgr.ApplyClippingPlane(aPrs, id);
+  }
+
+    /* Detaches a clipping plane with Id from presentation thePrs */
+  CORBA::Boolean VISU_Gen_i::DetachClippingPlane(Prs3d_ptr thePrs, CORBA::Long id)
+  {
+    VISU::Prs3d_i* aPrs = dynamic_cast<VISU::Prs3d_i*>(VISU::GetServant(thePrs).in());
+    return myClippingPlaneMgr.DetachClippingPlane(aPrs, id);
+  }
+    
+    /* Get number of clipping planes */
+  CORBA::Long VISU_Gen_i::GetClippingPlanesNb()
+  {
+    return myClippingPlaneMgr.GetClippingPlanesNb();
+  }
+
+
 }
index 1043ed2a240ac5f2bad5f27f3f0f900d1a452df2..63cbf179d281ae3af6a7a5f971deb121b13a0b25 100644 (file)
@@ -30,6 +30,7 @@
 #include "SALOME_Component_i.hxx"
 #include "SALOME_NamingService.hxx"
 #include "VISU_ColoredPrs3d_i.hh"
+#include "VISU_ClippingPlaneMgr.hxx"
 
 #include <string>
 
@@ -41,6 +42,8 @@ namespace VISU
                     public virtual Base_i
   {
     SALOMEDS::Study_var myStudyDocument;
+    VISU_ClippingPlaneMgr myClippingPlaneMgr;
+
     VISU_Gen_i(const VISU::VISU_Gen_i &);
   public:
     VISU_Gen_i(CORBA::ORB_ptr theORB,
@@ -361,6 +364,33 @@ namespace VISU
     virtual
     VISU::ColoredPrs3dCache_ptr
     GetColoredPrs3dCache(SALOMEDS::Study_ptr theStudy);
+
+    
+    virtual CORBA::Long CreateClippingPlane(CORBA::Double X,CORBA::Double  Y, CORBA::Double Z, 
+                                           CORBA::Double dX, CORBA::Double dY, CORBA::Double dZ, 
+                                           CORBA::Boolean isAuto, const char* name);
+
+    virtual void EditClippingPlane(CORBA::Long id, CORBA::Double X,CORBA::Double  Y, CORBA::Double Z, 
+                                    CORBA::Double dX, CORBA::Double dY, CORBA::Double dZ, 
+                                    CORBA::Boolean isAuto, const char* name);
+
+    /* Returns clipping plane by its Id */
+    virtual VISU::ClippingPlane* GetClippingPlane(CORBA::Long id);
+    
+    /* Deletes clipping plane by its Id */
+    virtual CORBA::Boolean DeleteClippingPlane(CORBA::Long id);
+    
+    /* Applyes a clipping plane with Id to presentation thePrs */
+    virtual CORBA::Boolean ApplyClippingPlane(Prs3d_ptr thePrs, CORBA::Long id);
+    
+    /* Detaches a clipping plane with Id from presentation thePrs */
+    virtual CORBA::Boolean DetachClippingPlane(Prs3d_ptr thePrs, CORBA::Long id);
+    
+    /* Get number of clipping planes */
+    virtual CORBA::Long GetClippingPlanesNb();
+
+    VISU_ClippingPlaneMgr& GetClippingPlaneMgr() { return myClippingPlaneMgr; }
+
   };
 }
 
index 90e3b18adfd5e156db05c6086fb120acd29d0ddb..6d637875d685f3ae53555f8846620f69211f234e 100644 (file)
@@ -43,6 +43,8 @@ static int MYDEBUG = 0;
 static int MYDEBUG = 0;
 #endif
 
+using namespace std;
+
 //---------------------------------------------------------------
 size_t
 VISU::IsoSurfaces_i
index 3886da2a42acb95097643ce18e64a995218f43a3..a4a67ff3f1408c4f27eba663dcbba745013a3812 100644 (file)
@@ -46,6 +46,8 @@ static int MYDEBUG = 0;
 
 static int INCMEMORY = 4;
 
+using namespace std;
+
 //----------------------------------------------------------------------------
 namespace
 {
@@ -127,6 +129,8 @@ VISU::Mesh_i
   SetMeshName(theMeshName.c_str());
   myEntity = int(theEntity);//jfa IPAL9284
   mySubMeshName = theFamilyName;
+  SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
+  myIsShrank = aResourceMgr->booleanValue("VISU", "mesh_shrink", false);
   return Build(false);
 }
 
@@ -189,6 +193,8 @@ VISU::Mesh_i
       throw std::runtime_error("Mesh_i::Build - GetCResult()->GetInput() == NULL !!!");
     if (!theRestoring) {
       myPresentType =  VISU::PresentationType(VISU::GetResourceMgr()->integerValue("VISU" , "mesh_represent", 2));
+      myIsShrank = (myPresentType == VISU::SHRINK);
+
       if(myEntity == VISU::NODE_ENTITY)
        myPresentType = VISU::POINT;
       SetName((const char*)GenerateName().toLatin1(), false);
@@ -397,7 +403,9 @@ VISU::Mesh_i
     return;
 
   VISU::TSetModified aModified(this);
-  
+  if (theType == VISU::SHRINK) {
+    myIsShrank = true;
+  }
   myPresentType = theType;
   myParamsTime.Modified();
 }
@@ -444,6 +452,8 @@ VISU::Mesh_i
 
   myPresentType = VISU::PresentationType(VISU::Storable::FindValue(theMap,"myPresentType").toInt());
 
+  myIsShrank = (VISU::Storable::FindValue(theMap,"myIsShrank", "0").toInt() == 1)? true: false;
+
   myCellColor.R = VISU::Storable::FindValue(theMap,"myCellColor.R").toDouble();
   myCellColor.G = VISU::Storable::FindValue(theMap,"myCellColor.G").toDouble();
   myCellColor.B = VISU::Storable::FindValue(theMap,"myCellColor.B").toDouble();
@@ -485,6 +495,8 @@ VISU::Mesh_i
 
   Storable::DataToStream( theStr, "myPresentType", int(myPresentType) );
 
+  Storable::DataToStream( theStr, "myIsShrank",  (myIsShrank? "1":"0"));
+
   Storable::DataToStream( theStr, "myCellColor.R", myCellColor.R );
   Storable::DataToStream( theStr, "myCellColor.G", myCellColor.G );
   Storable::DataToStream( theStr, "myCellColor.B", myCellColor.B );
@@ -508,8 +520,21 @@ VISU::Mesh_i
   try{
     VISU::Prs3d_i::CreateActor(anActor);
     SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
-    bool toShrink  = aResourceMgr->booleanValue("VISU", "mesh_shrink", false);
-    if (toShrink) anActor->SetShrink();
+    //bool toShrink  = aResourceMgr->booleanValue("VISU", "mesh_shrink", false);
+    //if (toShrink) anActor->SetShrink();
+    if (anActor->IsShrunkable()) {
+      if (myIsShrank)
+       anActor->SetShrink();
+      else
+       anActor->UnShrink();
+    }
+    anActor->SetFeatureEdgesAngle( aResourceMgr->doubleValue("VISU", "feature_edges_angle", 0.0) );
+    anActor->SetFeatureEdgesFlags( aResourceMgr->booleanValue("VISU", "show_feature_edges", false),
+                                  aResourceMgr->booleanValue("VISU", "show_boundary_edges", false),
+                                  aResourceMgr->booleanValue("VISU", "show_manifold_edges", false),
+                                  aResourceMgr->booleanValue("VISU", "show_non_manifold_edges", false) );
+    anActor->SetFeatureEdgesColoring( aResourceMgr->booleanValue("VISU", "feature_edges_coloring", false) );
+
     UpdateActor(anActor);
   }catch (...) {
     anActor->Delete();
@@ -528,6 +553,12 @@ VISU::Mesh_i
     if(MYDEBUG) MESSAGE("Mesh_i::UpdateActor");
     VISU::Prs3d_i::UpdateActor(anActor);
     anActor->SetRepresentation(myPresentType);
+    if (anActor->IsShrunkable()) {
+      if (myIsShrank)
+       anActor->SetShrink();
+      else
+       anActor->UnShrink();
+    }
     anActor->GetSurfaceProperty()->SetColor(myCellColor.R, myCellColor.G, myCellColor.B);
     anActor->GetEdgeProperty()->SetColor(myLinkColor.R, myLinkColor.G, myLinkColor.B);
     anActor->GetNodeProperty()->SetColor(myNodeColor.R, myNodeColor.G, myNodeColor.B);
@@ -535,3 +566,20 @@ VISU::Mesh_i
 }
 
 //----------------------------------------------------------------------------
+
+
+void VISU::Mesh_i::SetShrink(CORBA::Boolean toShrink)
+{
+  if(toShrink == myIsShrank)
+    return;
+  VISU::TSetModified aModified(this);
+  myIsShrank = toShrink;
+  myParamsTime.Modified();
+}
+
+//----------------------------------------------------------------------------
+CORBA::Boolean VISU::Mesh_i::IsShrank()
+{
+  return myIsShrank;
+}
+
index b0395f1431523182351893ca9fd86feb40e16e6a..02d4efbca5d059f4519fe3ed5ebdc84e450bccad 100644 (file)
@@ -95,6 +95,11 @@ namespace VISU
     VISU::PresentationType 
     GetPresentationType();
 
+
+    virtual void SetShrink(CORBA::Boolean toShrink);
+
+    virtual CORBA::Boolean IsShrank();
+
     VISU_MeshPL* GetSpecificPL() const
     { 
       return myMeshPL;
@@ -114,6 +119,7 @@ namespace VISU
     SALOMEDS::Color myCellColor;
     SALOMEDS::Color myNodeColor;
     SALOMEDS::Color myLinkColor;
+    bool myIsShrank;
 
   public:
     static 
diff --git a/src/VISU_I/VISU_MonoColorPrs_i.cc b/src/VISU_I/VISU_MonoColorPrs_i.cc
deleted file mode 100644 (file)
index 28afbc8..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-//  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_MonoColorPrs_i.cxx
-//  Author : Vitaly Smetannikov
-//  Module : VISU
-
-
-#include "VISU_MonoColorPrs_i.hh"
-#include "VISU_Prs3dUtils.hh"
-#include "VISU_PipeLineUtils.hxx"
-#include "VISU_ScalarMapAct.h"
-
-#include "VISU_PipeLine.hxx"
-
-#include <vtkDataSetMapper.h>
-#include <vtkProperty.h>
-
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
-//---------------------------------------------------------------
-VISU::MonoColorPrs_i
-::MonoColorPrs_i(EPublishInStudyMode thePublishInStudyMode):
-  ColoredPrs3d_i(thePublishInStudyMode),
-  ScalarMap_i(thePublishInStudyMode)
-{
-  if(MYDEBUG) MESSAGE("MonoColorPrs_i::MonoColorPrs_i");
-}
-
-//---------------------------------------------------------------
-void 
-VISU::MonoColorPrs_i
-::SameAs(const Prs3d_i* theOrigin)
-{
-  TSuperClass::SameAs(theOrigin);
-
-  if(const MonoColorPrs_i* aPrs3d = dynamic_cast<const MonoColorPrs_i*>(theOrigin)){
-    MonoColorPrs_i* anOrigin = const_cast<MonoColorPrs_i*>(aPrs3d);
-    SetColor(anOrigin->GetColor());
-    ShowColored(anOrigin->IsColored());
-  }
-}
-
-
-//---------------------------------------------------------------
-VISU::Storable* 
-VISU::MonoColorPrs_i
-::Create(const std::string& theMeshName, 
-        VISU::Entity theEntity,
-        const std::string& theFieldName, 
-        CORBA::Long theTimeStampNumber)
-{
-  myIsColored = false;
-  myColor.R = myColor.G = myColor.B = 0.5;
-  return TSuperClass::Create(theMeshName,theEntity,theFieldName,theTimeStampNumber);
-}
-
-//---------------------------------------------------------------
-VISU::Storable* 
-VISU::MonoColorPrs_i
-::Restore(SALOMEDS::SObject_ptr theSObject,
-         const Storable::TRestoringMap& theMap)
-{
-  if(!TSuperClass::Restore(theSObject, theMap))
-    return NULL;
-
-  myIsColored = VISU::Storable::FindValue(theMap,"myIsColored").toInt();
-  myColor.R = VISU::Storable::FindValue(theMap,"myColor.R").toDouble();
-  myColor.G = VISU::Storable::FindValue(theMap,"myColor.G").toDouble();
-  myColor.B = VISU::Storable::FindValue(theMap,"myColor.B").toDouble();
-
-  return this;
-}
-
-//---------------------------------------------------------------
-void
-VISU::MonoColorPrs_i
-::ToStream(std::ostringstream& theStr)
-{
-  TSuperClass::ToStream(theStr);
-
-  Storable::DataToStream( theStr, "myIsColored", myIsColored );
-  Storable::DataToStream( theStr, "myColor.R", myColor.R );
-  Storable::DataToStream( theStr, "myColor.G", myColor.G );
-  Storable::DataToStream( theStr, "myColor.B", myColor.B );
-}
-
-
-//---------------------------------------------------------------
-VISU::MonoColorPrs_i::~MonoColorPrs_i()
-{
-  if(MYDEBUG) MESSAGE("MonoColorPrs_i::~MonoColorPrs_i()");
-}
-
-//---------------------------------------------------------------
-CORBA::Boolean VISU::MonoColorPrs_i::IsColored()
-{
-  return myIsColored;
-}
-
-
-
-//---------------------------------------------------------------
-void
-VISU::MonoColorPrs_i::ShowColored(CORBA::Boolean theColored)
-{
-  if(myIsColored == theColored)
-    return;
-  myIsColored = theColored; 
-  myParamsTime.Modified();
-}
-
-//---------------------------------------------------------------
-SALOMEDS::Color VISU::MonoColorPrs_i::GetColor()
-{
-  return myColor;
-}
-
-//---------------------------------------------------------------
-void VISU::MonoColorPrs_i::SetColor(const SALOMEDS::Color& theColor)
-{
-  bool anIsSameValue = VISU::CheckIsSameValue(myColor.R, theColor.R);
-  anIsSameValue &= VISU::CheckIsSameValue(myColor.G, theColor.G);
-  anIsSameValue &= VISU::CheckIsSameValue(myColor.B, theColor.B);
-  if(anIsSameValue)
-    return;
-
-  VISU::TSetModified aModified(this);
-  
-  myColor = theColor;
-  myParamsTime.Modified();
-}
-
-//---------------------------------------------------------------
-VISU_Actor* VISU::MonoColorPrs_i::CreateActor(bool toSupressShrinking) 
-{
-  VISU_Actor* anActor = TSuperClass::CreateActor(toSupressShrinking);
-  anActor->GetProperty()->SetColor(myColor.R,myColor.G,myColor.B);
-  return anActor;
-}
-
-//---------------------------------------------------------------
-VISU_Actor* VISU::MonoColorPrs_i::CreateActor()
-{
-  return CreateActor(false);
-}
-
-//---------------------------------------------------------------
-void VISU::MonoColorPrs_i::UpdateActor(VISU_ActorBase* theActor) 
-{
-  if(VISU_ScalarMapAct* anActor = dynamic_cast<VISU_ScalarMapAct*>(theActor)){
-    if(IsColored()){
-      anActor->SetBarVisibility(true);
-      GetPipeLine()->GetMapper()->SetScalarVisibility(1);
-    }else{
-      anActor->SetBarVisibility(false);
-      GetPipeLine()->GetMapper()->SetScalarVisibility(0);
-      anActor->GetProperty()->SetColor(myColor.R,myColor.G,myColor.B);
-    }
-    TSuperClass::UpdateActor(theActor);
-  }
-}
-
diff --git a/src/VISU_I/VISU_MonoColorPrs_i.hh b/src/VISU_I/VISU_MonoColorPrs_i.hh
deleted file mode 100644 (file)
index 50fff30..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-//  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_MonoColorPrs_i.hxx
-//  Author : Vitaly Smetannikov
-//  Module : VISU
-
-
-#ifndef VISU_MonoColorPrs_i_HeaderFile
-#define VISU_MonoColorPrs_i_HeaderFile
-
-#include <VISU_I.hxx>
-#include "VISU_ScalarMap_i.hh"
-
-namespace VISU
-{
-  //----------------------------------------------------------------------------
-  class VISU_I_EXPORT MonoColorPrs_i : public virtual POA_VISU::MonoColorPrs,
-                                      public virtual ScalarMap_i
-  {
-    MonoColorPrs_i(const MonoColorPrs_i&);
-
-  public:
-    //----------------------------------------------------------------------------
-    typedef ScalarMap_i TSuperClass;
-    typedef VISU::MonoColorPrs TInterface;
-
-    explicit MonoColorPrs_i(EPublishInStudyMode thePublishInStudyModep);
-
-    virtual void SameAs(const Prs3d_i* theOrigin);
-
-    virtual ~MonoColorPrs_i();
-
-    virtual CORBA::Boolean IsColored();
-
-    virtual void ShowColored(CORBA::Boolean theColored);
-
-    virtual SALOMEDS::Color GetColor();
-
-    virtual void SetColor(const SALOMEDS::Color& theColor);
-
-  protected:
-    SALOMEDS::Color myColor;
-    bool myIsColored;
-
-  public:
-    virtual Storable* Create(const std::string& theMeshName, 
-                            VISU::Entity theEntity,
-                            const std::string& theFieldName, 
-                            CORBA::Long theTimeStampNumber);
-
-    virtual void ToStream(std::ostringstream& theStr);
-
-    virtual Storable* Restore(SALOMEDS::SObject_ptr theSObject,
-                             const Storable::TRestoringMap& theMap);
-
-    virtual VISU_Actor* CreateActor();
-
-    virtual VISU_Actor* CreateActor(bool toSupressShrinking);
-
-    virtual void UpdateActor(VISU_ActorBase* theActor);
-  };
-};
-#endif
diff --git a/src/VISU_I/VISU_OptionalDeformation_i.cc b/src/VISU_I/VISU_OptionalDeformation_i.cc
deleted file mode 100755 (executable)
index 77a1229..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-//  Copyright (C) 2008  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_OptionalDeformation_i.cc
-//  Author : 
-//  Module : VISU
-
-#include "VISU_OptionalDeformation_i.hh"
-#include "VISU_Result_i.hh"
-#include "VISU_Prs3dUtils.hh"
-#include "VISUConfig.hh"
-
-#include "VISU_OptionalDeformationPL.hxx"
-
-
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
-//---------------------------------------------------------------
-VISU::OptionalDeformation_i::OptionalDeformation_i(VISU::ColoredPrs3d_i *theColoredPrs3d):
-  Deformation_i(theColoredPrs3d)
-{
-  if(MYDEBUG) MESSAGE("OptionalDeformation_i::OptionalDeformation_i()");
-}
-
-//---------------------------------------------------------------
-VISU::OptionalDeformation_i::~OptionalDeformation_i()
-{
-  if(MYDEBUG) MESSAGE("OptionalDeformation_i::~OptionalDeformation_i()");
-}
-
-//---------------------------------------------------------------
-void VISU::OptionalDeformation_i::UseDeformation(CORBA::Boolean theFlag){
-  if(MYDEBUG) MESSAGE("OptionalDeformation_i::UseDeformation()");
-
-  VISU::TSetModified aModified(GetColoredPrs3d());
-
-  ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_OptionalDeformationPL, bool>
-                  (GetSpecificDeformedPL(), &VISU_OptionalDeformationPL::UseDeformation, theFlag));
-}
-
-//---------------------------------------------------------------
-CORBA::Boolean VISU::OptionalDeformation_i::IsDeformed(){
-
-  if(MYDEBUG) MESSAGE("OptionalDeformation_i::IsDeformed()");
-  return GetSpecificDeformedPL()->IsDeformed();
-}
-
-
-void VISU::OptionalDeformation_i::InitDeformedPipeLine(VISU_DeformationPL* theDeformedPipeLine){
-
-  if(MYDEBUG) MESSAGE("OptionalDeformation_i::InitDeformedPipeLine()");
-  myOptionalDeformationPL = dynamic_cast<VISU_OptionalDeformationPL*>(theDeformedPipeLine);
-
-  TSuperClass::InitDeformedPipeLine(myOptionalDeformationPL);
-}
-
-//---------------------------------------------------------------
-void VISU::OptionalDeformation_i::
-DeformationToStream(std::ostringstream& theStr)
-{
-  Storable::DataToStream(theStr,"IsDeformed", IsDeformed());
-  if(IsDeformed())
-    TSuperClass::DeformationToStream(theStr);
-}
-
-//---------------------------------------------------------------
-void
-VISU::OptionalDeformation_i::RestoreDeformation(SALOMEDS::SObject_ptr theSObject,
-                                               const Storable::TRestoringMap& theMap)
-{
-  UseDeformation(Storable::FindValue(theMap,"IsDeformed").toInt());
-  if(IsDeformed())
-    TSuperClass::RestoreDeformation(theSObject,theMap);
-}
-
-
-
-void 
-VISU::OptionalDeformation_i::SameAsDeformation(const Deformation_i *aDeformedPrs){
-
-  if(const OptionalDeformation_i* aPrs3d = dynamic_cast<const OptionalDeformation_i*>(aDeformedPrs)){
-    OptionalDeformation_i* anOrigin = const_cast<OptionalDeformation_i*>(aPrs3d);
-    UseDeformation(anOrigin->IsDeformed());
-    
-    if(anOrigin->IsDeformed()){
-      TSuperClass::SameAsDeformation(aDeformedPrs);
-    }
-  }
-}
diff --git a/src/VISU_I/VISU_OptionalDeformation_i.hh b/src/VISU_I/VISU_OptionalDeformation_i.hh
deleted file mode 100755 (executable)
index ac6a08f..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-//  Copyright (C) 2008  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_Deformation_i.hxx
-//  Author : 
-//  Module : VISU
-
-#ifndef VISU_OptionalDeformation_i_HeaderFile
-#define VISU_OptionalDeformation_i_HeaderFile
-
-#include "VISU_I.hxx"
-#include "VISU_Deformation_i.hh"
-#include "VISU_OptionalDeformationPL.hxx"
-
-namespace VISU {
-  class VISU_I_EXPORT OptionalDeformation_i : public virtual POA_VISU::OptionalDeformation,
-                                             public virtual Deformation_i
-  {
-    OptionalDeformation_i(const OptionalDeformation_i&);
-  public:
-    typedef VISU::OptionalDeformation TInterface;
-    typedef Deformation_i TSuperClass;
-
-    OptionalDeformation_i(VISU::ColoredPrs3d_i* theModifiedEngine);
-    virtual ~OptionalDeformation_i();
-    
-    virtual void UseDeformation(CORBA::Boolean theFlag);
-    virtual CORBA::Boolean IsDeformed();
-
-
-    virtual
-    void
-    DeformationToStream(std::ostringstream& theStr);
-
-    virtual
-    void
-    RestoreDeformation(SALOMEDS::SObject_ptr theSObject,
-           const Storable::TRestoringMap& theMap);
-
-    virtual 
-    void 
-    SameAsDeformation(const Deformation_i *aDeformedPrs);
-
-  protected:
-    virtual
-    void InitDeformedPipeLine(VISU_DeformationPL* theDeformedPipeLine);
-
-    VISU_OptionalDeformationPL*
-    GetSpecificDeformedPL() const
-    { 
-      return myOptionalDeformationPL;
-    }
-    
-  private:
-    VISU_OptionalDeformationPL* myOptionalDeformationPL;
-    
-  };
-}
-#endif
index 3f8ff6589845a8a36d3e1562007237afa6355833..a5ecb5d87792dc17f9c98ee77b705dbe09780efd 100644 (file)
@@ -34,6 +34,7 @@ static int MYDEBUG = 0;
 static int MYDEBUG = 0;
 #endif
 
+using namespace std;
 
 //---------------------------------------------------------------
 size_t 
diff --git a/src/VISU_I/VISU_PointMap3d_i.cc b/src/VISU_I/VISU_PointMap3d_i.cc
deleted file mode 100644 (file)
index 2885a35..0000000
+++ /dev/null
@@ -1,1276 +0,0 @@
-//  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_PointMap3d_i.cc
-//  Author : Dmitry Matveitchev
-//  Module : VISU
-
-#include "VISU_PointMap3d_i.hh"
-
-#include "VISU_CutLines_i.hh"
-#include "VISU_Result_i.hh"
-#include "VISU_ViewManager_i.hh"
-#include "VISU_ScalarBarActor.hxx"
-#include "SUIT_ResourceMgr.h"
-
-#include "SALOME_Event.h"
-#include "VISU_Prs3dUtils.hh"
-#include "SPlot2d_Curve.h"
-#include "VISU_PipeLineUtils.hxx"
-
-#include "VISU_TableReader.hxx"
-#include "VISU_ConvertorUtils.hxx"
-#include "VISU_DeformedGridPL.hxx"
-
-#include "SALOME_InteractiveObject.hxx"
-#include "VISU_Gen_i.hh"
-
-#include <vtkTextProperty.h>
-#include <vtkActorCollection.h>
-
-#include <boost/bind.hpp>
-
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
-//----------------------------------------------------------------
-//                      PointMap3d Object
-//----------------------------------------------------------------
-int VISU::PointMap3d_i::myNbPresent = 0;
-const string VISU::PointMap3d_i::myComment  = "POINTMAP3D";
-/*!
-  Generate unique name
-*/
-QString VISU::PointMap3d_i::GenerateName()
-{
-  return VISU::GenerateName( "Table3D - ", ++myNbPresent );
-}
-/*!
-  Gets comment string
-*/
-const char* VISU::PointMap3d_i::GetComment() const
-{
-  return myComment.c_str();
-}
-/*!
-  Constructor
-*/
-VISU::PointMap3d_i::PointMap3d_i( SALOMEDS::Study_ptr theStudy, const char* theObjectEntry )
-  : Table_i(theStudy, theObjectEntry),
-  myActorCollection(vtkActorCollection::New()),
-  myIsActiveState(true)
-{
-  if(MYDEBUG) MESSAGE("PointMap3d_i::PointMap3d_i - this = "<<this);
-  SetStudyDocument(theStudy);
-  mySObj = theStudy->FindObjectID(theObjectEntry);
-  myOffset[0] = myOffset[1] = myOffset[2] = 0;
-  myActorCollection->Delete();
-}
-/*!
-  Destructor
-*/
-VISU::PointMap3d_i::~PointMap3d_i()
-{
-  if(MYDEBUG) MESSAGE("PointMap3d_i::~PointMap3d_i - this = "<<this);
-}
-
-//----------------------------------------------------------------------------
-namespace VISU
-{
-  struct TInvokeSignalEvent: public SALOME_Event
-  {
-    typedef boost::signal0<void> TSignal;
-    const TSignal& mySignal;
-    
-    TInvokeSignalEvent(const TSignal& theSignal):
-      mySignal(theSignal)
-    {}
-    
-    virtual
-    void
-    Execute()
-    {
-      mySignal();
-    }
-  };
-}
-
-//----------------------------------------------------------------------------
-void
-VISU::PointMap3d_i
-::SetTitle( const char* theTitle )
-{
-  SetName( theTitle, true );
-}
-
-//----------------------------------------------------------------------------
-char*
-VISU::PointMap3d_i
-::GetTitle()
-{
-  return CORBA::string_dup( GetName().c_str() );
-}
-
-//----------------------------------------------------------------------------
-SALOMEDS::SObject_var
-VISU::PointMap3d_i
-::GetSObject() const
-{
-  return mySObj;
-}
-
-//----------------------------------------------------------------------------
-std::string
-VISU::PointMap3d_i
-::GetObjectEntry() 
-{
-  CORBA::String_var anEntry = mySObj->GetID();
-  return anEntry.in(); 
-}
-
-//----------------------------------------------------------------------------
-Handle(SALOME_InteractiveObject)
-VISU::PointMap3d_i
-::GetIO()
-{
-  if( myIO.IsNull() )
-    myIO = new SALOME_InteractiveObject(GetEntry().c_str(), "VISU", GetName().c_str());
-
-  return myIO;
-}
-
-//----------------------------------------------------------------------------
-/*!
-  Creates table3d object
-*/
-VISU::Storable* VISU::PointMap3d_i::Create()
-{
-  // generate name ...
-  SetName(GetTableTitle().toLatin1().constData(), false);
-
-  if ( GetName() == "" ) {
-    if ( !mySObj->_is_nil() ) {
-      CutLines_i* pCutLines = NULL;
-      CORBA::Object_var anObj = SObjectToObject(mySObj);
-      if(!CORBA::is_nil(anObj)){
-       VISU::CutLines_var aCutLines = VISU::CutLines::_narrow(anObj);
-       if(!aCutLines->_is_nil())
-         pCutLines = dynamic_cast<CutLines_i*>(GetServant(aCutLines).in());
-      }
-      if (!pCutLines)
-       if (mySObj->GetName()) SetName(mySObj->GetName(), false);
-    }
-  }
-
-  if ( GetName() == "" )
-    SetName(GenerateName().toLatin1().constData(), false);
-
-  // Create Pipeline
-  myTablePL = VISU_DeformedGridPL::New();
-  myTablePL->SetPolyDataIDMapper(GetTableIDMapper());
-  myTablePL->Update();
-
-  SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
-
-  bool isUnits = aResourceMgr->booleanValue( "VISU", "scalar_bar_display_units", true );
-  SetUnitsVisible(isUnits);
-
-  SetSourceRange();
-
-  if( aResourceMgr->booleanValue("VISU", "scalar_bar_logarithmic", false) )
-    SetScaling(VISU::LOGARITHMIC);
-  else
-    SetScaling(VISU::LINEAR);
-
-  int aNumberOfColors = aResourceMgr->integerValue( "VISU", "scalar_bar_num_colors", 64 );
-  SetNbColors(aNumberOfColors);
-
-  int aRangeType = aResourceMgr->integerValue("VISU" , "scalar_range_type", 0);
-  UseFixedRange(aRangeType == 1);
-  if(aRangeType == 1){
-    float aMin = aResourceMgr->doubleValue("VISU", "scalar_range_min", 0);
-    float aMax = aResourceMgr->doubleValue("VISU", "scalar_range_max", 0);
-    SetRange(aMin, aMax);
-  }
-
-  QString aLabelsFormat = aResourceMgr->stringValue( "VISU", "scalar_bar_label_format", "%-#6.3g" );
-  SetLabelsFormat(aLabelsFormat.toLatin1().constData());
-
-  // Orientation
-  int anOrientation = aResourceMgr->integerValue("VISU", "scalar_bar_orientation", 0);
-  if(anOrientation == 1)
-    SetBarOrientation(VISU::ColoredPrs3dBase::HORIZONTAL);
-  else
-    SetBarOrientation(VISU::ColoredPrs3dBase::VERTICAL);
-
-  // Scalar Bar origin
-  QString propertyName = QString( "scalar_bar_%1_" ).arg( anOrientation == 0 ? "vertical" : "horizontal" );
-
-  vtkFloatingPointType aXorigin = (myBarOrientation == VISU::ColoredPrs3dBase::VERTICAL) ? 0.01 : 0.2;
-  aXorigin = aResourceMgr->doubleValue("VISU", propertyName + "x", aXorigin);
-  myPosition[0] = aXorigin;
-
-  vtkFloatingPointType aYorigin = (myBarOrientation == VISU::ColoredPrs3dBase::VERTICAL) ? 0.1 : 0.012;
-  aYorigin = aResourceMgr->doubleValue("VISU", propertyName + "y", aYorigin);
-  myPosition[1] = aYorigin;
-
-  // Scalar Bar size
-  myWidth = (myBarOrientation == VISU::ColoredPrs3dBase::VERTICAL)? 0.1 : 0.6;
-  myWidth = aResourceMgr->doubleValue("VISU", propertyName + "width", myWidth);
-
-  myHeight = (myBarOrientation == VISU::ColoredPrs3dBase::VERTICAL)? 0.8:0.12;
-  myHeight = aResourceMgr->doubleValue("VISU", propertyName + "height", myHeight);
-
-  myTitleWidth = aResourceMgr->doubleValue("VISU", propertyName + "title_width", 0);
-  myTitleHeight = aResourceMgr->doubleValue("VISU", propertyName + "title_height", 0);
-  myLabelWidth = aResourceMgr->doubleValue("VISU", propertyName + "label_width", 0);
-  myLabelHeight = aResourceMgr->doubleValue("VISU", propertyName + "label_height", 0);
-  myBarWidth = aResourceMgr->doubleValue("VISU", propertyName + "bar_width", 0);
-  myBarHeight = aResourceMgr->doubleValue("VISU", propertyName + "bar_height", 0);
-
-  // Nb of Labels
-  myNumberOfLabels = aResourceMgr->integerValue( "VISU", "scalar_bar_num_labels", 5 );
-
-  // Fonts properties definition
-  myIsBoldTitle = myIsItalicTitle = myIsShadowTitle = true;
-  myTitFontType = VTK_ARIAL;
-
-  if(aResourceMgr->hasValue( "VISU", "scalar_bar_title_font" )){
-    QFont f = aResourceMgr->fontValue( "VISU", "scalar_bar_title_font" );
-    if ( f.family() == "Arial" )
-      myTitFontType = VTK_ARIAL;
-    else if ( f.family() == "Courier" )
-      myTitFontType = VTK_COURIER;
-    else if ( f.family() == "Times" )
-      myTitFontType = VTK_TIMES;
-    
-    myIsBoldTitle   = f.bold();
-    myIsItalicTitle = f.italic();
-    myIsShadowTitle =  f.underline();
-  }
-
-  QColor aTextColor = aResourceMgr->colorValue( "VISU", "scalar_bar_title_color", QColor( 255, 255, 255 ) );
-
-  myTitleColor[0] = aTextColor.red()   / 255;
-  myTitleColor[1] = aTextColor.green() / 255;
-  myTitleColor[2] = aTextColor.blue()  / 255;
-
-  myIsBoldLabel = myIsItalicLabel = myIsShadowLabel = true;
-  myLblFontType = VTK_ARIAL;
-
-  if( aResourceMgr->hasValue( "VISU", "scalar_bar_label_font" )){
-    QFont f = aResourceMgr->fontValue( "VISU", "scalar_bar_label_font" );
-    if ( f.family() == "Arial" )
-      myLblFontType = VTK_ARIAL;
-    else if ( f.family() == "Courier" )
-      myLblFontType = VTK_COURIER;
-    else if ( f.family() == "Times" )
-      myLblFontType = VTK_TIMES;
-    
-    myIsBoldLabel   = f.bold();
-    myIsItalicLabel = f.italic();
-    myIsShadowLabel =  f.underline();
-  }
-
-  QColor aLabelColor = aResourceMgr->colorValue( "VISU", "scalar_bar_label_color", QColor( 255, 255, 255 ) );
-
-  myLabelColor[0] = aLabelColor.red()   / 255;
-  myLabelColor[1] = aLabelColor.green() / 255;
-  myLabelColor[2] = aLabelColor.blue()  / 255;
-
-  // scalar bar default position
-  bool anIsArrangeBar = aResourceMgr->booleanValue("VISU", "scalar_bars_default_position", 0);
-  int aPlace = 1;
-  if (anIsArrangeBar){
-    aPlace = aResourceMgr->integerValue("VISU", "scalar_bar_position_num",0);
-  }
-  if(myBarOrientation == VISU::ColoredPrs3dBase::HORIZONTAL){
-    myPosition[1] += myHeight*(aPlace-1);
-  } else {
-    myPosition[0] += myWidth*(aPlace-1);
-  }
-
-  return Build( false );
-}
-
-/*
-  GetIDMapper
-*/
-
-VISU::PTableIDMapper
-VISU::PointMap3d_i
-::GetTableIDMapper()
-{
-  //Initialisate table mapper
-  SALOMEDS::GenericAttribute_var anAttr;
-  mySObj->FindAttribute(anAttr, "AttributeTableOfReal");
-  SALOMEDS::AttributeTableOfReal_var aTableOfReal = SALOMEDS::AttributeTableOfReal::_narrow(anAttr);
-
-  PTableIDMapper aTableIDMapper( new TTableIDMapper() );
-  TTable2D& aTable2D = *aTableIDMapper;
-
-  aTable2D.myTitle = aTableOfReal->GetTitle();
-
-  SALOMEDS::StringSeq_var aColStrList = aTableOfReal->GetColumnTitles();
-  SALOMEDS::StringSeq_var aRowStrList = aTableOfReal->GetRowTitles();
-
-  for ( int i = 0; i < aRowStrList->length(); i++ ) {
-    aTable2D.myColumnTitles.push_back( aRowStrList[ i ].in() );
-  }
-
-  int aCols = aTableOfReal->GetNbColumns();
-  int aRows = aTableOfReal->GetNbRows();
-
-  for (int i=1; i<=aCols; i++) {
-    TTable2D::TRow aRow;
-    aRow.myTitle = aColStrList[ i-1 ].in();
-    for (int j=1; j<=aRows; j++) {
-      double aVal = aTableOfReal->GetValue(j, i);
-      QString aValStr = QString::number(aVal);
-      aRow.myValues.push_back( aValStr.toLatin1().constData() );
-    }
-    if( aRow.myValues.size() > 0 )
-      aTable2D.myRows.push_back( aRow );
-  }
-
-  return aTableIDMapper;
-}
-
-/*
-  Create Actor
-*/
-VISU_PointMap3dActor* VISU::PointMap3d_i::CreateActor()
-{
-  VISU_PointMap3dActor* anActor = VISU_PointMap3dActor::New();
-  anActor->SetPipeLine(myTablePL);
-  anActor->SetFactory(this);
-
-  SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
-  int  aDispMode = aResourceMgr->integerValue("VISU", "point_map_represent", 2);
-  bool toShrink  = aResourceMgr->booleanValue("VISU", "scalar_map_shrink", false);
-  anActor->SetRepresentation(aDispMode);
-  if (toShrink) anActor->SetShrink();
-
-  Handle (SALOME_InteractiveObject) anIO = new SALOME_InteractiveObject(GetEntry().c_str(), "VISU", GetName().c_str());
-  anActor->setIO(anIO);
-
-  myUpdateActorsSignal.connect(boost::bind(&VISU_Actor::UpdateFromFactory,anActor));
-  //  myRemoveActorsFromRendererSignal.connect(boost::bind(&VISU_Actor::RemoveFromRender,anActor));
-
-  myActorCollection->AddItem(anActor);
-
-  UpdateActor( anActor );
-
-  return anActor;
-}
-
-/*
-  Update Actor
-*/
-void VISU::PointMap3d_i::UpdateActor(VISU_ActorBase* theActor)
-{
-  if(VISU_PointMap3dActor* anActor = dynamic_cast<VISU_PointMap3dActor*>(theActor)){
-    Update();
-    VISU_ScalarBarActor *aScalarBar = anActor->GetScalarBar();
-    aScalarBar->SetLookupTable(GetSpecificPL()->GetBarTable());
-    aScalarBar->SetTitle(GetTitle());
-    aScalarBar->SetOrientation(GetBarOrientation());
-    aScalarBar->GetPositionCoordinate()->SetCoordinateSystemToNormalizedViewport();
-    aScalarBar->GetPositionCoordinate()->SetValue(GetPosX(),GetPosY());
-    aScalarBar->SetWidth(GetWidth());
-    aScalarBar->SetHeight(GetHeight());
-    aScalarBar->SetNumberOfLabels(GetLabels());
-    aScalarBar->SetRatios(myTitleWidth, myTitleHeight,
-                         myLabelWidth, myLabelHeight,
-                         myBarWidth, myBarHeight);
-    aScalarBar->SetNumberOfLabels(GetLabels());
-    aScalarBar->SetLabelFormat(GetLabelsFormat());
-
-    vtkFloatingPointType anRGB[3];
-
-    vtkTextProperty* aTitleProp = aScalarBar->GetTitleTextProperty();
-    aTitleProp->SetFontFamily(GetTitFontType());
-
-    GetTitleColor(anRGB[0],anRGB[1],anRGB[2]);
-    aTitleProp->SetColor(anRGB[0],anRGB[1],anRGB[2]);
-
-    IsBoldTitle()? aTitleProp->BoldOn() : aTitleProp->BoldOff();
-    IsItalicTitle()? aTitleProp->ItalicOn() : aTitleProp->ItalicOff();
-    IsShadowTitle()? aTitleProp->ShadowOn() : aTitleProp->ShadowOff();
-
-    vtkTextProperty* aLabelProp = aScalarBar->GetLabelTextProperty();
-    aLabelProp->SetFontFamily(GetLblFontType());
-
-    GetLabelColor(anRGB[0],anRGB[1],anRGB[2]);
-    aLabelProp->SetColor(anRGB[0],anRGB[1],anRGB[2]);
-
-    IsBoldLabel()? aLabelProp->BoldOn() : aLabelProp->BoldOff();
-    IsItalicLabel()? aLabelProp->ItalicOn() : aLabelProp->ItalicOff();
-    IsShadowLabel()? aLabelProp->ShadowOn() : aLabelProp->ShadowOff();
-
-    aScalarBar->Modified();
-  }
-  theActor->SetPosition(myOffset[0],myOffset[1],myOffset[2]);
-}
-
-void
-VISU::PointMap3d_i
-::UpdateActors()
-{
-  if(MYDEBUG) MESSAGE("Prs3d_i::UpdateActors - this = "<<this);
-  ProcessVoidEvent(new TVoidMemFunEvent<VISU_PipeLine>
-                  (GetSpecificPL(), &VISU_PipeLine::Update));
-
-  ProcessVoidEvent(new VISU::TInvokeSignalEvent(myUpdateActorsSignal));
-}
-
-//----------------------------------------------------------------------------
-void
-VISU::PointMap3d_i
-::Update()
-{
-  if(GetMTime() < myUpdateTime.GetMTime())
-    return;
-
-  if(MYDEBUG) MESSAGE("PointMap3d_i::Update - this = "<<this);
-
-  try{
-    ProcessVoidEvent(new TVoidMemFunEvent<VISU_PipeLine>
-                    (GetSpecificPL(), &VISU_PipeLine::Update));
-    myUpdateTime.Modified();
-  }catch(std::exception&){
-    throw;
-  }catch(...){
-    throw std::runtime_error("PointMap3d_i::Update >> unexpected exception was caught!!!");
-  }
-}
-
-//----------------------------------------------------------------------------
-unsigned long int 
-VISU::PointMap3d_i
-::GetMTime()
-{
-  unsigned long int aTime = myParamsTime.GetMTime();
-  if( GetSpecificPL() )
-    aTime = std::max(aTime, GetSpecificPL()->GetMTime());
-  return aTime;
-}
-
-/*!
-  Builds presentation of table
-*/
-VISU::Storable* VISU::PointMap3d_i::Build( int theRestoring )
-{
-
-  // look for reference SObject with table attribute
-  SALOMEDS::SObject_var SO = mySObj;
-
-  if ( !SO->_is_nil() ) {
-    CutLines_i* pCutLines = NULL;
-    CORBA::Object_var anObj = SObjectToObject(SO);
-    if(!CORBA::is_nil(anObj)){
-      VISU::CutLines_var aCutLines = VISU::CutLines::_narrow(anObj);
-      if(!aCutLines->_is_nil())
-       pCutLines = dynamic_cast<CutLines_i*>(GetServant(aCutLines).in());
-    }
-    SALOMEDS::Study_var aStudy = GetStudyDocument();
-    SALOMEDS::StudyBuilder_var Builder = GetStudyDocument()->NewBuilder();
-    SALOMEDS::GenericAttribute_var anAttr;
-    // look for component
-    if ( !theRestoring ) {
-       SALOMEDS::SComponent_var SComponent = VISU::FindOrCreateVisuComponent( GetStudyDocument() );
-       // create SObject and set attributes
-       QString aComment;
-       if(pCutLines)
-         aComment.sprintf("myComment=%s;mySourceId=CutLines",GetComment());
-       else{
-         aComment.sprintf("myComment=%s;mySourceId=TableAttr",GetComment());
-         SALOMEDS::SObject_var aFatherSObject = SO->GetFather();
-         if(aFatherSObject->FindAttribute(anAttr,"AttributeString")){
-           SALOMEDS::AttributeString_var aCommentAttr =
-             SALOMEDS::AttributeString::_narrow(anAttr);
-           CORBA::String_var aValue = aCommentAttr->Value();
-           Storable::TRestoringMap aMap;
-           Storable::StringToMap(aValue.in(),aMap);
-           bool anIsExist;
-           QString aMethodName = VISU::Storable::FindValue(aMap,"myComment",&anIsExist);
-           if(anIsExist){
-             if(aMethodName == "ImportTables"){
-               aComment.sprintf("myComment=%s;mySourceId=TableFile",GetComment());
-             }
-           }
-         }
-       }
-
-       string anEntry = CreateAttributes( GetStudyDocument(),
-                                         SO->GetID(),//SComponent->GetID(),
-                                         "ICON_TREE_TABLE",
-                                         GetID(),
-                                         GetName(),
-                                         "",
-                                         aComment.toLatin1().constData(),
-                                         pCutLines );
-       // create SObject referenced to real table object
-       mySObj = SALOMEDS::SObject::_duplicate(GetStudyDocument()->FindObjectID( anEntry.c_str() ));
-       if(pCutLines) {
-         pCutLines->BuildTableOfReal(mySObj);
-       }
-       // mpv (PAL5357): reference attributes are unnecessary now
-       //SALOMEDS::SObject_var refSO = Builder->NewObject( mySObj );
-       //Builder->Addreference( refSO, SO );
-    }
-
-    return this;
-  }
-  return NULL;
-}
-/*!
-  Restores table object from stream
-*/
-VISU::Storable* VISU::PointMap3d_i::Restore( const Storable::TRestoringMap& theMap, SALOMEDS::SObject_ptr SO)
-{
-  if(MYDEBUG) MESSAGE(GetComment());
-  SetName(VISU::Storable::FindValue(theMap,"myName").toLatin1().constData(), false);
-  myTitle = VISU::Storable::FindValue(theMap,"myTitle").toLatin1().constData();
-  myOrientation = ( VISU::Table::Orientation )( VISU::Storable::FindValue(theMap,"myOrientation").toInt() );
-  mySObj = SALOMEDS::SObject::_duplicate(SO);
-
-  //Create PipeLine
-  myTablePL = VISU_DeformedGridPL::New();
-  myTablePL->SetPolyDataIDMapper(GetTableIDMapper());
-  myTablePL->Update();
-
-  //Restore Other Values
-  
-  float aMin = VISU::Storable::FindValue(theMap,"myScalarRange[0]").toDouble();
-  float aMax = VISU::Storable::FindValue(theMap,"myScalarRange[1]").toDouble();
-  SetRange(aMin, aMax);
-
-  UseFixedRange(VISU::Storable::FindValue(theMap,"myIsFixedRange", "0").toInt());
-
-  SetNbColors(VISU::Storable::FindValue(theMap,"myNumberOfColors").toInt());
-  SetUnitsVisible(VISU::Storable::FindValue(theMap,"myUnitsVisible", "1").toInt());
-  SetLabelsFormat(VISU::Storable::FindValue(theMap,"myLabelsFormat", "%-#6.3g").toLatin1().constData());
-  SetBarOrientation((VISU::ColoredPrs3dBase::Orientation)VISU::Storable::FindValue(theMap,"myBarOrientation").toInt());
-
-  SetTitle(VISU::Storable::FindValue(theMap,"myTitle").toLatin1().constData());
-  myNumberOfLabels = VISU::Storable::FindValue(theMap,"myNumberOfLabels").toInt();
-  myPosition[0] = VISU::Storable::FindValue(theMap,"myPosition[0]").toDouble();
-  myPosition[1] = VISU::Storable::FindValue(theMap,"myPosition[1]").toDouble();
-  myWidth = VISU::Storable::FindValue(theMap,"myWidth").toDouble();
-  myHeight = VISU::Storable::FindValue(theMap,"myHeight").toDouble();
-  myTitleWidth = VISU::Storable::FindValue(theMap,"myTitleWidth").toInt();
-  myTitleHeight = VISU::Storable::FindValue(theMap,"myTitleHeight").toInt();
-  myLabelWidth = VISU::Storable::FindValue(theMap,"myLabelWidth").toInt();
-  myLabelHeight = VISU::Storable::FindValue(theMap,"myLabelHeight").toInt();
-  myBarWidth = VISU::Storable::FindValue(theMap,"myBarWidth").toInt();
-  myBarHeight = VISU::Storable::FindValue(theMap,"myBarHeight").toInt();
-
-  myTitFontType = VISU::Storable::FindValue(theMap,"myTitFontType").toInt();
-  myIsBoldTitle = VISU::Storable::FindValue(theMap,"myIsBoldTitle").toInt();
-  myIsItalicTitle = VISU::Storable::FindValue(theMap,"myIsItalicTitle").toInt();
-  myIsShadowTitle = VISU::Storable::FindValue(theMap,"myIsShadowTitle").toInt();
-  myTitleColor[0] = VISU::Storable::FindValue(theMap,"myTitleColor[0]").toFloat();
-  myTitleColor[1] = VISU::Storable::FindValue(theMap,"myTitleColor[1]").toFloat();
-  myTitleColor[2] = VISU::Storable::FindValue(theMap,"myTitleColor[2]").toFloat();
-
-  myLblFontType = VISU::Storable::FindValue(theMap,"myLblFontType").toInt();
-  myIsBoldLabel = VISU::Storable::FindValue(theMap,"myIsBoldLabel").toInt();
-  myIsItalicLabel = VISU::Storable::FindValue(theMap,"myIsItalicLabel").toInt();
-  myIsShadowLabel = VISU::Storable::FindValue(theMap,"myIsShadowLabel").toInt();
-  myLabelColor[0] = VISU::Storable::FindValue(theMap,"myLabelColor[0]").toFloat();
-  myLabelColor[1] = VISU::Storable::FindValue(theMap,"myLabelColor[1]").toFloat();
-  myLabelColor[2] = VISU::Storable::FindValue(theMap,"myLabelColor[2]").toFloat();
-
-  myParamsTime.Modified();
-  return Build( true );
-}
-/*!
-  Flushes table data into stream
-*/
-void VISU::PointMap3d_i::ToStream( std::ostringstream& theStr )
-{
-  Storable::DataToStream( theStr, "myName",        GetName().c_str() );
-  Storable::DataToStream( theStr, "myTitle",       myTitle.c_str() );
-  Storable::DataToStream( theStr, "myOrientation", myOrientation );
-
-  Storable::DataToStream( theStr, "myScalarRange[0]", GetMin() );
-  Storable::DataToStream( theStr, "myScalarRange[1]", GetMax() );
-  Storable::DataToStream( theStr, "myIsFixedRange",   IsRangeFixed() );
-
-  Storable::DataToStream( theStr, "myNumberOfColors", int(GetNbColors()) );
-  Storable::DataToStream( theStr, "myBarOrientation", myBarOrientation );
-
-  Storable::DataToStream( theStr, "myTitle",          myTitle.c_str() );
-  Storable::DataToStream( theStr, "myUnitsVisible",   myIsUnits );
-  Storable::DataToStream( theStr, "myNumberOfLabels", myNumberOfLabels );
-  Storable::DataToStream( theStr, "myLabelsFormat",   myLabelsFormat.c_str() );
-  Storable::DataToStream( theStr, "myPosition[0]",    myPosition[0] );
-  Storable::DataToStream( theStr, "myPosition[1]",    myPosition[1] );
-  Storable::DataToStream( theStr, "myWidth",          myWidth );
-  Storable::DataToStream( theStr, "myHeight",         myHeight );
-  Storable::DataToStream( theStr, "myTitleWidth",     myTitleWidth );
-  Storable::DataToStream( theStr, "myTitleHeight",    myTitleHeight );
-  Storable::DataToStream( theStr, "myLabelWidth",     myLabelWidth );
-  Storable::DataToStream( theStr, "myLabelHeight",    myLabelHeight );
-  Storable::DataToStream( theStr, "myBarWidth",       myBarWidth );
-  Storable::DataToStream( theStr, "myBarHeight",      myBarHeight );
-
-  Storable::DataToStream( theStr, "myTitFontType",    myTitFontType );
-  Storable::DataToStream( theStr, "myIsBoldTitle",    myIsBoldTitle );
-  Storable::DataToStream( theStr, "myIsItalicTitle",  myIsItalicTitle );
-  Storable::DataToStream( theStr, "myIsShadowTitle",  myIsShadowTitle );
-  Storable::DataToStream( theStr, "myTitleColor[0]",  myTitleColor[0] );
-  Storable::DataToStream( theStr, "myTitleColor[1]",  myTitleColor[1] );
-  Storable::DataToStream( theStr, "myTitleColor[2]",  myTitleColor[2] );
-
-  Storable::DataToStream( theStr, "myLblFontType",    myLblFontType );
-  Storable::DataToStream( theStr, "myIsBoldLabel",    myIsBoldLabel );
-  Storable::DataToStream( theStr, "myIsItalicLabel",  myIsItalicLabel );
-  Storable::DataToStream( theStr, "myIsShadowLabel",  myIsShadowLabel );
-  Storable::DataToStream( theStr, "myLabelColor[0]",  myLabelColor[0] );
-  Storable::DataToStream( theStr, "myLabelColor[1]",  myLabelColor[1] );
-  Storable::DataToStream( theStr, "myLabelColor[2]",  myLabelColor[2] );
-}
-/*!
-  Called from engine to restore table from the file
-*/
-VISU::Storable* VISU::PointMap3d_i::StorableEngine(SALOMEDS::SObject_ptr theSObject,
-                                                  const Storable::TRestoringMap& theMap,
-                                                  const std::string& thePrefix,
-                                                  CORBA::Boolean theIsMultiFile)
-{
-  SALOMEDS::Study_var aStudy = theSObject->GetStudy();
-  VISU::PointMap3d_i* pResent = new VISU::PointMap3d_i( aStudy, "" );
-  return pResent->Restore( theMap, theSObject);
-}
-/*!
-  Gets title for the original table object
-*/
-QString VISU::PointMap3d_i::GetTableTitle()
-{
-  SALOMEDS::SObject_var SO = mySObj;
-  SALOMEDS::StudyBuilder_var Builder = GetStudyDocument()->NewBuilder();
-  SALOMEDS::GenericAttribute_var        anAttr;
-  SALOMEDS::AttributeTableOfInteger_var anInt;
-  SALOMEDS::AttributeTableOfReal_var    aReal;
-  if ( !SO->_is_nil() ) {
-    if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfInteger" ) ) {
-      anInt = SALOMEDS::AttributeTableOfInteger::_narrow( anAttr );
-      CORBA::String_var aString = anInt->GetTitle();
-      return aString.in();
-    }
-    else if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfReal" ) ) {
-      aReal = SALOMEDS::AttributeTableOfReal::_narrow( anAttr );
-      CORBA::String_var aString = aReal->GetTitle();
-      return aString.in();
-    }
-  }
-  return "";
-}
-
-//---------------------------------------------------------------
-void VISU::PointMap3d_i::RemoveFromStudy()
-{
-  struct TRemoveFromStudy: public SALOME_Event
-  {
-    VISU::PointMap3d_i* myRemovable;
-    TRemoveFromStudy(VISU::PointMap3d_i* theRemovable):
-      myRemovable(theRemovable)
-    {}
-    
-    virtual
-    void
-    Execute()
-    {
-      VISU::RemoveFromStudy(myRemovable->GetSObject(),false);
-    }
-  };
-
-  // Remove the table with all curves
-  ProcessVoidEvent(new TRemoveFromStudy(this));
-}
-
-//----------------------------------------------------------------
-void VISU::PointMap3d_i::SetOffset(CORBA::Float theDx, CORBA::Float theDy, CORBA::Float theDz)
-{
-  myOffset[0] = theDx;
-  myOffset[1] = theDy;
-  myOffset[2] = theDz;
-  myParamsTime.Modified();
-}
-
-void VISU::PointMap3d_i::GetOffset(CORBA::Float& theDx, CORBA::Float& theDy, CORBA::Float& theDz)
-{
-  theDx = myOffset[0];
-  theDy = myOffset[1];
-  theDz = myOffset[2];
-}
-
-CORBA::Float VISU::PointMap3d_i::GetMemorySize()
-{
-  CORBA::Float aSize = GetSpecificPL()->GetMemorySize();
-
-  int anEnd = myActorCollection->GetNumberOfItems();
-  for(int anId = 0; anId < anEnd; anId++)
-    if(vtkObject* anObject = myActorCollection->GetItemAsObject(anId))
-      if(VISU_Actor* anActor = dynamic_cast<VISU_Actor*>(anObject)){
-       aSize += anActor->GetMemorySize();
-       //cout<<"Prs3d_i::GetMemorySize - "<<this<<"; anActor = "<<aSize / (1024.0 * 1024.0)<<endl;
-      }
-
-  // Convert to mega bytes
-  return aSize / (1024.0 * 1024.0);
-}
-
-//------------------ ColoredPrs3dBase Methods --------------------
-CORBA::Double VISU::PointMap3d_i::GetMin()
-{
-  return myTablePL->GetScalarRange()[0];
-}
-
-CORBA::Double VISU::PointMap3d_i::GetMinTableValue()
-{
-  SALOMEDS::GenericAttribute_var anAttr;
-  mySObj->FindAttribute(anAttr, "AttributeTableOfReal");
-  SALOMEDS::AttributeTableOfReal_var aTableOfReal = SALOMEDS::AttributeTableOfReal::_narrow(anAttr);
-  double aMin = aTableOfReal->GetValue(1, 1);
-  
-  for (int i=1; i<=aTableOfReal->GetNbColumns(); i++)
-    for (int j=1; j<=aTableOfReal->GetNbRows(); j++) {
-      double aVal = aTableOfReal->GetValue(j, i);
-      if (aVal < aMin)
-       aMin = aVal;
-    }
-  
-  return aMin;
-}
-
-CORBA::Double VISU::PointMap3d_i::GetMaxTableValue()
-{
-  SALOMEDS::GenericAttribute_var anAttr;
-  mySObj->FindAttribute(anAttr, "AttributeTableOfReal");
-  SALOMEDS::AttributeTableOfReal_var aTableOfReal = SALOMEDS::AttributeTableOfReal::_narrow(anAttr);
-  double aMax = aTableOfReal->GetValue(1, 1);
-
-  for (int i=1; i<=aTableOfReal->GetNbColumns(); i++)
-    for (int j=1; j<=aTableOfReal->GetNbRows(); j++) {
-      double aVal = aTableOfReal->GetValue(j, i);
-      if (aVal > aMax)
-       aMax = aVal;
-    }
-
-  return aMax;
-}
-
-CORBA::Double VISU::PointMap3d_i::GetMax()
-{
-  return myTablePL->GetScalarRange()[1];
-}
-
-void VISU::PointMap3d_i::SetRange(CORBA::Double theMin, CORBA::Double theMax)
-{
-  vtkFloatingPointType aScalarRange[2] = {theMin, theMax};
-  ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_DeformedGridPL, vtkFloatingPointType*>
-                  (GetSpecificPL(), &VISU_DeformedGridPL::SetScalarRange, aScalarRange));
-
-  UseFixedRange(true);
-}
-
-CORBA::Double VISU::PointMap3d_i::GetSourceMin()
-{
-  vtkFloatingPointType aRange[2];
-  GetSpecificPL()->GetSourceRange(aRange);
-  return aRange[0];
-}
-
-CORBA::Double VISU::PointMap3d_i::GetSourceMax()
-{
-  vtkFloatingPointType aRange[2];
-  GetSpecificPL()->GetSourceRange(aRange);
-  return aRange[1];
-}
-
-void VISU::PointMap3d_i::SetSourceRange()
-{
-  GetSpecificPL()->SetSourceRange();
-  ProcessVoidEvent(new TVoidMemFunEvent<VISU_DeformedGridPL>
-                  (GetSpecificPL(), &VISU_DeformedGridPL::SetSourceRange));
-
-  UseFixedRange(false);
-}
-
-CORBA::Boolean VISU::PointMap3d_i::IsRangeFixed()
-{
-  return myIsFixedRange; 
-}
-
-void VISU::PointMap3d_i::UseFixedRange(bool theRange)
-{
-  if(myIsFixedRange == theRange)
-    return;
-
-  myIsFixedRange = theRange;
-}
-
-void VISU::PointMap3d_i::SetPosition(CORBA::Double theX, CORBA::Double theY)
-{
-  bool anIsSameValue = VISU::CheckIsSameValue(myPosition[0], theX);
-  anIsSameValue &= VISU::CheckIsSameValue(myPosition[1], theY);
-  if(anIsSameValue)
-    return;
-
-  myPosition[0] = theX; 
-  myPosition[1] = theY;
-}
-
-CORBA::Double VISU::PointMap3d_i::GetPosX()
-{
-  return myPosition[0];
-}
-
-CORBA::Double VISU::PointMap3d_i::GetPosY()
-{
-  return myPosition[1];
-}
-
-void VISU::PointMap3d_i::SetSize(CORBA::Double theWidth, CORBA::Double theHeight)
-{
-  bool anIsSameValue = VISU::CheckIsSameValue(myWidth, theWidth);
-  anIsSameValue &= VISU::CheckIsSameValue(myHeight, theHeight);
-  if(anIsSameValue)
-    return;
-
-  myWidth = theWidth; 
-  myHeight = theHeight;
-}
-
-CORBA::Double VISU::PointMap3d_i::GetHeight()
-{
-  return myHeight;
-}
-
-CORBA::Double VISU::PointMap3d_i::GetWidth()
-{
-  return myWidth;
-}
-
-void VISU::PointMap3d_i::SetNbColors(CORBA::Long theNbColors)
-{
-  ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_DeformedGridPL, int>
-                  (GetSpecificPL(), &VISU_DeformedGridPL::SetNbColors, theNbColors));
-}
-
-CORBA::Long VISU::PointMap3d_i::GetNbColors()
-{
-  return GetSpecificPL()->GetNbColors();
-}
-
-void VISU::PointMap3d_i::SetLabels(CORBA::Long theNbLabels)
-{
-  if(myNumberOfLabels == theNbLabels)
-    return;
-
-  myNumberOfLabels = theNbLabels;
-}
-
-CORBA::Long VISU::PointMap3d_i::GetLabels()
-{
-  return myNumberOfLabels;
-}
-
-void VISU::PointMap3d_i::SetBarOrientation(VISU::ColoredPrs3dBase::Orientation theBarOrientation)
-{
-  if(myBarOrientation == theBarOrientation)
-    return;
-
-  myBarOrientation = theBarOrientation;
-}
-
-VISU::ColoredPrs3dBase::Orientation VISU::PointMap3d_i::GetBarOrientation()
-{
-  return myBarOrientation;
-}
-
-//------------------- ScaledPrs3d Methods -----------------------
-
-void VISU::PointMap3d_i::SetScaling(VISU::Scaling theScaling)
-{
-  ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_DeformedGridPL, int>
-                  (GetSpecificPL(), &VISU_DeformedGridPL::SetScaling, theScaling));
-}
-
-VISU::Scaling VISU::PointMap3d_i::GetScaling()
-{
-  return VISU::Scaling(GetSpecificPL()->GetScaling());
-}
-
-//------------------- Check Table on Positive Values ------------
-bool VISU::PointMap3d_i::IsPositiveTable()
-{
-  SALOMEDS::GenericAttribute_var anAttr;
-  mySObj->FindAttribute(anAttr, "AttributeTableOfReal");
-  SALOMEDS::AttributeTableOfReal_var aTableOfReal = SALOMEDS::AttributeTableOfReal::_narrow(anAttr);
-
-  for (int i=1; i<=aTableOfReal->GetNbColumns(); i++)
-    for (int j=1; j<=aTableOfReal->GetNbRows(); j++) {
-      double aVal = aTableOfReal->GetValue(j, i);
-      if (aVal < 0)
-       return false;
-    }
-
-  return true;
-}
-
-//------------------- Plot3dBase Methods ------------------------
-
-void VISU::PointMap3d_i::SetScaleFactor (CORBA::Double theScaleFactor)
-{
-  ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_DeformedGridPL, vtkFloatingPointType>
-                  (GetSpecificPL(), &VISU_DeformedGridPL::SetScaleFactor, theScaleFactor));
-}
-
-CORBA::Double VISU::PointMap3d_i::GetScaleFactor ()
-{
-  return myTablePL->GetScaleFactor();
-}
-
-void VISU::PointMap3d_i::SetContourPrs (CORBA::Boolean theIsContourPrs )
-{
-  ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_DeformedGridPL, bool>
-                  (GetSpecificPL(), &VISU_DeformedGridPL::SetContourPrs, theIsContourPrs));
-}
-
-CORBA::Boolean VISU::PointMap3d_i::GetIsContourPrs()
-{
-  return myTablePL->GetIsContourPrs();
-}
-
-void VISU::PointMap3d_i::SetNbOfContours (CORBA::Long theNb)
-{
-  ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_DeformedGridPL, int>
-                  (GetSpecificPL(), &VISU_DeformedGridPL::SetNumberOfContours, theNb));
-}
-
-CORBA::Long VISU::PointMap3d_i::GetNbOfContours ()
-{
-  return myTablePL->GetNumberOfContours();
-}
-
-//-------------------- Actor Factory Methods --------------------
-
-bool VISU::PointMap3d_i::GetActiveState ()
-{
-  return myIsActiveState;
-}
-
-void VISU::PointMap3d_i::SetActiveState ( bool theState )
-{
-  myIsActiveState = theState;
-}
-
-void VISU::PointMap3d_i::RemoveActor (VISU_ActorBase* theActor)
-{
-  myActorCollection->RemoveItem(theActor);
-}
-
-void VISU::PointMap3d_i::RemoveActors ()
-{
-  ProcessVoidEvent(new TInvokeSignalEvent(myRemoveActorsFromRendererSignal));
-  myActorCollection->RemoveAllItems();
-}
-
-
-//-----------------------Text Properties & Label Properties------------------
-bool VISU::PointMap3d_i::IsBoldTitle() 
-{ 
-  return myIsBoldTitle;
-}
-
-//----------------------------------------------------------------------------
-void VISU::PointMap3d_i::SetBoldTitle(bool theIsBoldTitle)
-{
-  if(myIsBoldTitle == theIsBoldTitle)
-    return;
-
-  myIsBoldTitle = theIsBoldTitle;
-  myParamsTime.Modified();
-}
-
-//----------------------------------------------------------------------------
-bool VISU::PointMap3d_i::IsItalicTitle() 
-{ 
-  return myIsItalicTitle;
-}
-
-//----------------------------------------------------------------------------
-void VISU::PointMap3d_i::SetItalicTitle(bool theIsItalicTitle)
-{ 
-  if(myIsItalicTitle == theIsItalicTitle)
-    return;
-
-  myIsItalicTitle = theIsItalicTitle;
-  myParamsTime.Modified();
-}
-
-//----------------------------------------------------------------------------
-bool VISU::PointMap3d_i::IsShadowTitle() 
-{ 
-  return myIsShadowTitle;
-}
-
-//----------------------------------------------------------------------------
-void VISU::PointMap3d_i::SetShadowTitle(bool theIsShadowTitle)
-{ 
-  if(myIsShadowTitle == theIsShadowTitle)
-    return;
-
-  myIsShadowTitle = theIsShadowTitle;
-  myParamsTime.Modified();
-}
-
-//----------------------------------------------------------------------------
-int VISU::PointMap3d_i::GetTitFontType()
-{
-  return myTitFontType;
-}
-
-//----------------------------------------------------------------------------
-void VISU::PointMap3d_i::SetTitFontType(int theTitFontType)
-{
-  if(myTitFontType == theTitFontType)
-    return;
-
-  myTitFontType = theTitFontType;
-  myParamsTime.Modified();
-}
-
-//----------------------------------------------------------------------------
-void VISU::PointMap3d_i::GetTitleColor(vtkFloatingPointType& theR, 
-                                        vtkFloatingPointType& theG, 
-                                        vtkFloatingPointType& theB)
-{
-  theR = myTitleColor[0]; 
-  theG = myTitleColor[1]; 
-  theB = myTitleColor[2];
-}
-
-//----------------------------------------------------------------------------
-void VISU::PointMap3d_i::SetTitleColor(vtkFloatingPointType theR, 
-                                        vtkFloatingPointType theG, 
-                                        vtkFloatingPointType theB)
-{
-  bool anIsSameValue = VISU::CheckIsSameValue(myTitleColor[0], theR);
-  anIsSameValue &= VISU::CheckIsSameValue(myTitleColor[1], theG);
-  anIsSameValue &= VISU::CheckIsSameValue(myTitleColor[2], theB);
-  if(anIsSameValue)
-    return;
-
-  myTitleColor[0] = theR; 
-  myTitleColor[1] = theG; 
-  myTitleColor[2] = theB; 
-  myParamsTime.Modified();
-}
-
-//----------------------------------------------------------------------------
-bool VISU::PointMap3d_i::IsBoldLabel()
-{
-  return myIsBoldLabel;
-}
-
-//----------------------------------------------------------------------------
-void VISU::PointMap3d_i::SetBoldLabel(bool theIsBoldLabel) 
-{
-  if(myIsBoldLabel == theIsBoldLabel)
-    return;
-
-  myIsBoldLabel = theIsBoldLabel;
-  myParamsTime.Modified();
-}
-
-//----------------------------------------------------------------------------
-bool VISU::PointMap3d_i::IsItalicLabel() 
-{
-  return myIsItalicLabel;
-}
-
-//----------------------------------------------------------------------------
-void VISU::PointMap3d_i::SetItalicLabel(bool theIsItalicLabel)
-{
-  if(myIsItalicLabel == theIsItalicLabel)
-    return;
-
-  myIsItalicLabel = theIsItalicLabel;
-  myParamsTime.Modified();
-}
-
-//----------------------------------------------------------------------------
-bool VISU::PointMap3d_i::IsShadowLabel() 
-{
-  return myIsShadowLabel;
-}
-
-//----------------------------------------------------------------------------
-void VISU::PointMap3d_i::SetShadowLabel(bool theIsShadowLabel)
-{
-  if(myIsShadowLabel == theIsShadowLabel)
-    return;
-
-  myIsShadowLabel = theIsShadowLabel;
-  myParamsTime.Modified();
-}
-
-//----------------------------------------------------------------------------
-int VISU::PointMap3d_i::GetLblFontType()
-{
-  return myLblFontType;
-}
-
-//----------------------------------------------------------------------------
-void VISU::PointMap3d_i::SetLblFontType(int theLblFontType)
-{
-  if(myLblFontType == theLblFontType)
-    return;
-
-  myLblFontType = theLblFontType;
-  myParamsTime.Modified();
-}
-
-//----------------------------------------------------------------------------
-void VISU::PointMap3d_i::GetLabelColor(vtkFloatingPointType& theR, 
-                                 vtkFloatingPointType& theG, 
-                                 vtkFloatingPointType& theB)
-{
-  theR = myLabelColor[0]; 
-  theG = myLabelColor[1]; 
-  theB = myLabelColor[2];
-}
-
-//----------------------------------------------------------------------------
-void VISU::PointMap3d_i::SetLabelColor(vtkFloatingPointType theR, 
-                                 vtkFloatingPointType theG, 
-                                 vtkFloatingPointType theB)
-{
-  bool anIsSameValue = VISU::CheckIsSameValue(myLabelColor[0], theR);
-  anIsSameValue &= VISU::CheckIsSameValue(myLabelColor[1], theG);
-  anIsSameValue &= VISU::CheckIsSameValue(myLabelColor[2], theB);
-  if(anIsSameValue)
-    return;
-
-  myLabelColor[0] = theR; 
-  myLabelColor[1] = theG; 
-  myLabelColor[2] = theB; 
-  myParamsTime.Modified();
-}
-
-//----------------------------------------------------------------------------
-CORBA::Long VISU::PointMap3d_i::GetTitleWidth() 
-{
-  return myTitleWidth;
-}
-
-//----------------------------------------------------------------------------
-CORBA::Long VISU::PointMap3d_i::GetTitleHeight() 
-{ 
-  return myTitleHeight;
-}
-
-//----------------------------------------------------------------------------
-CORBA::Long VISU::PointMap3d_i::GetLabelWidth() 
-{
-  return myLabelWidth;
-}
-
-//----------------------------------------------------------------------------
-CORBA::Long VISU::PointMap3d_i::GetLabelHeight() 
-{ 
-  return myLabelHeight;
-}
-
-//----------------------------------------------------------------------------
-CORBA::Long VISU::PointMap3d_i::GetBarWidth() 
-{
-  return myBarWidth;
-}
-
-//----------------------------------------------------------------------------
-CORBA::Long VISU::PointMap3d_i::GetBarHeight() 
-{ 
-  return myBarHeight;
-}
-
-//----------------------------------------------------------------------------
-void
-VISU::PointMap3d_i::SetLabelsFormat(const char* theFormat)
-{
-  if( myLabelsFormat != theFormat ){
-    myLabelsFormat = theFormat;
-    myParamsTime.Modified();
-  }
-}
-
-//----------------------------------------------------------------------------
-char* VISU::PointMap3d_i::GetLabelsFormat() 
-{ 
-  return CORBA::string_dup(myLabelsFormat.c_str());
-}
-
-//----------------------------------------------------------------------------
-void VISU::PointMap3d_i::SetUnitsVisible(CORBA::Boolean isVisible)
-{
-  if( myIsUnits != isVisible ){
-    myIsUnits = isVisible;
-    myParamsTime.Modified();
-  }
-}
-
-//----------------------------------------------------------------------------
-CORBA::Boolean VISU::PointMap3d_i::IsUnitsVisible()
-{
-  return myIsUnits;
-}
-
-//----------------------------------------------------------------------------
-void VISU::PointMap3d_i::SetRatios(CORBA::Long theTitleWidth, CORBA::Long theTitleHeight,
-                             CORBA::Long theLabelWidth, CORBA::Long theLabelHeight,
-                             CORBA::Long theBarWidth, CORBA::Long theBarHeight) 
-{
-  bool anIsSameValue = VISU::CheckIsSameValue(myTitleWidth, theTitleWidth);
-  anIsSameValue &= VISU::CheckIsSameValue(myTitleHeight, theTitleHeight);
-  anIsSameValue &= VISU::CheckIsSameValue(myLabelWidth, theLabelWidth);
-  anIsSameValue &= VISU::CheckIsSameValue(myLabelHeight, theLabelHeight);
-  anIsSameValue &= VISU::CheckIsSameValue(myBarWidth, theBarWidth);
-  anIsSameValue &= VISU::CheckIsSameValue(myBarHeight, theBarHeight);
-  if(anIsSameValue)
-    return;
-
-  myTitleWidth = theTitleWidth; 
-  myTitleHeight = theTitleHeight;
-  myLabelWidth = theLabelWidth; 
-  myLabelHeight = theLabelHeight;
-  myBarWidth = theBarWidth; 
-  myBarHeight = theBarHeight;
-  myParamsTime.Modified();
-}
diff --git a/src/VISU_I/VISU_PointMap3d_i.hh b/src/VISU_I/VISU_PointMap3d_i.hh
deleted file mode 100644 (file)
index 593721e..0000000
+++ /dev/null
@@ -1,272 +0,0 @@
-//  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_PointMap3d_i.hh
-//  Author : 
-//  Module : VISU
-
-#ifndef VISU_PointMap3d_i_HeaderFile
-#define VISU_PointMap3d_i_HeaderFile
-
-#include "VISU_PrsObject_i.hh"
-#include "SALOME_GenericObj_i.hh"
-
-#include "VISU_TableReader.hxx"
-#include "VISU_PointMap3dActor.h"
-#include "VISU_Table_i.hh"
-#include "VISU_ActorFactory.h"
-#include "VISU_DeformedGridPL.hxx"
-
-#include <vtkTimeStamp.h>
-#include <vtkSmartPointer.h>
-
-namespace VISU
-{
-
-  struct TActorFactory;
-
-  //==============================================================================
-  class VISU_I_EXPORT PointMap3d_i : public virtual POA_VISU::PointMap3d,
-                                    public virtual SALOME::GenericObj_i,
-                                    public virtual TActorFactory,
-                                    public virtual Table_i
-  {
-    static int myNbPresent;
-    PointMap3d_i( const PointMap3d_i& );
-  public:
-    PointMap3d_i( SALOMEDS::Study_ptr theStudy, const char* theObjectEntry);
-
-    virtual ~PointMap3d_i();
-    virtual VISU::VISUType GetType() { return VISU::TPOINTMAP3D;};
-
-    virtual void SetTitle( const char* theTitle );
-    virtual char* GetTitle();
-
-    virtual void RemoveFromStudy();
-    virtual void UpdateActor(VISU_ActorBase* thePointMap3dActor);
-    virtual void UpdateActors();
-
-    virtual void Update();
-
-    virtual Handle(SALOME_InteractiveObject) GetIO();
-
-    //----------- override Prs3d methods -----------------------------
-
-    //! Move the 3D presentation according to the given offset parameters
-    virtual void SetOffset(CORBA::Float theDx, CORBA::Float theDy, CORBA::Float theDz);
-
-    //! Gets offset parameters for the 3D presentation
-    virtual void GetOffset(CORBA::Float& theDx, CORBA::Float& theDy, CORBA::Float& theDz);
-
-    //! Gets memory size actually used by the presentation (Mb).
-    virtual CORBA::Float GetMemorySize();
-
-    //----------- override ColoredPrs3dBase methods ------------------
-
-    virtual CORBA::Double GetMin();
-    virtual CORBA::Double GetMax();
-    virtual CORBA::Double GetMinTableValue();
-    virtual CORBA::Double GetMaxTableValue();
-    virtual void SetRange(CORBA::Double theMin, CORBA::Double theMax);
-
-    virtual CORBA::Double GetSourceMin();
-    virtual CORBA::Double GetSourceMax();
-    virtual void SetSourceRange();
-
-    virtual CORBA::Boolean IsRangeFixed();
-
-    virtual void SetPosition(CORBA::Double X, CORBA::Double Y);
-    virtual CORBA::Double GetPosX();
-    virtual CORBA::Double GetPosY();
-
-    virtual void SetSize(CORBA::Double theWidth, CORBA::Double theHeight);
-
-    virtual void SetRatios(CORBA::Long theTitleWidth, CORBA::Long theTitleHeight,
-                          CORBA::Long theLabelWidth, CORBA::Long theLabelHeight,
-                          CORBA::Long theBarWidth, CORBA::Long theBarHeight);
-
-    virtual CORBA::Double GetWidth();
-    virtual CORBA::Double GetHeight();
-
-    virtual void SetNbColors(CORBA::Long theNbColors);
-    virtual CORBA::Long GetNbColors();
-
-    virtual void SetLabels(CORBA::Long theNbLabels);
-    virtual CORBA::Long GetLabels();
-
-    virtual void  SetLabelsFormat(const char* theFormat);
-    virtual char* GetLabelsFormat();
-
-    virtual void SetBarOrientation(VISU::ColoredPrs3dBase::Orientation theOrientation);
-    virtual VISU::ColoredPrs3dBase::Orientation GetBarOrientation();
-
-    void UseFixedRange(bool theUseFixedRange);
-
-    // ScaledMap Methods
-
-    virtual VISU::Scaling GetScaling();
-    virtual void SetScaling(VISU::Scaling theScaling);
-
-    bool IsPositiveTable();
-
-    // Plot3dBase methods
-
-    void SetScaleFactor (CORBA::Double theScaleFactor);
-    CORBA::Double GetScaleFactor();
-
-    void SetContourPrs (CORBA::Boolean theIsContourPrs );
-    CORBA::Boolean GetIsContourPrs();
-
-    void SetNbOfContours (CORBA::Long);
-    CORBA::Long GetNbOfContours();
-
-    VISU_DeformedGridPL* GetSpecificPL() const { return myTablePL; }
-
-    // TActorFactory Methods
-
-    //! Gets know whether the factory instance can be used for actor management or not
-    virtual bool GetActiveState();
-
-    virtual void SetActiveState(bool theState);
-
-    //! Return modified time of the factory
-    virtual unsigned long int GetMTime();
-
-    //! To unregister the actor
-    virtual void RemoveActor(VISU_ActorBase* theActor);
-    virtual void RemoveActors();
-
-    //------ Text Properties & Label Properties ------------------------
-
-    virtual bool IsBoldTitle();
-    virtual void SetBoldTitle(bool isBold);
-    virtual bool IsItalicTitle();
-    virtual void SetItalicTitle(bool isItalic);
-    virtual bool IsShadowTitle();
-    virtual void SetShadowTitle(bool isShadow);
-    virtual int  GetTitFontType();
-    virtual void SetTitFontType(int theType);
-    virtual void GetTitleColor(vtkFloatingPointType& theR, 
-                vtkFloatingPointType& theG, 
-                vtkFloatingPointType& theB);
-    virtual void SetTitleColor(vtkFloatingPointType theR, 
-                vtkFloatingPointType theG, 
-                vtkFloatingPointType theB);    
-
-    virtual bool IsBoldLabel();
-    virtual void SetBoldLabel(bool isBold);
-    virtual bool IsItalicLabel();
-    virtual void SetItalicLabel(bool isItalic);
-    virtual bool IsShadowLabel();
-    virtual void SetShadowLabel(bool isShadow);
-    virtual int  GetLblFontType();
-    virtual void SetLblFontType(int theType);
-    virtual void GetLabelColor(vtkFloatingPointType& theR, 
-                vtkFloatingPointType& theG, 
-                vtkFloatingPointType& theB);
-    virtual void SetLabelColor(vtkFloatingPointType theR, 
-                vtkFloatingPointType theG, 
-                vtkFloatingPointType theB);
-
-    //-------------------------------------------------------------------
-    virtual CORBA::Long GetTitleWidth();
-    virtual CORBA::Long GetTitleHeight();
-    virtual CORBA::Long GetLabelWidth();
-    virtual CORBA::Long GetLabelHeight();
-    virtual CORBA::Long GetBarWidth();
-    virtual CORBA::Long GetBarHeight();
-
-    virtual void SetUnitsVisible(CORBA::Boolean isVisible);
-    virtual CORBA::Boolean IsUnitsVisible();
-
-    //-------------------------------------------------------------------
-
-  protected:
-    Storable* Build(int theRestoring);
-
-    VISU::Table::Orientation myOrientation;
-    VISU::ColoredPrs3dBase::Orientation myBarOrientation;
-    std::string              myTitle;
-    std::string              myScalarBarTitle;
-    bool                     myIsUnits;
-    SALOMEDS::SObject_var    mySObj;
-    int                      myNumberOfLabels;
-    std::string              myLabelsFormat;
-    vtkFloatingPointType     myPosition[2],
-                             myWidth, myHeight,
-                             myTitleWidth, myTitleHeight,
-                             myLabelWidth, myLabelHeight,
-                             myBarWidth, myBarHeight;
-    bool                     myIsFixedRange;
-    CORBA::Float             myOffset[3];
-    bool                     myIsActiveState;
-    vtkTimeStamp             myParamsTime;
-    vtkTimeStamp             myUpdateTime;
-
-    Handle(SALOME_InteractiveObject) myIO;
-
-
-    //Font management
-    bool myIsBoldTitle;
-    bool myIsItalicTitle;
-    bool myIsShadowTitle;
-    int  myTitFontType;
-    vtkFloatingPointType myTitleColor[3];
-
-    bool myIsBoldLabel;
-    bool myIsItalicLabel;
-    bool myIsShadowLabel;
-    int  myLblFontType;
-    vtkFloatingPointType myLabelColor[3];
-
-    boost::signal0<void> myUpdateActorsSignal;
-    boost::signal0<void> myRemoveActorsFromRendererSignal;
-    vtkSmartPointer<vtkActorCollection> myActorCollection;
-
-  public:
-    //    virtual Storable* Create( const VISU::PTableIDMapper& theTableIDMapper );
-    virtual Storable*       Create();
-    VISU_PointMap3dActor*   CreateActor();
-    VISU::PTableIDMapper    GetTableIDMapper();
-
-    SALOMEDS::SObject_var GetSObject() const;
-    VISU_DeformedGridPL*  myTablePL;
-
-    virtual Storable* Restore( const Storable::TRestoringMap& theMap,
-                              SALOMEDS::SObject_ptr SO);
-
-    static Storable* StorableEngine(SALOMEDS::SObject_ptr theSObject,
-                                   const Storable::TRestoringMap& theMap,
-                                   const std::string& thePrefix,
-                                   CORBA::Boolean theIsMultiFile);
-
-    virtual void ToStream( std::ostringstream& theStr );
-    static const std::string myComment;
-    virtual const char* GetComment() const;
-    virtual QString GenerateName();
-    virtual QString GetTableTitle();
-
-    virtual std::string GetObjectEntry();
-  };
-}
-
-#endif
index 652e781ed33e6fc64c100c6b8dd7d79d6eff3095..fd5bebd1ecb4645ef18fd20566d5c3febdad24cf 100644 (file)
@@ -70,6 +70,59 @@ namespace VISU
     ProcessVoidEvent(new TEvent(this));
   }
 
+  //----------------------------------------------------------------------------
+
+  std::string ToFormat( const int thePrec )
+  {
+    // "%-#6.3g"
+    char str[ 255 ];
+    sprintf( str, "%%-#.%dg", thePrec );
+    return str;
+  }
 
   //----------------------------------------------------------------------------
+
+  int ToPrecision( const char* theFormat )
+  {
+    int N = strlen( theFormat );
+    int k = -1;
+    char str[ 255 ];
+    bool isOk = false;
+    for ( int i = 0; i < N; i++ )
+    {
+      if ( theFormat[ i ] ==  '.' )
+        k = 0;
+      else if ( theFormat[ i ] == 'g' )
+      {
+        str[ k ] = 0;
+        isOk = true;
+        break;
+      }
+      else if ( k >= 0 )
+        str[ k++ ] = theFormat[ i ];
+    }
+
+    int res = 0;
+    if ( isOk )
+      res = atoi( str );
+
+    return res;
+  }
 };
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
index 2f4bf8b9b5f6b9c7e520f2d27358a7d91d369dda..5c3003421e72637b9a10878a1553f1a3342a02d6 100644 (file)
@@ -31,7 +31,6 @@
 
 #include <vtkTimeStamp.h>
 
-
 namespace VISU
 {
   //----------------------------------------------------------------------------
@@ -44,6 +43,9 @@ namespace VISU
     ~TSetModified();
   };
 
+  Standard_EXPORT std::string  ToFormat( const int thePrec );
+  Standard_EXPORT int ToPrecision( const char* theFormat );
+
 
   //----------------------------------------------------------------------------
 }
index 55e2bd1d28b7ec46c1bd113747b28a1a30c94299..d0cf322edae0ded2c97114337c263827069b8110 100644 (file)
@@ -593,6 +593,12 @@ GetClippingPlane(vtkIdType theID) const
   return GetPipeLine()->GetClippingPlane(theID);
 }
 
+//----------------------------------------------------------------------------
+void VISU::Prs3d_i::RemoveClippingPlane(vtkIdType theID)
+{
+  GetPipeLine()->RemoveClippingPlane(theID);
+}
+
 //----------------------------------------------------------------------------
 void
 VISU::Prs3d_i
index 461df40f597689fcd4b01b9d3388bd3cffbc3b80..60fd16afbe99c01ae13f438f97d59cffee98b358 100644 (file)
@@ -223,6 +223,8 @@ namespace VISU
     vtkPlane* 
     GetClippingPlane(vtkIdType theID) const;
 
+    void RemoveClippingPlane(vtkIdType theID);
+
     void
     SetPlaneParam(vtkFloatingPointType theDir[3], 
                  vtkFloatingPointType theDist, 
index 2ba4a28629dfea61e44ae738c1fa664ad15f694e..d80281d41e7de82496837d61f9f789a033eb5054 100644 (file)
@@ -48,6 +48,8 @@ static int MYTIMEDEBUG = 0;
 static int MYTIMEDEBUG = 0;
 #endif
 
+using namespace std;
+
 namespace VISU
 {
   //----------------------------------------------------------------------------
index 2d8e89da0ec59f3bcd33412a7cc4deecbe84c9be..5d47138b85b88eb7c070adb565ba9ffd5d0bc419 100644 (file)
@@ -69,6 +69,7 @@ static int MYDEBUG = 1;
 static int MYDEBUG = 0;
 #endif
 
+using namespace std;
 
 namespace VISU
 {
@@ -799,10 +800,9 @@ VISU::Result_i
       if(MYDEBUG)
        MESSAGE("Result_i::Restore - aFileName = " << myFileInfo.filePath().toLatin1().data() << "; " << myFileInfo.isFile());
       
-      const char* aPathLatin = myFileInfo.filePath().toLatin1().data();
-      if (HDFascii::isASCII(aPathLatin)) {
-       MESSAGE("ConvertFromASCIIToHDF(" << aPathLatin << ")");
-       char* aResultPath = HDFascii::ConvertFromASCIIToHDF(aPathLatin);
+      if (HDFascii::isASCII(myFileInfo.filePath().toLatin1().data())) {
+       MESSAGE("ConvertFromASCIIToHDF(" << myFileInfo.filePath().toLatin1().data() << ")");
+       char* aResultPath = HDFascii::ConvertFromASCIIToHDF(myFileInfo.filePath().toLatin1().data());
        MESSAGE("ConvertFromASCIIToHDF() DONE : " << aResultPath);
        char* aHDFFileName = new char[strlen(aResultPath) + 19];
        sprintf(aHDFFileName, "%shdf_from_ascii.hdf", aResultPath);
diff --git a/src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc b/src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc
new file mode 100644 (file)
index 0000000..ac6a832
--- /dev/null
@@ -0,0 +1,404 @@
+//  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_ScalarMapOnDeformedShape_i.cc
+//  Author : Eugeny Nikolaev
+//  Module : VISU
+
+#include "VISU_ScalarMapOnDeformedShape_i.hh"
+#include "VISU_Prs3dUtils.hh"
+#include "VISU_Result_i.hh"
+
+#include "VISU_ScalarMapAct.h"
+#include "VISU_ScalarMapOnDeformedShapePL.hxx"
+#include "VISU_Convertor.hxx"
+
+#include "SUIT_ResourceMgr.h"
+#include "SALOME_Event.hxx"
+
+#include <vtkUnstructuredGrid.h>
+#include <vtkProperty.h>
+#include <vtkMapper.h>
+
+#ifdef _DEBUG_
+static int MYDEBUG = 0;
+#else
+static int MYDEBUG = 0;
+#endif
+
+static int INCMEMORY = 4+12;
+
+
+//---------------------------------------------------------------
+size_t
+VISU::ScalarMapOnDeformedShape_i
+::IsPossible(Result_i* theResult, 
+            const std::string& theMeshName, 
+            VISU::Entity theEntity,
+            const std::string& theFieldName, 
+            CORBA::Long theTimeStampNumber,
+            bool theIsMemoryCheck)
+{
+  size_t aResult = 0;
+  try{
+    aResult = TSuperClass::IsPossible(theResult,
+                                     theMeshName,
+                                     theEntity,
+                                     theFieldName,
+                                     theTimeStampNumber,
+                                     false);
+    if(theIsMemoryCheck && aResult){
+      VISU::Result_i::PInput anInput = theResult->GetInput(theMeshName,
+                                                          theEntity,
+                                                          theFieldName,
+                                                          theTimeStampNumber);
+      VISU::PField aField = anInput->GetField(theMeshName,
+                                             (VISU::TEntity)theEntity,
+                                             theFieldName);
+      if(aField->myNbComp <= 1)
+       return 0;
+
+      bool anIsEstimated = true;
+      size_t aSize = anInput->GetTimeStampOnMeshSize(theMeshName,
+                                                    (VISU::TEntity)theEntity,
+                                                    theFieldName,
+                                                    theTimeStampNumber,
+                                                    anIsEstimated);
+      if(anIsEstimated)
+       aSize *= INCMEMORY;
+      aResult = VISU_PipeLine::CheckAvailableMemory(aSize);
+      if(MYDEBUG) 
+       MESSAGE("ScalarMapOnDeformedShape_i::IsPossible - CheckAvailableMemory = "<<float(aSize)<<"; aResult = "<<aResult);
+    }
+  }catch(std::exception& exc){
+    INFOS("Follow exception was occured :\n"<<exc.what());
+  }catch(...){
+    INFOS("Unknown exception was occured!");
+  }
+  return aResult;
+}
+
+//---------------------------------------------------------------
+int VISU::ScalarMapOnDeformedShape_i::myNbPresent = 0;
+
+//---------------------------------------------------------------
+QString
+VISU::ScalarMapOnDeformedShape_i
+::GenerateName() 
+{
+  return VISU::GenerateName("ScalarDef.Shape",myNbPresent++);
+}
+
+//---------------------------------------------------------------
+const string VISU::ScalarMapOnDeformedShape_i::myComment = "SCALARMAPONDEFORMEDSHAPE";
+
+//---------------------------------------------------------------
+const char* 
+VISU::ScalarMapOnDeformedShape_i
+::GetComment() const
+{ 
+  return myComment.c_str();
+}
+
+//----------------------------------------------------------------------------
+const char*
+VISU::ScalarMapOnDeformedShape_i
+::GetIconName()
+{
+  if (!IsGroupsUsed())
+    return "ICON_TREE_SCALAR_MAP_ON_DEFORMED_SHAPE";
+  else
+    return "ICON_TREE_SCALAR_MAP_ON_DEFORMED_SHAPE_GROUPS";
+}
+
+//---------------------------------------------------------------
+VISU::ScalarMapOnDeformedShape_i
+::ScalarMapOnDeformedShape_i(EPublishInStudyMode thePublishInStudyMode) :
+  ColoredPrs3d_i(thePublishInStudyMode),
+  ScalarMap_i(thePublishInStudyMode),
+  myScalarMapOnDeformedShapePL(NULL),
+  myScalarTimeStampNumber(1)
+{}
+
+
+//---------------------------------------------------------------
+VISU::Storable* 
+VISU::ScalarMapOnDeformedShape_i
+::Create(const std::string& theMeshName, 
+        VISU::Entity theEntity,
+        const std::string& theFieldName, 
+        CORBA::Long theTimeStampNumber)
+{
+  TSuperClass::Create(theMeshName,
+                            theEntity,
+                            theFieldName,
+                            theTimeStampNumber);
+  SetScalarField(theEntity,
+                theFieldName.c_str(),
+                theTimeStampNumber);
+  return this;
+}
+
+
+//---------------------------------------------------------------
+VISU::Storable*
+VISU::ScalarMapOnDeformedShape_i
+::Restore(SALOMEDS::SObject_ptr theSObject,
+         const Storable::TRestoringMap& theMap)
+{
+  if(!TSuperClass::Restore(theSObject, theMap))
+    return NULL;
+
+  QString aMeshName = VISU::Storable::FindValue(theMap,"myScalarMeshName");
+  VISU::Entity anEntity = VISU::Entity(VISU::Storable::FindValue(theMap,"myScalarEntity").toInt());
+
+  QString aFieldName = VISU::Storable::FindValue(theMap,"myScalarFieldName");
+  int aTimeStampNumber = VISU::Storable::FindValue(theMap,"myScalarIteration").toInt();
+
+  SetScalarField(anEntity,
+                aFieldName,
+                aTimeStampNumber);
+
+  SetScale(VISU::Storable::FindValue(theMap,"myFactor").toDouble());
+  
+  return this;
+}
+
+
+//---------------------------------------------------------------
+void
+VISU::ScalarMapOnDeformedShape_i
+::ToStream(std::ostringstream& theStr)
+{
+  TSuperClass::ToStream(theStr);
+  
+  Storable::DataToStream( theStr, "myScalarEntity",    int(myScalarEntity));
+  Storable::DataToStream( theStr, "myScalarFieldName", myScalarFieldName.c_str());
+  Storable::DataToStream( theStr, "myScalarIteration", int(myScalarTimeStampNumber));
+
+  Storable::DataToStream( theStr, "myFactor", GetScale() );
+}
+
+
+//---------------------------------------------------------------
+VISU::ScalarMapOnDeformedShape_i
+::~ScalarMapOnDeformedShape_i()
+{
+  if(MYDEBUG) MESSAGE("ScalarMapOnDeformedShape_i::~ScalarMapOnDeformedShape_i()");
+}
+
+
+//---------------------------------------------------------------
+void
+VISU::ScalarMapOnDeformedShape_i
+::SameAs(const Prs3d_i* theOrigin)
+{
+  TSuperClass::SameAs(theOrigin);
+  
+  if(const ScalarMapOnDeformedShape_i* aPrs3d = dynamic_cast<const ScalarMapOnDeformedShape_i*>(theOrigin)){
+    ScalarMapOnDeformedShape_i* anOrigin = const_cast<ScalarMapOnDeformedShape_i*>(aPrs3d);
+    CORBA::String_var aFieldName = anOrigin->GetScalarFieldName();
+    
+    SetScalarField(anOrigin->GetScalarEntity(),
+                  aFieldName,
+                  anOrigin->GetScalarTimeStampNumber());
+    Update();
+  }
+}
+
+
+//---------------------------------------------------------------
+void
+VISU::ScalarMapOnDeformedShape_i
+::SetScale(CORBA::Double theScale) 
+{ 
+  VISU::TSetModified aModified(this);
+
+  ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_ScalarMapOnDeformedShapePL, vtkFloatingPointType>
+                  (GetSpecificPL(), &VISU_ScalarMapOnDeformedShapePL::SetScale, theScale));
+}
+
+
+//---------------------------------------------------------------
+CORBA::Double
+VISU::ScalarMapOnDeformedShape_i
+::GetScale()
+{
+  return myScalarMapOnDeformedShapePL->GetScale();
+}
+
+
+//---------------------------------------------------------------
+void
+VISU::ScalarMapOnDeformedShape_i
+::CreatePipeLine(VISU_PipeLine* thePipeLine)
+{
+  if(!thePipeLine){
+    myScalarMapOnDeformedShapePL = VISU_ScalarMapOnDeformedShapePL::New();
+  }else
+    myScalarMapOnDeformedShapePL = dynamic_cast<VISU_ScalarMapOnDeformedShapePL*>(thePipeLine);
+
+  myScalarMapOnDeformedShapePL->GetMapper()->SetScalarVisibility(1);
+
+  TSuperClass::CreatePipeLine(myScalarMapOnDeformedShapePL);
+}
+
+
+//---------------------------------------------------------------
+bool
+VISU::ScalarMapOnDeformedShape_i
+::CheckIsPossible() 
+{
+  return IsPossible(GetCResult(),GetCMeshName(),GetEntity(),GetCFieldName(),GetTimeStampNumber(),true);
+}
+
+
+//---------------------------------------------------------------
+VISU_Actor* 
+VISU::ScalarMapOnDeformedShape_i
+::CreateActor() 
+{
+  VISU_Actor* anActor = TSuperClass::CreateActor(true);
+  SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
+  int  aDispMode = aResourceMgr->integerValue("VISU", "scalar_def_represent", 2);
+  bool toShrink  = aResourceMgr->booleanValue("VISU", "scalar_def_shrink", false);
+  anActor->SetRepresentation(aDispMode);
+  if (toShrink) 
+    anActor->SetShrink();
+  anActor->SetVTKMapping(false);
+  return anActor;
+}
+
+
+//---------------------------------------------------------------
+void
+VISU::ScalarMapOnDeformedShape_i
+::UpdateActor(VISU_Actor* theActor) 
+{
+  if(VISU_ScalarMapAct* anActor = dynamic_cast<VISU_ScalarMapAct*>(theActor)){
+    anActor->SetBarVisibility(true);
+    GetPipeLine()->GetMapper()->SetScalarVisibility(1);
+  }
+  TSuperClass::UpdateActor(theActor);
+}
+
+
+//---------------------------------------------------------------
+void
+VISU::ScalarMapOnDeformedShape_i
+::SetField(VISU::PField theField)
+{
+  TSuperClass::SetField(theField);
+  
+  if(!myScalarField)
+    myScalarField = theField;
+}
+
+
+//---------------------------------------------------------------
+void
+VISU::ScalarMapOnDeformedShape_i
+::SetScalarField(VISU::Entity theEntity,
+                const char* theFieldName,
+                CORBA::Long theTimeStampNumber)
+{
+  bool anIsModified = false;
+
+  if(!anIsModified)
+    anIsModified |= myScalarEntity != theEntity;
+
+  if(!anIsModified)
+    anIsModified |= myScalarFieldName != theFieldName;
+
+  if(!anIsModified)
+    anIsModified |= myScalarTimeStampNumber != theTimeStampNumber;
+  
+  if(!anIsModified)
+    return;
+
+  VISU::TSetModified aModified(this);
+
+  VISU::TEntity aEntity = VISU::TEntity(theEntity);
+  VISU::Result_i::PInput anInput = GetCResult()->GetInput(GetCMeshName(),
+                                                         theEntity,
+                                                         theFieldName,
+                                                         theTimeStampNumber);
+  myScalarField = anInput->GetField(GetCMeshName(), aEntity, theFieldName);
+
+  VISU::PUnstructuredGridIDMapper anIDMapper = 
+    anInput->GetTimeStampOnMesh(GetCMeshName(),
+                               aEntity,
+                               theFieldName,
+                               theTimeStampNumber);
+
+  vtkUnstructuredGrid* anOutput = anIDMapper->GetUnstructuredGridOutput();
+  if(myScalarMapOnDeformedShapePL && anOutput)
+    ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_ScalarMapOnDeformedShapePL, vtkDataSet*>
+                    (GetSpecificPL(), &VISU_ScalarMapOnDeformedShapePL::SetScalars, anOutput));
+  
+  myScalarEntity = theEntity;
+  myScalarFieldName = theFieldName;
+  myScalarTimeStampNumber = theTimeStampNumber;
+
+  SetTitle(theFieldName);
+  SetScalarMode(GetScalarMode());
+  if(!IsRangeFixed() && IsPipeLineExists())
+    SetSourceRange();
+
+  myParamsTime.Modified();
+}
+
+
+//---------------------------------------------------------------
+VISU::Entity 
+VISU::ScalarMapOnDeformedShape_i
+::GetScalarEntity()
+{
+  return myScalarEntity;
+}
+
+
+//---------------------------------------------------------------
+char* 
+VISU::ScalarMapOnDeformedShape_i
+::GetScalarFieldName()
+{
+  return CORBA::string_dup(myScalarFieldName.c_str());
+}
+
+
+//---------------------------------------------------------------
+CORBA::Long 
+VISU::ScalarMapOnDeformedShape_i
+::GetScalarTimeStampNumber()
+{
+  return myScalarTimeStampNumber;
+}
+
+
+//---------------------------------------------------------------
+VISU::PField
+VISU::ScalarMapOnDeformedShape_i
+::GetScalarField()
+{
+  return myScalarField;
+}
diff --git a/src/VISU_I/VISU_ScalarMapOnDeformedShape_i.hh b/src/VISU_I/VISU_ScalarMapOnDeformedShape_i.hh
new file mode 100644 (file)
index 0000000..83f2e64
--- /dev/null
@@ -0,0 +1,179 @@
+//  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_ScalarMapOnDeformedShape_i.hh
+// Author:  Eugeny Nikolaev
+// Module : VISU
+
+#ifndef VISU_ScalarMapOnDeformedShape_i_HeaderFile
+#define VISU_ScalarMapOnDeformedShape_i_HeaderFile
+
+#include "VISU_ScalarMap_i.hh"
+
+class VISU_ScalarMapOnDeformedShapePL;
+
+namespace VISU
+{
+  //----------------------------------------------------------------------------  
+  //! Class of Scalar Map on Deformed Shape presentation.
+  class VISU_I_EXPORT ScalarMapOnDeformedShape_i : public virtual POA_VISU::ScalarMapOnDeformedShape,
+                                                  public virtual ScalarMap_i
+  {
+    static int myNbPresent;
+    ScalarMapOnDeformedShape_i(const ScalarMapOnDeformedShape_i&);
+    
+  public:
+    //----------------------------------------------------------------------------     
+    typedef ScalarMap_i TSuperClass;
+    typedef VISU::ScalarMapOnDeformedShape TInterface;
+        
+    explicit
+    ScalarMapOnDeformedShape_i(EPublishInStudyMode thePublishInStudyModep);
+    
+    virtual
+    ~ScalarMapOnDeformedShape_i();
+
+    virtual
+    VISU::VISUType
+    GetType()
+    { 
+      return VISU::TSCALARMAPONDEFORMEDSHAPE;
+    }
+    
+    virtual 
+    void
+    SetScale(CORBA::Double theScale);
+
+    virtual
+    CORBA::Double 
+    GetScale();
+
+    virtual 
+    void
+    SameAs(const Prs3d_i* theOrigin);
+
+    VISU_ScalarMapOnDeformedShapePL* 
+    GetSpecificPL()
+    { 
+      return myScalarMapOnDeformedShapePL;
+    }
+   
+  protected:
+    //! Redefines VISU_ColoredPrs3d_i::SetField
+    virtual
+    void
+    SetField(VISU::PField theField);
+
+    //! Redefines VISU_ColoredPrs3d_i::CreatePipeLine
+    virtual
+    void
+    CreatePipeLine(VISU_PipeLine* thePipeLine);
+
+    //! Redefines VISU_ColoredPrs3d_i::CheckIsPossible
+    virtual 
+    bool 
+    CheckIsPossible();
+
+  public:
+    //! Redefines VISU_ColoredPrs3d_i::IsPossible
+    static
+    size_t
+    IsPossible(Result_i* theResult, 
+              const std::string& theMeshName, 
+              VISU::Entity theEntity,
+              const std::string& theFieldName, 
+              CORBA::Long theTimeStampNumber,
+              bool theIsMemoryCheck);
+
+    //! Redefines VISU_ColoredPrs3d_i::IsPossible
+    virtual
+    Storable* 
+    Create(const std::string& theMeshName, 
+          VISU::Entity theEntity,
+          const std::string& theFieldName, 
+          CORBA::Long theTimeStampNumber);
+
+    //! Redefines VISU_ColoredPrs3d_i::ToStream
+    virtual
+    void
+    ToStream(std::ostringstream& theStr);
+
+    //! Redefines VISU_ColoredPrs3d_i::Restore
+    virtual
+    Storable* 
+    Restore(SALOMEDS::SObject_ptr theSObject,
+           const Storable::TRestoringMap& theMap);
+    
+    static const std::string myComment;
+
+    virtual
+    const char* 
+    GetComment() const;
+
+    virtual
+    QString 
+    GenerateName();
+
+    virtual
+    const char* 
+    GetIconName();
+    
+    virtual
+    VISU_Actor* 
+    CreateActor();
+
+    virtual
+    void
+    UpdateActor(VISU_Actor* theActor) ;
+
+    virtual 
+    void
+    SetScalarField(VISU::Entity theEntity,
+                  const char* theFieldName,
+                  CORBA::Long theTimeStampNumber);
+
+    virtual
+    VISU::Entity
+    GetScalarEntity();
+
+    virtual
+    char* 
+    GetScalarFieldName();
+
+    virtual
+    CORBA::Long
+    GetScalarTimeStampNumber();
+
+    virtual 
+    VISU::PField
+    GetScalarField();
+
+  private:
+    VISU_ScalarMapOnDeformedShapePL *myScalarMapOnDeformedShapePL;
+
+    PField myScalarField;
+    VISU::Entity myScalarEntity;
+    std::string myScalarFieldName;
+    CORBA::Long myScalarTimeStampNumber;
+  };
+}
+#endif
index f0aba10aa462ef2d6295845bffa0eef745bc9a00..85e40ce6fc7504b2e3e112ad4055d3c42f3dda95 100644 (file)
@@ -53,6 +53,7 @@ static int MYDEBUG = 0;
 
 static int INCMEMORY = 4;
 
+using namespace std;
 
 //----------------------------------------------------------------------------
 size_t
@@ -171,7 +172,8 @@ VISU::ScalarMap_i
 //----------------------------------------------------------------------------
 VISU::ScalarMap_i::
 ScalarMap_i(EPublishInStudyMode thePublishInStudyMode) :
-  ColoredPrs3d_i(thePublishInStudyMode)
+  ColoredPrs3d_i(thePublishInStudyMode),
+  myShowBar(true)
 {}
 
 //----------------------------------------------------------------------------
@@ -191,7 +193,7 @@ VISU::ScalarMap_i
     ScalarMap_i* anOrigin = const_cast<ScalarMap_i*>(aPrs3d);
  
     SetScaling(anOrigin->GetScaling());
-    
+    SetBarVisible(anOrigin->IsBarVisible());
     Update();
   }
 }
@@ -217,6 +219,7 @@ VISU::ScalarMap_i
   else
     SetScaling(VISU::LINEAR);
 
+  myShowBar = true;
   return this;
 }
 
@@ -239,6 +242,9 @@ VISU::ScalarMap_i
 
   SetScaling(VISU::Scaling(VISU::Storable::FindValue(theMap,"myScaling").toInt()));
 
+  QString aVal = VISU::Storable::FindValue(theMap,"myShowBar", "1");
+  SetBarVisible((aVal.toInt() == 1)? true : false);
+
   // Check if the icon needs to be updated, update if necessary
   SALOMEDS::Study_var aStudy = theSObject->GetStudy();
   SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
@@ -261,6 +267,7 @@ VISU::ScalarMap_i
   TSuperClass::ToStream(theStr);
 
   Storable::DataToStream( theStr, "myScaling",        GetScaling() );
+  Storable::DataToStream( theStr, "myShowBar",        (IsBarVisible()? 1:0) );
 }
 
 
@@ -362,6 +369,14 @@ VISU::ScalarMap_i
   return IsPossible(GetCResult(),GetCMeshName(),GetEntity(),GetCFieldName(),GetTimeStampNumber(),true);
 }
 
+void VISU::ScalarMap_i::SetBarVisible(CORBA::Boolean theVisible) 
+{ 
+  if (myShowBar == theVisible)
+    return;
+  VISU::TSetModified aModified(this);
+  myShowBar = theVisible; 
+  myParamsTime.Modified();
+}
 
 //----------------------------------------------------------------------------
 void
@@ -378,14 +393,6 @@ VISU::ScalarMap_i
   TSuperClass::CreatePipeLine(myScalarMapPL);
 }
 
-//----------------------------------------------------------------------------
-void
-VISU::ScalarMap_i
-::SetMapScale(double theMapScale)
-{
-  GetSpecificPL()->SetMapScale(theMapScale);
-}
-
 //----------------------------------------------------------------------------
 VISU_Actor* 
 VISU::ScalarMap_i
@@ -394,7 +401,7 @@ VISU::ScalarMap_i
   VISU_ScalarMapAct* anActor = VISU_ScalarMapAct::New();
   try{
     TSuperClass::CreateActor(anActor);
-    anActor->SetBarVisibility(true);
+    anActor->SetBarVisibility(myShowBar); 
     SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
     int  aDispMode = aResourceMgr->integerValue("VISU", "scalar_map_represent", 2);
     bool toShrink  = aResourceMgr->booleanValue("VISU", "scalar_map_shrink", false);
@@ -402,6 +409,14 @@ VISU::ScalarMap_i
     anActor->SetRepresentation(aDispMode);
     if (toShrink && !toSupressShrinking) anActor->SetShrink();
     anActor->SetShading(toUseShading);
+
+    anActor->SetFeatureEdgesAngle( aResourceMgr->doubleValue("VISU", "feature_edges_angle", 0.0) );
+    anActor->SetFeatureEdgesFlags( aResourceMgr->booleanValue("VISU", "show_feature_edges", false),
+                                  aResourceMgr->booleanValue("VISU", "show_boundary_edges", false),
+                                  aResourceMgr->booleanValue("VISU", "show_manifold_edges", false),
+                                  aResourceMgr->booleanValue("VISU", "show_non_manifold_edges", false) );
+    anActor->SetFeatureEdgesColoring( aResourceMgr->booleanValue("VISU", "feature_edges_coloring", false) );
+
     UpdateActor(anActor);
   }catch(...){
     anActor->Delete();
@@ -424,16 +439,28 @@ VISU::ScalarMap_i
 ::UpdateActor(VISU_ActorBase* theActor) 
 {
   if(VISU_ScalarMapAct* anActor = dynamic_cast<VISU_ScalarMapAct*>(theActor)){
+    VISU_LookupTable * aLookupTable = GetSpecificPL()->GetBarTable();
+
+    if ( IsScalarFilterUsed() ) {
+      aLookupTable->ForceBuild();
+      static unsigned char MARK_COLOR[] = { 255, 255, 255 };
+      aLookupTable->MarkValueByColor( GetScalarFilterMin(), MARK_COLOR );
+      aLookupTable->MarkValueByColor( GetScalarFilterMax(), MARK_COLOR );
+    }
+
     VISU_ScalarBarActor *aScalarBar = anActor->GetScalarBar();
-    aScalarBar->SetLookupTable(GetSpecificPL()->GetBarTable());
+    aScalarBar->SetLookupTable( aLookupTable );
+
+    aScalarBar->SetDistribution( GetSpecificPL()->GetDistribution() );
+    aScalarBar->SetDistributionVisibility( GetIsDistributionVisible() );
+
     aScalarBar->SetTitle(GetScalarBarTitle().c_str());
     aScalarBar->SetOrientation(GetBarOrientation());
     aScalarBar->GetPositionCoordinate()->SetCoordinateSystemToNormalizedViewport();
     aScalarBar->GetPositionCoordinate()->SetValue(GetPosX(),GetPosY());
     aScalarBar->SetWidth(GetWidth());
     aScalarBar->SetHeight(GetHeight());
-    aScalarBar->SetRatios(GetTitleWidth(), GetTitleHeight(),
-                         GetLabelWidth(), GetLabelHeight(),
+    aScalarBar->SetRatios(GetTitleSize(), GetLabelSize(), 
                          GetBarWidth(), GetBarHeight());
     aScalarBar->SetNumberOfLabels(GetLabels());
     aScalarBar->SetLabelFormat(GetLabelsFormat());
@@ -460,7 +487,25 @@ VISU::ScalarMap_i
     IsItalicLabel()? aLabelProp->ItalicOn() : aLabelProp->ItalicOff();
     IsShadowLabel()? aLabelProp->ShadowOn() : aLabelProp->ShadowOff();
 
+    anActor->SetBarVisibility(myShowBar); 
+
     aScalarBar->Modified();
+    
+    // Update values labels
+
+    vtkTextProperty* aProp = anActor->GetsValLabelsProps();
+    if ( aProp )
+    {
+      aProp->SetFontFamily( GetValLblFontType() );
+      aProp->SetFontSize( GetValLblFontSize() );
+      aProp->SetBold( IsBoldValLbl() );
+      aProp->SetItalic( IsItalicValLbl() );
+      aProp->SetShadow( IsShadowValLbl() );
+
+      vtkFloatingPointType anRGB[ 3 ];
+      GetValLblFontColor( anRGB[ 0 ], anRGB[ 1 ], anRGB[ 2 ] );
+      aProp->SetColor( anRGB[ 0 ], anRGB[ 1 ], anRGB[ 2 ] );
+    }
   }
   TSuperClass::UpdateActor(theActor);
 }
index 44a7ba96ed6875d1deedca2519bed2824d3131ee..4a74f9df17b2296eaa1486e6f9e44b3ee868d10a 100644 (file)
@@ -98,6 +98,10 @@ namespace VISU
     { 
       return myScalarMapPL; 
     }
+
+    virtual CORBA::Boolean IsBarVisible() { return myShowBar; }
+
+    virtual void SetBarVisible(CORBA::Boolean theVisible);
     
   protected:
     //! Redefines VISU_ColoredPrs3d_i::DoSetInput
@@ -163,10 +167,6 @@ namespace VISU
     Restore(SALOMEDS::SObject_ptr theSObject,
            const Storable::TRestoringMap& theMap);
 
-    virtual
-    void
-    SetMapScale(double theMapScale = 1.0);
-
     virtual 
     void
     SameAs(const Prs3d_i* theOrigin);
@@ -193,6 +193,7 @@ namespace VISU
 
   private:
     VISU_ScalarMapPL* myScalarMapPL;
+    bool myShowBar;
   };
 }
 
index 01ebfa16f8afb851b6ac250aa0feabaf1bb5fd40..6b0d58ac11e426b32ee6754722c8280e92a0d187 100644 (file)
@@ -45,6 +45,7 @@ static int MYDEBUG = 0;
 static int MYDEBUG = 0;
 #endif
 
+using namespace std;
 
 //---------------------------------------------------------------
 size_t
index 0910d8dc60be4ede36309c0d81a7ab9145215b54..4cbc5cc0abd852d11ac227efc6d1d0a68821e0af 100644 (file)
@@ -38,6 +38,8 @@
 
 #include "utilities.h"
 
+using namespace std;
+
 #ifdef _DEBUG_
 static int MYDEBUG = 0;
 #else
@@ -514,6 +516,14 @@ VISU::Storable* VISU::Curve_i::Build(int theRestoring )
                                          true );
        // create SObject referenced to real table object
        mySObj = SALOMEDS::SObject::_duplicate(GetStudyDocument()->FindObjectID(anEntry.c_str()));
+
+       // Set icon
+       SALOMEDS::StudyBuilder_var aStudyBuilder = GetStudyDocument()->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;
     }
@@ -1029,6 +1039,14 @@ VISU::Storable* VISU::Container_i::Build( int theRestoring )
                                       aComment.toLatin1().data(),
                                       true );
     mySObj = SALOMEDS::SObject::_duplicate(GetStudyDocument()->FindObjectID(anEntry.c_str()));
+
+    // Set icon
+    SALOMEDS::StudyBuilder_var aStudyBuilder = GetStudyDocument()->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 0fc2b12e073d89c1c44307f5ba47b3ac43e263f7..13be9942f8991d35c64b5bd68c62e34d161e3a58 100644 (file)
@@ -81,6 +81,7 @@
 #include <Standard_ErrorHandler.hxx>
 #endif
 
+using namespace std;
 
 //------------------------------------------------------------------------
 namespace VISU 
index 1ef9bab6198f9f80d19e28e2aef2d8fc8eaaad0a..9dab489f9c3e621a925900668212229a63af7e73 100644 (file)
@@ -46,6 +46,7 @@ static int MYDEBUG = 0;
 
 static int INCMEMORY = 4+12;
 
+using namespace std;
 
 //---------------------------------------------------------------
 size_t 
index c388740b97160ecc9c86c5b3aea591e1bb323d5c..8ebf690fab08b0234f9abb6090a4ac7b981f1382 100644 (file)
@@ -28,6 +28,7 @@
 #define VISU_View_i_HeaderFile
 
 #include "VISUConfig.hh"
+#include "SALOME_GenericObj_i.hh"
 
 class QWidget;
 
@@ -46,7 +47,8 @@ namespace VISU
   class Curve_i;
 
   class VISU_I_EXPORT View_i : public virtual POA_VISU::View,
-                 public virtual Storable
+                              public virtual SALOME::GenericObj_i,
+                              public virtual Storable
   {
   public:
     View_i (SalomeApp_Application *theApplication,
@@ -125,7 +127,7 @@ namespace VISU
 
   //===========================================================================
   class VISU_I_EXPORT XYPlot_i : public virtual POA_VISU::XYPlot,
-                   public virtual View_i
+                                public virtual View_i
   {
   public:
     typedef VISU::XYPlot TInterface;
@@ -216,7 +218,7 @@ namespace VISU
 
   //===========================================================================
   class VISU_I_EXPORT View3D_i : public virtual POA_VISU::View3D,
-                   public virtual View_i
+                                public virtual View_i
   {
   public:
     typedef VISU::View3D TInterface;
index d237a8dd7b4b9e112fd20895799c8342f527ef52..a37018e688468189adfc3feab18cbeceedfa581e 100644 (file)
 
 include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
-lib_LTLIBRARIES= libVISU_Swigcmodule.la
-dist_libVISU_Swigcmodule_la_SOURCES= VISU_Gen_s.cc
-nodist_libVISU_Swigcmodule_la_SOURCES= libVISU_Swig_wrap.cxx
+SWIG_FLAGS = @SWIG_FLAGS@ -I$(srcdir)
+SWIG_DEF   = libVISU_Swig.i
 
-SWIG_DEF = libVISU_Swig.i
-SWIG_FLAGS= @SWIG_FLAGS@ -I$(srcdir)
+salomeinclude_HEADERS = $(SWIG_DEF) VISU_Gen_s.hh
+
+# Libraries targets
+lib_LTLIBRARIES                 = _libVISU_Swig.la
+dist__libVISU_Swig_la_SOURCES   = $(SWIG_DEF) VISU_Gen_s.hh VISU_Gen_s.cc
+nodist__libVISU_Swig_la_SOURCES = libVISU_Swig_wrap.cxx
 
 libVISU_Swig.py: libVISU_Swig_wrap.cxx
+
 libVISU_Swig_wrap.cxx: $(SWIG_DEF)
        $(SWIG) $(SWIG_FLAGS) -o $@ $<
 
-libVISU_Swigcmodule_la_CPPFLAGS= \
+_libVISU_Swig_la_CPPFLAGS = \
        -ftemplate-depth-32 \
        $(PYTHON_INCLUDES) \
        $(HDF5_INCLUDES) \
@@ -49,20 +53,20 @@ libVISU_Swigcmodule_la_CPPFLAGS= \
        $(BOOST_CPPFLAGS) \
        -I$(srcdir)/../CONVERTOR -I$(srcdir)/../PIPELINE
 
-libVISU_Swigcmodule_la_LDFLAGS= $(PYTHON_LIBS) ../CONVERTOR/libVisuConvertor.la ../PIPELINE/libVisuPipeLine.la
+_libVISU_Swig_la_LDFLAGS = -module
+_libVISU_Swig_la_LIBADD  = $(PYTHON_LIBS) ../CONVERTOR/libVisuConvertor.la ../PIPELINE/libVisuPipeLine.la
 
-dist_salomescript_DATA= libVISU_Swig.py batchmode_visu.py batchmode_visu_table.py batchmode_visu_view3d.py \
+dist_salomescript_DATA = batchmode_visu.py batchmode_visu_table.py batchmode_visu_view3d.py \
        visu_med.py visu_view3d.py visu.py visu_gui.py visu_prs_example.py \
        visu_table.py visu_big_table.py visu_view.py visu_delete.py \
        visu_swig_test.py visu_split_views.py \
        visu_succcessive_animation.py visu_apply_properties.py visu_apply_properties_successive.py \
+       batch_test_events.py batchmode_visu_view.py test_events.py visu_cache.py visu_pointmap3d.py \
        VISU_Example_01.py VISU_Example_02.py VISU_Example_03.py VISU_Example_04.py \
        VISU_Example_05.py VISU_Example_06.py VISU_Example_07.py
-dist_sharedpkgpython_DATA= VISU_shared_modules.py
 
-CLEANFILES= libVISU_Swig.py libVISU_Swig_wrap.cxx
+nodist_salomescript_DATA = libVISU_Swig.py 
 
-install-exec-hook: $(libdir)/_libVISU_Swig.so
+dist_sharedpkgpython_DATA = VISU_shared_modules.py
 
-$(libdir)/_libVISU_Swig.so:
-       ( cd $(libdir); ln -sf libVISU_Swigcmodule.so _libVISU_Swig.so; )
+CLEANFILES = libVISU_Swig.py libVISU_Swig_wrap.cxx
diff --git a/src/VISU_SWIG/visu_pointmap3d.py b/src/VISU_SWIG/visu_pointmap3d.py
deleted file mode 100755 (executable)
index f16d6ee..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-import os
-import VISU
-from visu_gui import *
-
-aTableFile = os.getenv('DATA_DIR') + '/Tables/table_test.xls'
-
-aTableSObject = myVisu.ImportTables(aTableFile)
-
-aTable = None
-if aTableSObject:
-  anIsFound, aSObject = aTableSObject.FindSubObject(1)
-  if anIsFound:
-    aTable = aSObject.GetObject()
-
-aViewManager = myVisu.GetViewManager();
-aView = aViewManager.Create3DView()
-if aView is None : print "Creating View Error"
-print aTable
-
-##########Get Values################
-aScaleFactor = aTable.GetScaleFactor();
-anIsContourPrs = aTable.GetIsContourPrs();
-aNbOfContours = aTable.GetNbOfContours();
-aScaling = aTable.GetScaling();
-aMin = aTable.GetMin();
-aMax = aTable.GetMax();
-aSourceMin = aTable.GetSourceMin();
-aSourceMax = aTable.GetSourceMax();
-aPosX = aTable.GetPosX();
-aPosY = aTable.GetPosY();
-aHeight = aTable.GetHeight();
-aWidth = aTable.GetWidth();
-aNbColors = aTable.GetNbColors();
-aLabels = aTable.GetLabels();
-aBarOrientation = aTable.GetBarOrientation();
-
-
-print "Get Values:"
-print "aScaleFactor = ", aScaleFactor
-print "anIsContourPrs = ", anIsContourPrs
-print "aNbOfContours = ", aNbOfContours
-print "aScaling = ", aScaling
-print "===== SCALAR BAR ======="
-print "aMin = ", aMin
-print "aMax = ", aMax
-print "aSourceMin = ", aSourceMin
-print "aSourceMax = ", aSourceMax
-print "aPosX = ", aPosX
-print "aPosY = ", aPosY
-print "aHeight = ", aHeight
-print "aWidth = ", aWidth
-print "aNbColors = ", aNbColors
-print "aLabels = ", aLabels
-print "aBarOrientation = ", aBarOrientation
-
-aView.DisplayOnly( aTable )
-aView.FitAll()
\ No newline at end of file
index c09b3d46ff3f4b94d845790ce86a58205f344370..8afb0e312f15513cafc5a953bfbcf98b68019b5b 100755 (executable)
@@ -29,46 +29,17 @@ lib_LTLIBRARIES= libVVTK.la
 # header files
 salomeinclude_HEADERS= \
        VVTK.h \
-       VVTK_ViewManager.h \
-       VVTK_ViewModel.h \
-       VVTK_InteractorStyle.h \
-       VVTK_PickingDlg.h \
-       VVTK_SegmentationCursorDlg.h \
        VVTK_PrimitiveBox.h \
-       VVTK_SizeBox.h \
-       VVTK_ViewWindow.h \
-       VVTK_MainWindow.h \
-       VVTK_ImageWriter.h \
-       VVTK_ImageWriterMgr.h \
-       VVTK_RecorderDlg.h \
-       VVTK_Recorder.h
+       VVTK_SizeBox.h
 
 dist_libVVTK_la_SOURCES= \
-       VVTK_ViewManager.cxx \
-       VVTK_ViewModel.cxx \
-       VVTK_InteractorStyle.cxx \
-       VVTK_PickingDlg.cxx \
-       VVTK_SegmentationCursorDlg.cxx \
        VVTK_PrimitiveBox.cxx \
-       VVTK_SizeBox.cxx \
-       VVTK_ViewWindow.cxx \
-       VVTK_Renderer.cxx \
-       VVTK_MainWindow.cxx \
-       VVTK_ImageWriter.cxx \
-       VVTK_ImageWriterMgr.cxx \
-       VVTK_RecorderDlg.cxx \
-       VVTK_Recorder.cxx
+       VVTK_SizeBox.cxx
 
 MOC_FILES= \
-       VVTK_ViewWindow_moc.cxx \
-       VVTK_ViewModel_moc.cxx \
-       VVTK_ViewManager_moc.cxx \
-       VVTK_PickingDlg_moc.cxx \
-       VVTK_SegmentationCursorDlg_moc.cxx \
-       VVTK_RecorderDlg_moc.cxx \
        VVTK_PrimitiveBox_moc.cxx \
-       VVTK_SizeBox_moc.cxx \
-       VVTK_MainWindow_moc.cxx
+       VVTK_SizeBox_moc.cxx
+
 nodist_libVVTK_la_SOURCES=$(MOC_FILES)
 
 libVVTK_la_CPPFLAGS= \
index 456b27150991eacb9bde2037dc41d66ef8b4b1e2..158542a5d8c36e0e077ce1e1982d8032e2f365f3 100644 (file)
 #include <QApplication>
 
 //----------------------------------------------------------------------------
-VVTK_MainWindow
-::VVTK_MainWindow(QWidget* theParent, 
-                 const char* theName,
-                 SUIT_ResourceMgr* theResourceMgr,
-                 SUIT_ViewWindow* theViewWindow):
+VVTK_MainWindow::VVTK_MainWindow(QWidget* theParent, 
+                                const char* theName,
+                                SUIT_ResourceMgr* theResourceMgr,
+                                SUIT_ViewWindow* theViewWindow):
   SVTK_MainWindow(theParent,theName,theResourceMgr,theViewWindow),
-  myInteractorStyle(VVTK_InteractorStyle::New()),
   myControllerIncrement(VVTK_ControllerIncrement::New()),
   myControllerOnKeyDown(VVTK_ControllerOnKeyDown::New())
 {
   myToolMgr = new QtxActionToolMgr( this );
-  myInteractorStyle->SetControllerIncrement(myControllerIncrement.GetPointer());
-  myControllerIncrement->Delete();
 
-  myInteractorStyle->SetControllerOnKeyDown(myControllerOnKeyDown.GetPointer());
+  myControllerIncrement->Delete();
   myControllerOnKeyDown->Delete();
 
-  myInteractorStyle->Delete();
-
   // Recording
   myRecordingToolBar = new QToolBar(tr("LBL_TOOLBAR_RECORD_LABEL"), this);
   addToolBar(Qt::LeftToolBarArea, myRecordingToolBar );
@@ -132,9 +126,7 @@ QtxActionToolMgr* VVTK_MainWindow::toolMgr() const
 }
 
 //----------------------------------------------------------------------------
-void
-VVTK_MainWindow
-::Initialize(SVTK_RenderWindowInteractor* theInteractor)
+void VVTK_MainWindow::Initialize(SVTK_RenderWindowInteractor* theInteractor)
 { 
   vtkInteractorStyle* aStyle = theInteractor->GetInteractorStyle();
   if(SVTK_InteractorStyle *anInteractorStyle = dynamic_cast<SVTK_InteractorStyle*>(aStyle)){
@@ -189,17 +181,6 @@ void VVTK_MainWindow::onDumpView()
   QApplication::restoreOverrideCursor();
 }
 
-//----------------------------------------------------------------------------
-void
-VVTK_MainWindow
-::OnInteractorStyleSwitch(bool theIsGaussStyleOn)
-{
-  if ( theIsGaussStyleOn )
-    this->PushInteractorStyle(myInteractorStyle.GetPointer());
-  else
-    this->PopInteractorStyle();
-}
-
 //----------------------------------------------------------------------------
 void VVTK_MainWindow::OnStartRecording()
 {
@@ -256,9 +237,7 @@ void VVTK_MainWindow::OnStopRecording()
 }
 
 //----------------------------------------------------------------------------
-void 
-VVTK_MainWindow
-::action( const int accelAction  )
+void VVTK_MainWindow::action( const int accelAction  )
 {
   if ( accelAction == SUIT_Accel::ZoomFit )
     onFitAll();
@@ -269,13 +248,11 @@ VVTK_MainWindow
 }
 
 //----------------------------------------------------------------------------
-VVTK_MainWindow1
-::VVTK_MainWindow1(QSplitter* theParent, 
-                 const char* theName,
-                 SUIT_ResourceMgr* theResourceMgr,
-                 SUIT_ViewWindow* theViewWindow):
+VVTK_MainWindow1::VVTK_MainWindow1(QSplitter* theParent, 
+                                  const char* theName,
+                                  SUIT_ResourceMgr* theResourceMgr,
+                                  SUIT_ViewWindow* theViewWindow):
   VVTK_MainWindow(theParent,theName,theResourceMgr,theViewWindow),
-  myStyleSwitchAction(NULL),
   mySplitter(theParent),
   myPickingDlg(NULL)
 {
@@ -285,23 +262,6 @@ VVTK_MainWindow1
   QPixmap aPixmap;
   QtxAction* anAction;
 
-  aPixmap = theResourceMgr->loadPixmap( "VISU", tr( "ICON_VVTK_INTERACTOR_STYLE_SWITCH" ) );
-  anAction = new QtxAction(tr("MNU_VVTK_INTERACTOR_STYLE_SWITCH"), 
-                          aPixmap,
-                          tr( "MNU_VVTK_INTERACTOR_STYLE_SWITCH" ), 
-                          0, 
-                          this, 
-                          //"VVTK/SVTK StyleSwitch", 
-                          true);
-  anAction->setCheckable(true);
-  anAction->setStatusTip(tr("DSC_VVTK_INTERACTOR_STYLE_SWITCH"));
-
-  myPtsToolBar->addAction( anAction );
-  myStyleSwitchAction = anAction;
-
-  if( theResourceMgr->integerValue( "VISU", "mouse_behaviour", true ) == 1 )
-    myStyleSwitchAction->toggle();
-
   aPixmap = theResourceMgr->loadPixmap("VISU",tr("ICON_VVTK_SELECTION_MODE_SWITCH"));
   myPickingAction = new QtxAction(tr("MNU_VVTK_SELECTION_MODE_SWITCH"), 
                                  aPixmap,
@@ -356,18 +316,12 @@ VVTK_MainWindow1
   myPtsToolBar->addAction( aSegmentationAction );
 }
 
-void
-VVTK_MainWindow1
-::Initialize(SVTK_RenderWindowInteractor* theInteractor,
-            VVTK_Renderer1* theRenderer)
+void VVTK_MainWindow1::Initialize(SVTK_RenderWindowInteractor* theInteractor,
+                                 VVTK_Renderer1* theRenderer)
 {
   myRenderer = theRenderer;
   VVTK_MainWindow::Initialize(theInteractor);
 
-  if( myStyleSwitchAction->isChecked() )
-    PushInteractorStyle(myInteractorStyle.GetPointer());
-  connect(myStyleSwitchAction, SIGNAL(toggled(bool)), this, SLOT(OnInteractorStyleSwitch(bool)));
-
   mySegmentationCursorDlg->SetWidgetCtrl( theRenderer->GetWidgetCtrl() );
   mySegmentationCursorDlg->SetInteractor( theInteractor );
 
@@ -375,31 +329,25 @@ VVTK_MainWindow1
   myPickingDlg->SetInteractor( theInteractor );
 }
 
-VVTK_MainWindow1
-::~VVTK_MainWindow1()
+VVTK_MainWindow1::~VVTK_MainWindow1()
 {}
 
 //----------------------------------------------------------------------------
-VVTK_MainWindow2*
-VVTK_MainWindow1
-::CreateMainWindow2(QWidget* theParent, 
-                   const char* theName,
-                   SUIT_ResourceMgr* theResourceMgr,
-                   SUIT_ViewWindow* theViewWindow)
+VVTK_MainWindow2* VVTK_MainWindow1::CreateMainWindow2(QWidget* theParent, 
+                                                     const char* theName,
+                                                     SUIT_ResourceMgr* theResourceMgr,
+                                                     SUIT_ViewWindow* theViewWindow)
 {
   myMainWindow2 = new VVTK_MainWindow2(theParent,
                                       theName,
                                       theResourceMgr,
-                                      theViewWindow,
-                                      myStyleSwitchAction);
+                                      theViewWindow);
   return myMainWindow2;
 }
 
 
 //----------------------------------------------------------------------------
-void
-VVTK_MainWindow1
-::OnSelectionModeSwitch(bool theIsSelectionOn)
+void VVTK_MainWindow1::OnSelectionModeSwitch(bool theIsSelectionOn)
 {
   if ( theIsSelectionOn && !isVisible() )
     return;
@@ -419,9 +367,7 @@ VVTK_MainWindow1
     myPickingDlg->hide();
 }
 
-void
-VVTK_MainWindow1
-::OnSelectionChanged()
+void VVTK_MainWindow1::OnSelectionChanged()
 {
   Selection_Mode aSelectionMode = SelectionMode();
   if(myPickingAction->isChecked() && aSelectionMode != GaussPointSelection)
@@ -432,54 +378,40 @@ VVTK_MainWindow1
 
 
 //----------------------------------------------------------------------------
-VISU_WidgetCtrl* 
-VVTK_MainWindow1
-::GetWidgetCtrl()
+VISU_WidgetCtrl* VVTK_MainWindow1::GetWidgetCtrl()
 {
   return myRenderer->GetWidgetCtrl();
 }
 
-VISU_InsideCursorSettings* 
-VVTK_MainWindow1
-::GetInsideCursorSettings()
+VISU_InsideCursorSettings* VVTK_MainWindow1::GetInsideCursorSettings()
 {
   return mySegmentationCursorDlg->GetInsideCursorSettings();
 }
 
-VISU_OutsideCursorSettings* 
-VVTK_MainWindow1
-::GetOutsideCursorSettings()
+VISU_OutsideCursorSettings* VVTK_MainWindow1::GetOutsideCursorSettings()
 {
   return mySegmentationCursorDlg->GetOutsideCursorSettings();
 }
 
-VISU_PickingSettings* 
-VVTK_MainWindow1
-::GetPickingSettings()
+VISU_PickingSettings* VVTK_MainWindow1::GetPickingSettings()
 {
   return myPickingDlg->GetPickingSettings();
 }
 
 //----------------------------------------------------------------------------
-void
-VVTK_MainWindow1
-::SetPlanesSegementation(bool theIsOn)
+void VVTK_MainWindow1::SetPlanesSegementation(bool theIsOn)
 {
   myPlaneSegmentationAction->setChecked( theIsOn );
   OnSegmentationSwitch(myPlaneSegmentationAction);
 }
 
-void
-VVTK_MainWindow1
-::SetSphereSegementation(bool theIsOn)
+void VVTK_MainWindow1::SetSphereSegementation(bool theIsOn)
 {
   mySphereSegmentationAction->setChecked( theIsOn );
   OnSegmentationSwitch(mySphereSegmentationAction);
 }
 
-void
-VVTK_MainWindow1
-::OnSegmentationSwitch(QtxAction* theAction)
+void VVTK_MainWindow1::OnSegmentationSwitch(QtxAction* theAction)
 {
   bool anIsSegmentationOn = myPlaneSegmentationAction->isChecked() ||
     mySphereSegmentationAction->isChecked();
@@ -516,9 +448,7 @@ VVTK_MainWindow1
   }
 }
 
-void
-VVTK_MainWindow1
-::OnSegmentationSwitch()
+void VVTK_MainWindow1::OnSegmentationSwitch()
 {
   QtxAction* anAction = ( QtxAction* )sender();
   OnSegmentationSwitch(anAction);
@@ -526,30 +456,20 @@ VVTK_MainWindow1
 
 
 //----------------------------------------------------------------------------
-VVTK_MainWindow2
-::VVTK_MainWindow2(QWidget* theParent, 
-                  const char* theName,
-                  SUIT_ResourceMgr* theResourceMgr,
-                  SUIT_ViewWindow* theViewWindow,
-                  QtxAction* theStyleSwitchAction):
-  VVTK_MainWindow(theParent,theName,theResourceMgr,theViewWindow),
-  myStyleSwitchAction(theStyleSwitchAction)
+VVTK_MainWindow2::VVTK_MainWindow2(QWidget* theParent, 
+                                  const char* theName,
+                                  SUIT_ResourceMgr* theResourceMgr,
+                                  SUIT_ViewWindow* theViewWindow):
+  VVTK_MainWindow(theParent,theName,theResourceMgr,theViewWindow)
 {}
 
-VVTK_MainWindow2
-::~VVTK_MainWindow2()
+VVTK_MainWindow2::~VVTK_MainWindow2()
 {}
 
 
 //----------------------------------------------------------------------------
-void
-VVTK_MainWindow2
-::Initialize(SVTK_RenderWindowInteractor* theInteractor)
+void VVTK_MainWindow2::Initialize(SVTK_RenderWindowInteractor* theInteractor)
 {
   VVTK_MainWindow::Initialize(theInteractor);
-
-  if( myStyleSwitchAction->isChecked() )
-    PushInteractorStyle(myInteractorStyle.GetPointer());
-  connect(myStyleSwitchAction, SIGNAL(toggled(bool)), this, SLOT(OnInteractorStyleSwitch(bool)));
 }
 
index 2471822051f5d1b297cf7b5afd4e5241821f5c1b..068774eaa1d5e9bc4613b1fce4ac902086b68c5b 100644 (file)
@@ -57,49 +57,28 @@ public:
                  SUIT_ViewWindow* theViewWindow);
 
   //! Reimplement SVTK_MainWindow::Initialize
-  virtual
-  void
-  Initialize(SVTK_RenderWindowInteractor* theInteractor);
+  virtual void Initialize(SVTK_RenderWindowInteractor* theInteractor);
 
   //! Destroy instance of the class
-  virtual
-  ~VVTK_MainWindow();
+  virtual ~VVTK_MainWindow();
 
  public slots:
 
-  virtual
-  void
-  onDumpView();
+  virtual void onDumpView();
 
-   //! To change active interactor style at run-time
-  virtual
-  void
-  OnInteractorStyleSwitch(bool theIsGaussStyleOn); 
+  virtual void action( const int );
 
-  virtual 
-  void
-  action( const int );
+  virtual void OnStartRecording();
 
-  virtual
-  void
-  OnStartRecording();
+  virtual void OnPlayRecording();
 
-  virtual
-  void
-  OnPlayRecording();
+  virtual void OnPauseRecording();
 
-  virtual
-  void
-  OnPauseRecording();
-
-  virtual
-  void
-  OnStopRecording();
+  virtual void OnStopRecording();
 
  protected:
   virtual QtxActionToolMgr* toolMgr() const;
 
-  vtkSmartPointer<VVTK_InteractorStyle> myInteractorStyle;
   vtkSmartPointer<VVTK_ControllerIncrement> myControllerIncrement;
   vtkSmartPointer<VVTK_ControllerOnKeyDown> myControllerOnKeyDown; 
 
@@ -128,69 +107,53 @@ public:
                   SUIT_ViewWindow* theViewWindow);
 
   //! Reimplement VVTK_MainWindow::Initialize
-  virtual
-  void
-  Initialize(SVTK_RenderWindowInteractor* theInteractor,
-            VVTK_Renderer1* theRenderer);
+  virtual void Initialize(SVTK_RenderWindowInteractor* theInteractor,
+                         VVTK_Renderer1* theRenderer);
 
   //! Destroy instance of the class
-  virtual
-  ~VVTK_MainWindow1();
+  virtual ~VVTK_MainWindow1();
 
   //! Create instance of the segmented VVTK_MainWindow
   /*!
     The two views (VVTK_MainWindow1 and VVTK_MainWindow2) should change its behaviour in the same time.
     So, it is necessary to synhronize them through sharing some common pointers.
   */
-  VVTK_MainWindow2*
-  CreateMainWindow2(QWidget* theParent, 
-                   const char* theName,
-                   SUIT_ResourceMgr* theResourceMgr,
-                   SUIT_ViewWindow* theViewWindow);
+  VVTK_MainWindow2* CreateMainWindow2(QWidget* theParent, 
+                                     const char* theName,
+                                     SUIT_ResourceMgr* theResourceMgr,
+                                     SUIT_ViewWindow* theViewWindow);
 
   VISU_WidgetCtrl*  GetWidgetCtrl();
 
-  void
-  SetPlanesSegementation(bool theIsOn);
+  void SetPlanesSegementation(bool theIsOn);
 
-  void
-  SetSphereSegementation(bool theIsOn);
+  void SetSphereSegementation(bool theIsOn);
 
-  VISU_InsideCursorSettings*
-  GetInsideCursorSettings();
+  VISU_InsideCursorSettings* GetInsideCursorSettings();
 
   //! Get contained VISU_OutsideCursorSettings
-  VISU_OutsideCursorSettings*
-  GetOutsideCursorSettings();
+  VISU_OutsideCursorSettings* GetOutsideCursorSettings();
 
   //! Get contained VISU_PickingSettings
-  VISU_PickingSettings* 
-  GetPickingSettings();
+  VISU_PickingSettings* GetPickingSettings();
 
  public slots:
   //! To activate/ deactivate the segementation cursor at run-time
-  void
-  OnSegmentationSwitch();//bool theIsSegmentationOn); 
+  void OnSegmentationSwitch();//bool theIsSegmentationOn); 
 
-  void
-  OnSegmentationSwitch(QtxAction* theAction);//bool theIsSegmentationOn); 
+  void OnSegmentationSwitch(QtxAction* theAction);//bool theIsSegmentationOn); 
 
    //! To change active selection mode at run-time
-  virtual
-  void
-  OnSelectionModeSwitch(bool theIsSelectionOn); 
+  virtual void OnSelectionModeSwitch(bool theIsSelectionOn); 
 
    //! To adjust to the current selection mode
-  virtual
-  void
-  OnSelectionChanged(); 
+  virtual void OnSelectionChanged(); 
 
  protected:
   VVTK_Renderer1* myRenderer; //!< Keeps extended version of SVTK_Renderer
 
   VVTK_MainWindow2* myMainWindow2; //!< Refer to segmented view
 
-  QtxAction* myStyleSwitchAction; //!< Action for switch interactor style
   QToolBar* myPtsToolBar; //!< Additional tool bar
 
   //! To implement show/hide segmented view on acttivate/ deactivate segementation cursor
@@ -218,21 +181,13 @@ class VVTK_EXPORT VVTK_MainWindow2: public VVTK_MainWindow
   VVTK_MainWindow2(QWidget* theParent, 
                   const char* theName,
                   SUIT_ResourceMgr* theResourceMgr,
-                  SUIT_ViewWindow* theViewWindow,
-                  QtxAction* theStyleSwitchAction);
+                  SUIT_ViewWindow* theViewWindow);
 public:
   //! Destroy instance of the class
-  virtual
-  ~VVTK_MainWindow2();
+  virtual ~VVTK_MainWindow2();
 
   //! Reimplement SVTK_MainWindow::Initialize
-  virtual
-  void
-  Initialize(SVTK_RenderWindowInteractor* theInteractor);
-
- protected:
-  // Refer to the VVTK_MainWindow1::myStyleSwitchAction instance
-  QtxAction* myStyleSwitchAction; 
+  virtual void Initialize(SVTK_RenderWindowInteractor* theInteractor);
 
 };
 
index 18b42feee1b79b9a69dcc3761cb3978262cac118..52d14ff1d30a9af431480b39545ecef6d8556aa2 100644 (file)
@@ -24,7 +24,7 @@
 #include "VVTK_PickingDlg.h"
 
 #include "VISU_GaussPtsAct.h"
-#include "VISU_GaussPtsSettings.h"
+#include "VISU_PickingSettings.h"
 #include "VISU_GaussPointsPL.hxx"
 
 #include "SUIT_MessageBox.h"
@@ -454,29 +454,84 @@ VVTK_PickingDlg::~VVTK_PickingDlg()
 
 void VVTK_PickingDlg::AddActor( VISU_GaussPtsAct* theActor )
 {
-  theActor->SetPickingSettings( myPickingSettings.GetPointer() );
+  //theActor->SetPickingSettings( myPickingSettings.GetPointer() );
 }
 
 void VVTK_PickingDlg::RemoveActor( VISU_GaussPtsAct* theActor )
 {
-  theActor->SetPickingSettings( NULL );
+  //theActor->SetPickingSettings( NULL );
 }
 
 void VVTK_PickingDlg::Update()
 {
-  myCursorSizeSpinBox->setValue( myPickingSettings->GetCursorSize() );
-  myPyramidHeightSpinBox->setValue( myPickingSettings->GetPyramidHeight() );
-  myPointToleranceSpinBox->setValue( myPickingSettings->GetPointTolerance() );
-  myTransparencySpinBox->setValue( int(myPickingSettings->GetInfoWindowTransparency() * 100.0) );
-  myPositionComboBox->setCurrentIndex( myPickingSettings->GetInfoWindowPosition() );
-  myZoomFactorSpinBox->setValue( myPickingSettings->GetZoomFactor() );
-  myStepNumberSpinBox->setValue( myPickingSettings->GetStepNumber() );
-  myDisplayParentMeshCheckBox->setChecked( myPickingSettings->GetDisplayParentMesh() );
-
-  vtkFloatingPointType* aColor = myPickingSettings->GetColor();
-  mySelectionColorButton->setColor( QColor( ( int )( aColor[0] * 255.0 ),
-                                           ( int )( aColor[1] * 255.0 ),
-                                           ( int )( aColor[2] * 255.0 ) ) );
+  float aCursorSize = 0.5;
+  float aPyramidHeight = 10.0;
+  float aPointTolerance = 0.1;
+  QColor aColor = Qt::yellow;
+  int anInfoWindowTransparency = 50;
+  int anInfoWindowPosition = VISU_PickingSettings::BelowPoint;
+  float aZoomFactor = 1.5;
+  int aStepNumber = 10;
+  bool aDisplayParentMesh = false;
+
+  //if( !myPickingSettings->GetInitial() )
+  {
+    myCursorSizeSpinBox->setValue( myPickingSettings->GetCursorSize() );
+    myPyramidHeightSpinBox->setValue( myPickingSettings->GetPyramidHeight() );
+    myPointToleranceSpinBox->setValue( myPickingSettings->GetPointTolerance() );
+    myTransparencySpinBox->setValue( int(myPickingSettings->GetInfoWindowTransparency() * 100.0) );
+    myPositionComboBox->setCurrentIndex( myPickingSettings->GetInfoWindowPosition() );
+    myZoomFactorSpinBox->setValue( myPickingSettings->GetZoomFactor() );
+    myStepNumberSpinBox->setValue( myPickingSettings->GetStepNumber() );
+    myDisplayParentMeshCheckBox->setChecked( myPickingSettings->GetDisplayParentMesh() );
+
+    vtkFloatingPointType* aColor = myPickingSettings->GetColor();
+   
+    //QPalette aPalette( mySelectionColorButton->palette() );
+    /*aPalette.setColor( mySelectionColorButton->backgroundRole(),
+                      QColor( ( int )( aColor[0] * 255.0 ),
+                              ( int )( aColor[1] * 255.0 ),
+                              ( int )( aColor[2] * 255.0 ) ) );
+                               mySelectionColorButton->setPalette( aPalette );*/
+    mySelectionColorButton->setColor(
+                 QColor( ( int )( aColor[0] * 255.0 ),
+                ( int )( aColor[1] * 255.0 ),
+                 ( int )( aColor[2] * 255.0 ) ) );
+    
+    return;
+  }
+
+  SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
+
+  aCursorSize = aResourceMgr->doubleValue( "VISU", "picking_cursor_size", aCursorSize );
+  myCursorSizeSpinBox->setValue( aCursorSize );
+
+  aPyramidHeight = aResourceMgr->doubleValue( "VISU", "picking_pyramid_height", aPyramidHeight );
+  myPyramidHeightSpinBox->setValue( aPyramidHeight );
+
+  aPointTolerance = aResourceMgr->doubleValue( "VISU", "picking_point_tolerance", aPointTolerance );
+  myPointToleranceSpinBox->setValue( aPointTolerance );
+
+  aColor = aResourceMgr->colorValue( "VISU", "picking_selection_color", aColor );
+  //QPalette aPalette( mySelectionColorButton->palette() );
+  //aPalette.setColor( mySelectionColorButton->backgroundRole(), aColor );
+  mySelectionColorButton->setColor( aColor );
+
+  anInfoWindowTransparency = aResourceMgr->integerValue( "VISU", "picking_transparency", anInfoWindowTransparency );
+  myTransparencySpinBox->setValue( anInfoWindowTransparency );
+
+  anInfoWindowPosition = aResourceMgr->integerValue( "VISU", "picking_position", anInfoWindowPosition );
+  myPositionComboBox->setCurrentIndex( anInfoWindowPosition );
+
+  aZoomFactor = aResourceMgr->doubleValue( "VISU", "picking_zoom_factor", aZoomFactor );
+  myZoomFactorSpinBox->setValue( aZoomFactor );
+
+  aStepNumber = aResourceMgr->integerValue( "VISU", "picking_step_number", aStepNumber );
+  myStepNumberSpinBox->setValue( aStepNumber );
+
+  aDisplayParentMesh = aResourceMgr->booleanValue( "VISU", "picking_display_parent_mesh", aDisplayParentMesh );
+  myDisplayParentMeshCheckBox->setChecked( aDisplayParentMesh );
+
   onClickApply();
 }
 
@@ -566,6 +621,8 @@ void VVTK_PickingDlg::KeyPressed()
 
 void VVTK_PickingDlg::onClickApply()
 {
+  //myPickingSettings->SetInitial( false );
+
   myPickingSettings->SetCursorSize( myCursorSizeSpinBox->value() );
   myPickingSettings->SetPyramidHeight( myPyramidHeightSpinBox->value() );
   myPickingSettings->SetPointTolerance( myPointToleranceSpinBox->value() );
index 8b56aede642ec584fe51d9d2a33c85076d9ad651..d0e3d6a1a0b77ee1e7dc5d2800ea4ac829b2b6d0 100644 (file)
@@ -194,7 +194,7 @@ VVTK_Renderer
     anActor->SetHighlightProperty(myGaussHighlightProperty.GetPointer());
 
     anActor->SetInsideCursorSettings(myInsideCursorSettings);
-    anActor->SetPickingSettings(myPickingSettings);
+    //anActor->SetPickingSettings(myPickingSettings);
   }
 }
 
@@ -210,7 +210,7 @@ VVTK_Renderer
     anActor->SetHighlightProperty(NULL);
 
     anActor->SetInsideCursorSettings(NULL);
-    anActor->SetPickingSettings(NULL);
+    //anActor->SetPickingSettings(NULL);
   }
 }
 
index 977d3848d35d2d960d17081e6ef80ebefe196b7d..5a071c849eebcb7d9b6d8649574de27634e1f90a 100644 (file)
 #include <vtkRenderer.h>
 
 //---------------------------------------------------------------
-VVTK_Viewer
-::VVTK_Viewer()
+VVTK_Viewer::VVTK_Viewer()
 {
 }
 
 //---------------------------------------------------------------
-VVTK_Viewer
-::~VVTK_Viewer() 
+VVTK_Viewer::~VVTK_Viewer() 
 {
 }
 
 //---------------------------------------------------------------
-SUIT_ViewWindow*
-VVTK_Viewer
-::createView( SUIT_Desktop* theDesktop )
+SUIT_ViewWindow* VVTK_Viewer::createView( SUIT_Desktop* theDesktop )
 {
   TViewWindow* aViewWindow = new TViewWindow (theDesktop);
   aViewWindow->Initialize(this);
 
   aViewWindow->setBackgroundColor( backgroundColor() );
   aViewWindow->SetTrihedronSize( trihedronSize() );
+  aViewWindow->SetProjectionMode( projectionMode() );
+  aViewWindow->SetInteractionStyle( interactionStyle() );
+  aViewWindow->SetIncrementalSpeed( incrementalSpeed(), incrementalSpeedMode() );
+  aViewWindow->SetSpacemouseButtons( spacemouseBtn(1), spacemouseBtn(2), spacemouseBtn(3) );
 
   return aViewWindow;
 }
 
 //---------------------------------------------------------------
-void
-VVTK_Viewer
-::Display(const SALOME_VTKPrs* thePrs)
+void VVTK_Viewer::Display(const SALOME_VTKPrs* thePrs)
 {
   // try do downcast object
   if(const SVTK_Prs* aPrs = dynamic_cast<const SVTK_Prs*>(thePrs)){
@@ -106,9 +104,7 @@ namespace VVTK
 }
 
 //---------------------------------------------------------------
-bool
-VVTK_Viewer
-::isVisible( const Handle(SALOME_InteractiveObject)& theIO )
+bool VVTK_Viewer::isVisible( const Handle(SALOME_InteractiveObject)& theIO )
 {
   QVector<SUIT_ViewWindow*> aViews = myViewManager->getViews();
   for(int i = 0, iEnd = aViews.size(); i < iEnd; i++)