]> SALOME platform Git repositories - modules/visu.git/blob - idl/VISU_Gen.idl
Salome HOME
5f7648d6150efd3482c7e5e3cb70087b95f0afd5
[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   //-------------------------------------------------------
604   /*!
605    *  \brief Plot3D interface
606    *
607    *  Presentation parameters of Plot3D presentation. This type of presentation
608    *  consists of deforming initial planar mesh according to values assigned to the mesh elements.
609    *  If mesh not planar but volumic one, it is possible to generate intermediate planar mesh.
610    */
611   interface Plot3D : ScalarMap {
612     /*!
613      *  This enumeration contains a set of elements defining
614      *  the type of orientation in 3D space of the cutting plane.
615      */
616     enum Orientation { XY,   /*!< The object is located in the plane formed by X and Y axis. */
617                        YZ,   /*!< The object is located in the plane formed by Y and Z axis. */
618                        ZX }; /*!< The object is located in the plane formed by Z and X axis. */
619
620     /*!
621      *  Sets the orientation in 3D space of cutting plane for the presentation.
622      *  \param theOrientation This parameter defines the type of orientation of cutting plane
623      *         in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
624      *  \param theXAngle The angle of rotation of the cutting plane
625      *         around the first axis of the chosen orientation.
626      *  \param theXAngle The angle of rotation of the cutting plane
627      *         around the second axis of the chosen orientation.
628      */
629     void SetOrientation (in Orientation theOrientation, in double theXAngle, in double theYAngle);
630
631     /*!
632      *  Gets the type of orientation in 3D space of cutting plane.
633      */
634     Orientation GetOrientationType();
635
636     /*!
637      *  Gets rotation angle of the cutting plane
638      *  around the first axis of the chosen orientation.
639      */
640     double GetRotateX();
641
642     /*!
643      *  Gets rotation angle of the cutting plane
644      *  around the second axis of the chosen orientation.
645      */
646     double GetRotateY();
647
648     /*!
649      *  Sets the position of a cutting plane.
650      *  \param thePlanePosition The position of the cutting plane.
651      *  \param theIsRelative Define, whether the input position is relative.
652      */
653     void SetPlanePosition (in double  thePlanePosition,
654                            in boolean theIsRelative);
655
656     /*!
657      *  Gets the position of the cutting plane
658      */
659     double GetPlanePosition();
660
661     /*!
662      *  Returns true if a position of cutting plane is relative
663      */
664     boolean IsPositionRelative();
665
666     /*!
667      *  Sets the scale factor for scalar values
668      *  (how much corresponding mesh elements should be translated).
669      *  \param theScaleFactor The scaling factor.
670      */
671     void SetScaleFactor (in double theScaleFactor);
672
673     /*!
674      *  Gets the scale factor for scalar values.
675      *  (how much corresponding mesh elements is translated)
676      */
677     double GetScaleFactor();
678
679     /*!
680      *  Sets presentation type: contour or surface.
681      *  \param theIsContourPrs Define, whether presentation type is contour.
682      */
683     void SetContourPrs (in boolean theIsContourPrs );
684
685     /*!
686      *  Returns true if presentation type is contour.
687      */
688     boolean GetIsContourPrs();
689
690     /*!
691      *  Sets the number of contours.
692      *  \param theNb The number of contours.
693      */
694     void SetNbOfContours (in long theNb);
695
696     /*!
697      *  Gets the number of contours.
698      */
699     long GetNbOfContours();
700   };
701
702   //-------------------------------------------------------
703   /*! \brief Cut planes interface
704    *
705    * Presentation parameters of Cut planes presentation. This type of presentation
706    * consists of cutting your initial mesh by a definite number of planes. As the
707    * result you will see these planes which will be cutted by the borders of the mesh.
708    */
709   interface CutPlanes : ScalarMap {
710     /*!
711      * This enumeration contains a set of elements defining the type of orientation in 3D space
712      * of the cut planes.
713      */
714     enum Orientation {XY, /*!< The object is located in the plane formed by X and Y axis. */
715                       YZ, /*!< The object is located in the plane formed by Y and Z axis. */
716                       ZX}; /*!< The object is located in the plane formed by Z and X axis. */
717
718     /*!
719      * Sets the type of orientation in 3D space of cut planes presentation.
720      * \param theOrientation This parameter defines the type of orientation of cut planes
721      *                       in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
722      * \param theXAngle The angle of rotation of the cut planes around
723      *                  the first axis of the chosen orientation.
724      * \param theXAngle The angle of rotation of the cut planes around
725      *                  the second axis of the chosen orientation.
726      */
727     void SetOrientation(in Orientation theOrientation, in double theXAngle, in double theYAngle);
728
729     /*!
730      * Gets the type of orientation in 3D space of cut planes presentation.
731      */
732     Orientation GetOrientationType();
733
734     /*!
735      * Gets rotation angle of the cut plane presentation around the first axis of the chosen orientation.
736      */
737     double GetRotateX();
738
739     /*!
740      * Gets rotation angle of the cut plane presentation around the second axis of the chosen orientation.
741      */
742     double GetRotateY();
743
744     /*!
745      * Sets the displacement of the cut planes in 3D space.
746      *
747      * \param theDisp This parameter defines position of the cut planes
748      * in 3D space. It varies from 0 to 1. If the chosen value is 0.5, the cut planes
749      * will be evenly located regarding each other; in other words, the distance between all
750      * of them will be equal. If the value is higher or lower than 0.5, the planes will be displaced
751      * to one or another side.
752      */
753     void SetDisplacement(in double theDisp);
754
755     /*!
756      * Gets the displacement of the cut planes in 3D space.
757      */
758     double GetDisplacement();
759
760     /*!
761      * Sets the position of a definite cut plane.
762      * \param thePlaneNumber The number of this cut plane.
763      * \param thePlanePosition The position of this cut plane.
764      */
765      void SetPlanePosition(in long thePlaneNumber, in double thePlanePosition);
766
767     /*!
768      * Sets the position of the choosen plane to default value.
769      * \param thePlaneNumber The number of this cut plane.
770      */
771      void SetDefault(in long thePlaneNumber);
772
773     /*!
774      * Gets the position of the choosen plane
775      */
776     double GetPlanePosition(in long thePlaneNumber);
777
778     /*!
779      * Determines whether the choosen plane has default position.
780      * \param thePlaneNumber The number of this cut plane.
781      */
782     boolean IsDefault(in long thePlaneNumber);
783
784     /*!
785      * Sets the number of cut planes.
786      * \param theNb The number of cut planes.
787      */
788     void SetNbPlanes(in long theNb);
789
790     /*!
791      * Gets the number of cut planes.
792      */
793     long GetNbPlanes();
794   };
795
796   //-------------------------------------------------------
797   /*! \brief Cut lines presentation.
798    *
799    * Presentation parameters of a Cut lines presentation.
800    * Cut Lines is a type of presentation which displays colored cells
801    *   with applied scalar values on the mesh where lines are placed.
802    * The procedure of construction of a Cut Lines presentation reuses the algorithm
803    *   of creation of Cut Planes presentation and consists of two steps:
804    *
805    *   1. From Cut Planes presentation one plane is taken and
806    *      it is used as base plane for construction of cut lines.
807    *   2. This plane is cut by a regular array of planes. The result of this
808    *      operation is a regular array of lines in space, belonging to the same plane
809    *      and having the same orientation. They are located inside or on the mesh.
810    */
811   interface CutLines : ScalarMap {
812     /*!
813      * Sets the type of orientation in 3D space of the base plane of a cut lines presentation.
814      * \param theOrientation The orientation of the base plane in 3D space.
815      * \param theXAngle The angle of rotation of the base plane around
816      *                  the first axis of the chosen orientation.
817      * \param theXAngle The angle of rotation of the base plane around
818      *                  the second axis of the chosen orientation.
819      */
820     void SetOrientation(in CutPlanes::Orientation theOrientation, in double theXAngle, in double theYAngle);
821
822     /*!
823      * Sets the type of orientation in 3D space of the cutting planes of a cut lines presentation.
824      * \param theOrientation This parameter defines the type of orientation of the cutting planes
825      *                       in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
826      * \param theXAngle The angle of rotation of the cutting planes
827      *                  around the first axis of the chosen orientation.
828      * \param theXAngle The angle of rotation of the cutting planes
829      *                  around the second axis of the chosen orientation.
830      */
831     void SetOrientation2(in CutPlanes::Orientation theOrientation, in double theXAngle, in double theYAngle);
832
833     /*!
834      * Gets the type of orientation in 3D space of the base plane of a cut lines presentation.
835      */
836     CutPlanes::Orientation GetOrientationType();
837
838     /*!
839      * Gets the type of orientation in 3D space of the cutting planes of a cut lines presentation.
840      */
841     CutPlanes::Orientation GetOrientationType2();
842
843     /*!
844      * Gets rotation angle of the base plane around the first axis of the chosen orientation.
845      */
846     double GetRotateX();
847
848     /*!
849      * Gets rotation angle of the cutting planes around the first axis of the chosen orientation.
850      */
851     double GetRotateX2();
852
853     /*!
854      * Gets rotation angle of the base plane around the second axis of the chosen orientation.
855      */
856     double GetRotateY();
857
858     /*!
859      * Gets rotation angle of the cutting planes around the second axis of the chosen orientation.
860      */
861     double GetRotateY2();
862
863     /*!
864      * Sets the displacement of the base plane of the cut lines presentation in 3D space.
865      *
866      * \param theDisp This parameter defines position of the base plane
867      * in 3D space. It varies from 0 to 1.
868      */
869     void SetDisplacement(in double theDisp);
870
871     /*!
872      * Sets the displacement of the cutting planes of the cut lines presentation in 3D space.
873      *
874      * \param theDisp This parameter defines position of the cutting planes
875      * in 3D space. It varies from 0 to 1.
876      */
877     void SetDisplacement2(in double theDisp);
878
879     /*!
880      * Gets the displacement of the base plane of the cut lines presentation in 3D space.
881      */
882     double GetDisplacement();
883
884     /*!
885      * Gets the displacement of the cutting planes of the cut lines presentation in 3D space.
886      */
887     double GetDisplacement2();
888
889     /*! Sets the position of the base plane in 3D space.
890      * \param thePlanePosition A double value defining the position of the base plane in 3D space.
891      */
892     void SetBasePlanePosition(in double thePlanePosition);
893
894     /*! Gets the position of the base plane in 3D space.
895      */
896     double GetBasePlanePosition();
897
898     /*! Sets the position of one of cutting planes in 3D space.
899      * \param thePlaneNumber A long value defining the order number of this cutting plane.
900      * \param thePlanePosition A double value defining the position of the base plane in 3D space.
901      */
902     void SetLinePosition(in long thePlaneNumber, in double thePlanePosition);
903
904     /*! Gets the position of one of cutting planes in 3D space.
905      * \param thePlaneNumber A long value defining the order number of this cutting plane.
906      */
907     double GetLinePosition(in long thePlaneNumber);
908
909     /*! Sets the position of the base plane to default value.
910      */
911     void SetDefault();
912
913     /*!
914      * Determines whether the base plane has default position.
915      * \return True if the base plane has default position.
916      */
917     boolean IsDefault();
918
919     /*!
920      * Sets the position of the choosen cutting plane to default value.
921      * \param thePlaneNumber The number of this cutting plane.
922      */
923     void SetDefaultPosition(in long thePlaneNumber);
924
925     /*!
926      * Determines whether the choosen cutting plane has default position.
927      * \param thePlaneNumber The number of this cutting plane.
928      * \return True if this cutting plane has default position.
929      */
930     boolean IsDefaultPosition(in long thePlaneNumber);
931
932     /*!
933      * Sets the number of cut lines.
934      * \param theNb The number of cut lines.
935      */
936     void SetNbLines(in long theNb);
937
938     /*!
939      * Gets the number of cut lines.
940      */
941     long GetNbLines();
942   };
943
944   /*! \brief Interface of the stream lines representation
945    *
946    * This interface contains presentation parameters of stream lines presentations.
947    * <BR>Stream lines is a type of presentation transforming into lines the
948    * cells with vectors having most similar direction. A stream line can be thought
949    * of as the path that a massless particle takes in a vector field.
950    * Streamlines are used to convey the structure of a vector field.
951    * Usually streamlines are created to explore the most interesting features in the field.
952    */
953   interface StreamLines : DeformedShape {
954     /*! This enumerations contains a set of elements necessary
955      * for definition of direction of the stream lines.
956      */
957     enum Direction{ FORWARD,
958                     BACKWARD,
959                     BOTH
960     };
961
962     /*! Sets the parameters of the stream lines presentation.
963      * \param theIntStep Inegration step is a parameter of smoothness of the stream lines.
964      *                   This parameter defines the accuracy of construction of the streamlines.
965      *                   A smaller value of this parameter allows to construct smoother
966      *                   streamlines (at the cost of more computation time).
967      * \param thePropogationTime This parameter controls the maximum length of
968      *                           the stream line (measured in units of time).
969      * \param theStepLength This parameter defines the size of the output line segments
970      *                      that make up the streamline (which is represented as a polyline).
971      * \param thePrs3d The source presentation. The points of the field located on this source
972      *                 presentation will serve as starting points for generation of stream lines.
973      * \note If this parameter is not defined, your stream lines
974      *       presentation will be generated on all points of the field.
975      * \param thePercents This parameter defines the quantity of points of the field
976      *                    (from 0 to 100%) which will be used as starting points for
977      *                    construction of the stream lines. Thus, the value of this
978      *                    parameter can vary from 0 to 1.
979      * \param theDirection Direction of the stream lines (Forward, Backward or Both).
980      * \return True if all parameters are properly set.
981      */
982     boolean SetParams(in double theIntStep,
983                       in double thePropogationTime,
984                       in double theStepLength,
985                       in Prs3d thePrs3d,
986                       in double thePercents,
987                       in Direction theDirection);
988
989     /*! Gets the value of integration step of the stream lines presentation.
990      */
991     double GetIntegrationStep();
992
993     /*! Gets the value of propagation time of the stream lines presentation.
994      */
995     double GetPropagationTime();
996
997     /*! Gets the value of step length of the stream lines presentation.
998      */
999     double GetStepLength();
1000
1001     /*! Returns the source presentation used for generation of the stream lines.
1002      */
1003     Prs3d GetSource();
1004
1005     /*! Gets the quantity of points of the field used as starting
1006      *  points for generation of the stream lines presentation.
1007      */
1008     double GetUsedPoints();
1009
1010     /*! Returns the direction of the stream lines.
1011      */
1012     Direction GetDirection();
1013   };
1014
1015   /*! \brief Interface of the isometric surface presentation
1016    *
1017    * This interface contains presentation parameters of
1018    * isometric surface presentations.
1019    * <BR>Iso surfaces presentation combines all equal scalar
1020    * values on the cells and on the basis of them constructs
1021    * isobaric surfaces, which form this presentation.
1022    */
1023   interface IsoSurfaces : ScalarMap {
1024     /*!
1025      * Sets the number of isometric surfaces.
1026      * \param theNb A long value defining the number of isometric surfaces
1027      *              which will be used for construction of this presentation.
1028      */
1029     void SetNbSurfaces(in long theNb);
1030
1031     /*!
1032      * Gets the number of isometric surfaces
1033      */
1034     long GetNbSurfaces();
1035   };
1036
1037   //-------------------------------------------------------
1038   /*! \brief Interface of the vector presentation.
1039    *
1040    * This interface contains presentation parameters of vector presentations.
1041    */
1042   interface Vectors : DeformedShape {
1043     /*!
1044      * Sets the width of the lines of the vectors.
1045      * \param theWidth A double value defining the width of the lines of the vectors.
1046      */
1047     void SetLineWidth(in double theWidth);
1048
1049     /*!
1050      * Gets the width of the lines of the vectors.
1051      */
1052     double GetLineWidth();
1053
1054     /*!
1055      * This enumeration contains a set of elements defining the type of representation of the vector head.
1056      */
1057     enum GlyphType{ ARROW,
1058                     CONE2,
1059                     CONE6,
1060                     NONE
1061                   };
1062
1063     /*!
1064      * Sets the type of representation of the vector head.
1065      * \param theType This parameter defines the type of representation of the vector head.
1066      * This value is taken from the <VAR>GlyphType</VAR> enumeration.
1067      */
1068     void SetGlyphType(in GlyphType theType);
1069
1070     /*!
1071      * Gets the type of representation of the vector head.
1072      */
1073     GlyphType GetGlyphType();
1074
1075     /*!
1076      * This enumeration contains a set of elements defining the position of the vector head.
1077      */
1078     enum GlyphPos{ CENTER, /*!<In the center of the vector.*/
1079                    TAIL,   /*!<In the tail of the vector.*/
1080                    HEAD  /*!<In the head of the vector.*/
1081                  };
1082
1083     /*!
1084      * Sets the position of the vector head.
1085      * \param thePos This parameter defines the position of the vector head.
1086      * This value is taken from the <VAR>GlyphPos</VAR> enumeration.
1087      */
1088     void SetGlyphPos(in GlyphPos thePos);
1089
1090     /*!
1091      * Gets the position of the vector head.
1092      */
1093     GlyphPos GetGlyphPos();
1094   };
1095
1096   //-------------------------------------------------------
1097   /*! \brief %Animation class
1098    *
1099    * This class provides a set of methods used for:<br>
1100    * <ul>
1101    *     <li> generating different animations on the basis of a field,
1102    *     <li> setting the parameters of the animations,
1103    *     <li> playing these animations in the %VISU module.
1104    * </ul>
1105    * \note
1106    * <BR><B>Field</B> represents the results of calculations
1107    * (it can be scalar or vector values), grouped together under one physical concept.
1108    * <BR><B>Time stamp</B> represents a subfield: the results
1109    * of calculations are taken in one definite moment.
1110    */
1111   interface Animation : Base {
1112     /*! Defines the field which will be used as a base for generation of the animation.
1113      * \param theObject The %SObject corresponding to the field.
1114      */
1115     void addField(in SALOMEDS::SObject theObject);
1116
1117     /*! Generates presentations on the basis of the field.
1118      * \param theFieldNum The number of the field, which will be used
1119      *                    as the basis for construction of the presentation.
1120      */
1121     void generatePresentations(in long theFieldNum);
1122
1123     /*! Generates a set of frames from the created by the method
1124      *  <VAR>generatePresentations</VAR>3D presentations. A sequence of
1125      *  these frames will be transformed into an animation.
1126      *  \return  True, if the frames have been successfully generated.
1127      */
1128     boolean generateFrames();
1129
1130     /*! Clears the view before starting an animation.
1131      */
1132     void clearView();
1133
1134     /*! \name Playback of an animation:
1135      */
1136 /*@{*/
1137
1138     /*! Starts an animation.
1139      */
1140     void startAnimation();
1141
1142     /*! Stops an animation.
1143      */
1144     void stopAnimation();
1145
1146     /*! Forwards to the next frame.
1147      */
1148     void nextFrame();
1149
1150     /*! Returns to the previous frame.
1151      */
1152     void prevFrame();
1153
1154     /*! Returns to the first frame of the animation.
1155      */
1156     void firstFrame();
1157
1158     /*! Forwards to the last frame of the animation.
1159      */
1160     void lastFrame();
1161
1162     /*!  Passes to a definite frame of the animation.
1163      * \param theFrame A long value defining the number of the frame.
1164      */
1165     void gotoFrame(in long theFrame);
1166 /*@}*/
1167
1168     /*! Gets the number of time stamps (subfields) contained in the given field.
1169      */
1170     long getNbFields();
1171
1172     /*! Gets the number of generated frames
1173      */
1174     long getNbFrames();
1175
1176     /*! Returns True, if the animation is currently running.
1177      */
1178     boolean isRunning();
1179
1180     /*! Returns the number of the current frame.
1181      */
1182     long getCurrentFrame();
1183
1184     /*!
1185      */
1186     ColoredPrs3d getPresentation(in long theField, in long theFrame);
1187
1188     /*! Sets the type of presentation (vectors, deformed shape etc.)
1189      *  which will be generated by the method <VAR>generatePresentations</VAR>.
1190      */
1191     void setPresentationType(in long theFieldNum, in VISUType theType);
1192
1193     /*! Gets the type of presentation (vectors, deformed shape etc.) which will
1194      * be generated by the method <VAR>generatePresentations</VAR>.
1195      */
1196     VISUType getPresentationType(in long theFieldNum);
1197
1198     /*! Sets the speed of the animation.
1199      * \param theSpeed The speed of the animation. The value varies from 1 to 99.
1200      */
1201     void setSpeed(in long theSpeed);
1202
1203     /*!  Gets the speed of the animation.
1204      */
1205     long getSpeed();
1206
1207     /*! Ruturns True, if playback of the animation is proportional.
1208      * This option allows to render your animation with proportional periods
1209      * of time between every frame (not depending on the time stamps).
1210      */
1211     boolean isProportional();
1212
1213     /*! Sets the range of the animation. The range is defined on the basis of
1214      *  the time stamps of the field which have been used for generation of the animation.
1215      *  This method allows to bound the range of generated frames.
1216      *  If this method is not used, the animation will be generated
1217      *  on the basis of all time stamps contained in the field.
1218      *  \param theMin The value of the first time stamp which will be used for generation of the animation.
1219      *  \param theMax The value of the last time stamp which will be used for generation of the animation.
1220      */
1221     void setAnimationRange(in double theMin, in double theMax);
1222
1223     /*! Gets the number of the first time stamp which will be used for generation of the animation.
1224      */
1225     double getMinRange();
1226
1227     /*! Gets the number of the last time stamp which will be used for generation of the animation.
1228      */
1229     double getMaxRange();
1230
1231     /*! Returns True if the range of the animation has been defined
1232      *  by the method <VAR>setAnimationRange</VAR>. Otherwise
1233      *  the animation will be generated on the basis of all time stamps contained in the field.
1234      */
1235     boolean isRangeDefined();
1236
1237     /*! Saves all the frames composing the animation into a definite directory.
1238      *  Pictures format is set with method <VAR>setDumpFormat()</VAR>.
1239      *  \param thePath The directory where all the frames will be saved.
1240      */
1241     void dumpTo(in string thePath);
1242
1243     /*! Set format for saving all the frames composing the animation.
1244      *  \param theFormat The format for saving pictures.
1245      *                   For available formats see QImageIO documentation (Qt).
1246      *                   If specified format is not available, default format will be used.
1247      *                   Default format is JPEG or first of supported, if JPEG is not available.
1248      *  \return Really set format. Differ from \a theFormat if \a theFormat is not available.
1249      */
1250     string setDumpFormat(in string theFormat);
1251
1252     /*! Returns True, if the playback of the animation is cycling.
1253      */
1254     boolean isCycling();
1255
1256     /*! Gets the first time stamp of the field defined at the input of the animation.
1257      * \note This method is used if animation range is <b>NOT</b> defined.
1258      */
1259     double getMinTime();
1260
1261     /*! Gets the last time stamp of the field defined at the input of the animation.
1262      * \note This method is used if animation range is <b>NOT</b> defined.
1263      */
1264     double getMaxTime();
1265
1266     /*! Sets proprtional playback of the animation. This option allows to render your animation
1267      *  with proportional periods of time between every frame (not depending on the time stamps).
1268      *  \param theProp If this boolean parameter is True, playback
1269      *                 of your animation will be set as proportional.
1270      */
1271     void setProportional(in boolean theProp);
1272
1273     /*! Sets cycling playback of the animation. The number of cycles
1274      *  can be infinite, untill you use <VAR>startAnimation</VAR> method.
1275      *  \param theCycle If this boolean parameter is True, playback
1276      *                  of your animation will be set as cycling.
1277      */
1278     void setCycling(in boolean theCycle);
1279
1280     SALOMEDS::SObject publishInStudy();
1281
1282     void saveAnimation();
1283
1284     void restoreFromStudy(in SALOMEDS::SObject theSObj);
1285
1286     boolean isSavedInStudy();
1287   };
1288
1289   /*! \brief Interface %Result
1290    *
1291    * This interface serves for inner representation of data generated
1292    * in other sources (MED object or file). This data is needed
1293    * for further construction of graphical presentations.
1294    */
1295   interface Result : RemovableObject, SALOME::GenericObj {
1296     /*! Reads all data from the corresponding sources. By default the data is loaded on demand.
1297      */
1298     boolean BuildAll();
1299
1300     /*! Start to parse the source MED file and publish all its entities into the study*/
1301     boolean Build(in boolean theIsBuildAll, in boolean theIsAtOnce);
1302
1303     /*! Allow to check is all requested MED entites already loaded or not */
1304     boolean IsDone();
1305
1306     /*! Allow to check is corresponding MED entites already loaded or not */
1307     boolean IsEntitiesDone();
1308
1309     /*! Choose to parse MED fields and perform global min / max on the MED timestamps.*/
1310     void SetBuildFields(in boolean theIsBuildFields, in boolean theIsCalculateMinMax);
1311
1312     /*! Allow to check is corresponding MED fields already loaded or not */
1313     boolean IsFieldsDone();
1314
1315     /*! Choose to parse MED groups.*/
1316     void SetBuildGroups(in boolean theIsBuildGroups);
1317
1318     /*! Allow to check is corresponding MED groups and families already loaded or not */
1319     boolean IsGroupsDone();
1320
1321     /*! Allow to check is min / max calculation over field's components already perfrormed or not */
1322     boolean IsMinMaxDone();
1323   };
1324
1325   //-------------------------------------------------------
1326   interface ViewManager;
1327   interface View3D;
1328
1329   /*! \brief %VISU_Gen interface
1330    *
1331    * This is the main interface of %VISU component. It is necessary for creation of
1332    * post-processing presentations from given %Result and %Table object reference,
1333    * using the views provided by %ViewManager.
1334    */
1335   interface VISU_Gen : Engines::Component, SALOMEDS::Driver, Base {
1336     /*! Sets a definite study to be current.
1337      */
1338     void SetCurrentStudy(in SALOMEDS::Study theStudy);
1339
1340     /*! Gets the current study.
1341      */
1342     SALOMEDS::Study GetCurrentStudy();
1343
1344     /*!
1345      * Gets the %View Manager which is used for creation of
1346      * post-processing presentations.
1347      */
1348     ViewManager GetViewManager();
1349
1350     /*!
1351      * Imports tables from a file and create TableAttribute in Sudy
1352      */
1353     SALOMEDS::SObject ImportTables(in string theFileName);
1354
1355     /*!
1356      * Export table to a file
1357      */
1358     boolean ExportTableToFile(in SALOMEDS::SObject theTable, in string theFileName);
1359
1360     /*!
1361      * Imports data from a file. The access to this file will be conserved outside of the application.
1362      * \param theFileName String parameter defining the name of the file
1363      *                    from which the data will be imported.
1364      */
1365     Result ImportFile(in string theFileName);
1366
1367     /*!
1368      * Create result and initialize its with the file. The access to this file will be conserved outside of the application.
1369      * \param theFileName String parameter defining the name of the file
1370      *                    from which the data will be imported.
1371      */
1372     Result CreateResult(in string theFileName);
1373
1374     /*!
1375      * Imports data from a file. The access to this file will closed.
1376      * \param theFileName String parameter defining the name of the file
1377      *                    from which the data will be imported.
1378      */
1379     Result CopyAndImportFile(in string theFileName);
1380
1381     /*!
1382      * Imports data from a %MED object.
1383      */
1384     Result ImportMed(in SALOMEDS::SObject theMedSObject);
1385
1386     /*!
1387      * Imports data from a %MED field.
1388      */
1389     Result ImportMedField(in SALOME_MED::FIELD theField);
1390
1391     /*!
1392      * Creates a mesh on the basis of the data generated in other sources (MED object or file).
1393      * \param theResult   Data generated in other sources. (MED object or file)
1394      * \param theMeshName  One of the meshes presented in MED file
1395      * \param theEntity Type of entity where the field is defined
1396      */
1397     Mesh MeshOnEntity(in Result theResult, in string theMeshName, in Entity theEntity);
1398
1399     /*!
1400      * Creates on the basis of a family a mesh  which will be composed of geometrical
1401      * elements, corresponding to the type of cells (node, edge, face or cell) of this family.
1402      * \param theResult   Data generated in other sources. (MED object or file)
1403      * \param theMeshName  One of the meshes presented in MED file
1404      * \param theEntity Type of entity where the field is defined.
1405      */
1406     Mesh FamilyMeshOnEntity(in Result theResult, in string theMeshName,
1407                             in Entity theEntity, in string theFamilyName);
1408
1409     /*!
1410      * Creates a mesh on the basis of a group of families.
1411      * \param theResult   Data generated in other sources. (MED object or file)
1412      * \param theMeshName  One of the meshes presented in MED file
1413      * \param theGroupName Name of the group.
1414      */
1415     Mesh GroupMesh(in Result theResult, in string theMeshName, in string theGroupName);
1416
1417     /*!
1418      * Creates a scalar map presentation.
1419      * \param theResult    Data generated in other sources. (MED object or file)
1420      * \param theMeshName  One of the meshes presented in MED file
1421      * \param theEntity    Type of entity where the field is defined
1422      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1423      * \param theIteration Number of iteration on the field
1424      */
1425     ScalarMap ScalarMapOnField(in Result theResult, in string theMeshName,
1426                                in Entity theEntity, in string theFieldName,
1427                                in double theIteration);
1428
1429     /*!
1430      * Creates a Gauss Points presentation.
1431      * \param theResult    Data generated in other sources. (MED object or file)
1432      * \param theMeshName  One of the meshes presented in MED file
1433      * \param theEntity    Type of entity where the field is defined
1434      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1435      * \param theIteration Number of iteration on the field
1436      */
1437     GaussPoints GaussPointsOnField(in Result theResult, in string theMeshName,
1438                                    in Entity theEntity, in string theFieldName,
1439                                    in double theIteration);
1440
1441     /*!
1442      * Creates a deformed shape presentation.
1443      * \param theResult    Data generated in other sources. (MED object or file)
1444      * \param theMeshName  One of the meshes presented in MED file
1445      * \param theEntity    Type of entity where the field is defined
1446      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1447      * \param theIteration Number of iteration on the field
1448      */
1449     DeformedShape DeformedShapeOnField(in Result theResult, in string theMeshName,
1450                                        in Entity theEntity, in string theFieldName,
1451                                        in double theIteration);
1452
1453     /*!
1454      * Creates a vector presentation.
1455      * \param theResult    Data generated in other sources. (MED object or file)
1456      * \param theMeshName  One of the meshes presented in MED file
1457      * \param theEntity    Type of entity where the field is defined
1458      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1459      * \param theIteration Number of iteration on the field
1460      */
1461     Vectors VectorsOnField(in Result theResult, in string theMeshName,
1462                            in Entity theEntity, in string theFieldName,
1463                            in double theIteration);
1464
1465     /*!
1466      * Creates an iso surface presentation.
1467      * \param theResult    Data generated in other sources. (MED object or file)
1468      * \param theMeshName  One of the meshes presented in MED file
1469      * \param theEntity    Type of entity where the field is defined
1470      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1471      * \param theIteration Number of iteration on the field
1472      */
1473     IsoSurfaces IsoSurfacesOnField(in Result theResult, in string theMeshName,
1474                                    in Entity theEntity, in string theFieldName,
1475                                    in double theIteration);
1476
1477     /*!
1478      * Creates an stream lines presentation.
1479      * \param theResult    Data generated in other sources. (MED object or file)
1480      * \param theMeshName  One of the meshes presented in MED file
1481      * \param theEntity    Type of entity where the field is defined
1482      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1483      * \param theIteration Number of iteration on the field
1484      */
1485     StreamLines StreamLinesOnField(in Result theResult, in string theMeshName,
1486                                    in Entity theEntity, in string theFieldName,
1487                                    in double theIteration);
1488
1489     /*!
1490      * Creates a presentation of cut planes.
1491      * \param theResult    Data generated in other sources. (MED object or file)
1492      * \param theMeshName  One of the meshes presented in MED file
1493      * \param theEntity    Type of entity where the field is defined
1494      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1495      * \param theIteration Number of iteration on the field
1496      */
1497     CutPlanes CutPlanesOnField(in Result theResult, in string theMeshName,
1498                                in Entity theEntity, in string theFieldName,
1499                                in double theIteration);
1500
1501     /*!
1502      * Creates a presentation of cut lines.
1503      * \param theResult    Data generated in other sources. (MED object or file)
1504      * \param theMeshName  One of the meshes presented in MED file
1505      * \param theEntity    Type of entity where the field is defined
1506      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1507      * \param theIteration Number of iteration on the field
1508      */
1509     CutLines CutLinesOnField(in Result theResult, in string theMeshName,
1510                              in Entity theEntity, in string theFieldName,
1511                              in double theIteration);
1512
1513     /*!
1514      * Creates a Plot3D presentation.
1515      * \param theResult    Data generated in other sources. (MED object or file)
1516      * \param theMeshName  One of the meshes presented in MED file
1517      * \param theEntity    Type of entity where the field is defined
1518      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1519      * \param theIteration Number of iteration on the field
1520      */
1521     Plot3D Plot3DOnField(in Result theResult, in string theMeshName,
1522                          in Entity theEntity, in string theFieldName,
1523                          in double theIteration);
1524
1525     /*!
1526      * Creates a table presentation.
1527      * \param theTableEntry The entry of the table which will be displayed.
1528      */
1529     Table CreateTable(in string theTableEntry);
1530
1531     /*!
1532      * Creates a curve on the basis of points, whose values are taken from the table.
1533      * \param theTable  Table containing the data for construction of curves.
1534      * \param HRow  Index of the row in the table:  abscissa of the point.
1535      * \param VRow  Index of the row in the table:  ordinate of the point.
1536      */
1537     Curve CreateCurve(in Table theTable, in long theHRow, in long theVRow);
1538
1539     /*!
1540      * Creates a presentation form containing an array of references to the curves.
1541      */
1542     Container CreateContainer();
1543
1544     /*! Creates an animation in the 3D view.
1545      * \param theView3d The 3D view, where the animation will be rendered.
1546      */
1547     Animation CreateAnimation(in View3D theView3d);
1548
1549     void DeleteResult(in Result theResult);
1550
1551     void DeletePrs3d(in Prs3d thePrs3d);
1552   };
1553
1554   /*! \brief %View interface
1555    *
1556    * Contains a set of methods used by the %View frame, which can be one of
1557    * the following types: 3d, Table, XY plot.
1558    * %View interface is a base for all types of %view interfaces.
1559    */
1560   interface View: Base {
1561
1562     /*! \brief %ViewRepresentation enumeration
1563      *
1564      * displaying part ("ALL" isn't setable)
1565      */
1566     enum ViewRepresentation {
1567       OBJECTBROWSER,
1568       VIEWER,
1569       PYTHON,
1570       MESSAGES
1571     };
1572
1573     void ShowPart (in ViewRepresentation ViewRepr, in boolean state );
1574
1575     boolean IsPartShown( in ViewRepresentation ViewRepr );
1576
1577     /*!
1578      *  New methods for view parameters management.
1579      */
1580
1581     /*! \brief Split workarea of this view.
1582      *
1583      *  Horizontally split workarea of this view.
1584      *  This view is moved in a new right area.
1585      */
1586     void SplitRight();
1587
1588     /*! \brief Split workarea of this view.
1589      *
1590      *  Horizontally split workarea of this view.
1591      *  This view stays in an old left area, others are moved in a new right area.
1592      */
1593     void SplitLeft();
1594
1595     /*! \brief Split workarea of this view.
1596      *
1597      *  Vertically split workarea of this view.
1598      *  This view is moved in a new bottom area.
1599      */
1600     void SplitBottom();
1601
1602     /*! \brief Split workarea of this view.
1603      *
1604      *  Vertically split workarea of this view.
1605      *  This view stays in an old top area, others are moved in a new bottom area.
1606      */
1607     void SplitTop();
1608
1609     /*!
1610      *  Put this view window on top of its work area.
1611      */
1612     void OnTop();
1613
1614     /*!
1615      *  Put \a theView in workarea of this view right after it.
1616      *  If \a theView was alone in its workarea, workarea of \a theView will be destroyed.
1617      *  If \a theView was in the same workarea with this view, simple reordering will take place.
1618      *  \param theView A view window to be attracted to this one.
1619      */
1620     void Attract (in View theView);
1621
1622     /*!
1623      *  Put all the view windows from workarea of \a theView in workarea of this view right after it.
1624      *  Workarea of \a theView will be destroyed.
1625      *  If \a theView was in the same workarea with this view, simple reordering will take place.
1626      *  \param theView A view window to be attracted to this one together with all its workarea.
1627      */
1628     void AttractAll (in View theView);
1629
1630     /*!
1631      *  Set position of this view window relatively its splitter.
1632      *  \param thePosition Desired position of this view window relatively
1633      *         its splitter. Meaningfull values lays in range [0..1].
1634      *
1635      *  Direction of positioning is defined by the splitter orientation.
1636      */
1637     void SetRelativePositionInSplitter (in double thePosition);
1638
1639     /*!
1640      *  Set size of this view window relatively its splitter.
1641      *  \param theSize Desired size of this view window relatively
1642      *         its splitter. Meaningfull values lays in range [0..1].
1643      *
1644      *  Direction of resizing is defined by the splitter orientation.
1645      */
1646     void SetRelativeSizeInSplitter (in double theSize);
1647
1648     /*!
1649      *  Set horizontal position of this view window relatively its workstack.
1650      *  \param thePosition Desired horizontal position of this view window
1651      *         relatively its workstack. Meaningfull values lays in range [0..1].
1652      */
1653     void SetRelativePositionX (in double thePosition);
1654
1655     /*!
1656      *  Set vertical position of this view window relatively its workstack.
1657      *  \param thePosition Desired vertical position of this view window
1658      *         relatively its workstack. Meaningfull values lays in range [0..1].
1659      */
1660     void SetRelativePositionY (in double thePosition);
1661
1662     /*!
1663      *  Set horizontal size of this view window relatively its workstack.
1664      *  \param theSize Desired horizontal size of this view window relatively
1665      *         its workstack. Meaningfull values lays in range [0..1].
1666      */
1667     void SetRelativeSizeX (in double theSize);
1668
1669     /*!
1670      *  Set vertical size of this view window relatively its workstack.
1671      *  \param theSize Desired vertical size of this view window relatively
1672      *         its workstack. Meaningfull values lays in range [0..1].
1673      */
1674     void SetRelativeSizeY (in double theSize);
1675
1676     /*!
1677      *  Old methods for view parameters management, they don't work now
1678      */
1679     void SetViewWidth (in long Width); //setting width of view
1680     void SetViewHeight (in long Height); //setting height of view
1681     long GetViewWidth(); //getting view width
1682     long GetViewHeight(); //getting view height
1683     enum ViewPosition {TOP, CENTER, BOTTOM, RIGHT, LEFT}; //position of the study frame
1684     void SetViewPositionHorizontal (in ViewPosition ViewPosHor); //setting of the horizontal view position
1685     void SetViewPositionVertical (in ViewPosition ViewPosVer); //setting of the vertical view position
1686     void SetRelativePosition( in double x, in double y );
1687     void SetRelativeSize( in double x, in double y );
1688     void Minimize(); // Minimizes to the task bar or to the bottom of the Desktop the %View frame.
1689     void Restore(); // Restores the %View frame.
1690     void Maximize(); // Maximizes the %View frame.
1691
1692     /*!
1693      * Sets the title of the %View frame.
1694      * \param theTitle String parameter defining the title of the %View frame.
1695      */
1696     void SetTitle(in string theTitle);
1697
1698     /*!
1699      * Gets the title of the %View frame.
1700      */
1701     string GetTitle();
1702
1703     /*!
1704      * Sets background color of the %View frame.
1705      * \param theColor Background color defined in <VAR>SALOMEDS::Color</VAR> enumeration.
1706      */
1707     void SetBackground(in SALOMEDS::Color theColor);
1708
1709     /*!
1710      * Gets background color of the %View frame.
1711      */
1712     SALOMEDS::Color GetBackground();
1713
1714     /*!
1715      * Removes all presentations (presentable objects) from the %view.
1716      */
1717     void EraseAll();
1718
1719     /*!
1720      * Displays all presentations (presentable objects) in the %view.
1721      */
1722     void DisplayAll();
1723
1724     /*!
1725      * Removes a definite presentation (presentable object) from the %view.
1726      * \param thePrsObj The presentation (presentable object) which should be deleted.
1727      */
1728     void Erase(in PrsObject thePrsObj);
1729
1730     /*!
1731      * Displays a definite presentation (presentable object) in the %view.
1732      * \param thePrsObj The presentation (presentable object) which should be displayed.
1733      */
1734     void Display(in PrsObject thePrsObj);
1735
1736     /*!
1737      * Allows to display only a definite presentation (presentable object) in the %view.
1738      * All other presentations are removed from the %view.
1739      * \param thePrsObj The presentation (presentable object) which should be displayed.
1740      */
1741     void DisplayOnly(in PrsObject thePrsObj);
1742
1743     /*!
1744      * Updates the view.
1745      */
1746     void Update();
1747
1748     /*!
1749      * Saves the view.
1750      * \param theFileName The name of the file where the view will be saved.
1751      * \return True, if the view have been saved successfully.
1752      */
1753     boolean SavePicture(in string theFileName);
1754   };
1755
1756   //-------------------------------------------------------
1757   /*! \brief 3D view interface
1758    *
1759    *  This interface contains a set of methods necessary for representation of objects in 3D space.
1760    */
1761   interface View3D : View {
1762     /*!
1763      * This enumeration contains a set of elements determining a predefined point of view
1764      *  (position of the camera in 3D space relative to the presentable object).
1765      */
1766     enum ViewType{ FRONT, BACK, LEFT, RIGHT, TOP, BOTTOM};
1767
1768     /*!
1769      * This enumeration contains a set of elements determining the axis
1770      */
1771     enum Axis{ XAxis, YAxis, ZAxis};
1772
1773     /*!
1774      * Data type defining coordinates in 3D space.
1775      */
1776     typedef double XYZ[3];
1777
1778     /*!
1779      * Makes all presentations, which are currently present in the %view, completely visible.
1780      */
1781     void FitAll();
1782
1783     /*!
1784      * Sets a predefined point of view (FRONT, BACK, LEFT, RIGHT, TOP, BOTTOM). (In other words it means
1785      * a predefined position of the camera in 3D space with respect to the object which is represented.)
1786      */
1787     void SetView(in ViewType theType);
1788
1789     /*!
1790      * Sets the position of the camera in 3D space.
1791      * This point is used as the first point of the vector
1792      * defining the view direction of the camera.
1793      */
1794     void SetPointOfView(in XYZ theCoord);
1795
1796     /*!
1797      * Gets the position of the camera in 3D space.
1798      * This point is used as the first point of the vector
1799      * defining the view direction of the camera.
1800      */
1801     XYZ GetPointOfView();
1802
1803     /*!
1804      * Sets the vertical line of the camera in 3D space.
1805      */
1806     void SetViewUp(in XYZ theDir);
1807
1808     /*!
1809      * Gets the vertical line of the camera in 3D space.
1810      */
1811     XYZ GetViewUp();
1812
1813     /*!
1814      * Sets the point of sight of the camera. This point is used as the
1815      * second point of the vector defining the view direction of the camera.
1816      */
1817     void SetFocalPoint(in XYZ theDir);
1818
1819     /*!
1820      * Gets the point of sight of the camera. This point is used as the
1821      * second point of the vector defining the view direction of the camera.
1822      */
1823     XYZ GetFocalPoint();
1824
1825     /*!
1826      * Zooming of the presentable object. Sets the scale.
1827      */
1828     void SetParallelScale(in double theScale);
1829
1830     /*!
1831      * Zooming of the presentable object. Gets the scale.
1832      */
1833     double GetParallelScale();
1834
1835     /*!
1836      * Scaling of the view along a definite axis.
1837      * \param theAxis The axis of the scaling
1838      * \param theParam The coefficient of the scaling
1839      */
1840     void ScaleView(in Axis theAxis, in double theParam);
1841
1842     /*!
1843      * Removes the scaling of the view.
1844      */
1845     void RemoveScale();
1846
1847     /*!
1848      * Saves view parameters.
1849      * \return True if the view parameters have been created, False if the parameters have been modified.
1850      * \param theName The name under which the view parameters will be saved.
1851      */
1852     boolean SaveViewParams(in string theName);
1853
1854     /*! Restores view parameters.
1855      * \return True if the view parameters have been found and applied to the view,
1856      * False if the parameters with this name don't exist.
1857      * \param theName The name of the view parameters which will be restored.
1858      */
1859     boolean RestoreViewParams(in string theName);
1860   };
1861
1862   //-------------------------------------------------------
1863   /*! \brief Interface of the Table view
1864    *
1865    * This interface is used for creation of a view necessary for presentation of a table.
1866    */
1867   interface TableView : View {
1868   };
1869
1870   //-------------------------------------------------------
1871   /*! \brief Interface of the 2D plot view
1872    *
1873    * This interface is used for creation of a view necessary for presentation
1874    * of a XY plot generated on the basis of one or several curve lines.
1875    */
1876   interface XYPlot : View {
1877     /*! Sets the title of the XY plot
1878      * \param theTitle  The title of the XY plot
1879      */
1880     void SetSubTitle(in string theTitle);
1881
1882     /*! Gets the title of the XY plot
1883      */
1884     string GetSubTitle();
1885
1886     /*!
1887      * This enumeration contains a set of elements determining the type
1888      * of the curve lines, which will be displayed in your XY plot.
1889      */
1890     enum CurveType { POINTS, MULTYLINE, SPLINE};
1891
1892     /*! Sets the type of the curve lines.
1893      * \param theType The type of the curve lines taken from <VAR>CurveType</VAR> enumeration.
1894      */
1895     void SetCurveType(in CurveType theType);
1896
1897     /*! Gets the type of the curve lines.
1898      */
1899     CurveType GetCurveType();
1900
1901     /*! Sets the size of the markers (data points) with help of
1902      * which the curve is constructed on the graphics.
1903      * \param theSize Long value defining the size of the markers.
1904      */
1905     void SetMarkerSize(in long theSize);
1906
1907     /*! Gets the size of the markers (data points) with help of
1908      * which the curve is constructed on the graphics.
1909      */
1910     long GetMarkerSize();
1911
1912     /*! Enable/disables X-axis grid of the 2D plot.
1913      */
1914     void EnableXGrid(in boolean theMajor, in long theNumMajor, in boolean theMinor, in long theNumMinor);
1915
1916     /*! Enable/disables Y-axis grid of the 2D plot.
1917      */
1918     void EnableYGrid(in boolean theMajor, in long theNumMajor, in boolean theMinor, in long theNumMinor);
1919
1920     /*! Sets horizontal scaling of the 2D plot.
1921      * \param theScaling Type of scaling taken from <VAR>Scaling</VAR> enumeration.
1922      */
1923     void SetHorScaling(in Scaling theScaling);
1924
1925     /*! Gets the type horizontal scaling of the 2D plot.
1926      */
1927     Scaling GetHorScaling();
1928
1929     /*! Sets vertical scaling of the 2D plot.
1930      * \param theScaling Type of scaling taken from <VAR>Scaling</VAR> enumeration.
1931      */
1932     void SetVerScaling(in Scaling theScaling);
1933
1934     /*! Gets the type vertical scaling of the 2D plot.
1935      */
1936     Scaling GetVerScaling();
1937
1938     /*! Sets the title of the X-axis of the plot.
1939      * \param theTitle String value defining the title of the X-axis of the plot.
1940      */
1941     void SetXTitle(in string theTitle);
1942
1943     /*! Gets the title of the X-axis of the plot.
1944      */
1945     string GetXTitle();
1946
1947     /*! Sets the title of the Y-axis of the plot.
1948      * \param theTitle String value defining the title of the X-axis of the plot.
1949      */
1950     void SetYTitle(in string theTitle);
1951
1952     /*! Gets the title of the Y-axis of the plot.
1953      */
1954     string GetYTitle();
1955
1956     /*! Shows/hides the legend (description) of the 2D plot.
1957      */
1958     void ShowLegend(in boolean theShowing);
1959
1960     /*! Shrinks and enlarges the 2D plot to fit the 2D viewer.
1961      */
1962     void FitAll();
1963
1964     /*! Set range of the 2D plot to X axis of the 2D viewer.
1965      */
1966     void FitXRange(in double xMin, in double xMax);
1967
1968     /*! Set range of the 2D plot to Y axis of the 2D viewer.
1969      */
1970     void FitYRange(in double yMin, in double yMax);
1971
1972     /*! Set range of the 2D plot to XY axis of the 2D viewer.
1973      */
1974     void FitRange(in double xMin, in double xMax,
1975                   in double yMin, in double yMax);
1976
1977     void GetFitRanges(out double xMin,out double xMax,
1978                       out double yMin,out double yMax);
1979   };
1980
1981   //-------------------------------------------------------
1982   /*! \brief Interface of the %ViewManager
1983    *
1984    * The ViewManager is necessary for work with view windows (creation and deletion).
1985    */
1986   interface ViewManager: Base {
1987     /*! \brief Getting an active %View Frame
1988      *
1989      * Returns an object reference to the active %View Frame.
1990      * Type of the %View must be checked.
1991      * \note <BR>Returns nil if there are no views currently opened.
1992      */
1993     View GetCurrentView();
1994
1995     /*! \brief Creation of a 3d %View.
1996      *
1997      * Returns an object reference to the newly created 3D %View.
1998      */
1999     View3D Create3DView();
2000
2001     /*! \brief Creation of a Table %View.
2002      *
2003      * Returns an object reference to the newly created Table %View.
2004      */
2005     TableView CreateTableView(in Table theTable);
2006
2007     /*! \brief Creation of a 2D plot %View.
2008      *
2009      * Returns an object reference to the newly created 2D plot %View.
2010      */
2011     XYPlot CreateXYPlot();
2012
2013     /*! Deletes a definite view.
2014      * \param theView The view which should be deleted.
2015      */
2016     void Destroy(in View theView);
2017   };
2018 };
2019
2020 #endif