Salome HOME
Note 0009977 of the issue 0013178: EDF243 VISU : post_processing for fields at nodes
[modules/visu.git] / idl / VISU_Gen.idl
1 //  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 //  This library is free software; you can redistribute it and/or
7 //  modify it under the terms of the GNU Lesser General Public
8 //  License as published by the Free Software Foundation; either
9 //  version 2.1 of the License.
10 //
11 //  This library is distributed in the hope that it will be useful,
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 //  Lesser General Public License for more details.
15 //
16 //  You should have received a copy of the GNU Lesser General Public
17 //  License along with this library; if not, write to the Free Software
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //  File   : VISU_Gen.idl
23 //  Author : Alexey Petrov
24
25 /*! \file VISU_Gen.idl This file conatins a set of interfaces of the %VISU module.
26  *     This module provides various forms of data visualization in %SALOME application.
27  *     These forms include data tables, XY plots, 3d representations
28  *     and combination of these forms.
29  */
30
31 #ifndef __VISU_GEN__
32 #define __VISU_GEN__
33
34 #include "SALOME_Exception.idl"
35 #include "SALOME_GenericObj.idl"
36 #include "SALOME_Component.idl"
37 #include "SALOMEDS.idl"
38 #include "SALOMEDS_Attributes.idl"
39 #include "MED.idl"
40
41 /*!
42   The main package of interfaces of the post-processing module %VISU.
43 */
44 module VISU {
45   //-------------------------------------------------------
46   typedef string IdType;
47
48   typedef sequence<string> string_array;
49   typedef sequence<double> double_array;
50
51   /*!
52    * This enumeration contains a set of elements defining the type
53    * of the scaling, which can be applied on different presentations.
54    */
55   enum Scaling{ LINEAR, /*!< Linear type of scaling. */
56                 LOGARITHMIC /*!< Logarithmic type of scaling. */
57               };
58
59   /*!
60    * This enumeration contains a set of elements defining
61    * what kind of value will be extracted from gauss points data.
62    */
63   enum GaussMetric {
64     AVERAGE, /*!< Average value (default). */
65     MINIMUM, /*!< Minimum value. */
66     MAXIMUM  /*!< Maximum value. */
67   };
68
69   /*!
70    * This enumeration contains a set of elements defining the
71    * type of the %entity (topological units) constituting a mesh.
72    */
73   enum Entity {
74     NODE, /*!< Node corresponds to a geometrical point. */
75     EDGE, /*!< Edge corresponds to a geometrical line connecting two points. */
76     FACE, /*!< Face corresponds to a geometrical plane bounded by several lines. */
77     CELL, /*!< Cell is a volumic element of a mesh */
78     NONE  /*!< Indicates undefined entity value */
79   };
80
81   /*!
82    * Marker type (used for point rendering)
83    */
84   enum MarkerType {
85     MT_NONE,
86     MT_POINT,
87     MT_PLUS,
88     MT_STAR,
89     MT_O,
90     MT_X,
91     MT_O_POINT,
92     MT_O_PLUS,
93     MT_O_STAR,
94     MT_O_X,
95     MT_USER,
96     MT_POINT_SPRITE /*!< VISU specific */
97   };
98
99   /*!
100    * Marker scale (used for point rendering)
101    */
102   enum MarkerScale {
103     MS_NONE,
104     MS_10,
105     MS_15,
106     MS_20,
107     MS_25,
108     MS_30,
109     MS_35,
110     MS_40,
111     MS_45,
112     MS_50,
113     MS_55,
114     MS_60,
115     MS_65,
116     MS_70
117   };
118
119   /*!
120    * Tables' sort order
121    */
122   enum SortOrder {
123     AscendingOrder, /*!< The table items are sorted ascending */
124     DescendingOrder /*!< The table items are sorted descending */
125   };
126
127   /*!
128    * Tables' sort policy (specifies how empty cells are taken into account when sorting)
129    */
130   enum SortPolicy {
131     EmptyLowest,    /*!< Empty cells are considered as lowest values */
132     EmptyHighest,   /*!< Empty cells are considered as highest values */
133     EmptyFirst,     /*!< Empty cells are always first */
134     EmptyLast,      /*!< Empty cells are always last */
135     EmptyIgnore     /*!< Empty cells are ignored (stay at initial positions) */
136   };
137
138   /*!
139    * This enumeration contains a set of elements defining the type of the %VISU object.
140    * This enumeration is used for navigation between a set of %VISU interfaces.
141    */
142   enum VISUType {
143     TNONE, /*!< Not a %VISU object */
144     TCURVE, /*!< Curve line object for construction of 2D XY plots */
145     TTABLE, /*!< Table containing numerical data */
146     TCONTAINER, /*!< Container object used for storing a set of curve lines */
147     TMESH, /*!< Meshing object */
148     TSCALARMAP, /*!< Scalarmap 3D presentation object */
149     TISOSURFACES, /*!< Iso surface 3D presentation object */
150     TDEFORMEDSHAPE, /*!< Deformed shape 3D presentation object */
151     TSCALARMAPONDEFORMEDSHAPE, /*!< Scalar map on deformed shape 3D presentation object. It is obsolete. Use TDEFORMEDSHAPEANDSCALARMAP instead */
152     TDEFORMEDSHAPEANDSCALARMAP, /*!< Deformed shape and scalar map 3D presentation object */
153     TGAUSSPOINTS, /*!< Gauss Points 3D presentation object */
154     TPLOT3D, /*!< Plot3D 3D presentation object */
155     TPOINTMAP3D, /*!< 3D presentation for table object */
156     TCUTPLANES, /*!< Cut planes 3D presentation object */
157     TCUTLINES, /*!< Cut lines 3D presentation object */
158     TCUTSEGMENT, /*!< Cut segment 3D presentation object */
159     TVECTORS, /*!< Vectors 3D presentation object */
160     TSTREAMLINES, /*!< Streamlines 3D presentation object */
161     TVISUGEN, /*!< %VISU generator used for performing operations with different %VISU objects */
162     TVIEWMANAGER, /*!< View manager used for performing operations with different views */
163     TRESULT, /*!< The data on which different presentations are based */
164     TXYPLOT, /*!< 2D XY plot consisting of one or several curve lines */
165     TTABLEVIEW, /*!< Table view is used for displaying data tables */
166     TVIEW3D, /*!< 3D view is used for displaying 3D graphical presentations */
167     TGAUSSVIEW, /*!< 3D view is used for displaying Gauss Points graphical presentations */
168     TENTITY, /*!< An element composing a mesh: node, edge, face or cell */
169     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. */
170     TGROUP, /*!< A group of families */
171     TFIELD, /*!< Field represents the results of calculations (it can be scalar or vector values), grouped together under one physical concept. */
172     TTIMESTAMP, /*!<Time stamp represents a subfield: the results of calculations are taken in one definite moment. */
173     TANIMATION, /*!< Represents Animation object. */
174     TEVOLUTION, /*!< Represents Evolution object. */
175     TCOLOREDPRS3DHOLDER, /*!< Colored 3D presentation holder */
176     TCOLOREDPRS3DCACHE, /*!< Colored 3D presentation cache */
177     TPART, /*!< MULTIPR: part of a mesh */
178     TALL
179   };
180
181   /* Clipping planes management */
182   struct ClippingPlane {
183     double X;
184     double Y;
185     double Z;
186     double dX;
187     double dY;
188     double dZ;
189     boolean isAuto;
190     string name;
191   };
192
193   interface Base {
194     /*!
195      * Returns ID of the object.
196      */
197     IdType GetID();
198
199     /*!
200      * Returns the type of the presentable object
201      */
202     VISUType GetType();
203   };
204
205   /*!
206    *  \brief Removable object interface
207    *
208    *  Removable object interface is the root class of all removable objects.
209    */
210   interface RemovableObject : Base {
211     /*!
212      *  Remove object from study.
213      */
214     void RemoveFromStudy();
215   };
216
217   /*! \brief Presentable object interface
218    *
219    * Presentable object interface is the root class of all presentable objects.
220    */
221   interface PrsObject : RemovableObject {
222   };
223
224   //-------------------------------------------------------
225   /*! \brief Interface of curve representation.
226    *
227    * Manages presentation parameters of one curve.
228    * It can be used for presentation of a set of curves using a combined presentation.
229    */
230   interface Curve : PrsObject {
231     /*!
232      * Sets the title of the curve.
233      * \param theTitle This string parameter defines the title of this curve.
234      */
235     void SetTitle(in string theTitle);
236
237     /*!
238      * Gets the title of the curve.
239      * \return String value corresponding to the title of the curve.
240      */
241     string GetTitle();
242
243     /*!
244      * Sets the color of the curve.
245      * \param theColor The color of the curve. This parameter is taken
246      *                 from the <VAR>Orientation</VAR> enumeration.
247      */
248     void SetColor(in SALOMEDS::Color theColor);
249
250     /*!
251      * Gets the color of the curve.
252      * \return Color of the curve. The returned value will correspond
253      *         to one of the elements the <VAR>Color</VAR> enumeration.
254      */
255     SALOMEDS::Color GetColor();
256
257     /*!
258      * This enumeration contains a set of elements defining the
259      * presentation type of markers (data points) with help of
260      * which the curve is constructed on the graphics.
261      */
262     enum MarkerType { NONE,
263                       CIRCLE,
264                       RECTANGLE,
265                       DIAMOND,
266                       DTRIANGLE,
267                       UTRIANGLE,
268                       LTRIANGLE,
269                       RTRIANGLE,
270                       CROSS,
271                       XCROSS
272     };
273
274     /*!
275      * Sets the presentation type of markers (data points) with help of
276      * which the curve is constructed on the graphics.
277      * \param theType This parameter defines the type of marker with help
278      *                of which the curve is constructed on the graphics.
279      *                It is taken from <VAR>MarkerType</VAR> enumeration.
280      */
281     void SetMarker(in MarkerType theType);
282
283     /*!
284      * Gets the presentation type of markers (data points) with
285      * help of which the curve is constructed on the graphics.
286      * \return The type of marker with help of which the curve is constructed
287      *         on the graphics. The returned value will correspond to
288      *         one of the elements the <VAR>MarkerType</VAR> enumeration.
289      */
290     MarkerType GetMarker();
291
292     /*!
293      * This enumeration contains a set of elements defining the
294      * type of presentation of a curve line on the graphics.
295      */
296     enum LineType{ VOIDLINE, SOLIDLINE, DASHLINE, DOTLINE, DASHDOTLINE, DASHDOTDOTLINE};
297
298     /*!
299      * Sets the type of presentation of curve lines on the graphics.
300      * \param theType This parameter defines the type of presentation of curve lines on the graphics.
301      * \param theLineWidth Long value defining the width of the curve line.
302      */
303     void SetLine(in LineType theType, in long theLineWidth);
304
305     /*!
306      * Gets the type of representation of curve lines on the graphics.
307      * \return The type of representation of curve lines on the graphics.
308      */
309     LineType GetLine();
310
311     /*!
312      * Gets the width of the curve line.
313      * \return Long value corresponding to the width of the curve line.
314      */
315     long GetLineWidth();
316   };
317
318   //-------------------------------------------------------
319   /*! \brief %Container presentable object interface
320    *
321    * This class is provided in order to create one presentation using several presentable objects.
322    * This can provide a combination of a set of curves to display them in XY plot view.
323    */
324   interface Container : PrsObject {
325     /*!
326      * Adds a curve into the container.
327      * \param theCurve The added curve.
328      */
329     void AddCurve(in Curve theCurve);
330
331     /*!
332      * Removes a curve from the container.
333      * \param theCurve The removed curve.
334      */
335     void RemoveCurve(in Curve theCurve);
336
337     /*!
338      * Gets the number of curves which are stored in the container.
339      * \return A long value corresponding to the number of curves which are stored in the container.
340      */
341     long GetNbCurves();
342
343     /*!
344      * Removes all curves from the container.
345      */
346     void Clear();
347   };
348
349   //-------------------------------------------------------
350   interface Result;
351   /*! \brief 3D presentation interface
352    *
353    * This is a root class for all 3D presentations, which can be displayed in %VISU module.
354    */
355   interface Prs3d : PrsObject, SALOME::GenericObj
356   {
357     /*!
358      * Move the 3D presentation according to the given offset parameters
359      */
360     void SetOffset(in float theDx, in float theDy, in float theDz);
361
362     /*!
363      * Gets offset parameters for the 3D presentation
364      */
365     void GetOffset(out float theDx, out float theDy, out float theDz);
366
367     /*!
368      * Set standard point marker for the object
369      * \param theType standard marker type
370      * \param theScale standard marker scale
371      */
372     void SetMarkerStd(in MarkerType theType, in MarkerScale theScale);
373
374     /*!
375      * Set custom point marker for the object. The texture can be added
376      * by LoadTexture() function
377      * \param theTextureId texture ID
378      */
379     void SetMarkerTexture(in long theTextureId);
380
381     /*!
382      * Get type of the point marker assigned to the object
383      * \return current marker type (MT_NONE if no marker is set)
384      */
385     MarkerType GetMarkerType();
386
387     /*!
388      * Get scale of the point marker assigned to the object
389      * \return current marker scale (MS_NONE if no marker is set)
390      */
391     MarkerScale GetMarkerScale();
392
393     /*!
394      * Get texture idenifier of the point marker assigned to the object
395      * \return marker texture ID (0 if no marker set)
396      */
397     long GetMarkerTexture();
398
399     /*!
400      * Gets memory size actually used by the presentation (Mb).
401      */
402     float GetMemorySize();
403   };
404
405   /*!
406    * This enumeration contains a set of elements defining the
407    * type of presentation of the mesh.
408    */
409   enum PresentationType{ POINT,
410                          WIREFRAME,
411                          SHADED,
412                          INSIDEFRAME,
413                          SURFACEFRAME,
414                          FEATURE_EDGES,
415                          SHRINK
416   };
417
418   /*!
419    * This enumeration contains a set of elements defining the
420    * type of presentation of the 2D quadratic mesh elements.
421    */
422   enum Quadratic2DPresentationType{
423     LINES,
424     ARCS
425   };
426
427   /*! \brief Interface of the mesh.
428    *
429    * Manages presentation parameters of a 3D presentation of a mesh.
430    * This object can be used for presentation of set of curves using Container class.
431    */
432   interface Mesh : Prs3d {
433     /*!
434      * Sets the color of mesh cells.
435      * \param theColor The color of the cells. This parameter is taken from <VAR>Color</VAR> enumeration.
436      */
437     void SetCellColor(in SALOMEDS::Color theColor);
438
439     /*!
440      * Gets the color of mesh cells.
441      */
442     SALOMEDS::Color GetCellColor();
443
444     /*!
445      * Sets the color of mesh nodes.
446      * \param theColor The color of the nodes. This parameter is taken from <VAR>Color</VAR> enumeration.
447      */
448     void SetNodeColor(in SALOMEDS::Color theColor);
449
450     /*!
451      * Gets the color of mesh nodes.
452      */
453     SALOMEDS::Color GetNodeColor();
454
455     /*!
456      * Sets the color of mesh links.
457      * \param theColor The color of the links. This parameter is taken from <VAR>Color</VAR> enumeration.
458      */
459     void SetLinkColor(in SALOMEDS::Color theColor);
460
461     /*!
462      * Gets the color of mesh links.
463      */
464     SALOMEDS::Color GetLinkColor();
465
466     /*!
467      * Sets the type of representation of a mesh.
468      * \param theType The of representation of a mesh. This parameter is
469      *                taken from <VAR>PresentationType</VAR> enumeration.
470      */
471     void SetPresentationType(in PresentationType theType);
472
473     /*!
474      * Gets the type of representation of the mesh.
475      * \return The type of representation of the mesh.
476      */
477     PresentationType GetPresentationType();
478
479
480     /*!
481      * Sets the type of representation of a 2D quadratic mesh elements.
482      * \param theType The type of representation of 2D quadratic mesh elements.
483      *                This parameter is taken from
484      *                      <VAR>Quadratic2DPresentationType</VAR> enumeration.
485      */
486     void SetQuadratic2DPresentationType(in Quadratic2DPresentationType theType);
487
488     /*!
489      * Gets the type of representation of the 2D quadratic mesh elements.
490      * \return The type of representation of the 2D quadratic mesh elements.
491      */
492     Quadratic2DPresentationType GetQuadratic2DPresentationType();
493
494     /*!
495      * Switches shrink mode of presentation
496      * Note: SetPresentationType(SHRINK) is same as SetShrink(True)
497      */
498     void SetShrink(in boolean toShrink);
499
500     /*!
501      * Returns current state of shrink mode
502      */
503     boolean IsShrank();
504   };
505
506
507   //-------------------------------------------------------
508   /*! \brief Basic Interface for the %Colored 3D Presentations
509    *
510    * This interface is responsable for coloring of 3D field presentations
511    * according the scalar values applied to different cells.
512    * As well it contains presentation parameters of the scalar bar. The scalar
513    * bar is displayed along with each colored field presentation and serves for
514    * consulting the correspondance between colors and data values.
515    */
516   interface ColoredPrs3dBase : Prs3d
517   {
518     /*!
519      * Sets scalar range - min and max boundaries of the scalar bar.
520      * \param theMin  Min boundary of the scalar bar.
521      * \param theMax  Max boundary of the scalar bar.
522      */
523     void SetRange(in double theMin, in double theMax);
524
525     /*!
526      * Gets the min boundary of the scalar bar.
527      */
528     double GetMin();
529
530     /*!
531      * Gets the max boundary of the scalar bar.
532      */
533     double GetMax();
534
535     /*!
536      * Sets scalar range that corresponds to the source data.
537      */
538     void SetSourceRange();
539
540     /*!
541      * Gets the min boundary of the scalar bar from source data.
542      */
543     double GetSourceMin();
544
545     /*!
546      * Gets the max boundary of the scalar bar from source data.
547      */
548     double GetSourceMax();
549
550     /*!
551      * Defines whether the scalar range corresponds to the source data or not.
552      */
553     boolean IsRangeFixed();
554
555     /*! \brief Position of the scalar bar.
556      *
557      * Sets the position of the scalar bar origin on the screen.
558      * \param X   Horizontal position. The value can be between 0 and 1.
559      * \param Y   Vertical position. The value can be between 0 and 1.
560      */
561     void SetPosition(in double X, in double Y);
562
563     /*!
564      * Gets horizontal position of the scalar bar origin.
565      */
566     double GetPosX();
567
568     /*!
569      * Gets vertical position of the scalar bar origin.
570      */
571     double GetPosY();
572
573     /*! \brief Size of this presentable object.
574      *
575      * Sets the size of the scalar bar.
576      * \param theWidth  Width of this presentable object. The value can be between 0 and 1.
577      * \param theHeight  Height of this presentable object. The value can be between 0 and 1.
578      */
579     void SetSize(in double theWidth, in double theHeight);
580
581     /*!
582      * Gets the width of this presentable object.
583      * \return A double value corresponding to the width of this presentable object.
584      */
585     double GetWidth();
586
587     /*!
588      * Gets the height of this presentable object.
589      * \return A double value corresponding to the height of this presentable object.
590      */
591     double GetHeight();
592
593     /*!
594      * Sets the number of colors which will be used for presentation of this presentable object.
595      * \param theNbColors A long value defining the number of colors.
596      */
597     void SetNbColors(in long theNbColors);
598
599     /*!
600      * Gets the number of colors which will be used for visualization of this presentable object.
601      * \return A long value corresponding to the number of colors which
602      *         will be used for visualization of this presentable object.
603      */
604     long GetNbColors();
605     /*!
606      * Sets the number of labels which will be used for indication of color gradation
607      * of the scalar bar.
608      * \param theNbLabels A long value defining the number of labels.
609      */
610     void SetLabels(in long theNbLabels);
611
612     /*!
613      * Gets the number of labels which will be used for indication of color gradation of the scalar bar.
614      * \return A long value corresponding to the number of labels which will
615      *         be used for indication of color gradation of the scalar bar.
616      */
617     long GetLabels();
618
619     /*! %Orientation of the scalar bar (to provide backward compatibility). */
620     enum Orientation {
621       HORIZONTAL, /*!< Horizontal orientation of the scalar bar.*/
622       VERTICAL    /*!< Vertical orientation of the scalar bar.*/
623     };
624
625     /*!
626      * Sets the type of orientation of the scalar bar (to provide backward compatibility).
627      * \param theOrientation This parameter defines the orientation of the scalar bar.
628      *                       It is taken from the <VAR>Orientaton</VAR> enumeration.
629      */
630     void SetBarOrientation(in Orientation theOrientation);
631
632     /*!
633      * Gets the type of orientation of the scalar bar (to provide backward compatibility).
634      */
635     Orientation GetBarOrientation();
636   };
637
638   /*! \brief Additional Interface for the %Colored 3D Presentations
639    *
640    */
641
642   interface ColoredPrs3d : ColoredPrs3dBase
643   {
644     /*!
645      * Sets the title of the scalar bar. By default - the name of the selected result is used.
646      * \param theName String parameter defining the name of the scalar bar.
647      */
648     void SetTitle(in string theName);
649
650     /*!
651      * Gets the title of the scalar bar.
652      */
653     string GetTitle();
654
655     /*! Sets the method of coloring of the elements composing a 3D presentation.
656      */
657     void SetScalarMode(in long theScalarMode);
658
659     /*! Gets the method of coloring of the elements composing a 3D presentation.
660      */
661     long GetScalarMode();
662
663     /*!
664      * Set the visibility of a distribution curve.
665      * \param theIs is used to switch on/off the visibility of a distribution curve.
666      */
667     void SetIsDistributionVisible(in boolean theIs);
668
669     //! Gets current visibility of a distribution curve
670     boolean GetIsDistributionVisible();
671
672     //! Gets current filtering by scalars mode
673     boolean IsScalarFilterUsed();
674
675     void UseScalarFiltering( in boolean theUseScalarFilter );
676
677     /*!
678      * Sets scalar range - min and max boundaries of the scalar bar.
679      * \param theMin  Min boundary of the scalar bar.
680      * \param theMax  Max boundary of the scalar bar.
681      * \param theIsFilter  if true then filter by scalars.
682      */
683     void SetScalarFilterRange( in double theMin, in double theMax );
684
685     double GetScalarFilterMin();
686
687     double GetScalarFilterMax();
688
689     /*!
690      * Add group as geometry of presentation.
691      * \param theMeshName  - mesh name
692      * \param theGroupName - group name
693      */
694     void AddMeshOnGroup(in string theGroupName);
695
696     /*!
697      * PrsMerger method:
698      * Remove all groups.(The scalar map will be placed on all mesh).
699      */
700     void RemoveAllGeom();
701   };
702
703
704   //-------------------------------------------------------
705   interface View3D;
706   interface ColoredPrs3dCache;
707
708
709   //-------------------------------------------------------
710   /*! \brief %ColoredPrs3dHolder interface.
711    * Interface of 3d presentation's holder, which represents colored 3d presentations,
712    * created on fields. It is publishing in the object browser in a separate folder
713    * and can be controled by viewer's slider.
714    */
715   interface ColoredPrs3dHolder : PrsObject, SALOME::GenericObj
716   {
717     /*!
718      * Presentation input parameters.
719      */
720     struct BasicInput
721     {
722       Result myResult;
723       string myMeshName;
724       Entity myEntity;
725       string myFieldName;
726       long myTimeStampNumber;
727     };
728
729     /*!
730      * Apply input parameters to last visited presentation in the cache.
731      */
732     boolean Apply(in ColoredPrs3d thePrs3d,
733                   in BasicInput theInput,
734                   in View3D theView3D);
735
736     /*!
737      * Gets the last visited presentation in the cache.
738      */
739     ColoredPrs3d GetDevice();
740
741     /*!
742      * Gets type of the managed presentations.
743      */
744     VISUType GetPrsType();
745
746     /*! Defines timestamp representation.
747      */
748     struct TimeStampInfo
749     {
750       string myTime;
751       long myNumber;
752     };
753
754     /*! Defines representation range of timestamps.
755      */
756     typedef sequence<TimeStampInfo> TimeStampsRange;
757
758     /*!
759      * Gets TimeStampsRange information from the last visited presentation.
760      */
761     TimeStampsRange GetTimeStampsRange();
762
763     /*!
764      * Gets input parameters of the last visited presentation.
765      */
766     BasicInput GetBasicInput();
767
768     /*!
769      * Gets a %ColoredPrs3dCache, to which the holder belongs
770      */
771     ColoredPrs3dCache GetCache();
772
773     /*!
774      * Gets memory size actually used by the holder (Mb).
775      */
776     float GetMemorySize();
777   };
778
779
780   //-------------------------------------------------------
781   /*! \brief %ColoredPrs3dCache interface.
782    * This interface is responsible for memory management of 3d presentations.
783    * One cache corresponds to one study.
784    */
785   interface ColoredPrs3dCache : RemovableObject, SALOME::GenericObj
786   {
787     /*! This enumeration contains the cache memory modes. */
788     enum MemoryMode {
789       MINIMAL, /*!< Minimal memory mode (default behaviour). */
790       LIMITED  /*!< Limited memory mode (fixed memory size for presentations). */
791     };
792
793     /*! This enumeration defines how to enlarge the cache limited memory. */
794     enum EnlargeType {
795       NO_ENLARGE, /*!< No need to enlarge (default behaviour). */
796       ENLARGE,    /*!< Enlarge limited memory. */
797       IMPOSSIBLE  /*!< Impossible to enlarge (not enough free memory). */
798     };
799
800     /*! Sets a memory mode.*/
801     void SetMemoryMode(in MemoryMode theMode);
802
803     /*! Gets a memory mode.*/
804     MemoryMode GetMemoryMode();
805
806     /*! Sets a memory size for limited mode (Mb). */
807     void SetLimitedMemory(in float theMemorySize);
808
809     /*! Gets a memory size for limited mode (Mb). */
810     float GetLimitedMemory();
811
812     /*!
813      * Gets memory size actually used by the cache system (Mb).
814      */
815     float GetMemorySize();
816
817     /*! Creates %ColoredPrs3dHolder.*/
818     ColoredPrs3dHolder CreateHolder(in VISUType theType,
819                                     in ColoredPrs3dHolder::BasicInput theInput);
820
821     /*! Gets a memory which is required to create a holder. */
822     EnlargeType GetRequiredMemory(in VISUType theType,
823                                   in ColoredPrs3dHolder::BasicInput theInput,
824                                   out float theRequiredMemory);
825   };
826
827
828   //-------------------------------------------------------
829   /*! \brief Interface of the %Scalar Map
830    *
831    * This interface is responsable for coloring of 3D field presentations
832    * according the scalar values applied to different cells.
833    * As well it contains presentation parameters of the scalar bar. The scalar
834    * bar is displayed along with each colored field presentation and serves for
835    * consulting the correspondance between colors and data values.
836    */
837
838   interface ScaledPrs3d {
839     /*!
840      * Sets the type of scaling of the values reflected by the scalar bar.
841      * \param theScaling The value of this parameter is taken from the <VAR>Scaling</VAR> enumeration.
842      */
843     void SetScaling(in Scaling theScaling);
844
845     /*!
846      * Gets the type of scaling of the values reflected by this presentation.
847      */
848     Scaling GetScaling();
849   };
850
851   interface ScalarMap : ColoredPrs3d, ScaledPrs3d {
852
853     /*!
854      * Returns visibility state of scalar bar
855      */
856     boolean IsBarVisible();
857
858     /*!
859      * Sets visibility state of scalar bar
860      */
861     void SetBarVisible(in boolean theVisible);
862
863     /*!
864      * Sets the gauss metric for the presentation.
865      * \param theGaussMetric The value of this parameter is taken from the <VAR>GaussMetric</VAR> enumeration.
866      */
867     void SetGaussMetric(in GaussMetric theGaussMetric);
868
869     /*!
870      * Gets the gauss metric of the presentation.
871      */
872     GaussMetric GetGaussMetric();
873
874     /*!
875      * Sets the color of mesh links.
876      * \param theColor The color of the links. This parameter is taken from <VAR>Color</VAR> enumeration.
877      */
878     void SetLinkColor(in SALOMEDS::Color theColor);
879
880     /*!
881      * Gets the color of mesh links.
882      */
883     SALOMEDS::Color GetLinkColor();
884   };
885
886   //-------------------------------------------------------
887   /*! \brief Gauss Points presentation interface
888    *
889    * Presentation parameters of the Gauss Points presentation.
890    */
891   //-------------------------------------------------------
892   interface GaussPoints : ColoredPrs3d
893   {
894     //! Set flag indicating which scalar bar is active.
895     void SetIsActiveLocalScalarBar(in boolean theFlag);
896
897     //! Get flag indicating which scalar bar is active.
898     boolean GetIsActiveLocalScalarBar();
899
900     //! Set flag indicating visibility of global scalar bar.
901     void SetIsDispGlobalScalarBar(in boolean theFlag);
902
903     //! Get flag indicating visibility of global scalar bar.
904     boolean GetIsDispGlobalScalarBar();
905
906     //! Set value of the distance between global and local scalar bars.
907     void SetSpacing(in double theSpacing);
908
909     //! Get value of the distance between global and local scalar bars.
910     double GetSpacing();
911
912     /*!
913      * Returns visibility state of scalar bar
914      */
915     boolean IsBarVisible();
916
917     /*!
918      * Sets visibility state of scalar bar
919      */
920     void SetBarVisible(in boolean theVisible);
921
922     /*!
923      * Set the Multicolored mode.
924      * \param theIsColored is used to switch between Results and Geometry modes.
925      * Multiple colors are using when the presentation is
926      * drawing in the Results mode, one color - in the Geometry mode.
927      */
928     void SetIsColored(in boolean theIsColored);
929
930     //! Gets current color mode
931     boolean GetIsColored();
932
933     /*! Sets the color of this presentation in case of IsColored switched off.
934      * \param theColor The color of this presentation. This parameter
935      *                 is taken from the <VAR>Color</VAR> enumeration.
936      */
937     void SetColor(in SALOMEDS::Color theColor);
938
939     /*!
940      * When the Bicolor parameter is set to true, scalar bars are
941      * drawing with two colors : red color correspoonds to positive
942      * scalar values, blue color - to negative values.
943      */
944     void SetBiColor(in boolean theIsBiColor);
945
946     //! Get the Bicolor mode.
947     boolean GetBiColor();
948
949     //! Checks whether the Gauss Points will be deformed or not
950     boolean GetIsDeformed();
951
952     //! Apply deformation on the Gauss Points
953     void SetIsDeformed(in boolean theIsDeformed);
954
955     /*!
956      *  Sets the scale factor for scalar values
957      *  (how much corresponding mesh elements should be translated).
958      *  \param theScaleFactor The scaling factor.
959      */
960     void SetScaleFactor(in double theScaleFactor);
961
962     /*!
963      *  Gets the scale factor for scalar values.
964      *  (how much corresponding mesh elements is translated)
965      */
966     double GetScaleFactor();
967
968     /*!
969      * This enumeration contains a set of elements defining the type of representation of the vector head.
970      */
971     enum PrimitiveType {
972       SPRITE,
973       POINT,
974       SPHERE
975     };
976
977     //! Set type of the primitives which is used for drawing the Gauss Points
978     void SetPrimitiveType(in PrimitiveType thePrimitiveType);
979
980     //! Get type of the primitives which is used for drawing the Gauss Points
981     PrimitiveType GetPrimitiveType();
982
983     //! Sets Point Sprite clamp
984     void SetClamp(in double theClamp);
985
986     //! Gets Point Sprite clamp
987     double GetClamp();
988
989     //! Sets minimum size of Point Sprites
990     void SetMinSize(in double theMinSize);
991
992     //! Gets minimum size of Point Sprites
993     double GetMinSize();
994
995     //! Sets maximum size of Point Sprites
996     void SetMaxSize(in double theMaxSize);
997
998     //! Gets maximum size of Point Sprites
999     double GetMaxSize();
1000
1001     //! Sets magnification for Point Sprites
1002     void SetMagnification(in double theMagnification);
1003
1004     //! Gets magnification for Point Sprites
1005     double GetMagnification();
1006
1007     //! Sets the increment of changing Magnification parameter
1008     void SetMagnificationIncrement(in double theIncrement);
1009
1010     //! Gets the increment of changing Magnification parameter
1011     double GetMagnificationIncrement();
1012
1013     //! Sets Point Sprites size
1014     void SetGeomSize(in double theGeomSize);
1015
1016     //! Sets size of Point Sprite
1017     double GetGeomSize();
1018
1019     //! Get path to the image using for Main Point Sprite texture
1020     string GetMainTexture();
1021
1022     //! Get path to the image using for Alpha Point Sprite texture
1023     string GetAlphaTexture();
1024
1025     //! Points Main and AlphaMask images to be used by Point Sprites
1026     void SetTextures(in string theMainTexture, in string theAlphaTexture);
1027
1028     //! Sets Point Sprite Alpha threshold
1029     void SetAlphaThreshold(in double theAlphaThreshold);
1030
1031     //! Gets Point Sprite Alpha threshold
1032     double GetAlphaThreshold();
1033
1034     //! Sets resolution of the Geometrical Sphere
1035     void SetResolution(in long theResolution);
1036
1037     //! Sets resolution of the Geometrical Sphere
1038     long GetResolution();
1039
1040     //! Sets how many faces of can be drawn in the Geometrical Sphere primitive mode
1041     void SetFaceLimit(in long theFaceLimit);
1042
1043     //! Defines how many faces of can be drawn in the Geometrical Sphere primitive mode
1044     long GetFaceLimit();
1045
1046
1047   };
1048
1049
1050   /*! \brief MonoColor presentation presentation interface
1051    *
1052    * Presentation parameters of the MonoColor presentation.
1053    */
1054   interface MonoColorPrs : ScalarMap {
1055
1056     /*! This boolean method returns True if this deformed shape presentation is colored.
1057      */
1058     boolean IsColored();
1059
1060     /*! Shows this presentation in colored mode.
1061      * \param theColored If this boolean parameter is True this presentable
1062      *                   object will be shown in colored mode.
1063      */
1064     void ShowColored(in boolean theColored);
1065
1066     /*! Gets the color of this presentable object.
1067      * \return The color of this presentable object.
1068      */
1069     SALOMEDS::Color GetColor();
1070
1071     /*! Sets the color of this presentation.
1072      * \param theColor The color of this presentation. This parameter
1073      *                 is taken from the <VAR>Color</VAR> enumeration.
1074      */
1075     void SetColor(in SALOMEDS::Color theColor);
1076   };
1077
1078
1079   /*! \brief Deformed shape presentation interface
1080    *
1081    * Presentation parameters of the deformed shape presentation.
1082    */
1083   interface DeformedShape : MonoColorPrs
1084   {
1085     /*!
1086      * Sets the scale of the presentatable object.
1087      * \param theScale Double value defining the scale of this presentable object.
1088      */
1089     void SetScale(in double theScale);
1090
1091     /*!
1092      * Gets the scale of the presentatable object.
1093      */
1094     double GetScale();
1095
1096   };
1097
1098   //-------------------------------------------------------
1099   /*! \brief Deformation interface
1100    *
1101    * This is base interface for building of the deformed presentations
1102    */
1103   interface Deformation{
1104     /*!
1105      * Sets the scale of the presentatable object.
1106      * \param theScale Double value defining the scale of this presentable object.
1107      */
1108     void SetScale(in double theScale);
1109
1110     /*!
1111      * Gets the scale of the presentatable object.
1112      */
1113     double GetScale();
1114
1115     /*!
1116      * Sets the vectorial field
1117      * \param theEntity    - entity of vectorial field
1118      * \param theFieldName - the name of vectorial field
1119      */
1120     void SetVectorialField(in Entity theEntity,
1121                            in string theFieldName);
1122
1123     /*!
1124      * Get vectorial entity
1125      */
1126     Entity GetVectorialFieldEntity();
1127
1128     /*!
1129      * Get scalar field name
1130      */
1131     string GetVectorialFieldName();
1132
1133   };
1134
1135   //-------------------------------------------------------
1136   /*! \brief OptionalDeformation interface
1137    *
1138    * This is interface for switch on/off of the deformation of the presentation
1139    */
1140   interface OptionalDeformation : Deformation{
1141
1142     /*!
1143      * Sets the deformation flag of the presentatable object.
1144      * \param theFlag Boolean value defining the deformation flag of this presentable object.
1145      */
1146     void UseDeformation(in boolean theFlag);
1147
1148     /*!
1149      * Gets the deformation flag of the presentatable object.
1150      */
1151     boolean IsDeformed();
1152   };
1153
1154   //-------------------------------------------------------
1155   /*! \brief Scalar Map on Deformed shape presentation interface
1156    *
1157    * Presentation parameters of the scalar map on deformed shape presentation.
1158    */
1159   interface DeformedShapeAndScalarMap : ScalarMap {
1160
1161     /*!
1162      * Sets the scale of the presentatable object.
1163      * \param theScale Double value defining the scale of this presentable object.
1164      */
1165     void SetScale(in double theScale);
1166
1167     /*!
1168      * Gets the scale of the presentatable object.
1169      */
1170     double GetScale();
1171
1172     /*!
1173      * Sets the scalar field
1174      * \param theEntity    - entity of scalar field
1175      * \param theFieldName - the name of scalar field
1176      * \param theTimeStampNumber - the timestamp number for the scalar field
1177      */
1178     void SetScalarField(in Entity theEntity,
1179                         in string theFieldName,
1180                         in long theTimeStampNumber);
1181
1182
1183     /*!
1184      * Get scalar entity
1185      */
1186     Entity GetScalarEntity();
1187
1188     /*!
1189      * Get scalar field name
1190      */
1191     string GetScalarFieldName();
1192
1193     /*!
1194      * Get timestamp number for the scalar field
1195      */
1196     long GetScalarTimeStampNumber();
1197   };
1198
1199
1200   //-------------------------------------------------------
1201   /*!
1202    *  \brief Plot3D interface
1203    *
1204    *  Presentation parameters of Plot3D presentation. This type of presentation
1205    *  consists of deforming initial planar mesh according to values assigned to the mesh elements.
1206    *  If mesh not planar but volumic one, it is possible to generate intermediate planar mesh.
1207    */
1208   interface Plot3dBase {
1209     /*!
1210      *  Sets the scale factor for scalar values
1211      *  (how much corresponding mesh elements should be translated).
1212      *  \param theScaleFactor The scaling factor.
1213      */
1214     void SetScaleFactor (in double theScaleFactor);
1215
1216     /*!
1217      *  Gets the scale factor for scalar values.
1218      *  (how much corresponding mesh elements is translated)
1219      */
1220     double GetScaleFactor();
1221
1222     /*!
1223      *  Sets presentation type: contour or surface.
1224      *  \param theIsContourPrs Define, whether presentation type is contour.
1225      */
1226     void SetContourPrs (in boolean theIsContourPrs );
1227
1228     /*!
1229      *  Returns true if presentation type is contour.
1230      */
1231     boolean GetIsContourPrs();
1232
1233     /*!
1234      *  Sets the number of contours.
1235      *  \param theNb The number of contours.
1236      */
1237     void SetNbOfContours (in long theNb);
1238
1239     /*!
1240      *  Gets the number of contours.
1241      */
1242     long GetNbOfContours();
1243   };
1244
1245   interface Plot3D : ScalarMap, Plot3dBase {
1246     /*!
1247      *  This enumeration contains a set of elements defining
1248      *  the type of orientation in 3D space of the cutting plane.
1249      */
1250     enum Orientation { XY,   /*!< The object is located in the plane formed by X and Y axis. */
1251                        YZ,   /*!< The object is located in the plane formed by Y and Z axis. */
1252                        ZX }; /*!< The object is located in the plane formed by Z and X axis. */
1253
1254     /*!
1255      *  Sets the orientation in 3D space of cutting plane for the presentation.
1256      *  \param theOrientation This parameter defines the type of orientation of cutting plane
1257      *         in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
1258      *  \param theXAngle The angle of rotation of the cutting plane
1259      *         around the first axis of the chosen orientation.
1260      *  \param theXAngle The angle of rotation of the cutting plane
1261      *         around the second axis of the chosen orientation.
1262      */
1263     void SetOrientation (in Orientation theOrientation, in double theXAngle, in double theYAngle);
1264
1265     /*!
1266      *  Gets the type of orientation in 3D space of cutting plane.
1267      */
1268     Orientation GetOrientationType();
1269
1270     /*!
1271      *  Gets rotation angle of the cutting plane
1272      *  around the first axis of the chosen orientation.
1273      */
1274     double GetRotateX();
1275
1276     /*!
1277      *  Gets rotation angle of the cutting plane
1278      *  around the second axis of the chosen orientation.
1279      */
1280     double GetRotateY();
1281
1282     /*!
1283      *  Sets the position of a cutting plane.
1284      *  \param thePlanePosition The position of the cutting plane.
1285      *  \param theIsRelative Define, whether the input position is relative.
1286      */
1287     void SetPlanePosition (in double  thePlanePosition,
1288                            in boolean theIsRelative);
1289
1290     /*!
1291      *  Gets the position of the cutting plane
1292      */
1293     double GetPlanePosition();
1294
1295     /*!
1296      *  Returns true if a position of cutting plane is relative
1297      */
1298     boolean IsPositionRelative();
1299   };
1300
1301  //-------------------------------------------------------
1302   /*! \brief %Table representation interface
1303    *
1304    * Presentation parameters of the %Table view.
1305    */
1306   interface Table : PrsObject {
1307     /*!
1308      * Sets the title of the table.
1309      * \param theTitle String parameter defining the title of this table.
1310      */
1311     void SetTitle(in string theTitle);
1312
1313     /*!
1314      * Gets the title of the table.
1315      * \return A string value containing the title of the table.
1316     */
1317     string GetTitle();
1318
1319     /*!
1320      * This enumeration contains a set of elements defining the orientation of the table.
1321      */
1322     enum Orientation {
1323       HORIZONTAL, /*!< Horizontal orientation of the table. */
1324       VERTIACAL   /*!< Vertical orientation of the table. */
1325     };
1326
1327     /*!
1328      * Sets orientation of the table.
1329      * \param theOrientation This input parameter defines the orientation of the table.
1330      *                       It is taken from the <VAR>Orientation</VAR> enumeration.
1331      */
1332     void SetOrientation(in Orientation theOrientation);
1333
1334     /*!
1335      * Gets orientation of the table.
1336      * \return Orientation of the table. The returned value will correspond
1337      *         to one of the elements the <VAR>Orientation</VAR> enumeration.
1338      */
1339     Orientation GetOrientation();
1340
1341     /*!
1342      * Gets the number of rows of the table.
1343      * \return Long value corresponding to the number of rows of the table
1344      */
1345     long GetNbRows();
1346
1347     /*!
1348      * Gets the number of columns of the table.
1349      * \return Long value corresponding to the number of columns of the table
1350      */
1351     long GetNbColumns();
1352
1353     /*!
1354      * Sorts the specified row of the table.
1355      * \param theRow Index of the row to sort
1356      * \param theSortOrder Sort order (see <VAR>SortOrder</VAR> enumeration)
1357      * \param theSortPolicy Sort policy (see <VAR>SortPolicy</VAR> enumeration)
1358      */
1359     void SortRow(in long theRow, in SortOrder theSortOrder, in SortPolicy theSortPolicy);
1360
1361     /*!
1362      * Sorts the specified column of the table.
1363      * \param theRow Index of the column to sort
1364      * \param theSortOrder Sort order (see <VAR>SortOrder</VAR> enumeration)
1365      * \param theSortPolicy Sort policy (see <VAR>SortPolicy</VAR> enumeration)
1366      */
1367     void SortColumn(in long theColumn, in SortOrder theSortOrder, in SortPolicy theSortPolicy);
1368
1369     /*!
1370      * Sorts the table by the specified row.
1371      * \param theRow Index of the row, by which the table has to be sort
1372      * \param theSortOrder Sort order (see <VAR>SortOrder</VAR> enumeration)
1373      * \param theSortPolicy Sort policy (see <VAR>SortPolicy</VAR> enumeration)
1374      */
1375     void SortByRow(in long theRow, in SortOrder theSortOrder, in SortPolicy theSortPolicy);
1376
1377     /*!
1378      * Sorts the table by the specified column.
1379      * \param theColumn Index of the column, by which the table has to be sort
1380      * \param theSortOrder Sort order (see <VAR>SortOrder</VAR> enumeration)
1381      * \param theSortPolicy Sort policy (see <VAR>SortPolicy</VAR> enumeration)
1382      */
1383     void SortByColumn(in long theColumn, in SortOrder theSortOrder, in SortPolicy theSortPolicy);
1384   };
1385
1386   //-------------------------------------------------------
1387   /*! \brief %PointMap3d representation interface
1388    *
1389    * Presentation parameters of the %Table Point Map in 3d view.
1390    */
1391   interface PointMap3d : ColoredPrs3dBase, ScaledPrs3d, Plot3dBase, Table {
1392   };
1393
1394   //-------------------------------------------------------
1395   /*! \brief Cut planes interface
1396    *
1397    * Presentation parameters of Cut planes presentation. This type of presentation
1398    * consists of cutting your initial mesh by a definite number of planes. As the
1399    * result you will see these planes which will be cutted by the borders of the mesh.
1400    */
1401   interface CutPlanes : ScalarMap, OptionalDeformation {
1402     /*!
1403      * This enumeration contains a set of elements defining the type of orientation in 3D space
1404      * of the cut planes.
1405      */
1406     enum Orientation {XY, /*!< The object is located in the plane formed by X and Y axis. */
1407                       YZ, /*!< The object is located in the plane formed by Y and Z axis. */
1408                       ZX}; /*!< The object is located in the plane formed by Z and X axis. */
1409
1410     /*!
1411      * Sets the type of orientation in 3D space of cut planes presentation.
1412      * \param theOrientation This parameter defines the type of orientation of cut planes
1413      *                       in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
1414      * \param theXAngle The angle of rotation of the cut planes around
1415      *                  the first axis of the chosen orientation.
1416      * \param theXAngle The angle of rotation of the cut planes around
1417      *                  the second axis of the chosen orientation.
1418      */
1419     void SetOrientation(in Orientation theOrientation, in double theXAngle, in double theYAngle);
1420
1421     /*!
1422      * Gets the type of orientation in 3D space of cut planes presentation.
1423      */
1424     Orientation GetOrientationType();
1425
1426     /*!
1427      * Gets rotation angle of the cut plane presentation around the first axis of the chosen orientation.
1428      */
1429     double GetRotateX();
1430
1431     /*!
1432      * Gets rotation angle of the cut plane presentation around the second axis of the chosen orientation.
1433      */
1434     double GetRotateY();
1435
1436     /*!
1437      * Sets the displacement of the cut planes in 3D space.
1438      *
1439      * \param theDisp This parameter defines position of the cut planes
1440      * in 3D space. It varies from 0 to 1. If the chosen value is 0.5, the cut planes
1441      * will be evenly located regarding each other; in other words, the distance between all
1442      * of them will be equal. If the value is higher or lower than 0.5, the planes will be displaced
1443      * to one or another side.
1444      */
1445     void SetDisplacement(in double theDisp);
1446
1447     /*!
1448      * Gets the displacement of the cut planes in 3D space.
1449      */
1450     double GetDisplacement();
1451
1452     /*!
1453      * Sets the position of a definite cut plane.
1454      * \param thePlaneNumber The number of this cut plane.
1455      * \param thePlanePosition The position of this cut plane.
1456      */
1457      void SetPlanePosition(in long thePlaneNumber, in double thePlanePosition);
1458
1459     /*!
1460      * Sets the position of the choosen plane to default value.
1461      * \param thePlaneNumber The number of this cut plane.
1462      */
1463      void SetDefault(in long thePlaneNumber);
1464
1465     /*!
1466      * Gets the position of the choosen plane
1467      */
1468     double GetPlanePosition(in long thePlaneNumber);
1469
1470     /*!
1471      * Determines whether the choosen plane has default position.
1472      * \param thePlaneNumber The number of this cut plane.
1473      */
1474     boolean IsDefault(in long thePlaneNumber);
1475
1476     /*!
1477      * Sets the number of cut planes.
1478      * \param theNb The number of cut planes.
1479      */
1480     void SetNbPlanes(in long theNb);
1481
1482     /*!
1483      * Gets the number of cut planes.
1484      */
1485     long GetNbPlanes();
1486   };
1487
1488   //-------------------------------------------------------
1489   /*! \brief Base interface for Cut Lines and Cut Segment tools
1490    *
1491    */
1492   interface CutLinesBase : ScalarMap {
1493     /*!
1494      * Sets the number of cut lines.
1495      * \param theNb The number of cut lines.
1496      */
1497     void SetNbLines(in long theNb);
1498
1499     /*!
1500      * Gets the number of cut lines.
1501      */
1502     long GetNbLines();
1503
1504     /*! Invert all curves of corresponding table
1505      * \param theInvert - Invert all curves, if value is TRUE, else not.
1506      */
1507     void SetAllCurvesInverted(in boolean theInvert);
1508
1509     /*! Checks the orientation of all curves
1510      * \retval TRUE - if all curves are inverted, else FALSE
1511      */
1512     boolean IsAllCurvesInverted();
1513
1514     /*! Sets values which cutlines would be shown: aboslute or relative values
1515      * \param theAbsLength - boolean value, TRUE or false.
1516      */
1517     void SetUseAbsoluteLength(in boolean theAbsLength);
1518
1519     /*! Checks values of cutlines: using aboslute or relative values
1520      */
1521     boolean IsUseAbsoluteLength();
1522   };
1523
1524   //-------------------------------------------------------
1525   /*! \brief Cut lines presentation.
1526    *
1527    * Presentation parameters of a Cut lines presentation.
1528    * Cut Lines is a type of presentation which displays colored cells
1529    *   with applied scalar values on the mesh where lines are placed.
1530    * The procedure of construction of a Cut Lines presentation reuses the algorithm
1531    *   of creation of Cut Planes presentation and consists of two steps:
1532    *
1533    *   1. From Cut Planes presentation one plane is taken and
1534    *      it is used as base plane for construction of cut lines.
1535    *   2. This plane is cut by a regular array of planes. The result of this
1536    *      operation is a regular array of lines in space, belonging to the same plane
1537    *      and having the same orientation. They are located inside or on the mesh.
1538    */
1539   interface CutLines : CutLinesBase {
1540     /*!
1541      * Sets the type of orientation in 3D space of the base plane of a cut lines presentation.
1542      * \param theOrientation The orientation of the base plane in 3D space.
1543      * \param theXAngle The angle of rotation of the base plane around
1544      *                  the first axis of the chosen orientation.
1545      * \param theXAngle The angle of rotation of the base plane around
1546      *                  the second axis of the chosen orientation.
1547      */
1548     void SetOrientation(in CutPlanes::Orientation theOrientation, in double theXAngle, in double theYAngle);
1549
1550     /*!
1551      * Sets the type of orientation in 3D space of the cutting planes of a cut lines presentation.
1552      * \param theOrientation This parameter defines the type of orientation of the cutting planes
1553      *                       in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
1554      * \param theXAngle The angle of rotation of the cutting planes
1555      *                  around the first axis of the chosen orientation.
1556      * \param theXAngle The angle of rotation of the cutting planes
1557      *                  around the second axis of the chosen orientation.
1558      */
1559     void SetOrientation2(in CutPlanes::Orientation theOrientation, in double theXAngle, in double theYAngle);
1560
1561     /*!
1562      * Gets the type of orientation in 3D space of the base plane of a cut lines presentation.
1563      */
1564     CutPlanes::Orientation GetOrientationType();
1565
1566     /*!
1567      * Gets the type of orientation in 3D space of the cutting planes of a cut lines presentation.
1568      */
1569     CutPlanes::Orientation GetOrientationType2();
1570
1571     /*!
1572      * Gets rotation angle of the base plane around the first axis of the chosen orientation.
1573      */
1574     double GetRotateX();
1575
1576     /*!
1577      * Gets rotation angle of the cutting planes around the first axis of the chosen orientation.
1578      */
1579     double GetRotateX2();
1580
1581     /*!
1582      * Gets rotation angle of the base plane around the second axis of the chosen orientation.
1583      */
1584     double GetRotateY();
1585
1586     /*!
1587      * Gets rotation angle of the cutting planes around the second axis of the chosen orientation.
1588      */
1589     double GetRotateY2();
1590
1591     /*!
1592      * Sets the displacement of the base plane of the cut lines presentation in 3D space.
1593      *
1594      * \param theDisp This parameter defines position of the base plane
1595      * in 3D space. It varies from 0 to 1.
1596      */
1597     void SetDisplacement(in double theDisp);
1598
1599     /*!
1600      * Sets the displacement of the cutting planes of the cut lines presentation in 3D space.
1601      *
1602      * \param theDisp This parameter defines position of the cutting planes
1603      * in 3D space. It varies from 0 to 1.
1604      */
1605     void SetDisplacement2(in double theDisp);
1606
1607     /*!
1608      * Gets the displacement of the base plane of the cut lines presentation in 3D space.
1609      */
1610     double GetDisplacement();
1611
1612     /*!
1613      * Gets the displacement of the cutting planes of the cut lines presentation in 3D space.
1614      */
1615     double GetDisplacement2();
1616
1617     /*! Sets the position of the base plane in 3D space.
1618      * \param thePlanePosition A double value defining the position of the base plane in 3D space.
1619      */
1620     void SetBasePlanePosition(in double thePlanePosition);
1621
1622     /*! Gets the position of the base plane in 3D space.
1623      */
1624     double GetBasePlanePosition();
1625
1626     /*! Sets the position of one of cutting planes in 3D space.
1627      * \param thePlaneNumber A long value defining the order number of this cutting plane.
1628      * \param thePlanePosition A double value defining the position of the base plane in 3D space.
1629      */
1630     void SetLinePosition(in long thePlaneNumber, in double thePlanePosition);
1631
1632     /*! Gets the position of one of cutting planes in 3D space.
1633      * \param thePlaneNumber A long value defining the order number of this cutting plane.
1634      */
1635     double GetLinePosition(in long thePlaneNumber);
1636
1637     /*! Sets the position of the base plane to default value.
1638      */
1639     void SetDefault();
1640
1641     /*!
1642      * Determines whether the base plane has default position.
1643      * \return True if the base plane has default position.
1644      */
1645     boolean IsDefault();
1646
1647     /*!
1648      * Sets the position of the choosen cutting plane to default value.
1649      * \param thePlaneNumber The number of this cutting plane.
1650      */
1651     void SetDefaultPosition(in long thePlaneNumber);
1652
1653     /*!
1654      * Determines whether the choosen cutting plane has default position.
1655      * \param thePlaneNumber The number of this cutting plane.
1656      * \return True if this cutting plane has default position.
1657      */
1658     boolean IsDefaultPosition(in long thePlaneNumber);
1659   };
1660
1661   //-------------------------------------------------------
1662   /*! \brief Cut segment presentation.
1663    *
1664    * Presentation parameters of a Cut segment presentation.
1665    * Cut Segment is a simplified variant of Cut Lines presentation, which is used
1666    * to display a single line instead of set of them. Axis of this line is defined
1667    * by coordinates of two points in 3D space.
1668    */
1669   interface CutSegment : CutLinesBase {
1670     /*!
1671      * Sets coordinates of the first point of axis of the segment.
1672      * \param theX X coordinate of the point
1673      * \param theY Y coordinate of the point
1674      * \param theZ Z coordinate of the point
1675      */
1676     void SetPoint1(in double theX, in double theY, in double theZ);
1677
1678     /*!
1679      * Gets coordinates of the first point of axis of the segment.
1680      * \param theX X coordinate of the point
1681      * \param theY Y coordinate of the point
1682      * \param theZ Z coordinate of the point
1683      */
1684     void GetPoint1(out double theX, out double theY, out double theZ);
1685
1686     /*!
1687      * Sets coordinates of the second point of axis of the segment.
1688      * \param theX X coordinate of the point
1689      * \param theY Y coordinate of the point
1690      * \param theZ Z coordinate of the point
1691      */
1692     void SetPoint2(in double theX, in double theY, in double theZ);
1693
1694     /*!
1695      * Gets coordinates of the second point of axis of the segment.
1696      * \param theX X coordinate of the point
1697      * \param theY Y coordinate of the point
1698      * \param theZ Z coordinate of the point
1699      */
1700     void GetPoint2(out double theX, out double theY, out double theZ);
1701   };
1702
1703   /*! \brief Interface of the stream lines representation
1704    *
1705    * This interface contains presentation parameters of stream lines presentations.
1706    * <BR>Stream lines is a type of presentation transforming into lines the
1707    * cells with vectors having most similar direction. A stream line can be thought
1708    * of as the path that a massless particle takes in a vector field.
1709    * Streamlines are used to convey the structure of a vector field.
1710    * Usually streamlines are created to explore the most interesting features in the field.
1711    */
1712   interface StreamLines : MonoColorPrs {
1713     /*! This enumerations contains a set of elements necessary
1714      * for definition of direction of the stream lines.
1715      */
1716     enum Direction{ FORWARD,
1717                     BACKWARD,
1718                     BOTH
1719     };
1720
1721     /*! Sets the parameters of the stream lines presentation.
1722      * \param theIntStep Inegration step is a parameter of smoothness of the stream lines.
1723      *                   This parameter defines the accuracy of construction of the streamlines.
1724      *                   A smaller value of this parameter allows to construct smoother
1725      *                   streamlines (at the cost of more computation time).
1726      * \param thePropogationTime This parameter controls the maximum length of
1727      *                           the stream line (measured in units of time).
1728      * \param theStepLength This parameter defines the size of the output line segments
1729      *                      that make up the streamline (which is represented as a polyline).
1730      * \param thePrs3d The source presentation. The points of the field located on this source
1731      *                 presentation will serve as starting points for generation of stream lines.
1732      * \note If this parameter is not defined, your stream lines
1733      *       presentation will be generated on all points of the field.
1734      * \param thePercents This parameter defines the quantity of points of the field
1735      *                    (from 0 to 100%) which will be used as starting points for
1736      *                    construction of the stream lines. Thus, the value of this
1737      *                    parameter can vary from 0 to 1.
1738      * \param theDirection Direction of the stream lines (Forward, Backward or Both).
1739      * \return True if all parameters are properly set.
1740      */
1741     boolean SetParams(in double theIntStep,
1742                       in double thePropogationTime,
1743                       in double theStepLength,
1744                       in Prs3d thePrs3d,
1745                       in double thePercents,
1746                       in Direction theDirection);
1747
1748     /*! Gets the value of integration step of the stream lines presentation.
1749      */
1750     double GetIntegrationStep();
1751
1752     /*! Gets the value of propagation time of the stream lines presentation.
1753      */
1754     double GetPropagationTime();
1755
1756     /*! Gets the value of step length of the stream lines presentation.
1757      */
1758     double GetStepLength();
1759
1760     /*! Returns the source presentation used for generation of the stream lines.
1761      */
1762     Prs3d GetSource();
1763
1764     /*! Gets the quantity of points of the field used as starting
1765      *  points for generation of the stream lines presentation.
1766      */
1767     double GetUsedPoints();
1768
1769     /*! Returns the direction of the stream lines.
1770      */
1771     Direction GetDirection();
1772   };
1773
1774   /*! \brief Interface of the isometric surface presentation
1775    *
1776    * This interface contains presentation parameters of
1777    * isometric surface presentations.
1778    * <BR>Iso surfaces presentation combines all equal scalar
1779    * values on the cells and on the basis of them constructs
1780    * isobaric surfaces, which form this presentation.
1781    */
1782   interface IsoSurfaces : MonoColorPrs {
1783     /*!
1784      * Sets the number of isometric surfaces.
1785      * \param theNb A long value defining the number of isometric surfaces
1786      *              which will be used for construction of this presentation.
1787      */
1788     void SetNbSurfaces(in long theNb);
1789
1790     /*!
1791      * Gets the number of isometric surfaces
1792      */
1793     long GetNbSurfaces();
1794
1795     /*!
1796      * Returns TRUE if labels with values are shown
1797      */
1798     boolean IsLabeled();
1799
1800     /*!
1801      * Set show or not value labels
1802      */
1803     void ShowLabels(in boolean theShow, in long theNb);
1804
1805     /*!
1806      * Returns Nb of labels per surface
1807      */
1808    long GetNbLabels();
1809
1810   };
1811
1812   //-------------------------------------------------------
1813   /*! \brief Interface of the vector presentation.
1814    *
1815    * This interface contains presentation parameters of vector presentations.
1816    */
1817   interface Vectors : DeformedShape {
1818     /*!
1819      * Sets the width of the lines of the vectors.
1820      * \param theWidth A double value defining the width of the lines of the vectors.
1821      */
1822     void SetLineWidth(in double theWidth);
1823
1824     /*!
1825      * Gets the width of the lines of the vectors.
1826      */
1827     double GetLineWidth();
1828
1829     /*!
1830      * This enumeration contains a set of elements defining the type of representation of the vector head.
1831      */
1832     enum GlyphType{ ARROW,
1833                     CONE2,
1834                     CONE6,
1835                     NONE
1836                   };
1837
1838     /*!
1839      * Sets the type of representation of the vector head.
1840      * \param theType This parameter defines the type of representation of the vector head.
1841      * This value is taken from the <VAR>GlyphType</VAR> enumeration.
1842      */
1843     void SetGlyphType(in GlyphType theType);
1844
1845     /*!
1846      * Gets the type of representation of the vector head.
1847      */
1848     GlyphType GetGlyphType();
1849
1850     /*!
1851      * This enumeration contains a set of elements defining the position of the vector head.
1852      */
1853     enum GlyphPos{ CENTER, /*!<In the center of the vector.*/
1854                    TAIL,   /*!<In the tail of the vector.*/
1855                    HEAD  /*!<In the head of the vector.*/
1856                  };
1857
1858     /*!
1859      * Sets the position of the vector head.
1860      * \param thePos This parameter defines the position of the vector head.
1861      * This value is taken from the <VAR>GlyphPos</VAR> enumeration.
1862      */
1863     void SetGlyphPos(in GlyphPos thePos);
1864
1865     /*!
1866      * Gets the position of the vector head.
1867      */
1868     GlyphPos GetGlyphPos();
1869   };
1870
1871   //-------------------------------------------------------
1872   /*! \brief %Animation class
1873    *
1874    * This class provides a set of methods used for:<br>
1875    * <ul>
1876    *     <li> generating different animations on the basis of a field,
1877    *     <li> setting the parameters of the animations,
1878    *     <li> playing these animations in the %VISU module.
1879    * </ul>
1880    * \note
1881    * <BR><B>Field</B> represents the results of calculations
1882    * (it can be scalar or vector values), grouped together under one physical concept.
1883    * <BR><B>Time stamp</B> represents a subfield: the results
1884    * of calculations are taken in one definite moment.
1885    */
1886   interface Animation : Base
1887   {
1888     /*!
1889    * This enumeration contains a set of available animation modes.
1890    */
1891     enum AnimationMode{ PARALLEL, /*!< parallel mode of animation. */
1892                         SUCCESSIVE /*!< succcessive mode of animation. */
1893     };
1894
1895     /*! Defines the field which will be used as a base for generation of the animation.
1896      * \param theObject The %SObject corresponding to the field.
1897      */
1898     boolean addField(in SALOMEDS::SObject theObject);
1899
1900     /*! Remove all fields from Animation object.
1901      */
1902     void clearFields();
1903
1904     /*! Generates presentations on the basis of the field.
1905      * \param theFieldNum The number of the field, which will be used
1906      *                    as the basis for construction of the presentation.
1907      */
1908     void generatePresentations(in long theFieldNum);
1909
1910     /*! Generates a set of frames from the created by the method
1911      *  <VAR>generatePresentations</VAR>3D presentations. A sequence of
1912      *  these frames will be transformed into an animation.
1913      *  \return  True, if the frames have been successfully generated.
1914      */
1915     boolean generateFrames();
1916
1917     /*! Clears the view before starting an animation.
1918      */
1919     void clearView();
1920
1921     /*! \name Playback of an animation:
1922      */
1923 /*@{*/
1924
1925     /*! Starts an animation.
1926      */
1927     void startAnimation();
1928
1929     /*! Stops an animation.
1930      */
1931     void stopAnimation();
1932
1933     /*! Forwards to the next frame.
1934      */
1935     void nextFrame();
1936
1937     /*! Returns to the previous frame.
1938      */
1939     void prevFrame();
1940
1941     /*! Returns to the first frame of the animation.
1942      */
1943     void firstFrame();
1944
1945     /*! Forwards to the last frame of the animation.
1946      */
1947     void lastFrame();
1948
1949     /*!  Passes to a definite frame of the animation.
1950      * \param theFrame A long value defining the number of the frame.
1951      */
1952     void gotoFrame(in long theFrame);
1953 /*@}*/
1954
1955     /*! Gets the number of time stamps (subfields) contained in the given field.
1956      */
1957     long getNbFields();
1958
1959     /*! Gets the number of generated frames
1960      */
1961     long getNbFrames();
1962
1963     /*! Returns True, if the animation is currently running.
1964      */
1965     boolean isRunning();
1966
1967     /*! Returns the number of the current frame.
1968      */
1969     long getCurrentFrame();
1970
1971     /*!
1972      */
1973     ColoredPrs3d getPresentation(in long theField, in long theFrame);
1974
1975     /*! Sets the type of presentation (vectors, deformed shape etc.)
1976      *  which will be generated by the method <VAR>generatePresentations</VAR>.
1977      *  \note \c addField() method should be called before in order to add field
1978      *  with number theFieldNum.
1979      */
1980     void setPresentationType(in long theFieldNum, in VISUType theType);
1981
1982     /*! Gets the type of presentation (vectors, deformed shape etc.) which will
1983      *  be generated by the method <VAR>generatePresentations</VAR>.
1984      *  \note \c addField() method should be called before in order to add field
1985      *  with number theFieldNum.
1986      */
1987     VISUType getPresentationType(in long theFieldNum);
1988
1989     /*! Sets the speed of the animation.
1990      * \param theSpeed The speed of the animation. The value varies from 1 to 99.
1991      */
1992     void setSpeed(in long theSpeed);
1993
1994     /*!  Gets the speed of the animation.
1995      */
1996     long getSpeed();
1997
1998     /*! Ruturns True, if playback of the animation is proportional.
1999      * This option allows to render your animation with proportional periods
2000      * of time between every frame (not depending on the time stamps).
2001      */
2002     boolean isProportional();
2003
2004     /*! Sets the range of the animation. The range is defined on the basis of
2005      *  the time stamps of the field which have been used for generation of the animation.
2006      *  This method allows to bound the range of generated frames.
2007      *  If this method is not used, the animation will be generated
2008      *  on the basis of all time stamps contained in the field.
2009      *  \param theMin The value of the first time stamp which will be used for generation of the animation.
2010      *  \param theMax The value of the last time stamp which will be used for generation of the animation.
2011      */
2012     void setAnimationRange(in double theMin, in double theMax);
2013
2014     /*! Gets the number of the first time stamp which will be used for generation of the animation.
2015      */
2016     double getMinRange();
2017
2018     /*! Gets the number of the last time stamp which will be used for generation of the animation.
2019      */
2020     double getMaxRange();
2021
2022     /*! Returns True if the range of the animation has been defined
2023      *  by the method <VAR>setAnimationRange</VAR>. Otherwise
2024      *  the animation will be generated on the basis of all time stamps contained in the field.
2025      */
2026     boolean isRangeDefined();
2027
2028     /*! Sets the sequence of the animation. The sequence is defined on the basis of
2029      *  the time stamps of the field which have been used for generation of the animation.
2030      *  This method allows to set the sequence of generated frames.
2031      *  If this method is not used, the animation will be generated
2032      *  on the basis of all time stamps contained in the field.
2033      *  Format of the sequence: '1,9,2-5,7-8'
2034      *  \param theSequence The sequence of time stamps indices which will be used for generation of the animation.
2035      */
2036     void setAnimationSequence(in string theSequence);
2037
2038     /*! Gets the animation sequence.
2039      */
2040     string getAnimationSequence();
2041
2042     /*! Returns True if the sequence of the animation has been defined
2043      *  by the method <VAR>setAnimationSequence</VAR>. Otherwise
2044      *  the animation will be generated on the basis of all time stamps contained in the field.
2045      */
2046     boolean isSequenceDefined();
2047
2048     /*! Saves all the frames composing the animation into a definite directory.
2049      *  Pictures format is set with method <VAR>setDumpFormat()</VAR>.
2050      *  \param thePath The directory where all the frames will be saved.
2051      */
2052     void dumpTo(in string thePath);
2053
2054     /*! Set format for saving all the frames composing the animation.
2055      *  \param theFormat The format for saving pictures.
2056      *                   For available formats see QImageIO documentation (Qt).
2057      *                   If specified format is not available, default format will be used.
2058      *                   Default format is JPEG or first of supported, if JPEG is not available.
2059      *  \return Really set format. Differ from \a theFormat if \a theFormat is not available.
2060      */
2061     string setDumpFormat(in string theFormat);
2062
2063     /*! Set frequency of timestamps used to generate AVI file.
2064      *  \param theFrequency The frequency of timestamps to use.
2065      */
2066     void setTimeStampFrequency(in long theFrequency);
2067
2068     /*! Get frequency of timestamps used to generate AVI file.
2069      *  \return The frequency of timestamps to use.
2070      */
2071     long getTimeStampFrequency();
2072
2073     /*! Returns True, if the playback of the animation is cycling.
2074      */
2075     boolean isCycling();
2076
2077     /*! Gets the first time stamp of the field defined at the input of the animation.
2078      * \note This method is used if animation range is <b>NOT</b> defined.
2079      */
2080     double getMinTime();
2081
2082     /*! Gets the last time stamp of the field defined at the input of the animation.
2083      * \note This method is used if animation range is <b>NOT</b> defined.
2084      */
2085     double getMaxTime();
2086
2087     /*! Sets proprtional playback of the animation. This option allows to render your animation
2088      *  with proportional periods of time between every frame (not depending on the time stamps).
2089      *  \param theProp If this boolean parameter is True, playback
2090      *                 of your animation will be set as proportional.
2091      */
2092     void setProportional(in boolean theProp);
2093
2094     /*! Sets cycling playback of the animation. The number of cycles
2095      *  can be infinite, untill you use <VAR>startAnimation</VAR> method.
2096      *  \param theCycle If this boolean parameter is True, playback
2097      *                  of your animation will be set as cycling.
2098      */
2099     void setCycling(in boolean theCycle);
2100
2101     boolean isCleaningMemoryAtEachFrame();
2102     void setCleaningMemoryAtEachFrame(in boolean theCycle);
2103
2104     SALOMEDS::SObject publishInStudy();
2105
2106     void saveAnimation();
2107
2108     void restoreFromStudy(in SALOMEDS::SObject theSObj);
2109
2110     boolean isSavedInStudy();
2111
2112     /*!
2113      * Sets the animation mode.
2114      * \param theMode The value of this parameter is taken from the <VAR>AnimationMode</VAR> enumeration.
2115      */
2116     void setAnimationMode(in AnimationMode theMode);
2117
2118     /*!
2119      * Gets the animation mode.
2120      */
2121     AnimationMode getAnimationMode();
2122
2123     /*!
2124      * Apply the presentation properties to all fields. The exception is raised in the following cases:
2125      * 1) presentations for the given field is not yet created;
2126      * 2) invalid dynamic cast of the given presentation to VISU::ColoredPrs3d_i;
2127      * 3) the MED file is not the same;
2128      * 4) the mesh name is not the same;
2129      * 5) the field name is not the same;
2130      * 6) the entity is not the same.
2131      */
2132     void ApplyProperties(in long theFieldNum, in ColoredPrs3d thePrs)
2133       raises (SALOME::SALOME_Exception);
2134   };
2135
2136
2137   //-------------------------------------------------------
2138   interface XYPlot;
2139
2140   //-------------------------------------------------------
2141   /*! \brief Interface %Evolution
2142    *
2143    */
2144   interface Evolution : Base
2145   {
2146     /*!
2147      * Defines the field which will be used as a base for generation of the evolution.
2148      * \param theObject The %SObject corresponding to the field.
2149      */
2150     boolean setField(in SALOMEDS::SObject theObject);
2151
2152     /*!
2153      * Sets id of the point for which the evolution will be generated.
2154      * \param thePointId id of the point.
2155      */
2156     void setPointId(in long thePointId);
2157
2158     /*!
2159      * Sets id of the component for which the evolution will be generated.
2160      * \param thePointId id of the component.
2161      */
2162     void setComponentId(in long theComponentId);
2163
2164     /*!
2165      * Shows the evolution.
2166      */
2167     boolean showEvolution();
2168
2169     /*!
2170      * Restores the evolution from study.
2171      * \param theSObj the study object from which the evolution should be restored.
2172      */
2173     void restoreFromStudy(in SALOMEDS::SObject theSObj);
2174   };
2175
2176
2177   /*! \brief Interface %Result
2178    *
2179    * This interface serves for inner representation of data generated
2180    * in other sources (MED object or file). This data is needed
2181    * for further construction of graphical presentations.
2182    */
2183   interface Result : RemovableObject, SALOME::GenericObj
2184   {
2185     /*! Reads all data from the corresponding sources. By default the data is loaded on demand.
2186      */
2187     boolean BuildAll();
2188
2189     /*! Start to parse the source MED file and publish all its entities into the study*/
2190     boolean Build(in boolean theIsBuildAll, in boolean theIsAtOnce);
2191
2192     /*! Allow to check is all requested MED entites already loaded or not */
2193     boolean IsDone();
2194
2195     /*! Allow to check is corresponding MED entites already loaded or not */
2196     boolean IsEntitiesDone();
2197
2198     /*! Choose to parse MED fields and perform global min / max on the MED timestamps.*/
2199     void SetBuildFields(in boolean theIsBuildFields, in boolean theIsCalculateMinMax);
2200
2201     /*! Allow to check is corresponding MED fields already loaded or not */
2202     boolean IsFieldsDone();
2203
2204     /*! Choose to parse MED groups.*/
2205     void SetBuildGroups(in boolean theIsBuildGroups);
2206
2207     /*! Allow to check is corresponding MED groups and families already loaded or not */
2208     boolean IsGroupsDone();
2209
2210     /*! Allow to check is min / max calculation over field's components already perfrormed or not */
2211     boolean IsMinMaxDone();
2212
2213     /*! Allow to check is corresponding multi resolution structure already loaded or not */
2214     boolean IsPartsDone();
2215
2216     typedef sequence<Entity> Entities;
2217
2218     typedef string EntityName;
2219
2220     typedef sequence<EntityName> EntityNames;
2221
2222     typedef long TimeStampNumber;
2223
2224     typedef sequence<TimeStampNumber> TimeStampNumbers;
2225
2226     enum Resolution {
2227       FULL,
2228       MEDIUM,
2229       LOW,
2230       HIDDEN
2231     };
2232
2233     typedef sequence<Resolution> Resolutions;
2234
2235     /*! Gets existing mesh names */
2236     EntityNames GetMeshNames();
2237
2238     /*! Gets existing mesh entites for the given mesh name */
2239     Entities GetEntities(in EntityName theMeshName);
2240
2241     /*! Gets existing families for the given mesh name and entity */
2242     EntityNames GetFamilies(in EntityName theMeshName, in Entity theEntity);
2243
2244     /*! Gets existing families for the given mesh name */
2245     EntityNames GetGroups(in EntityName theMeshName);
2246
2247     /*! Gets existing fields for the given mesh name and entity */
2248     EntityNames GetFields(in EntityName theMeshName, in Entity theEntity);
2249
2250     /*! Gets number of components for the given mesh name, entity and name of field */
2251     long GetNumberOfComponents(in EntityName theMeshName, in Entity theEntity, in EntityName theFieldName);
2252
2253     /*! Gets existing numbers of time stamps for the given mesh name, entity and name of field */
2254     TimeStampNumbers GetTimeStampNumbers(in EntityName theMeshName, in Entity theEntity,
2255                                          in EntityName theFieldName);
2256
2257     /*! Gets time values of time stamps for the given mesh name, entity and name of field */
2258     double_array GetTimeStampValues(in EntityName theMeshName, in Entity theEntity, in EntityName theFieldName);
2259
2260     /*! Gets existing parts of multi resolution structure for the given mesh name */
2261     EntityNames GetPartNames(in EntityName theMeshName);
2262
2263     /*! Gets available resolutions of multi resolution structure for the given mesh and part names */
2264     Resolutions GetResolutions(in EntityName theMeshName, in EntityName thePartName);
2265
2266     /*! Gets current resolution of multi resolution structure for the given mesh and part names */
2267     Resolution GetResolution(in EntityName theMeshName, in EntityName thePartName);
2268
2269     /*! Gets current resolution of multi resolution structure for the given mesh and part names */
2270     void SetResolution(in EntityName theMeshName, in EntityName thePartName, in Resolution theResolution);
2271
2272     /*! Gets information about imported MED file */
2273     SALOME_MED::MedFileInfo GetMEDFileInfo();
2274
2275     /*! Export MED file from temp object.  */
2276     boolean ExportMED(in string theFileName);
2277   };
2278
2279   //-------------------------------------------------------
2280   interface ViewManager;
2281
2282   /*! \brief %VISU_Gen interface
2283    *
2284    * This is the main interface of %VISU component. It is necessary for creation of
2285    * post-processing presentations from given %Result and %Table object reference,
2286    * using the views provided by %ViewManager.
2287    */
2288   interface VISU_Gen : Engines::EngineComponent, SALOMEDS::Driver, Base
2289   {
2290     /*! Sets a definite study to be current.
2291      */
2292     void SetCurrentStudy(in SALOMEDS::Study theStudy);
2293
2294     /*! Gets the current study.
2295      */
2296     SALOMEDS::Study GetCurrentStudy();
2297
2298     /*!
2299      * Gets the %View Manager which is used for creation of
2300      * post-processing presentations.
2301      */
2302     ViewManager GetViewManager();
2303
2304     /*!
2305      * Imports tables from a file and create TableAttribute in Study
2306      */
2307     SALOMEDS::SObject ImportTables(in string theFileName,
2308                                    in boolean theFirstStrAsTitle);
2309
2310     /*!
2311      * Export table to a file
2312      */
2313     boolean ExportTableToFile(in SALOMEDS::SObject theTable, in string theFileName);
2314
2315     /*!
2316      * Imports data from a file. The access to this file will be conserved outside of the application.
2317      * \param theFileName String parameter defining the name of the file
2318      *                    from which the data will be imported.
2319      */
2320     Result ImportFile(in string theFileName);
2321
2322     /*!
2323      * Create result and initialize its with the file. The access to this file will be conserved outside of the application.
2324      * \param theFileName String parameter defining the name of the file
2325      *                    from which the data will be imported.
2326      */
2327     Result CreateResult(in string theFileName);
2328
2329     /*!
2330      * Imports data from a file. The access to this file will closed.
2331      * \param theFileName String parameter defining the name of the file
2332      *                    from which the data will be imported.
2333      */
2334     Result CopyAndImportFile(in string theFileName);
2335
2336     /*!
2337      * Imports data from a %MED object.
2338      */
2339     Result ImportMed(in SALOMEDS::SObject theMedSObject);
2340
2341     /*!
2342      * Imports data from a %MED field.
2343      */
2344     Result ImportMedField(in SALOME_MED::FIELD theField);
2345
2346     /*!
2347      * Rename a study object, representing a mesh, specified by given values.
2348      * \param theResult   Data generated in other sources (MED object or file).
2349      * \param theMeshName One of the meshes presented in MED file.
2350      * \param theEntity   Type of entity where the field is defined.
2351      * \param theSubMeshName Name of sub-mesh (group or family).
2352      * \param theNewName  Name to be given to the study object.
2353      */
2354     void RenameEntityInStudy(in Result theResult,
2355                              in string theMeshName,
2356                              in Entity theEntity,
2357                              in string theNewName);
2358     void RenameFamilyInStudy(in Result theResult,
2359                              in string theMeshName,
2360                              in Entity theEntity,
2361                              in string theSubMeshName,
2362                              in string theNewName);
2363     void RenameGroupInStudy(in Result theResult,
2364                             in string theMeshName,
2365                             in string theSubMeshName,
2366                             in string theNewName);
2367
2368     /*!
2369      * Creates a mesh on the basis of the data generated in other sources (MED object or file).
2370      * \param theResult   Data generated in other sources. (MED object or file)
2371      * \param theMeshName  One of the meshes presented in MED file
2372      * \param theEntity Type of entity where the field is defined
2373      */
2374     Mesh MeshOnEntity(in Result theResult, in string theMeshName, in Entity theEntity);
2375
2376     /*!
2377      * Creates on the basis of a family a mesh  which will be composed of geometrical
2378      * elements, corresponding to the type of cells (node, edge, face or cell) of this family.
2379      * \param theResult   Data generated in other sources. (MED object or file)
2380      * \param theMeshName  One of the meshes presented in MED file
2381      * \param theEntity Type of entity where the field is defined.
2382      */
2383     Mesh FamilyMeshOnEntity(in Result theResult, in string theMeshName,
2384                             in Entity theEntity, in string theFamilyName);
2385
2386     /*!
2387      * Creates a mesh on the basis of a group of families.
2388      * \param theResult   Data generated in other sources. (MED object or file)
2389      * \param theMeshName  One of the meshes presented in MED file
2390      * \param theGroupName Name of the group.
2391      */
2392     Mesh GroupMesh(in Result theResult, in string theMeshName, in string theGroupName);
2393
2394     /*!
2395      * Creates a scalar map presentation.
2396      * \param theResult    Data generated in other sources. (MED object or file)
2397      * \param theMeshName  One of the meshes presented in MED file
2398      * \param theEntity    Type of entity where the field is defined
2399      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2400      * \param theTimeStampNumber Number of iteration on the field
2401      */
2402     ScalarMap ScalarMapOnField(in Result theResult, in string theMeshName,
2403                                in Entity theEntity, in string theFieldName,
2404                                in long theTimeStampNumber);
2405
2406     /*!
2407      * Creates a Gauss Points presentation.
2408      * \param theResult    Data generated in other sources. (MED object or file)
2409      * \param theMeshName  One of the meshes presented in MED file
2410      * \param theEntity    Type of entity where the field is defined
2411      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2412      * \param theTimeStampNumber Number of iteration on the field
2413      */
2414     GaussPoints GaussPointsOnField(in Result theResult, in string theMeshName,
2415                                    in Entity theEntity, in string theFieldName,
2416                                    in long theTimeStampNumber);
2417
2418     /*!
2419      * Creates a deformed shape presentation.
2420      * \param theResult    Data generated in other sources. (MED object or file)
2421      * \param theMeshName  One of the meshes presented in MED file
2422      * \param theEntity    Type of entity where the field is defined
2423      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2424      * \param theTimeStampNumber Number of iteration on the field
2425      */
2426     DeformedShape DeformedShapeOnField(in Result theResult, in string theMeshName,
2427                                        in Entity theEntity, in string theFieldName,
2428                                        in long theTimeStampNumber);
2429
2430     /*!
2431      * Creates a deformed shape presentation. This function is obsolete. Use DeformedShapeAndScalarMapOnField instead.
2432      * \param theResult    Data generated in other sources. (MED object or file)
2433      * \param theMeshName  One of the meshes presented in MED file
2434      * \param theEntity    Type of entity where the field is defined
2435      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2436      * \param theTimeStampNumber Number of iteration on the field
2437      */
2438     DeformedShapeAndScalarMap ScalarMapOnDeformedShapeOnField(in Result theResult, in string theMeshName,
2439                                                               in Entity theEntity, in string theFieldName,
2440                                                               in long theTimeStampNumber);
2441
2442     /*!
2443      * Creates a deformed shape presentation.
2444      * \param theResult    Data generated in other sources. (MED object or file)
2445      * \param theMeshName  One of the meshes presented in MED file
2446      * \param theEntity    Type of entity where the field is defined
2447      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2448      * \param theTimeStampNumber Number of iteration on the field
2449      */
2450     DeformedShapeAndScalarMap DeformedShapeAndScalarMapOnField(in Result theResult, in string theMeshName,
2451                                                                in Entity theEntity, in string theFieldName,
2452                                                                in long theTimeStampNumber);
2453
2454     /*!
2455      * Creates a vector presentation.
2456      * \param theResult    Data generated in other sources. (MED object or file)
2457      * \param theMeshName  One of the meshes presented in MED file
2458      * \param theEntity    Type of entity where the field is defined
2459      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2460      * \param theTimeStampNumber Number of iteration on the field
2461      */
2462     Vectors VectorsOnField(in Result theResult, in string theMeshName,
2463                            in Entity theEntity, in string theFieldName,
2464                            in long theTimeStampNumber);
2465
2466     /*!
2467      * Creates an iso surface presentation.
2468      * \param theResult    Data generated in other sources. (MED object or file)
2469      * \param theMeshName  One of the meshes presented in MED file
2470      * \param theEntity    Type of entity where the field is defined
2471      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2472      * \param theTimeStampNumber Number of iteration on the field
2473      */
2474     IsoSurfaces IsoSurfacesOnField(in Result theResult, in string theMeshName,
2475                                    in Entity theEntity, in string theFieldName,
2476                                    in long theTimeStampNumber);
2477
2478     /*!
2479      * Creates an stream lines presentation.
2480      * \param theResult    Data generated in other sources. (MED object or file)
2481      * \param theMeshName  One of the meshes presented in MED file
2482      * \param theEntity    Type of entity where the field is defined
2483      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2484      * \param theTimeStampNumber Number of iteration on the field
2485      */
2486     StreamLines StreamLinesOnField(in Result theResult, in string theMeshName,
2487                                    in Entity theEntity, in string theFieldName,
2488                                    in long theTimeStampNumber);
2489
2490     /*!
2491      * Creates a presentation of cut planes.
2492      * \param theResult    Data generated in other sources. (MED object or file)
2493      * \param theMeshName  One of the meshes presented in MED file
2494      * \param theEntity    Type of entity where the field is defined
2495      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2496      * \param theTimeStampNumber Number of iteration on the field
2497      */
2498     CutPlanes CutPlanesOnField(in Result theResult, in string theMeshName,
2499                                in Entity theEntity, in string theFieldName,
2500                                in long theTimeStampNumber);
2501
2502     /*!
2503      * Creates a presentation of cut lines.
2504      * \param theResult    Data generated in other sources. (MED object or file)
2505      * \param theMeshName  One of the meshes presented in MED file
2506      * \param theEntity    Type of entity where the field is defined
2507      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2508      * \param theTimeStampNumber Number of iteration on the field
2509      */
2510     CutLines CutLinesOnField(in Result theResult, in string theMeshName,
2511                              in Entity theEntity, in string theFieldName,
2512                              in long theTimeStampNumber);
2513
2514     /*!
2515      * Creates a presentation of cut segment.
2516      * \param theResult    Data generated in other sources. (MED object or file)
2517      * \param theMeshName  One of the meshes presented in MED file
2518      * \param theEntity    Type of entity where the field is defined
2519      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2520      * \param theTimeStampNumber Number of iteration on the field
2521      */
2522     CutSegment CutSegmentOnField(in Result theResult, in string theMeshName,
2523                                  in Entity theEntity, in string theFieldName,
2524                                  in long theTimeStampNumber);
2525
2526     /*!
2527      * Creates a Plot3D presentation.
2528      * \param theResult    Data generated in other sources. (MED object or file)
2529      * \param theMeshName  One of the meshes presented in MED file
2530      * \param theEntity    Type of entity where the field is defined
2531      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2532      * \param theTimeStampNumber Number of iteration on the field
2533      */
2534     Plot3D Plot3DOnField(in Result theResult, in string theMeshName,
2535                          in Entity theEntity, in string theFieldName,
2536                          in long theTimeStampNumber);
2537
2538     /*!
2539      * Creates a table presentation.
2540      * \param theTableEntry The entry of the table which will be displayed.
2541      */
2542     Table CreateTable(in string theTableEntry);
2543
2544     /*!
2545      * Creates a curve on the basis of points, whose values are taken from the table.
2546      * \param theTable  Table containing the data for construction of curves.
2547      * \param theHRow   Index of the row in the table: abscissa of the point.
2548      * \param theVRow   Index of the row in the table: ordinate of the point.
2549      */
2550     Curve CreateCurve(in Table theTable, in long theHRow, in long theVRow);
2551
2552     /*!
2553      * Creates a curve on the basis of points, whose values are taken from the table.
2554      * Each point has also assigned value, that will be shown as tooltip in Plot2d
2555      * \param theTable  Table containing the data for construction of curves.
2556      * \param theHRow   Index of the row in the table: abscissa of the point.
2557      * \param theVRow   Index of the row in the table: ordinate of the point.
2558      * \param theZRow   Index of the row in the table: assigned value (so-called as Z).
2559      */
2560     Curve CreateCurveWithZ( in Table theTable, in long theHRow, in long theVRow, in long theZRow );
2561
2562     /*!
2563      * Creates a curve on the basis of points, whose values are taken from the table.
2564      * Each point has also assigned value, that will be shown as tooltip in Plot2d.
2565      * The curve can be displayed using right axis of Plot2d view.
2566      * \param theTable  Table containing the data for construction of curves.
2567      * \param theHRow   Index of the row in the table: abscissa of the point.
2568      * \param theVRow   Index of the row in the table: ordinate of the point.
2569      * \param theZRow   Index of the row in the table: assigned value (so-called as Z).
2570      * \param theIsV2   Flag allowed to display the curve using right axis of Plot2d view.
2571      */
2572     Curve CreateCurveWithZExt( in Table theTable, in long theHRow, in long theVRow, in long theZRow,
2573                                in boolean theIsV2 );
2574
2575     /*!
2576      * Creates a presentation form containing an array of references to the curves.
2577      */
2578     Container CreateContainer();
2579
2580     /*! Creates an animation in the 3D view.
2581      * \param theView3d The 3D view, where the animation will be rendered.
2582      */
2583     Animation CreateAnimation(in View3D theView3d);
2584
2585     /*! Creates an evolution in the XY plot.
2586      * \param theXYPlot The XY plot, where the evolution will be rendered.
2587      */
2588     Evolution CreateEvolution(in XYPlot theXYPlot);
2589
2590     void DeleteResult(in Result theResult);
2591
2592     void DeletePrs3d(in Prs3d thePrs3d);
2593
2594     /*!
2595      * Get or create %ColoredPrs3dCache object.
2596      */
2597     ColoredPrs3dCache GetColoredPrs3dCache(in SALOMEDS::Study theStudy);
2598
2599
2600     /* Clipping planes management */
2601
2602     /*Create a clipping plane and return its ID (position in corresponded array)
2603       Id of clipping plane could be changed after deletion of other clipping plane
2604     */
2605     long CreateClippingPlane(in double X, in double Y, in double Z,
2606                              in double dX, in double dY, in double dZ,
2607                              in boolean auto, in string name);
2608
2609     void EditClippingPlane(in long id, in double X, in double Y, in double Z,
2610                              in double dX, in double dY, in double dZ,
2611                              in boolean auto, in string name);
2612
2613     /* Returns clipping plane by its Id */
2614     ClippingPlane GetClippingPlane(in long id);
2615
2616     /* Deletes clipping plane by its Id */
2617     boolean DeleteClippingPlane(in long id);
2618
2619     /* Applyes a clipping plane with Id to presentation thePrs */
2620     boolean ApplyClippingPlane(in Prs3d thePrs, in long id);
2621
2622     /* Detaches a clipping plane with Id from presentation thePrs */
2623     boolean DetachClippingPlane(in Prs3d thePrs, in long id);
2624
2625
2626     /* Get number of clipping planes */
2627     long GetClippingPlanesNb();
2628
2629     /*! Converts set of VTK files to the one MED-file
2630      * \param theVTKFiles sequence of VTK files
2631      * \param out MED-file
2632      * \param theMeshName mesh name. This parameter can be empty. In this case name
2633               of mesh is equal vtk2med
2634      * \param theTSNames values of time stamps. This array can be empty, in
2635               this case values of time stamps will be generated automatically ( 0, 1, 2 ... )
2636      * \return TRUE if operation has been completed successfully, FALSE otherwise
2637      */
2638     boolean VTK2MED( in string_array theVTKFiles,
2639                      in string theMEDFile,
2640                      in string theMeshName,
2641                      in double_array theTStamps );
2642
2643     /*!
2644      * Load texture from file
2645      * \param theTextureFile texture file name
2646      * \return unique texture identifier
2647      */
2648     long LoadTexture(in string theTextureFile);
2649   };
2650
2651   /*! \brief %View interface
2652    *
2653    * Contains a set of methods used by the %View frame, which can be one of
2654    * the following types: 3d, Table, XY plot.
2655    * %View interface is a base for all types of %view interfaces.
2656    */
2657   interface View: Base, SALOME::GenericObj
2658   {
2659     /*! \brief %ViewRepresentation enumeration
2660      *
2661      * displaying part ("ALL" isn't setable)
2662      */
2663     enum ViewRepresentation {
2664       OBJECTBROWSER,
2665       VIEWER,
2666       PYTHON,
2667       MESSAGES
2668     };
2669
2670     void ShowPart (in ViewRepresentation ViewRepr, in boolean state );
2671
2672     boolean IsPartShown( in ViewRepresentation ViewRepr );
2673
2674     /*!
2675      *  New methods for view parameters management.
2676      */
2677
2678     /*! \brief Split workarea of this view.
2679      *
2680      *  Horizontally split workarea of this view.
2681      *  This view is moved in a new right area.
2682      */
2683     void SplitRight();
2684
2685     /*! \brief Split workarea of this view.
2686      *
2687      *  Horizontally split workarea of this view.
2688      *  This view stays in an old left area, others are moved in a new right area.
2689      */
2690     void SplitLeft();
2691
2692     /*! \brief Split workarea of this view.
2693      *
2694      *  Vertically split workarea of this view.
2695      *  This view is moved in a new bottom area.
2696      */
2697     void SplitBottom();
2698
2699     /*! \brief Split workarea of this view.
2700      *
2701      *  Vertically split workarea of this view.
2702      *  This view stays in an old top area, others are moved in a new bottom area.
2703      */
2704     void SplitTop();
2705
2706     /*!
2707      *  Put this view window on top of its work area.
2708      */
2709     void OnTop();
2710
2711     /*!
2712      *  Put \a theView in workarea of this view right after it.
2713      *  If \a theView was alone in its workarea, workarea of \a theView will be destroyed.
2714      *  If \a theView was in the same workarea with this view, simple reordering will take place.
2715      *  \param theView A view window to be attracted to this one.
2716      */
2717     void Attract (in View theView);
2718
2719     /*!
2720      *  Put all the view windows from workarea of \a theView in workarea of this view right after it.
2721      *  Workarea of \a theView will be destroyed.
2722      *  If \a theView was in the same workarea with this view, simple reordering will take place.
2723      *  \param theView A view window to be attracted to this one together with all its workarea.
2724      */
2725     void AttractAll (in View theView);
2726
2727     /*!
2728      *  Set position of this view window relatively its splitter.
2729      *  \param thePosition Desired position of this view window relatively
2730      *         its splitter. Meaningfull values lays in range [0..1].
2731      *
2732      *  Direction of positioning is defined by the splitter orientation.
2733      */
2734     void SetRelativePositionInSplitter (in double thePosition);
2735
2736     /*!
2737      *  Set size of this view window relatively its splitter.
2738      *  \param theSize Desired size of this view window relatively
2739      *         its splitter. Meaningfull values lays in range [0..1].
2740      *
2741      *  Direction of resizing is defined by the splitter orientation.
2742      */
2743     void SetRelativeSizeInSplitter (in double theSize);
2744
2745     /*!
2746      *  Set horizontal position of this view window relatively its workstack.
2747      *  \param thePosition Desired horizontal position of this view window
2748      *         relatively its workstack. Meaningfull values lays in range [0..1].
2749      */
2750     void SetRelativePositionX (in double thePosition);
2751
2752     /*!
2753      *  Set vertical position of this view window relatively its workstack.
2754      *  \param thePosition Desired vertical position of this view window
2755      *         relatively its workstack. Meaningfull values lays in range [0..1].
2756      */
2757     void SetRelativePositionY (in double thePosition);
2758
2759     /*!
2760      *  Set horizontal size of this view window relatively its workstack.
2761      *  \param theSize Desired horizontal size of this view window relatively
2762      *         its workstack. Meaningfull values lays in range [0..1].
2763      */
2764     void SetRelativeSizeX (in double theSize);
2765
2766     /*!
2767      *  Set vertical size of this view window relatively its workstack.
2768      *  \param theSize Desired vertical size of this view window relatively
2769      *         its workstack. Meaningfull values lays in range [0..1].
2770      */
2771     void SetRelativeSizeY (in double theSize);
2772
2773     /*!
2774      *  Old methods for view parameters management, they don't work now
2775      */
2776     void SetViewWidth (in long Width); //setting width of view
2777     void SetViewHeight (in long Height); //setting height of view
2778     long GetViewWidth(); //getting view width
2779     long GetViewHeight(); //getting view height
2780     enum ViewPosition {TOP, CENTER, BOTTOM, RIGHT, LEFT}; //position of the study frame
2781     void SetViewPositionHorizontal (in ViewPosition ViewPosHor); //setting of the horizontal view position
2782     void SetViewPositionVertical (in ViewPosition ViewPosVer); //setting of the vertical view position
2783     void SetRelativePosition( in double x, in double y );
2784     void SetRelativeSize( in double x, in double y );
2785     void Minimize(); // Minimizes to the task bar or to the bottom of the Desktop the %View frame.
2786     void Restore(); // Restores the %View frame.
2787     void Maximize(); // Maximizes the %View frame.
2788
2789     /*!
2790      * Sets the title of the %View frame.
2791      * \param theTitle String parameter defining the title of the %View frame.
2792      */
2793     void SetTitle(in string theTitle);
2794
2795     /*!
2796      * Gets the title of the %View frame.
2797      */
2798     string GetTitle();
2799
2800     /*!
2801      * Sets background color of the %View frame.
2802      * \param theColor Background color defined in <VAR>SALOMEDS::Color</VAR> enumeration.
2803      */
2804     void SetBackground(in SALOMEDS::Color theColor);
2805
2806     /*!
2807      * Gets background color of the %View frame.
2808      */
2809     SALOMEDS::Color GetBackground();
2810
2811     /*!
2812      * Removes all presentations (presentable objects) from the %view.
2813      */
2814     void EraseAll();
2815
2816     /*!
2817      * Displays all presentations (presentable objects) in the %view.
2818      */
2819     void DisplayAll();
2820
2821     /*!
2822      * Removes a definite presentation (presentable object) from the %view.
2823      * \param thePrsObj The presentation (presentable object) which should be deleted.
2824      */
2825     void Erase(in PrsObject thePrsObj);
2826
2827     /*!
2828      * Displays a definite presentation (presentable object) in the %view.
2829      * \param thePrsObj The presentation (presentable object) which should be displayed.
2830      */
2831     void Display(in PrsObject thePrsObj);
2832
2833     /*!
2834      * Allows to display only a definite presentation (presentable object) in the %view.
2835      * All other presentations are removed from the %view.
2836      * \param thePrsObj The presentation (presentable object) which should be displayed.
2837      */
2838     void DisplayOnly(in PrsObject thePrsObj);
2839
2840     /*!
2841      * Updates the view.
2842      */
2843     void Update();
2844
2845     /*!
2846      * Saves the view.
2847      * \param theFileName The name of the file where the view will be saved.
2848      * \return True, if the view have been saved successfully.
2849      */
2850     boolean SavePicture(in string theFileName);
2851   };
2852
2853   //-------------------------------------------------------
2854   /*! \brief 3D view interface
2855    *
2856    *  This interface contains a set of methods necessary for representation of objects in 3D space.
2857    */
2858   interface View3D : View {
2859     /*!
2860      * This enumeration contains a set of elements determining a predefined point of view
2861      *  (position of the camera in 3D space relative to the presentable object).
2862      */
2863     enum ViewType{ FRONT, BACK, LEFT, RIGHT, TOP, BOTTOM};
2864
2865     /*!
2866      * This enumeration contains a set of elements determining the axis
2867      */
2868     enum Axis{ XAxis, YAxis, ZAxis};
2869
2870     /*!
2871      * Data type defining coordinates in 3D space.
2872      */
2873     typedef double XYZ[3];
2874
2875     /*!
2876      * Makes all presentations, which are currently present in the %view, completely visible.
2877      */
2878     void FitAll();
2879
2880     /*!
2881      * Sets a predefined point of view (FRONT, BACK, LEFT, RIGHT, TOP, BOTTOM). (In other words it means
2882      * a predefined position of the camera in 3D space with respect to the object which is represented.)
2883      */
2884     void SetView(in ViewType theType);
2885
2886     /*!
2887      * Sets the position of the camera in 3D space.
2888      * This point is used as the first point of the vector
2889      * defining the view direction of the camera.
2890      */
2891     void SetPointOfView(in XYZ theCoord);
2892
2893     /*!
2894      * Gets the position of the camera in 3D space.
2895      * This point is used as the first point of the vector
2896      * defining the view direction of the camera.
2897      */
2898     XYZ GetPointOfView();
2899
2900     /*!
2901      * Sets the vertical line of the camera in 3D space.
2902      */
2903     void SetViewUp(in XYZ theDir);
2904
2905     /*!
2906      * Gets the vertical line of the camera in 3D space.
2907      */
2908     XYZ GetViewUp();
2909
2910     /*!
2911      * Sets the point of sight of the camera. This point is used as the
2912      * second point of the vector defining the view direction of the camera.
2913      */
2914     void SetFocalPoint(in XYZ theDir);
2915
2916     /*!
2917      * Gets the point of sight of the camera. This point is used as the
2918      * second point of the vector defining the view direction of the camera.
2919      */
2920     XYZ GetFocalPoint();
2921
2922     /*!
2923      * Zooming of the presentable object. Sets the scale.
2924      */
2925     void SetParallelScale(in double theScale);
2926
2927     /*!
2928      * Zooming of the presentable object. Gets the scale.
2929      */
2930     double GetParallelScale();
2931
2932     /*!
2933      * Scaling of the view along a definite axis.
2934      * \param theAxis The axis of the scaling
2935      * \param theParam The coefficient of the scaling
2936      */
2937     void ScaleView(in Axis theAxis, in double theParam);
2938
2939     /*!
2940      * Removes the scaling of the view.
2941      */
2942     void RemoveScale();
2943
2944     /*!
2945      * Saves view parameters.
2946      * \return True if the view parameters have been created, False if the parameters have been modified.
2947      * \param theName The name under which the view parameters will be saved.
2948      */
2949     boolean SaveViewParams(in string theName);
2950
2951     /*! Restores view parameters.
2952      * \return True if the view parameters have been found and applied to the view,
2953      * False if the parameters with this name don't exist.
2954      * \param theName The name of the view parameters which will be restored.
2955      */
2956     boolean RestoreViewParams(in string theName);
2957
2958
2959     /*! Get representation type of the given presentation in this view.
2960      *  \param thePrs Object to get a representation type of.
2961      *  \return <VAR>PresentationType</VAR> Representation type of object in this view.
2962      */
2963     PresentationType GetPresentationType(in ScalarMap thePrs);
2964
2965     /*! Set representation type of the given presentation in this view.
2966      *  \param thePrs Object to set a representation type of.
2967      *  \param thePrsType Representation type to be set to the given object.
2968      *  \return Empty string in case of success, error description in case of failure.
2969      */
2970     string SetPresentationType(in ScalarMap thePrs, in PresentationType thePrsType);
2971
2972
2973     /*! Set representation type of 2D quadratic elements
2974      *  of the given presentation in this view.
2975      *  \param thePrs Object to set a representation type of 2D quadratic elements.
2976      *  \param theType Representation type of 2D quadratic elements to be set to the given object.
2977      *  \return Empty string in case of success, error description in case of failure.
2978      */
2979     string SetQuadratic2DPresentationType(in ScalarMap thePrs,in Quadratic2DPresentationType theType);
2980
2981
2982     /*! Get representation type of the 2D quadratic mesh elements of given presentation in this view.
2983      *  \param thePrs Object to get a representation type of 2D quadratic mesh elements.
2984      *  \return <VAR>Quadratic2DPresentationType</VAR> Representation type of 2D quadratic mesh elements
2985      *          in this view.
2986      */
2987     Quadratic2DPresentationType GetQuadratic2DPresentationType(in ScalarMap thePrs);
2988
2989
2990     /*! Get shrink state of the given presentation in this view.
2991      *  \param thePrs Object to get a shrink state of.
2992      *  \return TRUE if \a thePrs is shrinked in this view, FALSE overwise.
2993      */
2994     boolean IsShrinked(in ScalarMap thePrs);
2995
2996     /*! Make the given presentation shrinked or not shrinked in this view.
2997      *  \param thePrs Object to change a shrink state of.
2998      *  \param isShrinked Pass TRUE to make \a thePrs shrinked, FALSE overwise.
2999      *  \return Empty string in case of success, error description in case of failure.
3000      */
3001     string SetShrinked(in ScalarMap thePrs, in boolean isShrinked);
3002
3003     /*! Get shading state of the given presentation in this view.
3004      *  \param thePrs Object to get a shading state of.
3005      *  \return TRUE if \a thePrs is shaded in this view, FALSE overwise.
3006      */
3007     boolean IsShaded(in ScalarMap thePrs);
3008
3009     /*! Make the given presentation shaded or not shaded in this view.
3010      *  \param thePrs Object to set a shading state of.
3011      *  \param isShaded Pass TRUE to make \a thePrs shaded, FALSE overwise.
3012      *  \return Empty string in case of success, error description in case of failure.
3013      */
3014     string SetShaded(in ScalarMap thePrs, in boolean isShaded);
3015
3016     /*! Get opacity of the given presentation in this view.
3017      *  \param thePrs Object to get an opacity of.
3018      *  \return Opacity value in range [0, 1], 0 - transparent, 1 - opaque.
3019      */
3020     double GetOpacity(in ScalarMap thePrs);
3021
3022     /*! Set opacity of the given presentation in this view.
3023      *  \param thePrs Object to set an opacity of.
3024      *  \param theOpacity Opacity value [0, 1]. 0 - transparent, 1 - opaque.
3025      *  \return Empty string in case of success, error description in case of failure.
3026      */
3027     string SetOpacity(in ScalarMap thePrs, in double theOpacity);
3028
3029     /*! Get line width of the given presentation in this view.
3030      *  \param thePrs Object to get a line width of.
3031      *  \return Line width of \a thePrs in this view.
3032      */
3033     double GetLineWidth(in ScalarMap thePrs);
3034
3035     /*! Set line width of the given presentation in this view.
3036      *  \param thePrs Object to set a line width of.
3037      *  \param theLineWidth Line width value. Recommended values are in range [1, 10].
3038      *  \return Empty string in case of success, error description in case of failure.
3039      */
3040     string SetLineWidth(in ScalarMap thePrs, in double theLineWidth);
3041   };
3042
3043   //-------------------------------------------------------
3044   /*! \brief Interface of the Table view
3045    *
3046    * This interface is used for creation of a view necessary for presentation of a table.
3047    */
3048   interface TableView : View {
3049   };
3050
3051   //-------------------------------------------------------
3052   /*! \brief Interface of the 2D plot view
3053    *
3054    * This interface is used for creation of a view necessary for presentation
3055    * of a XY plot generated on the basis of one or several curve lines.
3056    */
3057   interface XYPlot : View {
3058     /*! Sets the title of the XY plot
3059      * \param theTitle  The title of the XY plot
3060      */
3061     void SetSubTitle(in string theTitle);
3062
3063     /*! Gets the title of the XY plot
3064      */
3065     string GetSubTitle();
3066
3067     /*!
3068      * This enumeration contains a set of elements determining the type
3069      * of the curve lines, which will be displayed in your XY plot.
3070      */
3071     enum CurveType { POINTS, MULTYLINE, SPLINE};
3072
3073     /*! Sets the type of the curve lines.
3074      * \param theType The type of the curve lines taken from <VAR>CurveType</VAR> enumeration.
3075      */
3076     void SetCurveType(in CurveType theType);
3077
3078     /*! Gets the type of the curve lines.
3079      */
3080     CurveType GetCurveType();
3081
3082     /*! Sets the size of the markers (data points) with help of
3083      * which the curve is constructed on the graphics.
3084      * \param theSize Long value defining the size of the markers.
3085      */
3086     void SetMarkerSize(in long theSize);
3087
3088     /*! Gets the size of the markers (data points) with help of
3089      * which the curve is constructed on the graphics.
3090      */
3091     long GetMarkerSize();
3092
3093     /*! Enable/disables X-axis grid of the 2D plot.
3094      */
3095     void EnableXGrid(in boolean theMajor, in long theNumMajor, in boolean theMinor, in long theNumMinor);
3096
3097     /*! Enable/disables Y-axis grid of the 2D plot.
3098      */
3099     void EnableYGrid(in boolean theMajor, in long theNumMajor, in boolean theMinor, in long theNumMinor);
3100
3101     /*! Sets horizontal scaling of the 2D plot.
3102      * \param theScaling Type of scaling taken from <VAR>Scaling</VAR> enumeration.
3103      */
3104     void SetHorScaling(in Scaling theScaling);
3105
3106     /*! Gets the type horizontal scaling of the 2D plot.
3107      */
3108     Scaling GetHorScaling();
3109
3110     /*! Sets vertical scaling of the 2D plot.
3111      * \param theScaling Type of scaling taken from <VAR>Scaling</VAR> enumeration.
3112      */
3113     void SetVerScaling(in Scaling theScaling);
3114
3115     /*! Gets the type vertical scaling of the 2D plot.
3116      */
3117     Scaling GetVerScaling();
3118
3119     /*! Sets the title of the X-axis of the plot.
3120      * \param theTitle String value defining the title of the X-axis of the plot.
3121      */
3122     void SetXTitle(in string theTitle);
3123
3124     /*! Gets the title of the X-axis of the plot.
3125      */
3126     string GetXTitle();
3127
3128     /*! Sets the title of the Y-axis of the plot.
3129      * \param theTitle String value defining the title of the X-axis of the plot.
3130      */
3131     void SetYTitle(in string theTitle);
3132
3133     /*! Gets the title of the Y-axis of the plot.
3134      */
3135     string GetYTitle();
3136
3137     /*! Shows/hides the legend (description) of the 2D plot.
3138      */
3139     void ShowLegend(in boolean theShowing);
3140
3141     /*! Shrinks and enlarges the 2D plot to fit the 2D viewer.
3142      */
3143     void FitAll();
3144
3145     /*! Set range of the 2D plot to X axis of the 2D viewer.
3146      */
3147     void FitXRange(in double xMin, in double xMax);
3148
3149     /*! Set range of the 2D plot to Y axis of the 2D viewer.
3150      */
3151     void FitYRange(in double yMin, in double yMax);
3152
3153     /*! Set range of the 2D plot to XY axis of the 2D viewer.
3154      */
3155     void FitRange(in double xMin, in double xMax,
3156                   in double yMin, in double yMax);
3157
3158     void GetFitRanges(out double xMin,out double xMax,
3159                       out double yMin,out double yMax);
3160   };
3161
3162   //-------------------------------------------------------
3163   /*! \brief Interface of the %ViewManager
3164    *
3165    * The ViewManager is necessary for work with view windows (creation and deletion).
3166    */
3167   interface ViewManager: Base {
3168     /*! \brief Getting an active %View Frame
3169      *
3170      * Returns an object reference to the active %View Frame.
3171      * Type of the %View must be checked.
3172      * \note <BR>Returns nil if there are no views currently opened.
3173      */
3174     View GetCurrentView();
3175
3176     /*! \brief Creation of a 3d %View.
3177      *
3178      * Returns an object reference to the newly created 3D %View.
3179      */
3180     View3D Create3DView();
3181
3182     /*! \brief Creation of a Table %View.
3183      *
3184      * Returns an object reference to the newly created Table %View.
3185      */
3186     TableView CreateTableView(in Table theTable);
3187
3188     /*! \brief Creation of a 2D plot %View.
3189      *
3190      * Returns an object reference to the newly created 2D plot %View.
3191      */
3192     XYPlot CreateXYPlot();
3193
3194     /*! Deletes a definite view.
3195      * \param theView The view which should be deleted.
3196      */
3197     void Destroy(in View theView);
3198   };
3199
3200
3201 };
3202
3203 #endif