Salome HOME
Join modifications from branch OCC_development_for_3_2_0a2
[modules/visu.git] / idl / VISU_Gen.idl
1 //  Copyright (C) 2003  CEA/DEN, EDF R&D
2 //
3 //
4 //
5 //  File   : VISU_Gen.idl
6 //  Author : Alexey Petrov
7
8 /*! \file VISU_Gen.idl This file conatins a set of interfaces of the %VISU module.
9  *     This module provides various forms of data visualization in %SALOME application.
10  *     These forms include data tables, XY plots, 3d representations
11  *     and combination of these forms.
12  */
13
14 #ifndef __VISU_GEN__
15 #define __VISU_GEN__
16
17 #include "SALOME_Exception.idl"
18 #include "SALOME_GenericObj.idl"
19 #include "SALOME_Component.idl"
20 #include "SALOMEDS.idl"
21 #include "SALOMEDS_Attributes.idl"
22 #include "MED.idl"
23
24 /*!
25   The main package of interfaces of the post-processing module %VISU.
26 */
27 module VISU {
28   //-------------------------------------------------------
29   typedef string IdType;
30
31   /*!
32    * This enumeration contains a set of elements defining the type
33    * of the scaling, which can be applied on different presentations.
34    */
35   enum Scaling{ LINEAR, /*!< Linear type of scaling. */
36                 LOGARITHMIC /*!< Logarithmic type of scaling. */
37               };
38
39   /*!
40    * This enumeration contains a set of elements defining the
41    * type of the %entity (topological units) constituting a mesh.
42    */
43   enum Entity{ NODE, /*!< Node corresponds to a geometrical point. */
44                EDGE, /*!< Edge corresponds to a geometrical line connecting two points. */
45                FACE, /*!< Face corresponds to a geometrical plane bounded by several lines. */
46                CELL  /*!< Cell is a volumic element of a mesh */
47                };
48
49   /*!
50    * This enumeration contains a set of elements defining the type of the %VISU object.
51    * This enumeration is used for navigation between a set of %VISU interfaces.
52    */
53   enum VISUType {
54     TNONE, /*!< Not a %VISU object */
55     TCURVE, /*!< Curve line object for construction of 2D XY plots */
56     TTABLE, /*!< Table containing numerical data */
57     TCONTAINER, /*!< Container object used for storing a set of curve lines */
58     TMESH, /*!< Meshing object */
59     TSCALARMAP, /*!< Scalarmap 3D presentation object */
60     TISOSURFACE, /*!< Iso surface 3D presentation object */
61     TDEFORMEDSHAPE, /*!< Deformed shape 3D presentation object */
62     TSCALARMAPONDEFORMEDSHAPE, /*!< Scalar map on deformed shape 3D presentation object */
63     TGAUSSPOINTS, /*!< Gauss Points 3D presentation object */
64     TPLOT3D, /*!< Plot3D 3D presentation object */
65     TCUTPLANES, /*!< Cut planes 3D presentation object */
66     TCUTLINES, /*!< Cut lines 3D presentation object */
67     TVECTORS, /*!< Vectors 3D presentation object */
68     TSTREAMLINES, /*!< Streamlines 3D presentation object */
69     TVISUGEN, /*!< %VISU generator used for performing operations with different %VISU objects */
70     TVIEWMANAGER, /*!< View manager used for performing operations with different views */
71     TRESULT, /*!< The data on which different presentations are based */
72     TXYPLOT, /*!< 2D XY plot consisting of one or several curve lines */
73     TTABLEVIEW, /*!< Table view is used for displaying data tables */
74     TVIEW3D, /*!< 3D view is used for displaying 3D graphical presentations */
75     TGAUSSVIEW, /*!< 3D view is used for displaying Gauss Points graphical presentations */
76     TENTITY, /*!< An element composing a mesh: node, edge, face or cell */
77     TFAMILY, /*!< The whole mesh can be divided into one or several submeshes, called families, which are defined by the user. Each family in its turn is composed of entities of a definite type. */
78     TGROUP, /*!< A group of families */
79     TFIELD, /*!< Field represents the results of calculations (it can be scalar or vector values), grouped together under one physical concept. */
80     TTIMESTAMP, /*!<Time stamp represents a subfield: the results of calculations are taken in one definite moment. */
81     TANIMATION, /*!< Represents Animation object. */
82     TALL
83   };
84
85   interface Base {
86     /*!
87      * Returns ID of the object.
88      */
89     IdType GetID();
90
91     /*!
92      * Returns the type of the presentable object
93      */
94     VISUType GetType();
95   };
96
97   /*!
98    *  \brief Removable object interface
99    *
100    *  Removable object interface is the root class of all removable objects.
101    */
102   interface RemovableObject : Base {
103     /*!
104      *  Remove object from study.
105      */
106     void RemoveFromStudy();
107   };
108
109   /*! \brief Presentable object interface
110    *
111    * Presentable object interface is the root class of all presentable objects.
112    */
113   interface PrsObject : RemovableObject {
114   };
115
116   //-------------------------------------------------------
117   /*! \brief %Table representation interface
118    *
119    * Presentation parameters of the %Table view.
120    */
121   interface Table : PrsObject {
122     /*!
123      * Sets the title of the table.
124      * \param theTitle String parameter defining the title of this table.
125      */
126     void SetTitle(in string theTitle);
127
128     /*!
129      * Gets the title of the table.
130      * \return A string value containing the title of the table.
131     */
132     string GetTitle();
133
134     /*!
135      * This enumeration contains a set of elements defining the orientation of the table.
136      */
137     enum Orientation {
138       HORIZONTAL, /*!< Horizontal orientation of the table. */
139       VERTIACAL   /*!< Vertical orientation of the table. */
140     };
141
142     /*!
143      * Sets orientation of the table.
144      * \param theOrientation This input parameter defines the orientation of the table.
145      *                       It is taken from the <VAR>Orientation</VAR> enumeration.
146      */
147     void SetOrientation(in Orientation theOrientation);
148
149     /*!
150      * Gets orientation of the table.
151      * \return Orientation of the table. The returned value will correspond
152      *         to one of the elements the <VAR>Orientation</VAR> enumeration.
153      */
154     Orientation GetOrientation();
155
156     /*!
157      * Gets the number of rows of the table.
158      * \return Long value corresponding to the number of rows of the table
159      */
160     long GetNbRows();
161
162     /*!
163      * Gets the number of columns of the table.
164      * \return Long value corresponding to the number of columns of the table
165      */
166     long GetNbColumns();
167   };
168
169   //-------------------------------------------------------
170   /*! \brief Interface of curve representation.
171    *
172    * Manages presentation parameters of one curve.
173    * It can be used for presentation of a set of curves using a combined presentation.
174    */
175   interface Curve : PrsObject {
176     /*!
177      * Sets the title of the curve.
178      * \param theTitle This string parameter defines the title of this curve.
179      */
180     void SetTitle(in string theTitle);
181
182     /*!
183      * Gets the title of the curve.
184      * \return String value corresponding to the title of the curve.
185      */
186     string GetTitle();
187
188     /*!
189      * Sets the color of the curve.
190      * \param theColor The color of the curve. This parameter is taken
191      *                 from the <VAR>Orientation</VAR> enumeration.
192      */
193     void SetColor(in SALOMEDS::Color theColor);
194
195     /*!
196      * Gets the color of the curve.
197      * \return Color of the curve. The returned value will correspond
198      *         to one of the elements the <VAR>Color</VAR> enumeration.
199      */
200     SALOMEDS::Color GetColor();
201
202     /*!
203      * This enumeration contains a set of elements defining the
204      * presentation type of markers (data points) with help of
205      * which the curve is constructed on the graphics.
206      */
207     enum MarkerType { NONE,
208                       CIRCLE,
209                       RECTANGLE,
210                       DIAMOND,
211                       DTRIANGLE,
212                       UTRIANGLE,
213                       LTRIANGLE,
214                       RTRIANGLE,
215                       CROSS,
216                       XCROSS
217     };
218
219     /*!
220      * Sets the presentation type of markers (data points) with help of
221      * which the curve is constructed on the graphics.
222      * \param theType This parameter defines the type of marker with help
223      *                of which the curve is constructed on the graphics.
224      *                It is taken from <VAR>MarkerType</VAR> enumeration.
225      */
226     void SetMarker(in MarkerType theType);
227
228     /*!
229      * Gets the presentation type of markers (data points) with
230      * help of which the curve is constructed on the graphics.
231      * \return The type of marker with help of which the curve is constructed
232      *         on the graphics. The returned value will correspond to
233      *         one of the elements the <VAR>MarkerType</VAR> enumeration.
234      */
235     MarkerType GetMarker();
236
237     /*!
238      * This enumeration contains a set of elements defining the
239      * type of presentation of a curve line on the graphics.
240      */
241     enum LineType{ VOIDLINE, SOLIDLINE, DASHLINE, DOTLINE, DASHDOTLINE, DASHDOTDOTLINE};
242
243     /*!
244      * Sets the type of presentation of curve lines on the graphics.
245      * \param theType This parameter defines the type of presentation of curve lines on the graphics.
246      * \param theLineWidth Long value defining the width of the curve line.
247      */
248     void SetLine(in LineType theType, in long theLineWidth);
249
250     /*!
251      * Gets the type of representation of curve lines on the graphics.
252      * \return The type of representation of curve lines on the graphics.
253      */
254     LineType GetLine();
255
256     /*!
257      * Gets the width of the curve line.
258      * \return Long value corresponding to the width of the curve line.
259      */
260     long GetLineWidth();
261   };
262
263   //-------------------------------------------------------
264   /*! \brief %Container presentable object interface
265    *
266    * This class is provided in order to create one presentation using several presentable objects.
267    * This can provide a combination of a set of curves to display them in XY plot view.
268    */
269   interface Container : PrsObject {
270     /*!
271      * Adds a curve into the container.
272      * \param theCurve The added curve.
273      */
274     void AddCurve(in Curve theCurve);
275
276     /*!
277      * Removes a curve from the container.
278      * \param theCurve The removed curve.
279      */
280     void RemoveCurve(in Curve theCurve);
281
282     /*!
283      * Gets the number of curves which are stored in the container.
284      * \return A long value corresponding to the number of curves which are stored in the container.
285      */
286     long GetNbCurves();
287
288     /*!
289      * Removes all curves from the container.
290      */
291     void Clear();
292   };
293
294   //-------------------------------------------------------
295   /*! \brief 3D presentation interface
296    *
297    * This is a root class for all 3D presentations, which can be displayed in %VISU module.
298    */
299   interface Prs3d : PrsObject, SALOME::GenericObj {
300     //interface Prs3d : PrsObject{
301     void SetOffset(in float theDx, in float theDy, in float theDz);
302     void GetOffset(out float theDx, out float theDy, out float theDz);
303   };
304
305   /*!
306    * This enumeration contains a set of elements defining the
307    * type of presentation of the mesh.
308    */
309   enum PresentationType{ POINT,
310                          WIREFRAME,
311                          SHADED,
312                          INSIDEFRAME,
313                          SURFACEFRAME,
314                          SHRINK
315   };
316
317   /*! \brief Interface of the mesh.
318    *
319    * Manages presentation parameters of a 3D presentation of a mesh.
320    * This object can be used for presentation of set of curves using Container class.
321    */
322   interface Mesh : Prs3d {
323     /*!
324      * Sets the color of mesh cells.
325      * \param theColor The color of the cells. This parameter is taken from <VAR>Color</VAR> enumeration.
326      */
327     void SetCellColor(in SALOMEDS::Color theColor);
328
329     /*!
330      * Gets the color of mesh cells.
331      */
332     SALOMEDS::Color GetCellColor();
333
334     /*!
335      * Sets the color of mesh nodes.
336      * \param theColor The color of the nodes. This parameter is taken from <VAR>Color</VAR> enumeration.
337      */
338     void SetNodeColor(in SALOMEDS::Color theColor);
339
340     /*!
341      * Gets the color of mesh nodes.
342      */
343     SALOMEDS::Color GetNodeColor();
344
345     /*!
346      * Sets the color of mesh links.
347      * \param theColor The color of the links. This parameter is taken from <VAR>Color</VAR> enumeration.
348      */
349     void SetLinkColor(in SALOMEDS::Color theColor);
350
351     /*!
352      * Gets the color of mesh links.
353      */
354     SALOMEDS::Color GetLinkColor();
355
356     /*!
357      * Sets the type of representation of a mesh.
358      * \param theType The of representation of a mesh. This parameter is
359      *                taken from <VAR>PresentationType</VAR> enumeration.
360      */
361     void SetPresentationType(in PresentationType theType);
362
363     /*!
364      * Gets the type of representation of the mesh.
365      * \return The type of representation of the mesh.
366      */
367     PresentationType GetPresentationType();
368   };
369
370
371   //-------------------------------------------------------
372   /*! \brief Basic Interface for the %Colored 3D Presentations
373    *
374    * This interface is responsable for coloring of 3D field presentations
375    * according the scalar values applied to different cells.
376    * As well it contains presentation parameters of the scalar bar. The scalar
377    * bar is displayed along with each colored field presentation and serves for
378    * consulting the correspondance between colors and data values.
379    */
380   interface ColoredPrs3d : Prs3d {
381     /*! Sets the method of coloring of the elements composing a 3D presentation.
382      */
383     void SetScalarMode(in long theScalarMode);
384
385     /*! Gets the method of coloring of the elements composing a 3D presentation.
386      */
387     long GetScalarMode();
388
389     /*!
390      * Gets the min boundary of the scalar bar.
391      */
392     double GetMin();
393
394     /*!
395      * Gets the max boundary of the scalar bar.
396      */
397     double GetMax();
398
399     /*! \brief Position of the scalar bar.
400      *
401      * Sets the position of the scalar bar origin on the screen.
402      * \param X   Horizontal position. The value can be between 0 and 1.
403      * \param Y   Vertical position. The value can be between 0 and 1.
404      */
405     void SetPosition(in double X, in double Y);
406
407     /*!
408      * Gets horizontal position of the scalar bar origin.
409      */
410     double GetPosX();
411
412     /*!
413      * Gets vertical position of the scalar bar origin.
414      */
415     double GetPosY();
416
417     /*! \brief Size of this presentable object.
418      *
419      * Sets the size of the scalar bar.
420      * \param theWidth  Width of this presentable object. The value can be between 0 and 1.
421      * \param theHeight  Height of this presentable object. The value can be between 0 and 1.
422      */
423     void SetSize(in double theWidth, in double theHeight);
424
425     /*!
426      * Gets the width of this presentable object.
427      * \return A double value corresponding to the width of this presentable object.
428      */
429     double GetWidth();
430
431     /*!
432      * Gets the height of this presentable object.
433      * \return A double value corresponding to the height of this presentable object.
434      */
435     double GetHeight();
436
437     /*!
438      * Sets the number of colors which will be used for presentation of this presentable object.
439      * \param theNbColors A long value defining the number of colors.
440      */
441     void SetNbColors(in long theNbColors);
442
443     /*!
444      * Gets the number of colors which will be used for visualization of this presentable object.
445      * \return A long value corresponding to the number of colors which
446      *         will be used for visualization of this presentable object.
447      */
448     long GetNbColors();
449
450     /*!
451      * Sets the number of labels which will be used for indication of color gradation
452      * of the scalar bar.
453      * \param theNbLabels A long value defining the number of labels.
454      */
455     void SetLabels(in long theNbLabels);
456
457     /*!
458      * Gets the number of labels which will be used for indication of color gradation of the scalar bar.
459      * \return A long value corresponding to the number of labels which will
460      *         be used for indication of color gradation of the scalar bar.
461      */
462     long GetLabels();
463
464     /*!
465      * Sets the title of the scalar bar. By default - the name of the selected result is used.
466      * \param theName String parameter defining the name of the scalar bar.
467      */
468     void SetTitle(in string theName);
469
470     /*!
471      * Gets the title of the scalar bar.
472      */
473     string GetTitle();
474   };
475
476
477   //-------------------------------------------------------
478   /*! \brief Interface of the %Scalar Map
479    *
480    * This interface is responsable for coloring of 3D field presentations
481    * according the scalar values applied to different cells.
482    * As well it contains presentation parameters of the scalar bar. The scalar
483    * bar is displayed along with each colored field presentation and serves for
484    * consulting the correspondance between colors and data values.
485    */
486   interface ScalarMap : ColoredPrs3d {
487     /*!
488      * Sets the type of scaling of the values reflected by the scalar bar.
489      * \param theScaling The value of this parameter is taken from the <VAR>Scaling</VAR> enumeration.
490      */
491     void SetScaling(in Scaling theScaling);
492
493     /*!
494      * Gets the type of scaling of the values reflected by this presentation.
495      */
496     Scaling GetScaling();
497
498     /*!
499      * Sets scalar range - min and max boundaries of the scalar bar.
500      * \param theMin  Min boundary of the scalar bar.
501      * \param theMax  Max boundary of the scalar bar.
502      */
503     void SetRange(in double theMin, in double theMax);
504
505     /*! %Orientation of the scalar bar (to provide backward compatibility). */
506     enum Orientation {
507       HORIZONTAL, /*!< Horizontal orientation of the scalar bar.*/
508       VERTICAL    /*!< Vertical orientation of the scalar bar.*/
509     };
510
511     /*!
512      * Sets the type of orientation of the scalar bar (to provide backward compatibility).
513      * \param theOrientation This parameter defines the orientation of the scalar bar.
514      *                       It is taken from the <VAR>Orientaton</VAR> enumeration.
515      */
516     void SetBarOrientation(in Orientation theOrientation);
517
518     /*!
519      * Gets the type of orientation of the scalar bar (to provide backward compatibility).
520      */
521     Orientation GetBarOrientation();
522   };
523
524   //-------------------------------------------------------
525   /*! \brief Gauss Points presentation interface
526    *
527    * Presentation parameters of the Gauss Points presentation.
528    */
529   //-------------------------------------------------------
530   interface GaussPoints : ColoredPrs3d {
531   };
532
533   /*! \brief Deformed shape presentation interface
534    *
535    * Presentation parameters of the deformed shape presentation.
536    */
537   interface DeformedShape : ScalarMap {
538     /*!
539      * Sets the scale of the presentatable object.
540      * \param theScale Double value defining the scale of this presentable object.
541      */
542     void SetScale(in double theScale);
543
544     /*!
545      * Gets the scale of the presentatable object.
546      */
547     double GetScale();
548
549     /*! This boolean method returns True if this deformed shape presentation is colored.
550      */
551     boolean IsColored();
552
553     /*! Shows this presentation in colored mode.
554      * \param theColored If this boolean parameter is True this presentable
555      *                   object will be shown in colored mode.
556      */
557     void ShowColored(in boolean theColored);
558
559     /*! Gets the color of this presentable object.
560      * \return The color of this presentable object.
561      */
562     SALOMEDS::Color GetColor();
563
564     /*! Sets the color of this presentation.
565      * \param theColor The color of this presentation. This parameter
566      *                 is taken from the <VAR>Color</VAR> enumeration.
567      */
568     void SetColor(in SALOMEDS::Color theColor);
569   };
570
571   //-------------------------------------------------------
572   /*! \brief Scalar Map on Deformed shape presentation interface
573    *
574    * Presentation parameters of the scalar map on deformed shape presentation.
575    */
576   interface ScalarMapOnDeformedShape : ScalarMap {
577     
578     /*!
579      * Sets the source ranges of pipeline
580      */
581     void SetSourceRange(in double theMinRange,in double theMaxRange);
582     /*!
583      * Gets the minimum source range of pipeline
584      */
585     double GetSourceRangeMin();
586     /*!
587      * Gets the maximum source range of pipeline
588      */
589     double GetSourceRangeMax();
590     
591     /*!
592      * Sets the scale of the presentatable object.
593      * \param theScale Double value defining the scale of this presentable object.
594      */
595     void SetScale(in double theScale);
596
597     /*!
598      * Gets the scale of the presentatable object.
599      */
600     double GetScale();
601
602     /*!
603      * Sets the scalar field
604      * \param theMeshName  - mesh name
605      * \param theFieldName - the name of scalar field
606      * \param theIteration - the iteration number for scalar field
607      * \param theEntity    - entity of scalar field
608      */
609     void SetScalarField(in string theMeshName,in string theFieldName,
610                         in long theIteration,in Entity theEntity);
611
612   };
613   //-------------------------------------------------------
614   /*!
615    *  \brief Plot3D interface
616    *
617    *  Presentation parameters of Plot3D presentation. This type of presentation
618    *  consists of deforming initial planar mesh according to values assigned to the mesh elements.
619    *  If mesh not planar but volumic one, it is possible to generate intermediate planar mesh.
620    */
621   interface Plot3D : ScalarMap {
622     /*!
623      *  This enumeration contains a set of elements defining
624      *  the type of orientation in 3D space of the cutting plane.
625      */
626     enum Orientation { XY,   /*!< The object is located in the plane formed by X and Y axis. */
627                        YZ,   /*!< The object is located in the plane formed by Y and Z axis. */
628                        ZX }; /*!< The object is located in the plane formed by Z and X axis. */
629
630     /*!
631      *  Sets the orientation in 3D space of cutting plane for the presentation.
632      *  \param theOrientation This parameter defines the type of orientation of cutting plane
633      *         in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
634      *  \param theXAngle The angle of rotation of the cutting plane
635      *         around the first axis of the chosen orientation.
636      *  \param theXAngle The angle of rotation of the cutting plane
637      *         around the second axis of the chosen orientation.
638      */
639     void SetOrientation (in Orientation theOrientation, in double theXAngle, in double theYAngle);
640
641     /*!
642      *  Gets the type of orientation in 3D space of cutting plane.
643      */
644     Orientation GetOrientationType();
645
646     /*!
647      *  Gets rotation angle of the cutting plane
648      *  around the first axis of the chosen orientation.
649      */
650     double GetRotateX();
651
652     /*!
653      *  Gets rotation angle of the cutting plane
654      *  around the second axis of the chosen orientation.
655      */
656     double GetRotateY();
657
658     /*!
659      *  Sets the position of a cutting plane.
660      *  \param thePlanePosition The position of the cutting plane.
661      *  \param theIsRelative Define, whether the input position is relative.
662      */
663     void SetPlanePosition (in double  thePlanePosition,
664                            in boolean theIsRelative);
665
666     /*!
667      *  Gets the position of the cutting plane
668      */
669     double GetPlanePosition();
670
671     /*!
672      *  Returns true if a position of cutting plane is relative
673      */
674     boolean IsPositionRelative();
675
676     /*!
677      *  Sets the scale factor for scalar values
678      *  (how much corresponding mesh elements should be translated).
679      *  \param theScaleFactor The scaling factor.
680      */
681     void SetScaleFactor (in double theScaleFactor);
682
683     /*!
684      *  Gets the scale factor for scalar values.
685      *  (how much corresponding mesh elements is translated)
686      */
687     double GetScaleFactor();
688
689     /*!
690      *  Sets presentation type: contour or surface.
691      *  \param theIsContourPrs Define, whether presentation type is contour.
692      */
693     void SetContourPrs (in boolean theIsContourPrs );
694
695     /*!
696      *  Returns true if presentation type is contour.
697      */
698     boolean GetIsContourPrs();
699
700     /*!
701      *  Sets the number of contours.
702      *  \param theNb The number of contours.
703      */
704     void SetNbOfContours (in long theNb);
705
706     /*!
707      *  Gets the number of contours.
708      */
709     long GetNbOfContours();
710   };
711
712   //-------------------------------------------------------
713   /*! \brief Cut planes interface
714    *
715    * Presentation parameters of Cut planes presentation. This type of presentation
716    * consists of cutting your initial mesh by a definite number of planes. As the
717    * result you will see these planes which will be cutted by the borders of the mesh.
718    */
719   interface CutPlanes : ScalarMap {
720     /*!
721      * This enumeration contains a set of elements defining the type of orientation in 3D space
722      * of the cut planes.
723      */
724     enum Orientation {XY, /*!< The object is located in the plane formed by X and Y axis. */
725                       YZ, /*!< The object is located in the plane formed by Y and Z axis. */
726                       ZX}; /*!< The object is located in the plane formed by Z and X axis. */
727
728     /*!
729      * Sets the type of orientation in 3D space of cut planes presentation.
730      * \param theOrientation This parameter defines the type of orientation of cut planes
731      *                       in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
732      * \param theXAngle The angle of rotation of the cut planes around
733      *                  the first axis of the chosen orientation.
734      * \param theXAngle The angle of rotation of the cut planes around
735      *                  the second axis of the chosen orientation.
736      */
737     void SetOrientation(in Orientation theOrientation, in double theXAngle, in double theYAngle);
738
739     /*!
740      * Gets the type of orientation in 3D space of cut planes presentation.
741      */
742     Orientation GetOrientationType();
743
744     /*!
745      * Gets rotation angle of the cut plane presentation around the first axis of the chosen orientation.
746      */
747     double GetRotateX();
748
749     /*!
750      * Gets rotation angle of the cut plane presentation around the second axis of the chosen orientation.
751      */
752     double GetRotateY();
753
754     /*!
755      * Sets the displacement of the cut planes in 3D space.
756      *
757      * \param theDisp This parameter defines position of the cut planes
758      * in 3D space. It varies from 0 to 1. If the chosen value is 0.5, the cut planes
759      * will be evenly located regarding each other; in other words, the distance between all
760      * of them will be equal. If the value is higher or lower than 0.5, the planes will be displaced
761      * to one or another side.
762      */
763     void SetDisplacement(in double theDisp);
764
765     /*!
766      * Gets the displacement of the cut planes in 3D space.
767      */
768     double GetDisplacement();
769
770     /*!
771      * Sets the position of a definite cut plane.
772      * \param thePlaneNumber The number of this cut plane.
773      * \param thePlanePosition The position of this cut plane.
774      */
775      void SetPlanePosition(in long thePlaneNumber, in double thePlanePosition);
776
777     /*!
778      * Sets the position of the choosen plane to default value.
779      * \param thePlaneNumber The number of this cut plane.
780      */
781      void SetDefault(in long thePlaneNumber);
782
783     /*!
784      * Gets the position of the choosen plane
785      */
786     double GetPlanePosition(in long thePlaneNumber);
787
788     /*!
789      * Determines whether the choosen plane has default position.
790      * \param thePlaneNumber The number of this cut plane.
791      */
792     boolean IsDefault(in long thePlaneNumber);
793
794     /*!
795      * Sets the number of cut planes.
796      * \param theNb The number of cut planes.
797      */
798     void SetNbPlanes(in long theNb);
799
800     /*!
801      * Gets the number of cut planes.
802      */
803     long GetNbPlanes();
804   };
805
806   //-------------------------------------------------------
807   /*! \brief Cut lines presentation.
808    *
809    * Presentation parameters of a Cut lines presentation.
810    * Cut Lines is a type of presentation which displays colored cells
811    *   with applied scalar values on the mesh where lines are placed.
812    * The procedure of construction of a Cut Lines presentation reuses the algorithm
813    *   of creation of Cut Planes presentation and consists of two steps:
814    *
815    *   1. From Cut Planes presentation one plane is taken and
816    *      it is used as base plane for construction of cut lines.
817    *   2. This plane is cut by a regular array of planes. The result of this
818    *      operation is a regular array of lines in space, belonging to the same plane
819    *      and having the same orientation. They are located inside or on the mesh.
820    */
821   interface CutLines : ScalarMap {
822     /*!
823      * Sets the type of orientation in 3D space of the base plane of a cut lines presentation.
824      * \param theOrientation The orientation of the base plane in 3D space.
825      * \param theXAngle The angle of rotation of the base plane around
826      *                  the first axis of the chosen orientation.
827      * \param theXAngle The angle of rotation of the base plane around
828      *                  the second axis of the chosen orientation.
829      */
830     void SetOrientation(in CutPlanes::Orientation theOrientation, in double theXAngle, in double theYAngle);
831
832     /*!
833      * Sets the type of orientation in 3D space of the cutting planes of a cut lines presentation.
834      * \param theOrientation This parameter defines the type of orientation of the cutting planes
835      *                       in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
836      * \param theXAngle The angle of rotation of the cutting planes
837      *                  around the first axis of the chosen orientation.
838      * \param theXAngle The angle of rotation of the cutting planes
839      *                  around the second axis of the chosen orientation.
840      */
841     void SetOrientation2(in CutPlanes::Orientation theOrientation, in double theXAngle, in double theYAngle);
842
843     /*!
844      * Gets the type of orientation in 3D space of the base plane of a cut lines presentation.
845      */
846     CutPlanes::Orientation GetOrientationType();
847
848     /*!
849      * Gets the type of orientation in 3D space of the cutting planes of a cut lines presentation.
850      */
851     CutPlanes::Orientation GetOrientationType2();
852
853     /*!
854      * Gets rotation angle of the base plane around the first axis of the chosen orientation.
855      */
856     double GetRotateX();
857
858     /*!
859      * Gets rotation angle of the cutting planes around the first axis of the chosen orientation.
860      */
861     double GetRotateX2();
862
863     /*!
864      * Gets rotation angle of the base plane around the second axis of the chosen orientation.
865      */
866     double GetRotateY();
867
868     /*!
869      * Gets rotation angle of the cutting planes around the second axis of the chosen orientation.
870      */
871     double GetRotateY2();
872
873     /*!
874      * Sets the displacement of the base plane of the cut lines presentation in 3D space.
875      *
876      * \param theDisp This parameter defines position of the base plane
877      * in 3D space. It varies from 0 to 1.
878      */
879     void SetDisplacement(in double theDisp);
880
881     /*!
882      * Sets the displacement of the cutting planes of the cut lines presentation in 3D space.
883      *
884      * \param theDisp This parameter defines position of the cutting planes
885      * in 3D space. It varies from 0 to 1.
886      */
887     void SetDisplacement2(in double theDisp);
888
889     /*!
890      * Gets the displacement of the base plane of the cut lines presentation in 3D space.
891      */
892     double GetDisplacement();
893
894     /*!
895      * Gets the displacement of the cutting planes of the cut lines presentation in 3D space.
896      */
897     double GetDisplacement2();
898
899     /*! Sets the position of the base plane in 3D space.
900      * \param thePlanePosition A double value defining the position of the base plane in 3D space.
901      */
902     void SetBasePlanePosition(in double thePlanePosition);
903
904     /*! Gets the position of the base plane in 3D space.
905      */
906     double GetBasePlanePosition();
907
908     /*! Sets the position of one of cutting planes in 3D space.
909      * \param thePlaneNumber A long value defining the order number of this cutting plane.
910      * \param thePlanePosition A double value defining the position of the base plane in 3D space.
911      */
912     void SetLinePosition(in long thePlaneNumber, in double thePlanePosition);
913
914     /*! Gets the position of one of cutting planes in 3D space.
915      * \param thePlaneNumber A long value defining the order number of this cutting plane.
916      */
917     double GetLinePosition(in long thePlaneNumber);
918
919     /*! Sets the position of the base plane to default value.
920      */
921     void SetDefault();
922
923     /*!
924      * Determines whether the base plane has default position.
925      * \return True if the base plane has default position.
926      */
927     boolean IsDefault();
928
929     /*!
930      * Sets the position of the choosen cutting plane to default value.
931      * \param thePlaneNumber The number of this cutting plane.
932      */
933     void SetDefaultPosition(in long thePlaneNumber);
934
935     /*!
936      * Determines whether the choosen cutting plane has default position.
937      * \param thePlaneNumber The number of this cutting plane.
938      * \return True if this cutting plane has default position.
939      */
940     boolean IsDefaultPosition(in long thePlaneNumber);
941
942     /*!
943      * Sets the number of cut lines.
944      * \param theNb The number of cut lines.
945      */
946     void SetNbLines(in long theNb);
947
948     /*!
949      * Gets the number of cut lines.
950      */
951     long GetNbLines();
952   };
953
954   /*! \brief Interface of the stream lines representation
955    *
956    * This interface contains presentation parameters of stream lines presentations.
957    * <BR>Stream lines is a type of presentation transforming into lines the
958    * cells with vectors having most similar direction. A stream line can be thought
959    * of as the path that a massless particle takes in a vector field.
960    * Streamlines are used to convey the structure of a vector field.
961    * Usually streamlines are created to explore the most interesting features in the field.
962    */
963   interface StreamLines : DeformedShape {
964     /*! This enumerations contains a set of elements necessary
965      * for definition of direction of the stream lines.
966      */
967     enum Direction{ FORWARD,
968                     BACKWARD,
969                     BOTH
970     };
971
972     /*! Sets the parameters of the stream lines presentation.
973      * \param theIntStep Inegration step is a parameter of smoothness of the stream lines.
974      *                   This parameter defines the accuracy of construction of the streamlines.
975      *                   A smaller value of this parameter allows to construct smoother
976      *                   streamlines (at the cost of more computation time).
977      * \param thePropogationTime This parameter controls the maximum length of
978      *                           the stream line (measured in units of time).
979      * \param theStepLength This parameter defines the size of the output line segments
980      *                      that make up the streamline (which is represented as a polyline).
981      * \param thePrs3d The source presentation. The points of the field located on this source
982      *                 presentation will serve as starting points for generation of stream lines.
983      * \note If this parameter is not defined, your stream lines
984      *       presentation will be generated on all points of the field.
985      * \param thePercents This parameter defines the quantity of points of the field
986      *                    (from 0 to 100%) which will be used as starting points for
987      *                    construction of the stream lines. Thus, the value of this
988      *                    parameter can vary from 0 to 1.
989      * \param theDirection Direction of the stream lines (Forward, Backward or Both).
990      * \return True if all parameters are properly set.
991      */
992     boolean SetParams(in double theIntStep,
993                       in double thePropogationTime,
994                       in double theStepLength,
995                       in Prs3d thePrs3d,
996                       in double thePercents,
997                       in Direction theDirection);
998
999     /*! Gets the value of integration step of the stream lines presentation.
1000      */
1001     double GetIntegrationStep();
1002
1003     /*! Gets the value of propagation time of the stream lines presentation.
1004      */
1005     double GetPropagationTime();
1006
1007     /*! Gets the value of step length of the stream lines presentation.
1008      */
1009     double GetStepLength();
1010
1011     /*! Returns the source presentation used for generation of the stream lines.
1012      */
1013     Prs3d GetSource();
1014
1015     /*! Gets the quantity of points of the field used as starting
1016      *  points for generation of the stream lines presentation.
1017      */
1018     double GetUsedPoints();
1019
1020     /*! Returns the direction of the stream lines.
1021      */
1022     Direction GetDirection();
1023   };
1024
1025   /*! \brief Interface of the isometric surface presentation
1026    *
1027    * This interface contains presentation parameters of
1028    * isometric surface presentations.
1029    * <BR>Iso surfaces presentation combines all equal scalar
1030    * values on the cells and on the basis of them constructs
1031    * isobaric surfaces, which form this presentation.
1032    */
1033   interface IsoSurfaces : ScalarMap {
1034     /*!
1035      * Sets the number of isometric surfaces.
1036      * \param theNb A long value defining the number of isometric surfaces
1037      *              which will be used for construction of this presentation.
1038      */
1039     void SetNbSurfaces(in long theNb);
1040
1041     /*!
1042      * Gets the number of isometric surfaces
1043      */
1044     long GetNbSurfaces();
1045   };
1046
1047   //-------------------------------------------------------
1048   /*! \brief Interface of the vector presentation.
1049    *
1050    * This interface contains presentation parameters of vector presentations.
1051    */
1052   interface Vectors : DeformedShape {
1053     /*!
1054      * Sets the width of the lines of the vectors.
1055      * \param theWidth A double value defining the width of the lines of the vectors.
1056      */
1057     void SetLineWidth(in double theWidth);
1058
1059     /*!
1060      * Gets the width of the lines of the vectors.
1061      */
1062     double GetLineWidth();
1063
1064     /*!
1065      * This enumeration contains a set of elements defining the type of representation of the vector head.
1066      */
1067     enum GlyphType{ ARROW,
1068                     CONE2,
1069                     CONE6,
1070                     NONE
1071                   };
1072
1073     /*!
1074      * Sets the type of representation of the vector head.
1075      * \param theType This parameter defines the type of representation of the vector head.
1076      * This value is taken from the <VAR>GlyphType</VAR> enumeration.
1077      */
1078     void SetGlyphType(in GlyphType theType);
1079
1080     /*!
1081      * Gets the type of representation of the vector head.
1082      */
1083     GlyphType GetGlyphType();
1084
1085     /*!
1086      * This enumeration contains a set of elements defining the position of the vector head.
1087      */
1088     enum GlyphPos{ CENTER, /*!<In the center of the vector.*/
1089                    TAIL,   /*!<In the tail of the vector.*/
1090                    HEAD  /*!<In the head of the vector.*/
1091                  };
1092
1093     /*!
1094      * Sets the position of the vector head.
1095      * \param thePos This parameter defines the position of the vector head.
1096      * This value is taken from the <VAR>GlyphPos</VAR> enumeration.
1097      */
1098     void SetGlyphPos(in GlyphPos thePos);
1099
1100     /*!
1101      * Gets the position of the vector head.
1102      */
1103     GlyphPos GetGlyphPos();
1104   };
1105
1106   //-------------------------------------------------------
1107   /*! \brief %Animation class
1108    *
1109    * This class provides a set of methods used for:<br>
1110    * <ul>
1111    *     <li> generating different animations on the basis of a field,
1112    *     <li> setting the parameters of the animations,
1113    *     <li> playing these animations in the %VISU module.
1114    * </ul>
1115    * \note
1116    * <BR><B>Field</B> represents the results of calculations
1117    * (it can be scalar or vector values), grouped together under one physical concept.
1118    * <BR><B>Time stamp</B> represents a subfield: the results
1119    * of calculations are taken in one definite moment.
1120    */
1121   interface Animation : Base {
1122     /*! Defines the field which will be used as a base for generation of the animation.
1123      * \param theObject The %SObject corresponding to the field.
1124      */
1125     void addField(in SALOMEDS::SObject theObject);
1126
1127     /*! Generates presentations on the basis of the field.
1128      * \param theFieldNum The number of the field, which will be used
1129      *                    as the basis for construction of the presentation.
1130      */
1131     void generatePresentations(in long theFieldNum);
1132
1133     /*! Generates a set of frames from the created by the method
1134      *  <VAR>generatePresentations</VAR>3D presentations. A sequence of
1135      *  these frames will be transformed into an animation.
1136      *  \return  True, if the frames have been successfully generated.
1137      */
1138     boolean generateFrames();
1139
1140     /*! Clears the view before starting an animation.
1141      */
1142     void clearView();
1143
1144     /*! \name Playback of an animation:
1145      */
1146 /*@{*/
1147
1148     /*! Starts an animation.
1149      */
1150     void startAnimation();
1151
1152     /*! Stops an animation.
1153      */
1154     void stopAnimation();
1155
1156     /*! Forwards to the next frame.
1157      */
1158     void nextFrame();
1159
1160     /*! Returns to the previous frame.
1161      */
1162     void prevFrame();
1163
1164     /*! Returns to the first frame of the animation.
1165      */
1166     void firstFrame();
1167
1168     /*! Forwards to the last frame of the animation.
1169      */
1170     void lastFrame();
1171
1172     /*!  Passes to a definite frame of the animation.
1173      * \param theFrame A long value defining the number of the frame.
1174      */
1175     void gotoFrame(in long theFrame);
1176 /*@}*/
1177
1178     /*! Gets the number of time stamps (subfields) contained in the given field.
1179      */
1180     long getNbFields();
1181
1182     /*! Gets the number of generated frames
1183      */
1184     long getNbFrames();
1185
1186     /*! Returns True, if the animation is currently running.
1187      */
1188     boolean isRunning();
1189
1190     /*! Returns the number of the current frame.
1191      */
1192     long getCurrentFrame();
1193
1194     /*!
1195      */
1196     ColoredPrs3d getPresentation(in long theField, in long theFrame);
1197
1198     /*! Sets the type of presentation (vectors, deformed shape etc.)
1199      *  which will be generated by the method <VAR>generatePresentations</VAR>.
1200      */
1201     void setPresentationType(in long theFieldNum, in VISUType theType);
1202
1203     /*! Gets the type of presentation (vectors, deformed shape etc.) which will
1204      * be generated by the method <VAR>generatePresentations</VAR>.
1205      */
1206     VISUType getPresentationType(in long theFieldNum);
1207
1208     /*! Sets the speed of the animation.
1209      * \param theSpeed The speed of the animation. The value varies from 1 to 99.
1210      */
1211     void setSpeed(in long theSpeed);
1212
1213     /*!  Gets the speed of the animation.
1214      */
1215     long getSpeed();
1216
1217     /*! Ruturns True, if playback of the animation is proportional.
1218      * This option allows to render your animation with proportional periods
1219      * of time between every frame (not depending on the time stamps).
1220      */
1221     boolean isProportional();
1222
1223     /*! Sets the range of the animation. The range is defined on the basis of
1224      *  the time stamps of the field which have been used for generation of the animation.
1225      *  This method allows to bound the range of generated frames.
1226      *  If this method is not used, the animation will be generated
1227      *  on the basis of all time stamps contained in the field.
1228      *  \param theMin The value of the first time stamp which will be used for generation of the animation.
1229      *  \param theMax The value of the last time stamp which will be used for generation of the animation.
1230      */
1231     void setAnimationRange(in double theMin, in double theMax);
1232
1233     /*! Gets the number of the first time stamp which will be used for generation of the animation.
1234      */
1235     double getMinRange();
1236
1237     /*! Gets the number of the last time stamp which will be used for generation of the animation.
1238      */
1239     double getMaxRange();
1240
1241     /*! Returns True if the range of the animation has been defined
1242      *  by the method <VAR>setAnimationRange</VAR>. Otherwise
1243      *  the animation will be generated on the basis of all time stamps contained in the field.
1244      */
1245     boolean isRangeDefined();
1246
1247     /*! Saves all the frames composing the animation into a definite directory.
1248      *  Pictures format is set with method <VAR>setDumpFormat()</VAR>.
1249      *  \param thePath The directory where all the frames will be saved.
1250      */
1251     void dumpTo(in string thePath);
1252
1253     /*! Set format for saving all the frames composing the animation.
1254      *  \param theFormat The format for saving pictures.
1255      *                   For available formats see QImageIO documentation (Qt).
1256      *                   If specified format is not available, default format will be used.
1257      *                   Default format is JPEG or first of supported, if JPEG is not available.
1258      *  \return Really set format. Differ from \a theFormat if \a theFormat is not available.
1259      */
1260     string setDumpFormat(in string theFormat);
1261
1262     /*! Returns True, if the playback of the animation is cycling.
1263      */
1264     boolean isCycling();
1265
1266     /*! Gets the first time stamp of the field defined at the input of the animation.
1267      * \note This method is used if animation range is <b>NOT</b> defined.
1268      */
1269     double getMinTime();
1270
1271     /*! Gets the last time stamp of the field defined at the input of the animation.
1272      * \note This method is used if animation range is <b>NOT</b> defined.
1273      */
1274     double getMaxTime();
1275
1276     /*! Sets proprtional playback of the animation. This option allows to render your animation
1277      *  with proportional periods of time between every frame (not depending on the time stamps).
1278      *  \param theProp If this boolean parameter is True, playback
1279      *                 of your animation will be set as proportional.
1280      */
1281     void setProportional(in boolean theProp);
1282
1283     /*! Sets cycling playback of the animation. The number of cycles
1284      *  can be infinite, untill you use <VAR>startAnimation</VAR> method.
1285      *  \param theCycle If this boolean parameter is True, playback
1286      *                  of your animation will be set as cycling.
1287      */
1288     void setCycling(in boolean theCycle);
1289
1290     SALOMEDS::SObject publishInStudy();
1291
1292     void saveAnimation();
1293
1294     void restoreFromStudy(in SALOMEDS::SObject theSObj);
1295
1296     boolean isSavedInStudy();
1297   };
1298
1299   /*! \brief Interface %Result
1300    *
1301    * This interface serves for inner representation of data generated
1302    * in other sources (MED object or file). This data is needed
1303    * for further construction of graphical presentations.
1304    */
1305   interface Result : RemovableObject, SALOME::GenericObj {
1306     /*! Reads all data from the corresponding sources. By default the data is loaded on demand.
1307      */
1308     boolean BuildAll();
1309
1310     /*! Start to parse the source MED file and publish all its entities into the study*/
1311     boolean Build(in boolean theIsBuildAll, in boolean theIsAtOnce);
1312
1313     /*! Allow to check is all requested MED entites already loaded or not */
1314     boolean IsDone();
1315
1316     /*! Allow to check is corresponding MED entites already loaded or not */
1317     boolean IsEntitiesDone();
1318
1319     /*! Choose to parse MED fields and perform global min / max on the MED timestamps.*/
1320     void SetBuildFields(in boolean theIsBuildFields, in boolean theIsCalculateMinMax);
1321
1322     /*! Allow to check is corresponding MED fields already loaded or not */
1323     boolean IsFieldsDone();
1324
1325     /*! Choose to parse MED groups.*/
1326     void SetBuildGroups(in boolean theIsBuildGroups);
1327
1328     /*! Allow to check is corresponding MED groups and families already loaded or not */
1329     boolean IsGroupsDone();
1330
1331     /*! Allow to check is min / max calculation over field's components already perfrormed or not */
1332     boolean IsMinMaxDone();
1333   };
1334
1335   //-------------------------------------------------------
1336   interface ViewManager;
1337   interface View3D;
1338
1339   /*! \brief %VISU_Gen interface
1340    *
1341    * This is the main interface of %VISU component. It is necessary for creation of
1342    * post-processing presentations from given %Result and %Table object reference,
1343    * using the views provided by %ViewManager.
1344    */
1345   interface VISU_Gen : Engines::Component, SALOMEDS::Driver, Base {
1346     /*! Sets a definite study to be current.
1347      */
1348     void SetCurrentStudy(in SALOMEDS::Study theStudy);
1349
1350     /*! Gets the current study.
1351      */
1352     SALOMEDS::Study GetCurrentStudy();
1353
1354     /*!
1355      * Gets the %View Manager which is used for creation of
1356      * post-processing presentations.
1357      */
1358     ViewManager GetViewManager();
1359
1360     /*!
1361      * Imports tables from a file and create TableAttribute in Sudy
1362      */
1363     SALOMEDS::SObject ImportTables(in string theFileName);
1364
1365     /*!
1366      * Export table to a file
1367      */
1368     boolean ExportTableToFile(in SALOMEDS::SObject theTable, in string theFileName);
1369
1370     /*!
1371      * Imports data from a file. The access to this file will be conserved outside of the application.
1372      * \param theFileName String parameter defining the name of the file
1373      *                    from which the data will be imported.
1374      */
1375     Result ImportFile(in string theFileName);
1376
1377     /*!
1378      * Create result and initialize its with the file. The access to this file will be conserved outside of the application.
1379      * \param theFileName String parameter defining the name of the file
1380      *                    from which the data will be imported.
1381      */
1382     Result CreateResult(in string theFileName);
1383
1384     /*!
1385      * Imports data from a file. The access to this file will closed.
1386      * \param theFileName String parameter defining the name of the file
1387      *                    from which the data will be imported.
1388      */
1389     Result CopyAndImportFile(in string theFileName);
1390
1391     /*!
1392      * Imports data from a %MED object.
1393      */
1394     Result ImportMed(in SALOMEDS::SObject theMedSObject);
1395
1396     /*!
1397      * Imports data from a %MED field.
1398      */
1399     Result ImportMedField(in SALOME_MED::FIELD theField);
1400
1401     /*!
1402      * Creates a mesh on the basis of the data generated in other sources (MED object or file).
1403      * \param theResult   Data generated in other sources. (MED object or file)
1404      * \param theMeshName  One of the meshes presented in MED file
1405      * \param theEntity Type of entity where the field is defined
1406      */
1407     Mesh MeshOnEntity(in Result theResult, in string theMeshName, in Entity theEntity);
1408
1409     /*!
1410      * Creates on the basis of a family a mesh  which will be composed of geometrical
1411      * elements, corresponding to the type of cells (node, edge, face or cell) of this family.
1412      * \param theResult   Data generated in other sources. (MED object or file)
1413      * \param theMeshName  One of the meshes presented in MED file
1414      * \param theEntity Type of entity where the field is defined.
1415      */
1416     Mesh FamilyMeshOnEntity(in Result theResult, in string theMeshName,
1417                             in Entity theEntity, in string theFamilyName);
1418
1419     /*!
1420      * Creates a mesh on the basis of a group of families.
1421      * \param theResult   Data generated in other sources. (MED object or file)
1422      * \param theMeshName  One of the meshes presented in MED file
1423      * \param theGroupName Name of the group.
1424      */
1425     Mesh GroupMesh(in Result theResult, in string theMeshName, in string theGroupName);
1426
1427     /*!
1428      * Creates a scalar map presentation.
1429      * \param theResult    Data generated in other sources. (MED object or file)
1430      * \param theMeshName  One of the meshes presented in MED file
1431      * \param theEntity    Type of entity where the field is defined
1432      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1433      * \param theIteration Number of iteration on the field
1434      */
1435     ScalarMap ScalarMapOnField(in Result theResult, in string theMeshName,
1436                                in Entity theEntity, in string theFieldName,
1437                                in double theIteration);
1438
1439     /*!
1440      * Creates a Gauss Points presentation.
1441      * \param theResult    Data generated in other sources. (MED object or file)
1442      * \param theMeshName  One of the meshes presented in MED file
1443      * \param theEntity    Type of entity where the field is defined
1444      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1445      * \param theIteration Number of iteration on the field
1446      */
1447     GaussPoints GaussPointsOnField(in Result theResult, in string theMeshName,
1448                                    in Entity theEntity, in string theFieldName,
1449                                    in double theIteration);
1450
1451     /*!
1452      * Creates a deformed shape presentation.
1453      * \param theResult    Data generated in other sources. (MED object or file)
1454      * \param theMeshName  One of the meshes presented in MED file
1455      * \param theEntity    Type of entity where the field is defined
1456      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1457      * \param theIteration Number of iteration on the field
1458      */
1459     DeformedShape DeformedShapeOnField(in Result theResult, in string theMeshName,
1460                                        in Entity theEntity, in string theFieldName,
1461                                        in double theIteration);
1462
1463     /*!
1464      * Creates a deformed shape presentation.
1465      * \param theResult    Data generated in other sources. (MED object or file)
1466      * \param theMeshName  One of the meshes presented in MED file
1467      * \param theEntity    Type of entity where the field is defined
1468      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1469      * \param theIteration Number of iteration on the field
1470      */
1471     ScalarMapOnDeformedShape ScalarMapOnDeformedShapeOnField(in Result theResult, in string theMeshName,
1472                                                              in Entity theEntity, in string theFieldName,
1473                                                              in double theIteration);
1474
1475     /*!
1476      * Creates a vector presentation.
1477      * \param theResult    Data generated in other sources. (MED object or file)
1478      * \param theMeshName  One of the meshes presented in MED file
1479      * \param theEntity    Type of entity where the field is defined
1480      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1481      * \param theIteration Number of iteration on the field
1482      */
1483     Vectors VectorsOnField(in Result theResult, in string theMeshName,
1484                            in Entity theEntity, in string theFieldName,
1485                            in double theIteration);
1486
1487     /*!
1488      * Creates an iso surface presentation.
1489      * \param theResult    Data generated in other sources. (MED object or file)
1490      * \param theMeshName  One of the meshes presented in MED file
1491      * \param theEntity    Type of entity where the field is defined
1492      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1493      * \param theIteration Number of iteration on the field
1494      */
1495     IsoSurfaces IsoSurfacesOnField(in Result theResult, in string theMeshName,
1496                                    in Entity theEntity, in string theFieldName,
1497                                    in double theIteration);
1498
1499     /*!
1500      * Creates an stream lines presentation.
1501      * \param theResult    Data generated in other sources. (MED object or file)
1502      * \param theMeshName  One of the meshes presented in MED file
1503      * \param theEntity    Type of entity where the field is defined
1504      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1505      * \param theIteration Number of iteration on the field
1506      */
1507     StreamLines StreamLinesOnField(in Result theResult, in string theMeshName,
1508                                    in Entity theEntity, in string theFieldName,
1509                                    in double theIteration);
1510
1511     /*!
1512      * Creates a presentation of cut planes.
1513      * \param theResult    Data generated in other sources. (MED object or file)
1514      * \param theMeshName  One of the meshes presented in MED file
1515      * \param theEntity    Type of entity where the field is defined
1516      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1517      * \param theIteration Number of iteration on the field
1518      */
1519     CutPlanes CutPlanesOnField(in Result theResult, in string theMeshName,
1520                                in Entity theEntity, in string theFieldName,
1521                                in double theIteration);
1522
1523     /*!
1524      * Creates a presentation of cut lines.
1525      * \param theResult    Data generated in other sources. (MED object or file)
1526      * \param theMeshName  One of the meshes presented in MED file
1527      * \param theEntity    Type of entity where the field is defined
1528      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1529      * \param theIteration Number of iteration on the field
1530      */
1531     CutLines CutLinesOnField(in Result theResult, in string theMeshName,
1532                              in Entity theEntity, in string theFieldName,
1533                              in double theIteration);
1534
1535     /*!
1536      * Creates a Plot3D presentation.
1537      * \param theResult    Data generated in other sources. (MED object or file)
1538      * \param theMeshName  One of the meshes presented in MED file
1539      * \param theEntity    Type of entity where the field is defined
1540      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1541      * \param theIteration Number of iteration on the field
1542      */
1543     Plot3D Plot3DOnField(in Result theResult, in string theMeshName,
1544                          in Entity theEntity, in string theFieldName,
1545                          in double theIteration);
1546
1547     /*!
1548      * Creates a table presentation.
1549      * \param theTableEntry The entry of the table which will be displayed.
1550      */
1551     Table CreateTable(in string theTableEntry);
1552
1553     /*!
1554      * Creates a curve on the basis of points, whose values are taken from the table.
1555      * \param theTable  Table containing the data for construction of curves.
1556      * \param HRow  Index of the row in the table:  abscissa of the point.
1557      * \param VRow  Index of the row in the table:  ordinate of the point.
1558      */
1559     Curve CreateCurve(in Table theTable, in long theHRow, in long theVRow);
1560
1561     /*!
1562      * Creates a presentation form containing an array of references to the curves.
1563      */
1564     Container CreateContainer();
1565
1566     /*! Creates an animation in the 3D view.
1567      * \param theView3d The 3D view, where the animation will be rendered.
1568      */
1569     Animation CreateAnimation(in View3D theView3d);
1570
1571     void DeleteResult(in Result theResult);
1572
1573     void DeletePrs3d(in Prs3d thePrs3d);
1574   };
1575
1576   /*! \brief %View interface
1577    *
1578    * Contains a set of methods used by the %View frame, which can be one of
1579    * the following types: 3d, Table, XY plot.
1580    * %View interface is a base for all types of %view interfaces.
1581    */
1582   interface View: Base {
1583
1584     /*! \brief %ViewRepresentation enumeration
1585      *
1586      * displaying part ("ALL" isn't setable)
1587      */
1588     enum ViewRepresentation {
1589       OBJECTBROWSER,
1590       VIEWER,
1591       PYTHON,
1592       MESSAGES
1593     };
1594
1595     void ShowPart (in ViewRepresentation ViewRepr, in boolean state );
1596
1597     boolean IsPartShown( in ViewRepresentation ViewRepr );
1598
1599     /*!
1600      *  New methods for view parameters management.
1601      */
1602
1603     /*! \brief Split workarea of this view.
1604      *
1605      *  Horizontally split workarea of this view.
1606      *  This view is moved in a new right area.
1607      */
1608     void SplitRight();
1609
1610     /*! \brief Split workarea of this view.
1611      *
1612      *  Horizontally split workarea of this view.
1613      *  This view stays in an old left area, others are moved in a new right area.
1614      */
1615     void SplitLeft();
1616
1617     /*! \brief Split workarea of this view.
1618      *
1619      *  Vertically split workarea of this view.
1620      *  This view is moved in a new bottom area.
1621      */
1622     void SplitBottom();
1623
1624     /*! \brief Split workarea of this view.
1625      *
1626      *  Vertically split workarea of this view.
1627      *  This view stays in an old top area, others are moved in a new bottom area.
1628      */
1629     void SplitTop();
1630
1631     /*!
1632      *  Put this view window on top of its work area.
1633      */
1634     void OnTop();
1635
1636     /*!
1637      *  Put \a theView in workarea of this view right after it.
1638      *  If \a theView was alone in its workarea, workarea of \a theView will be destroyed.
1639      *  If \a theView was in the same workarea with this view, simple reordering will take place.
1640      *  \param theView A view window to be attracted to this one.
1641      */
1642     void Attract (in View theView);
1643
1644     /*!
1645      *  Put all the view windows from workarea of \a theView in workarea of this view right after it.
1646      *  Workarea of \a theView will be destroyed.
1647      *  If \a theView was in the same workarea with this view, simple reordering will take place.
1648      *  \param theView A view window to be attracted to this one together with all its workarea.
1649      */
1650     void AttractAll (in View theView);
1651
1652     /*!
1653      *  Set position of this view window relatively its splitter.
1654      *  \param thePosition Desired position of this view window relatively
1655      *         its splitter. Meaningfull values lays in range [0..1].
1656      *
1657      *  Direction of positioning is defined by the splitter orientation.
1658      */
1659     void SetRelativePositionInSplitter (in double thePosition);
1660
1661     /*!
1662      *  Set size of this view window relatively its splitter.
1663      *  \param theSize Desired size of this view window relatively
1664      *         its splitter. Meaningfull values lays in range [0..1].
1665      *
1666      *  Direction of resizing is defined by the splitter orientation.
1667      */
1668     void SetRelativeSizeInSplitter (in double theSize);
1669
1670     /*!
1671      *  Set horizontal position of this view window relatively its workstack.
1672      *  \param thePosition Desired horizontal position of this view window
1673      *         relatively its workstack. Meaningfull values lays in range [0..1].
1674      */
1675     void SetRelativePositionX (in double thePosition);
1676
1677     /*!
1678      *  Set vertical position of this view window relatively its workstack.
1679      *  \param thePosition Desired vertical position of this view window
1680      *         relatively its workstack. Meaningfull values lays in range [0..1].
1681      */
1682     void SetRelativePositionY (in double thePosition);
1683
1684     /*!
1685      *  Set horizontal size of this view window relatively its workstack.
1686      *  \param theSize Desired horizontal size of this view window relatively
1687      *         its workstack. Meaningfull values lays in range [0..1].
1688      */
1689     void SetRelativeSizeX (in double theSize);
1690
1691     /*!
1692      *  Set vertical size of this view window relatively its workstack.
1693      *  \param theSize Desired vertical size of this view window relatively
1694      *         its workstack. Meaningfull values lays in range [0..1].
1695      */
1696     void SetRelativeSizeY (in double theSize);
1697
1698     /*!
1699      *  Old methods for view parameters management, they don't work now
1700      */
1701     void SetViewWidth (in long Width); //setting width of view
1702     void SetViewHeight (in long Height); //setting height of view
1703     long GetViewWidth(); //getting view width
1704     long GetViewHeight(); //getting view height
1705     enum ViewPosition {TOP, CENTER, BOTTOM, RIGHT, LEFT}; //position of the study frame
1706     void SetViewPositionHorizontal (in ViewPosition ViewPosHor); //setting of the horizontal view position
1707     void SetViewPositionVertical (in ViewPosition ViewPosVer); //setting of the vertical view position
1708     void SetRelativePosition( in double x, in double y );
1709     void SetRelativeSize( in double x, in double y );
1710     void Minimize(); // Minimizes to the task bar or to the bottom of the Desktop the %View frame.
1711     void Restore(); // Restores the %View frame.
1712     void Maximize(); // Maximizes the %View frame.
1713
1714     /*!
1715      * Sets the title of the %View frame.
1716      * \param theTitle String parameter defining the title of the %View frame.
1717      */
1718     void SetTitle(in string theTitle);
1719
1720     /*!
1721      * Gets the title of the %View frame.
1722      */
1723     string GetTitle();
1724
1725     /*!
1726      * Sets background color of the %View frame.
1727      * \param theColor Background color defined in <VAR>SALOMEDS::Color</VAR> enumeration.
1728      */
1729     void SetBackground(in SALOMEDS::Color theColor);
1730
1731     /*!
1732      * Gets background color of the %View frame.
1733      */
1734     SALOMEDS::Color GetBackground();
1735
1736     /*!
1737      * Removes all presentations (presentable objects) from the %view.
1738      */
1739     void EraseAll();
1740
1741     /*!
1742      * Displays all presentations (presentable objects) in the %view.
1743      */
1744     void DisplayAll();
1745
1746     /*!
1747      * Removes a definite presentation (presentable object) from the %view.
1748      * \param thePrsObj The presentation (presentable object) which should be deleted.
1749      */
1750     void Erase(in PrsObject thePrsObj);
1751
1752     /*!
1753      * Displays a definite presentation (presentable object) in the %view.
1754      * \param thePrsObj The presentation (presentable object) which should be displayed.
1755      */
1756     void Display(in PrsObject thePrsObj);
1757
1758     /*!
1759      * Allows to display only a definite presentation (presentable object) in the %view.
1760      * All other presentations are removed from the %view.
1761      * \param thePrsObj The presentation (presentable object) which should be displayed.
1762      */
1763     void DisplayOnly(in PrsObject thePrsObj);
1764
1765     /*!
1766      * Updates the view.
1767      */
1768     void Update();
1769
1770     /*!
1771      * Saves the view.
1772      * \param theFileName The name of the file where the view will be saved.
1773      * \return True, if the view have been saved successfully.
1774      */
1775     boolean SavePicture(in string theFileName);
1776   };
1777
1778   //-------------------------------------------------------
1779   /*! \brief 3D view interface
1780    *
1781    *  This interface contains a set of methods necessary for representation of objects in 3D space.
1782    */
1783   interface View3D : View {
1784     /*!
1785      * This enumeration contains a set of elements determining a predefined point of view
1786      *  (position of the camera in 3D space relative to the presentable object).
1787      */
1788     enum ViewType{ FRONT, BACK, LEFT, RIGHT, TOP, BOTTOM};
1789
1790     /*!
1791      * This enumeration contains a set of elements determining the axis
1792      */
1793     enum Axis{ XAxis, YAxis, ZAxis};
1794
1795     /*!
1796      * Data type defining coordinates in 3D space.
1797      */
1798     typedef double XYZ[3];
1799
1800     /*!
1801      * Makes all presentations, which are currently present in the %view, completely visible.
1802      */
1803     void FitAll();
1804
1805     /*!
1806      * Sets a predefined point of view (FRONT, BACK, LEFT, RIGHT, TOP, BOTTOM). (In other words it means
1807      * a predefined position of the camera in 3D space with respect to the object which is represented.)
1808      */
1809     void SetView(in ViewType theType);
1810
1811     /*!
1812      * Sets the position of the camera in 3D space.
1813      * This point is used as the first point of the vector
1814      * defining the view direction of the camera.
1815      */
1816     void SetPointOfView(in XYZ theCoord);
1817
1818     /*!
1819      * Gets the position of the camera in 3D space.
1820      * This point is used as the first point of the vector
1821      * defining the view direction of the camera.
1822      */
1823     XYZ GetPointOfView();
1824
1825     /*!
1826      * Sets the vertical line of the camera in 3D space.
1827      */
1828     void SetViewUp(in XYZ theDir);
1829
1830     /*!
1831      * Gets the vertical line of the camera in 3D space.
1832      */
1833     XYZ GetViewUp();
1834
1835     /*!
1836      * Sets the point of sight of the camera. This point is used as the
1837      * second point of the vector defining the view direction of the camera.
1838      */
1839     void SetFocalPoint(in XYZ theDir);
1840
1841     /*!
1842      * Gets the point of sight of the camera. This point is used as the
1843      * second point of the vector defining the view direction of the camera.
1844      */
1845     XYZ GetFocalPoint();
1846
1847     /*!
1848      * Zooming of the presentable object. Sets the scale.
1849      */
1850     void SetParallelScale(in double theScale);
1851
1852     /*!
1853      * Zooming of the presentable object. Gets the scale.
1854      */
1855     double GetParallelScale();
1856
1857     /*!
1858      * Scaling of the view along a definite axis.
1859      * \param theAxis The axis of the scaling
1860      * \param theParam The coefficient of the scaling
1861      */
1862     void ScaleView(in Axis theAxis, in double theParam);
1863
1864     /*!
1865      * Removes the scaling of the view.
1866      */
1867     void RemoveScale();
1868
1869     /*!
1870      * Saves view parameters.
1871      * \return True if the view parameters have been created, False if the parameters have been modified.
1872      * \param theName The name under which the view parameters will be saved.
1873      */
1874     boolean SaveViewParams(in string theName);
1875
1876     /*! Restores view parameters.
1877      * \return True if the view parameters have been found and applied to the view,
1878      * False if the parameters with this name don't exist.
1879      * \param theName The name of the view parameters which will be restored.
1880      */
1881     boolean RestoreViewParams(in string theName);
1882   };
1883
1884   //-------------------------------------------------------
1885   /*! \brief Interface of the Table view
1886    *
1887    * This interface is used for creation of a view necessary for presentation of a table.
1888    */
1889   interface TableView : View {
1890   };
1891
1892   //-------------------------------------------------------
1893   /*! \brief Interface of the 2D plot view
1894    *
1895    * This interface is used for creation of a view necessary for presentation
1896    * of a XY plot generated on the basis of one or several curve lines.
1897    */
1898   interface XYPlot : View {
1899     /*! Sets the title of the XY plot
1900      * \param theTitle  The title of the XY plot
1901      */
1902     void SetSubTitle(in string theTitle);
1903
1904     /*! Gets the title of the XY plot
1905      */
1906     string GetSubTitle();
1907
1908     /*!
1909      * This enumeration contains a set of elements determining the type
1910      * of the curve lines, which will be displayed in your XY plot.
1911      */
1912     enum CurveType { POINTS, MULTYLINE, SPLINE};
1913
1914     /*! Sets the type of the curve lines.
1915      * \param theType The type of the curve lines taken from <VAR>CurveType</VAR> enumeration.
1916      */
1917     void SetCurveType(in CurveType theType);
1918
1919     /*! Gets the type of the curve lines.
1920      */
1921     CurveType GetCurveType();
1922
1923     /*! Sets the size of the markers (data points) with help of
1924      * which the curve is constructed on the graphics.
1925      * \param theSize Long value defining the size of the markers.
1926      */
1927     void SetMarkerSize(in long theSize);
1928
1929     /*! Gets the size of the markers (data points) with help of
1930      * which the curve is constructed on the graphics.
1931      */
1932     long GetMarkerSize();
1933
1934     /*! Enable/disables X-axis grid of the 2D plot.
1935      */
1936     void EnableXGrid(in boolean theMajor, in long theNumMajor, in boolean theMinor, in long theNumMinor);
1937
1938     /*! Enable/disables Y-axis grid of the 2D plot.
1939      */
1940     void EnableYGrid(in boolean theMajor, in long theNumMajor, in boolean theMinor, in long theNumMinor);
1941
1942     /*! Sets horizontal scaling of the 2D plot.
1943      * \param theScaling Type of scaling taken from <VAR>Scaling</VAR> enumeration.
1944      */
1945     void SetHorScaling(in Scaling theScaling);
1946
1947     /*! Gets the type horizontal scaling of the 2D plot.
1948      */
1949     Scaling GetHorScaling();
1950
1951     /*! Sets vertical scaling of the 2D plot.
1952      * \param theScaling Type of scaling taken from <VAR>Scaling</VAR> enumeration.
1953      */
1954     void SetVerScaling(in Scaling theScaling);
1955
1956     /*! Gets the type vertical scaling of the 2D plot.
1957      */
1958     Scaling GetVerScaling();
1959
1960     /*! Sets the title of the X-axis of the plot.
1961      * \param theTitle String value defining the title of the X-axis of the plot.
1962      */
1963     void SetXTitle(in string theTitle);
1964
1965     /*! Gets the title of the X-axis of the plot.
1966      */
1967     string GetXTitle();
1968
1969     /*! Sets the title of the Y-axis of the plot.
1970      * \param theTitle String value defining the title of the X-axis of the plot.
1971      */
1972     void SetYTitle(in string theTitle);
1973
1974     /*! Gets the title of the Y-axis of the plot.
1975      */
1976     string GetYTitle();
1977
1978     /*! Shows/hides the legend (description) of the 2D plot.
1979      */
1980     void ShowLegend(in boolean theShowing);
1981
1982     /*! Shrinks and enlarges the 2D plot to fit the 2D viewer.
1983      */
1984     void FitAll();
1985
1986     /*! Set range of the 2D plot to X axis of the 2D viewer.
1987      */
1988     void FitXRange(in double xMin, in double xMax);
1989
1990     /*! Set range of the 2D plot to Y axis of the 2D viewer.
1991      */
1992     void FitYRange(in double yMin, in double yMax);
1993
1994     /*! Set range of the 2D plot to XY axis of the 2D viewer.
1995      */
1996     void FitRange(in double xMin, in double xMax,
1997                   in double yMin, in double yMax);
1998
1999     void GetFitRanges(out double xMin,out double xMax,
2000                       out double yMin,out double yMax);
2001   };
2002
2003   //-------------------------------------------------------
2004   /*! \brief Interface of the %ViewManager
2005    *
2006    * The ViewManager is necessary for work with view windows (creation and deletion).
2007    */
2008   interface ViewManager: Base {
2009     /*! \brief Getting an active %View Frame
2010      *
2011      * Returns an object reference to the active %View Frame.
2012      * Type of the %View must be checked.
2013      * \note <BR>Returns nil if there are no views currently opened.
2014      */
2015     View GetCurrentView();
2016
2017     /*! \brief Creation of a 3d %View.
2018      *
2019      * Returns an object reference to the newly created 3D %View.
2020      */
2021     View3D Create3DView();
2022
2023     /*! \brief Creation of a Table %View.
2024      *
2025      * Returns an object reference to the newly created Table %View.
2026      */
2027     TableView CreateTableView(in Table theTable);
2028
2029     /*! \brief Creation of a 2D plot %View.
2030      *
2031      * Returns an object reference to the newly created 2D plot %View.
2032      */
2033     XYPlot CreateXYPlot();
2034
2035     /*! Deletes a definite view.
2036      * \param theView The view which should be deleted.
2037      */
2038     void Destroy(in View theView);
2039   };
2040 };
2041
2042 #endif