1 // Copyright (C) 2005-2024 CEA, EDF, OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef __MED_PRESENTATION_MANAGER_IDL_
21 #define __MED_PRESENTATION_MANAGER_IDL_
23 #include "SALOME_GenericObj.idl"
24 #include "MEDDataManager.idl"
28 /* Enumerations and constants */
38 COLOR_MAP_BLUE_TO_RED_RAINBOW,
39 COLOR_MAP_COOL_TO_WARM
42 enum ScalarBarRangeType {
43 SCALAR_BAR_ALL_TIMESTEPS,
44 SCALAR_BAR_CURRENT_TIMESTEP,
45 SCALAR_BAR_CUSTOM_RANGE
50 MESH_MODE_SURFACE_EDGES,
54 enum PresentationVisibility {
55 PRESENTATION_INVISIBLE,
57 PRESENTATION_NOT_IN_VIEW
60 enum IntegrationDirType {
62 INTEGRATION_DIR_FORWARD,
63 INTEGRATION_DIR_BACKWARD
66 typedef sequence<double> DoubleArray;
69 // struct ScalarBarRange {
70 // // (valMin,valMax) defines the scalar bar range from:
71 // // (-1,timestep): the field values at the chosen timestep
72 // // (-1,-1): the field values across all timesteps
73 // // (-2,-2): the field values at current timestep
74 // // (start,end): a user-input range of values
79 const string DISPLAY_EUCLIDEAN_NORM = ""; // Void string to avoid clash with a real component name -- never used actually?
81 enum SliceOrientationType {
93 const ViewModeType VIEW_MODE_DEFAULT = VIEW_MODE_REPLACE;
94 const ColorMapType COLOR_MAP_DEFAULT = COLOR_MAP_BLUE_TO_RED_RAINBOW;
95 const ScalarBarRangeType SCALAR_BAR_RANGE_DEFAULT = SCALAR_BAR_ALL_TIMESTEPS;
96 const MeshModeType MESH_MODE_DEFAULT = MESH_MODE_WIREFRAME;
97 // const long SCALAR_BAR_RANGE_VAL_MIN_DEFAULT = -1;
98 // const long SCALAR_BAR_RANGE_VAL_MAX_DEFAULT = -1;
99 const string DISPLAY_DEFAULT = DISPLAY_EUCLIDEAN_NORM;
100 const SliceOrientationType SLICE_ORIENTATION_DEFAULT = SLICE_NORMAL_TO_X;
101 const IntegrationDirType INTEGRATION_DIR_DEFAULT = INTEGRATION_DIR_BOTH;
103 const long NB_CONTOURS_DEFAULT = 10;
104 const long NB_SLICES_DEFAULT = 1;
106 const long NB_CONTOURS_MAX = 50;
107 const long NB_SLICES_MAX = 20;
111 // Just showing the mesh
112 struct MeshViewParameters {
118 // A simple scalar map
119 struct ScalarMapParameters {
121 string displayedComponent; // DISPLAY_EUCLIDEAN_NORM or any component name
122 ScalarBarRangeType scalarBarRange;
123 ColorMapType colorMap;
125 boolean scalarBarVisibility;
126 DoubleArray scalarBarRangeArray;
127 boolean hideDataOutsideCustomRange;
130 // A contour is an isoline in 2D and an isosurface in 3D
131 struct ContourParameters { // Contour are only for scalar fields
133 ScalarBarRangeType scalarBarRange;
134 ColorMapType colorMap;
136 boolean scalarBarVisibility;
137 DoubleArray scalarBarRangeArray;
138 boolean hideDataOutsideCustomRange;
140 string contourComponent;
143 struct VectorFieldParameters {
145 ScalarBarRangeType scalarBarRange;
146 ColorMapType colorMap;
148 boolean scalarBarVisibility;
149 DoubleArray scalarBarRangeArray;
150 boolean hideDataOutsideCustomRange;
152 boolean customScaleFactor;
155 struct SlicesParameters {
157 string displayedComponent; // DISPLAY_EUCLIDEAN_NORM or any component name
158 ScalarBarRangeType scalarBarRange;
159 ColorMapType colorMap;
161 boolean scalarBarVisibility;
162 DoubleArray scalarBarRangeArray;
163 boolean hideDataOutsideCustomRange;
164 SliceOrientationType orientation;
169 struct DeflectionShapeParameters {
171 ScalarBarRangeType scalarBarRange;
172 ColorMapType colorMap;
174 boolean scalarBarVisibility;
175 DoubleArray scalarBarRangeArray;
176 boolean hideDataOutsideCustomRange;
179 struct PointSpriteParameters {
181 string displayedComponent; // DISPLAY_EUCLIDEAN_NORM or any component name
182 ScalarBarRangeType scalarBarRange;
183 ColorMapType colorMap;
185 boolean scalarBarVisibility;
186 DoubleArray scalarBarRangeArray;
187 boolean hideDataOutsideCustomRange;
190 // sphinx doc: begin of plot3d params
191 struct Plot3DParameters {
193 ScalarBarRangeType scalarBarRange;
194 ColorMapType colorMap;
196 boolean scalarBarVisibility;
197 DoubleArray scalarBarRangeArray;
198 boolean hideDataOutsideCustomRange;
199 DoubleArray planeNormal;
202 // sphinx doc: end of plot3d params
204 struct StreamLinesParameters {
206 ScalarBarRangeType scalarBarRange;
207 ColorMapType colorMap;
209 boolean scalarBarVisibility;
210 DoubleArray scalarBarRangeArray;
211 boolean hideDataOutsideCustomRange;
212 IntegrationDirType integrDir;
215 struct CutSegmentParameters {
217 ScalarBarRangeType scalarBarRange;
218 ColorMapType colorMap;
220 boolean scalarBarVisibility;
221 DoubleArray scalarBarRangeArray;
222 boolean hideDataOutsideCustomRange;
227 typedef sequence<long> PresentationsList;
231 interface MEDPresentationManager : SALOME::GenericObj
233 long makeMeshView(in MeshViewParameters params, in ViewModeType viewMode) raises (SALOME::SALOME_Exception);
234 long makeScalarMap(in ScalarMapParameters params, in ViewModeType viewMode) raises (SALOME::SALOME_Exception);
235 long makeContour(in ContourParameters params, in ViewModeType viewMode) raises (SALOME::SALOME_Exception);
236 long makeVectorField(in VectorFieldParameters params, in ViewModeType viewMode) raises (SALOME::SALOME_Exception);
237 long makeSlices(in SlicesParameters params, in ViewModeType viewMode) raises (SALOME::SALOME_Exception);
238 long makeDeflectionShape(in DeflectionShapeParameters params, in ViewModeType viewMode) raises (SALOME::SALOME_Exception);
239 long makePointSprite(in PointSpriteParameters params, in ViewModeType viewMode) raises (SALOME::SALOME_Exception);
240 long makePlot3D(in Plot3DParameters params, in ViewModeType viewMode) raises (SALOME::SALOME_Exception);
241 long makeStreamLines(in StreamLinesParameters params, in ViewModeType viewMode) raises (SALOME::SALOME_Exception);
242 long makeCutSegment(in CutSegmentParameters params, in ViewModeType viewMode) raises (SALOME::SALOME_Exception);
244 void setPresentationStringProperty(in long presId, in string propName, in string propValue);
245 string getPresentationStringProperty(in long presId, in string propName);
246 void setPresentationIntProperty(in long presId, in string propName, in long propValue);
247 long getPresentationIntProperty(in long presId, in string propName);
248 void setPresentationDoubleProperty(in long presId, in string propName, in double propValue);
249 double getPresentationDoubleProperty(in long presId, in string propName);
252 MeshViewParameters getMeshViewParameters(in long presId);
253 ScalarMapParameters getScalarMapParameters(in long presId);
254 ContourParameters getContourParameters(in long presId);
255 SlicesParameters getSlicesParameters(in long presId);
256 VectorFieldParameters getVectorFieldParameters(in long presId);
257 PointSpriteParameters getPointSpriteParameters(in long presId);
258 Plot3DParameters getPlot3DParameters(in long presId);
259 DeflectionShapeParameters getDeflectionShapeParameters(in long presId);
260 StreamLinesParameters getStreamLinesParameters(in long presId);
261 CutSegmentParameters getCutSegmentParameters(in long presId);
263 void updateMeshView(in long presId, in MeshViewParameters params) raises (SALOME::SALOME_Exception);
264 void updateScalarMap(in long presId, in ScalarMapParameters params) raises (SALOME::SALOME_Exception);
265 void updateContour(in long presId, in ContourParameters params) raises (SALOME::SALOME_Exception);
266 void updateVectorField(in long presId, in VectorFieldParameters params) raises (SALOME::SALOME_Exception);
267 void updateSlices(in long presId, in SlicesParameters params) raises (SALOME::SALOME_Exception);
268 void updateDeflectionShape(in long presId, in DeflectionShapeParameters params) raises (SALOME::SALOME_Exception);
269 void updatePointSprite(in long presId, in PointSpriteParameters params) raises (SALOME::SALOME_Exception);
270 void updatePlot3D(in long presId, in Plot3DParameters params) raises (SALOME::SALOME_Exception);
271 void updateStreamLines(in long presId, in StreamLinesParameters params) raises (SALOME::SALOME_Exception);
272 void updateCutSegment(in long presId, in CutSegmentParameters params) raises (SALOME::SALOME_Exception);
274 boolean removePresentation(in long presId) raises (SALOME::SALOME_Exception);
276 // Helper function to keep GUI sync
277 boolean activateView(in long presentationId) raises (SALOME::SALOME_Exception);
279 // Low level ParaVis dump
280 string getParavisDump(in long presId) raises (SALOME::SALOME_Exception);
282 // ViewModeType getPresentationViewMode(in long presId);
284 PresentationsList getAllPresentations();
286 // Visibility State in the active ParaView viewer
287 PresentationVisibility stateInActiveView(in long presId);
289 void cleanUp() raises (SALOME::SALOME_Exception);