1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : VISU_Gen.idl
23 // Author : Alexey Petrov
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.
34 #include "SALOME_Exception.idl"
35 #include "SALOME_GenericObj.idl"
36 #include "SALOME_Component.idl"
37 #include "SALOMEDS.idl"
38 #include "SALOMEDS_Attributes.idl"
42 The main package of interfaces of the post-processing module %VISU.
45 //-------------------------------------------------------
46 typedef string IdType;
48 typedef sequence<string> string_array;
49 typedef sequence<double> double_array;
52 * This enumeration contains a set of elements defining the type
53 * of the scaling, which can be applied on different presentations.
55 enum Scaling{ LINEAR, /*!< Linear type of scaling. */
56 LOGARITHMIC /*!< Logarithmic type of scaling. */
60 * This enumeration contains a set of elements defining
61 * what kind of value will be extracted from gauss points data.
64 AVERAGE, /*!< Average value (default). */
65 MINIMUM, /*!< Minimum value. */
66 MAXIMUM /*!< Maximum value. */
70 * This enumeration contains a set of elements defining the
71 * type of the %entity (topological units) constituting a mesh.
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 */
82 * This enumeration contains a set of elements defining the type of the %VISU object.
83 * This enumeration is used for navigation between a set of %VISU interfaces.
86 TNONE, /*!< Not a %VISU object */
87 TCURVE, /*!< Curve line object for construction of 2D XY plots */
88 TTABLE, /*!< Table containing numerical data */
89 TCONTAINER, /*!< Container object used for storing a set of curve lines */
90 TMESH, /*!< Meshing object */
91 TSCALARMAP, /*!< Scalarmap 3D presentation object */
92 TISOSURFACES, /*!< Iso surface 3D presentation object */
93 TDEFORMEDSHAPE, /*!< Deformed shape 3D presentation object */
94 TSCALARMAPONDEFORMEDSHAPE, /*!< Scalar map on deformed shape 3D presentation object. It is obsolete. Use TDEFORMEDSHAPEANDSCALARMAP instead */
95 TDEFORMEDSHAPEANDSCALARMAP, /*!< Deformed shape and scalar map 3D presentation object */
96 TGAUSSPOINTS, /*!< Gauss Points 3D presentation object */
97 TPLOT3D, /*!< Plot3D 3D presentation object */
98 TPOINTMAP3D, /*!< 3D presentation for table object */
99 TCUTPLANES, /*!< Cut planes 3D presentation object */
100 TCUTLINES, /*!< Cut lines 3D presentation object */
101 TCUTSEGMENT, /*!< Cut segment 3D presentation object */
102 TVECTORS, /*!< Vectors 3D presentation object */
103 TSTREAMLINES, /*!< Streamlines 3D presentation object */
104 TVISUGEN, /*!< %VISU generator used for performing operations with different %VISU objects */
105 TVIEWMANAGER, /*!< View manager used for performing operations with different views */
106 TRESULT, /*!< The data on which different presentations are based */
107 TXYPLOT, /*!< 2D XY plot consisting of one or several curve lines */
108 TTABLEVIEW, /*!< Table view is used for displaying data tables */
109 TVIEW3D, /*!< 3D view is used for displaying 3D graphical presentations */
110 TGAUSSVIEW, /*!< 3D view is used for displaying Gauss Points graphical presentations */
111 TENTITY, /*!< An element composing a mesh: node, edge, face or cell */
112 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. */
113 TGROUP, /*!< A group of families */
114 TFIELD, /*!< Field represents the results of calculations (it can be scalar or vector values), grouped together under one physical concept. */
115 TTIMESTAMP, /*!<Time stamp represents a subfield: the results of calculations are taken in one definite moment. */
116 TANIMATION, /*!< Represents Animation object. */
117 TEVOLUTION, /*!< Represents Evolution object. */
118 TCOLOREDPRS3DHOLDER, /*!< Colored 3D presentation holder */
119 TCOLOREDPRS3DCACHE, /*!< Colored 3D presentation cache */
120 TPART, /*!< MULTIPR: part of a mesh */
124 /* Clipping planes management */
125 struct ClippingPlane {
138 * Returns ID of the object.
143 * Returns the type of the presentable object
149 * \brief Removable object interface
151 * Removable object interface is the root class of all removable objects.
153 interface RemovableObject : Base {
155 * Remove object from study.
157 void RemoveFromStudy();
160 /*! \brief Presentable object interface
162 * Presentable object interface is the root class of all presentable objects.
164 interface PrsObject : RemovableObject {
167 //-------------------------------------------------------
168 /*! \brief Interface of curve representation.
170 * Manages presentation parameters of one curve.
171 * It can be used for presentation of a set of curves using a combined presentation.
173 interface Curve : PrsObject {
175 * Sets the title of the curve.
176 * \param theTitle This string parameter defines the title of this curve.
178 void SetTitle(in string theTitle);
181 * Gets the title of the curve.
182 * \return String value corresponding to the title of the curve.
187 * Sets the color of the curve.
188 * \param theColor The color of the curve. This parameter is taken
189 * from the <VAR>Orientation</VAR> enumeration.
191 void SetColor(in SALOMEDS::Color theColor);
194 * Gets the color of the curve.
195 * \return Color of the curve. The returned value will correspond
196 * to one of the elements the <VAR>Color</VAR> enumeration.
198 SALOMEDS::Color GetColor();
201 * This enumeration contains a set of elements defining the
202 * presentation type of markers (data points) with help of
203 * which the curve is constructed on the graphics.
205 enum MarkerType { NONE,
218 * Sets the presentation type of markers (data points) with help of
219 * which the curve is constructed on the graphics.
220 * \param theType This parameter defines the type of marker with help
221 * of which the curve is constructed on the graphics.
222 * It is taken from <VAR>MarkerType</VAR> enumeration.
224 void SetMarker(in MarkerType theType);
227 * Gets the presentation type of markers (data points) with
228 * help of which the curve is constructed on the graphics.
229 * \return The type of marker with help of which the curve is constructed
230 * on the graphics. The returned value will correspond to
231 * one of the elements the <VAR>MarkerType</VAR> enumeration.
233 MarkerType GetMarker();
236 * This enumeration contains a set of elements defining the
237 * type of presentation of a curve line on the graphics.
239 enum LineType{ VOIDLINE, SOLIDLINE, DASHLINE, DOTLINE, DASHDOTLINE, DASHDOTDOTLINE};
242 * Sets the type of presentation of curve lines on the graphics.
243 * \param theType This parameter defines the type of presentation of curve lines on the graphics.
244 * \param theLineWidth Long value defining the width of the curve line.
246 void SetLine(in LineType theType, in long theLineWidth);
249 * Gets the type of representation of curve lines on the graphics.
250 * \return The type of representation of curve lines on the graphics.
255 * Gets the width of the curve line.
256 * \return Long value corresponding to the width of the curve line.
261 //-------------------------------------------------------
262 /*! \brief %Container presentable object interface
264 * This class is provided in order to create one presentation using several presentable objects.
265 * This can provide a combination of a set of curves to display them in XY plot view.
267 interface Container : PrsObject {
269 * Adds a curve into the container.
270 * \param theCurve The added curve.
272 void AddCurve(in Curve theCurve);
275 * Removes a curve from the container.
276 * \param theCurve The removed curve.
278 void RemoveCurve(in Curve theCurve);
281 * Gets the number of curves which are stored in the container.
282 * \return A long value corresponding to the number of curves which are stored in the container.
287 * Removes all curves from the container.
292 //-------------------------------------------------------
294 /*! \brief 3D presentation interface
296 * This is a root class for all 3D presentations, which can be displayed in %VISU module.
298 interface Prs3d : PrsObject, SALOME::GenericObj
301 * Move the 3D presentation according to the given offset parameters
303 void SetOffset(in float theDx, in float theDy, in float theDz);
306 * Gets offset parameters for the 3D presentation
308 void GetOffset(out float theDx, out float theDy, out float theDz);
311 * Gets memory size actually used by the presentation (Mb).
313 float GetMemorySize();
317 * This enumeration contains a set of elements defining the
318 * type of presentation of the mesh.
320 enum PresentationType{ POINT,
330 * This enumeration contains a set of elements defining the
331 * type of presentation of the 2D quadratic mesh elements.
333 enum Quadratic2DPresentationType{
338 /*! \brief Interface of the mesh.
340 * Manages presentation parameters of a 3D presentation of a mesh.
341 * This object can be used for presentation of set of curves using Container class.
343 interface Mesh : Prs3d {
345 * Sets the color of mesh cells.
346 * \param theColor The color of the cells. This parameter is taken from <VAR>Color</VAR> enumeration.
348 void SetCellColor(in SALOMEDS::Color theColor);
351 * Gets the color of mesh cells.
353 SALOMEDS::Color GetCellColor();
356 * Sets the color of mesh nodes.
357 * \param theColor The color of the nodes. This parameter is taken from <VAR>Color</VAR> enumeration.
359 void SetNodeColor(in SALOMEDS::Color theColor);
362 * Gets the color of mesh nodes.
364 SALOMEDS::Color GetNodeColor();
367 * Sets the color of mesh links.
368 * \param theColor The color of the links. This parameter is taken from <VAR>Color</VAR> enumeration.
370 void SetLinkColor(in SALOMEDS::Color theColor);
373 * Gets the color of mesh links.
375 SALOMEDS::Color GetLinkColor();
378 * Sets the type of representation of a mesh.
379 * \param theType The of representation of a mesh. This parameter is
380 * taken from <VAR>PresentationType</VAR> enumeration.
382 void SetPresentationType(in PresentationType theType);
385 * Gets the type of representation of the mesh.
386 * \return The type of representation of the mesh.
388 PresentationType GetPresentationType();
392 * Sets the type of representation of a 2D quadratic mesh elements.
393 * \param theType The type of representation of 2D quadratic mesh elements.
394 * This parameter is taken from
395 * <VAR>Quadratic2DPresentationType</VAR> enumeration.
397 void SetQuadratic2DPresentationType(in Quadratic2DPresentationType theType);
400 * Gets the type of representation of the 2D quadratic mesh elements.
401 * \return The type of representation of the 2D quadratic mesh elements.
403 Quadratic2DPresentationType GetQuadratic2DPresentationType();
406 * Switches shrink mode of presentation
407 * Note: SetPresentationType(SHRINK) is same as SetShrink(True)
409 void SetShrink(in boolean toShrink);
412 * Returns current state of shrink mode
418 //-------------------------------------------------------
419 /*! \brief Basic Interface for the %Colored 3D Presentations
421 * This interface is responsable for coloring of 3D field presentations
422 * according the scalar values applied to different cells.
423 * As well it contains presentation parameters of the scalar bar. The scalar
424 * bar is displayed along with each colored field presentation and serves for
425 * consulting the correspondance between colors and data values.
427 interface ColoredPrs3dBase : Prs3d
430 * Sets scalar range - min and max boundaries of the scalar bar.
431 * \param theMin Min boundary of the scalar bar.
432 * \param theMax Max boundary of the scalar bar.
434 void SetRange(in double theMin, in double theMax);
437 * Gets the min boundary of the scalar bar.
442 * Gets the max boundary of the scalar bar.
447 * Sets scalar range that corresponds to the source data.
449 void SetSourceRange();
452 * Gets the min boundary of the scalar bar from source data.
454 double GetSourceMin();
457 * Gets the max boundary of the scalar bar from source data.
459 double GetSourceMax();
462 * Defines whether the scalar range corresponds to the source data or not.
464 boolean IsRangeFixed();
466 /*! \brief Position of the scalar bar.
468 * Sets the position of the scalar bar origin on the screen.
469 * \param X Horizontal position. The value can be between 0 and 1.
470 * \param Y Vertical position. The value can be between 0 and 1.
472 void SetPosition(in double X, in double Y);
475 * Gets horizontal position of the scalar bar origin.
480 * Gets vertical position of the scalar bar origin.
484 /*! \brief Size of this presentable object.
486 * Sets the size of the scalar bar.
487 * \param theWidth Width of this presentable object. The value can be between 0 and 1.
488 * \param theHeight Height of this presentable object. The value can be between 0 and 1.
490 void SetSize(in double theWidth, in double theHeight);
493 * Gets the width of this presentable object.
494 * \return A double value corresponding to the width of this presentable object.
499 * Gets the height of this presentable object.
500 * \return A double value corresponding to the height of this presentable object.
505 * Sets the number of colors which will be used for presentation of this presentable object.
506 * \param theNbColors A long value defining the number of colors.
508 void SetNbColors(in long theNbColors);
511 * Gets the number of colors which will be used for visualization of this presentable object.
512 * \return A long value corresponding to the number of colors which
513 * will be used for visualization of this presentable object.
517 * Sets the number of labels which will be used for indication of color gradation
519 * \param theNbLabels A long value defining the number of labels.
521 void SetLabels(in long theNbLabels);
524 * Gets the number of labels which will be used for indication of color gradation of the scalar bar.
525 * \return A long value corresponding to the number of labels which will
526 * be used for indication of color gradation of the scalar bar.
530 /*! %Orientation of the scalar bar (to provide backward compatibility). */
532 HORIZONTAL, /*!< Horizontal orientation of the scalar bar.*/
533 VERTICAL /*!< Vertical orientation of the scalar bar.*/
537 * Sets the type of orientation of the scalar bar (to provide backward compatibility).
538 * \param theOrientation This parameter defines the orientation of the scalar bar.
539 * It is taken from the <VAR>Orientaton</VAR> enumeration.
541 void SetBarOrientation(in Orientation theOrientation);
544 * Gets the type of orientation of the scalar bar (to provide backward compatibility).
546 Orientation GetBarOrientation();
549 /*! \brief Additional Interface for the %Colored 3D Presentations
553 interface ColoredPrs3d : ColoredPrs3dBase
556 * Sets the title of the scalar bar. By default - the name of the selected result is used.
557 * \param theName String parameter defining the name of the scalar bar.
559 void SetTitle(in string theName);
562 * Gets the title of the scalar bar.
566 /*! Sets the method of coloring of the elements composing a 3D presentation.
568 void SetScalarMode(in long theScalarMode);
570 /*! Gets the method of coloring of the elements composing a 3D presentation.
572 long GetScalarMode();
575 * Set the visibility of a distribution curve.
576 * \param theIs is used to switch on/off the visibility of a distribution curve.
578 void SetIsDistributionVisible(in boolean theIs);
580 //! Gets current visibility of a distribution curve
581 boolean GetIsDistributionVisible();
583 //! Gets current filtering by scalars mode
584 boolean IsScalarFilterUsed();
586 void UseScalarFiltering( in boolean theUseScalarFilter );
589 * Sets scalar range - min and max boundaries of the scalar bar.
590 * \param theMin Min boundary of the scalar bar.
591 * \param theMax Max boundary of the scalar bar.
592 * \param theIsFilter if true then filter by scalars.
594 void SetScalarFilterRange( in double theMin, in double theMax );
596 double GetScalarFilterMin();
598 double GetScalarFilterMax();
601 * Add group as geometry of presentation.
602 * \param theMeshName - mesh name
603 * \param theGroupName - group name
605 void AddMeshOnGroup(in string theGroupName);
609 * Remove all groups.(The scalar map will be placed on all mesh).
611 void RemoveAllGeom();
615 //-------------------------------------------------------
617 interface ColoredPrs3dCache;
620 //-------------------------------------------------------
621 /*! \brief %ColoredPrs3dHolder interface.
622 * Interface of 3d presentation's holder, which represents colored 3d presentations,
623 * created on fields. It is publishing in the object browser in a separate folder
624 * and can be controled by viewer's slider.
626 interface ColoredPrs3dHolder : PrsObject, SALOME::GenericObj
629 * Presentation input parameters.
637 long myTimeStampNumber;
641 * Apply input parameters to last visited presentation in the cache.
643 boolean Apply(in ColoredPrs3d thePrs3d,
644 in BasicInput theInput,
645 in View3D theView3D);
648 * Gets the last visited presentation in the cache.
650 ColoredPrs3d GetDevice();
653 * Gets type of the managed presentations.
655 VISUType GetPrsType();
657 /*! Defines timestamp representation.
665 /*! Defines representation range of timestamps.
667 typedef sequence<TimeStampInfo> TimeStampsRange;
670 * Gets TimeStampsRange information from the last visited presentation.
672 TimeStampsRange GetTimeStampsRange();
675 * Gets input parameters of the last visited presentation.
677 BasicInput GetBasicInput();
680 * Gets a %ColoredPrs3dCache, to which the holder belongs
682 ColoredPrs3dCache GetCache();
685 * Gets memory size actually used by the holder (Mb).
687 float GetMemorySize();
691 //-------------------------------------------------------
692 /*! \brief %ColoredPrs3dCache interface.
693 * This interface is responsible for memory management of 3d presentations.
694 * One cache corresponds to one study.
696 interface ColoredPrs3dCache : RemovableObject, SALOME::GenericObj
698 /*! This enumeration contains the cache memory modes. */
700 MINIMAL, /*!< Minimal memory mode (default behaviour). */
701 LIMITED /*!< Limited memory mode (fixed memory size for presentations). */
704 /*! This enumeration defines how to enlarge the cache limited memory. */
706 NO_ENLARGE, /*!< No need to enlarge (default behaviour). */
707 ENLARGE, /*!< Enlarge limited memory. */
708 IMPOSSIBLE /*!< Impossible to enlarge (not enough free memory). */
711 /*! Sets a memory mode.*/
712 void SetMemoryMode(in MemoryMode theMode);
714 /*! Gets a memory mode.*/
715 MemoryMode GetMemoryMode();
717 /*! Sets a memory size for limited mode (Mb). */
718 void SetLimitedMemory(in float theMemorySize);
720 /*! Gets a memory size for limited mode (Mb). */
721 float GetLimitedMemory();
724 * Gets memory size actually used by the cache system (Mb).
726 float GetMemorySize();
728 /*! Creates %ColoredPrs3dHolder.*/
729 ColoredPrs3dHolder CreateHolder(in VISUType theType,
730 in ColoredPrs3dHolder::BasicInput theInput);
732 /*! Gets a memory which is required to create a holder. */
733 EnlargeType GetRequiredMemory(in VISUType theType,
734 in ColoredPrs3dHolder::BasicInput theInput,
735 out float theRequiredMemory);
739 //-------------------------------------------------------
740 /*! \brief Interface of the %Scalar Map
742 * This interface is responsable for coloring of 3D field presentations
743 * according the scalar values applied to different cells.
744 * As well it contains presentation parameters of the scalar bar. The scalar
745 * bar is displayed along with each colored field presentation and serves for
746 * consulting the correspondance between colors and data values.
749 interface ScaledPrs3d {
751 * Sets the type of scaling of the values reflected by the scalar bar.
752 * \param theScaling The value of this parameter is taken from the <VAR>Scaling</VAR> enumeration.
754 void SetScaling(in Scaling theScaling);
757 * Gets the type of scaling of the values reflected by this presentation.
759 Scaling GetScaling();
762 interface ScalarMap : ColoredPrs3d, ScaledPrs3d {
765 * Returns visibility state of scalar bar
767 boolean IsBarVisible();
770 * Sets visibility state of scalar bar
772 void SetBarVisible(in boolean theVisible);
775 * Sets the gauss metric for the presentation.
776 * \param theGaussMetric The value of this parameter is taken from the <VAR>GaussMetric</VAR> enumeration.
778 void SetGaussMetric(in GaussMetric theGaussMetric);
781 * Gets the gauss metric of the presentation.
783 GaussMetric GetGaussMetric();
786 * Sets the color of mesh links.
787 * \param theColor The color of the links. This parameter is taken from <VAR>Color</VAR> enumeration.
789 void SetLinkColor(in SALOMEDS::Color theColor);
792 * Gets the color of mesh links.
794 SALOMEDS::Color GetLinkColor();
797 //-------------------------------------------------------
798 /*! \brief Gauss Points presentation interface
800 * Presentation parameters of the Gauss Points presentation.
802 //-------------------------------------------------------
803 interface GaussPoints : ColoredPrs3d
805 //! Set flag indicating which scalar bar is active.
806 void SetIsActiveLocalScalarBar(in boolean theFlag);
808 //! Get flag indicating which scalar bar is active.
809 boolean GetIsActiveLocalScalarBar();
811 //! Set flag indicating visibility of global scalar bar.
812 void SetIsDispGlobalScalarBar(in boolean theFlag);
814 //! Get flag indicating visibility of global scalar bar.
815 boolean GetIsDispGlobalScalarBar();
817 //! Set value of the distance between global and local scalar bars.
818 void SetSpacing(in double theSpacing);
820 //! Get value of the distance between global and local scalar bars.
824 * Returns visibility state of scalar bar
826 boolean IsBarVisible();
829 * Sets visibility state of scalar bar
831 void SetBarVisible(in boolean theVisible);
834 * Set the Multicolored mode.
835 * \param theIsColored is used to switch between Results and Geometry modes.
836 * Multiple colors are using when the presentation is
837 * drawing in the Results mode, one color - in the Geometry mode.
839 void SetIsColored(in boolean theIsColored);
841 //! Gets current color mode
842 boolean GetIsColored();
844 /*! Sets the color of this presentation in case of IsColored switched off.
845 * \param theColor The color of this presentation. This parameter
846 * is taken from the <VAR>Color</VAR> enumeration.
848 void SetColor(in SALOMEDS::Color theColor);
851 * When the Bicolor parameter is set to true, scalar bars are
852 * drawing with two colors : red color correspoonds to positive
853 * scalar values, blue color - to negative values.
855 void SetBiColor(in boolean theIsBiColor);
857 //! Get the Bicolor mode.
858 boolean GetBiColor();
860 //! Checks whether the Gauss Points will be deformed or not
861 boolean GetIsDeformed();
863 //! Apply deformation on the Gauss Points
864 void SetIsDeformed(in boolean theIsDeformed);
867 * Sets the scale factor for scalar values
868 * (how much corresponding mesh elements should be translated).
869 * \param theScaleFactor The scaling factor.
871 void SetScaleFactor(in double theScaleFactor);
874 * Gets the scale factor for scalar values.
875 * (how much corresponding mesh elements is translated)
877 double GetScaleFactor();
880 * This enumeration contains a set of elements defining the type of representation of the vector head.
888 //! Set type of the primitives which is used for drawing the Gauss Points
889 void SetPrimitiveType(in PrimitiveType thePrimitiveType);
891 //! Get type of the primitives which is used for drawing the Gauss Points
892 PrimitiveType GetPrimitiveType();
894 //! Sets Point Sprite clamp
895 void SetClamp(in double theClamp);
897 //! Gets Point Sprite clamp
900 //! Sets minimum size of Point Sprites
901 void SetMinSize(in double theMinSize);
903 //! Gets minimum size of Point Sprites
906 //! Sets maximum size of Point Sprites
907 void SetMaxSize(in double theMaxSize);
909 //! Gets maximum size of Point Sprites
912 //! Sets magnification for Point Sprites
913 void SetMagnification(in double theMagnification);
915 //! Gets magnification for Point Sprites
916 double GetMagnification();
918 //! Sets the increment of changing Magnification parameter
919 void SetMagnificationIncrement(in double theIncrement);
921 //! Gets the increment of changing Magnification parameter
922 double GetMagnificationIncrement();
924 //! Sets Point Sprites size
925 void SetGeomSize(in double theGeomSize);
927 //! Sets size of Point Sprite
928 double GetGeomSize();
930 //! Get path to the image using for Main Point Sprite texture
931 string GetMainTexture();
933 //! Get path to the image using for Alpha Point Sprite texture
934 string GetAlphaTexture();
936 //! Points Main and AlphaMask images to be used by Point Sprites
937 void SetTextures(in string theMainTexture, in string theAlphaTexture);
939 //! Sets Point Sprite Alpha threshold
940 void SetAlphaThreshold(in double theAlphaThreshold);
942 //! Gets Point Sprite Alpha threshold
943 double GetAlphaThreshold();
945 //! Sets resolution of the Geometrical Sphere
946 void SetResolution(in long theResolution);
948 //! Sets resolution of the Geometrical Sphere
949 long GetResolution();
951 //! Sets how many faces of can be drawn in the Geometrical Sphere primitive mode
952 void SetFaceLimit(in long theFaceLimit);
954 //! Defines how many faces of can be drawn in the Geometrical Sphere primitive mode
961 /*! \brief MonoColor presentation presentation interface
963 * Presentation parameters of the MonoColor presentation.
965 interface MonoColorPrs : ScalarMap {
967 /*! This boolean method returns True if this deformed shape presentation is colored.
971 /*! Shows this presentation in colored mode.
972 * \param theColored If this boolean parameter is True this presentable
973 * object will be shown in colored mode.
975 void ShowColored(in boolean theColored);
977 /*! Gets the color of this presentable object.
978 * \return The color of this presentable object.
980 SALOMEDS::Color GetColor();
982 /*! Sets the color of this presentation.
983 * \param theColor The color of this presentation. This parameter
984 * is taken from the <VAR>Color</VAR> enumeration.
986 void SetColor(in SALOMEDS::Color theColor);
990 /*! \brief Deformed shape presentation interface
992 * Presentation parameters of the deformed shape presentation.
994 interface DeformedShape : MonoColorPrs
997 * Sets the scale of the presentatable object.
998 * \param theScale Double value defining the scale of this presentable object.
1000 void SetScale(in double theScale);
1003 * Gets the scale of the presentatable object.
1009 //-------------------------------------------------------
1010 /*! \brief Deformation interface
1012 * This is base interface for building of the deformed presentations
1014 interface Deformation{
1016 * Sets the scale of the presentatable object.
1017 * \param theScale Double value defining the scale of this presentable object.
1019 void SetScale(in double theScale);
1022 * Gets the scale of the presentatable object.
1027 * Sets the vectorial field
1028 * \param theEntity - entity of vectorial field
1029 * \param theFieldName - the name of vectorial field
1031 void SetVectorialField(in Entity theEntity,
1032 in string theFieldName);
1035 * Get vectorial entity
1037 Entity GetVectorialFieldEntity();
1040 * Get scalar field name
1042 string GetVectorialFieldName();
1046 //-------------------------------------------------------
1047 /*! \brief OptionalDeformation interface
1049 * This is interface for switch on/off of the deformation of the presentation
1051 interface OptionalDeformation : Deformation{
1054 * Sets the deformation flag of the presentatable object.
1055 * \param theFlag Boolean value defining the deformation flag of this presentable object.
1057 void UseDeformation(in boolean theFlag);
1060 * Gets the deformation flag of the presentatable object.
1062 boolean IsDeformed();
1065 //-------------------------------------------------------
1066 /*! \brief Scalar Map on Deformed shape presentation interface
1068 * Presentation parameters of the scalar map on deformed shape presentation.
1070 interface DeformedShapeAndScalarMap : ScalarMap {
1073 * Sets the scale of the presentatable object.
1074 * \param theScale Double value defining the scale of this presentable object.
1076 void SetScale(in double theScale);
1079 * Gets the scale of the presentatable object.
1084 * Sets the scalar field
1085 * \param theEntity - entity of scalar field
1086 * \param theFieldName - the name of scalar field
1087 * \param theTimeStampNumber - the timestamp number for the scalar field
1089 void SetScalarField(in Entity theEntity,
1090 in string theFieldName,
1091 in long theTimeStampNumber);
1097 Entity GetScalarEntity();
1100 * Get scalar field name
1102 string GetScalarFieldName();
1105 * Get timestamp number for the scalar field
1107 long GetScalarTimeStampNumber();
1111 //-------------------------------------------------------
1113 * \brief Plot3D interface
1115 * Presentation parameters of Plot3D presentation. This type of presentation
1116 * consists of deforming initial planar mesh according to values assigned to the mesh elements.
1117 * If mesh not planar but volumic one, it is possible to generate intermediate planar mesh.
1119 interface Plot3dBase {
1121 * Sets the scale factor for scalar values
1122 * (how much corresponding mesh elements should be translated).
1123 * \param theScaleFactor The scaling factor.
1125 void SetScaleFactor (in double theScaleFactor);
1128 * Gets the scale factor for scalar values.
1129 * (how much corresponding mesh elements is translated)
1131 double GetScaleFactor();
1134 * Sets presentation type: contour or surface.
1135 * \param theIsContourPrs Define, whether presentation type is contour.
1137 void SetContourPrs (in boolean theIsContourPrs );
1140 * Returns true if presentation type is contour.
1142 boolean GetIsContourPrs();
1145 * Sets the number of contours.
1146 * \param theNb The number of contours.
1148 void SetNbOfContours (in long theNb);
1151 * Gets the number of contours.
1153 long GetNbOfContours();
1156 interface Plot3D : ScalarMap, Plot3dBase {
1158 * This enumeration contains a set of elements defining
1159 * the type of orientation in 3D space of the cutting plane.
1161 enum Orientation { XY, /*!< The object is located in the plane formed by X and Y axis. */
1162 YZ, /*!< The object is located in the plane formed by Y and Z axis. */
1163 ZX }; /*!< The object is located in the plane formed by Z and X axis. */
1166 * Sets the orientation in 3D space of cutting plane for the presentation.
1167 * \param theOrientation This parameter defines the type of orientation of cutting plane
1168 * in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
1169 * \param theXAngle The angle of rotation of the cutting plane
1170 * around the first axis of the chosen orientation.
1171 * \param theXAngle The angle of rotation of the cutting plane
1172 * around the second axis of the chosen orientation.
1174 void SetOrientation (in Orientation theOrientation, in double theXAngle, in double theYAngle);
1177 * Gets the type of orientation in 3D space of cutting plane.
1179 Orientation GetOrientationType();
1182 * Gets rotation angle of the cutting plane
1183 * around the first axis of the chosen orientation.
1185 double GetRotateX();
1188 * Gets rotation angle of the cutting plane
1189 * around the second axis of the chosen orientation.
1191 double GetRotateY();
1194 * Sets the position of a cutting plane.
1195 * \param thePlanePosition The position of the cutting plane.
1196 * \param theIsRelative Define, whether the input position is relative.
1198 void SetPlanePosition (in double thePlanePosition,
1199 in boolean theIsRelative);
1202 * Gets the position of the cutting plane
1204 double GetPlanePosition();
1207 * Returns true if a position of cutting plane is relative
1209 boolean IsPositionRelative();
1212 //-------------------------------------------------------
1213 /*! \brief %Table representation interface
1215 * Presentation parameters of the %Table view.
1217 interface Table : PrsObject {
1219 * Sets the title of the table.
1220 * \param theTitle String parameter defining the title of this table.
1222 void SetTitle(in string theTitle);
1225 * Gets the title of the table.
1226 * \return A string value containing the title of the table.
1231 * This enumeration contains a set of elements defining the orientation of the table.
1234 HORIZONTAL, /*!< Horizontal orientation of the table. */
1235 VERTIACAL /*!< Vertical orientation of the table. */
1239 * Sets orientation of the table.
1240 * \param theOrientation This input parameter defines the orientation of the table.
1241 * It is taken from the <VAR>Orientation</VAR> enumeration.
1243 void SetOrientation(in Orientation theOrientation);
1246 * Gets orientation of the table.
1247 * \return Orientation of the table. The returned value will correspond
1248 * to one of the elements the <VAR>Orientation</VAR> enumeration.
1250 Orientation GetOrientation();
1253 * Gets the number of rows of the table.
1254 * \return Long value corresponding to the number of rows of the table
1259 * Gets the number of columns of the table.
1260 * \return Long value corresponding to the number of columns of the table
1262 long GetNbColumns();
1265 //-------------------------------------------------------
1266 /*! \brief %PointMap3d representation interface
1268 * Presentation parameters of the %Table Point Map in 3d view.
1270 interface PointMap3d : ColoredPrs3dBase, ScaledPrs3d, Plot3dBase, Table {
1273 //-------------------------------------------------------
1274 /*! \brief Cut planes interface
1276 * Presentation parameters of Cut planes presentation. This type of presentation
1277 * consists of cutting your initial mesh by a definite number of planes. As the
1278 * result you will see these planes which will be cutted by the borders of the mesh.
1280 interface CutPlanes : ScalarMap, OptionalDeformation {
1282 * This enumeration contains a set of elements defining the type of orientation in 3D space
1283 * of the cut planes.
1285 enum Orientation {XY, /*!< The object is located in the plane formed by X and Y axis. */
1286 YZ, /*!< The object is located in the plane formed by Y and Z axis. */
1287 ZX}; /*!< The object is located in the plane formed by Z and X axis. */
1290 * Sets the type of orientation in 3D space of cut planes presentation.
1291 * \param theOrientation This parameter defines the type of orientation of cut planes
1292 * in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
1293 * \param theXAngle The angle of rotation of the cut planes around
1294 * the first axis of the chosen orientation.
1295 * \param theXAngle The angle of rotation of the cut planes around
1296 * the second axis of the chosen orientation.
1298 void SetOrientation(in Orientation theOrientation, in double theXAngle, in double theYAngle);
1301 * Gets the type of orientation in 3D space of cut planes presentation.
1303 Orientation GetOrientationType();
1306 * Gets rotation angle of the cut plane presentation around the first axis of the chosen orientation.
1308 double GetRotateX();
1311 * Gets rotation angle of the cut plane presentation around the second axis of the chosen orientation.
1313 double GetRotateY();
1316 * Sets the displacement of the cut planes in 3D space.
1318 * \param theDisp This parameter defines position of the cut planes
1319 * in 3D space. It varies from 0 to 1. If the chosen value is 0.5, the cut planes
1320 * will be evenly located regarding each other; in other words, the distance between all
1321 * of them will be equal. If the value is higher or lower than 0.5, the planes will be displaced
1322 * to one or another side.
1324 void SetDisplacement(in double theDisp);
1327 * Gets the displacement of the cut planes in 3D space.
1329 double GetDisplacement();
1332 * Sets the position of a definite cut plane.
1333 * \param thePlaneNumber The number of this cut plane.
1334 * \param thePlanePosition The position of this cut plane.
1336 void SetPlanePosition(in long thePlaneNumber, in double thePlanePosition);
1339 * Sets the position of the choosen plane to default value.
1340 * \param thePlaneNumber The number of this cut plane.
1342 void SetDefault(in long thePlaneNumber);
1345 * Gets the position of the choosen plane
1347 double GetPlanePosition(in long thePlaneNumber);
1350 * Determines whether the choosen plane has default position.
1351 * \param thePlaneNumber The number of this cut plane.
1353 boolean IsDefault(in long thePlaneNumber);
1356 * Sets the number of cut planes.
1357 * \param theNb The number of cut planes.
1359 void SetNbPlanes(in long theNb);
1362 * Gets the number of cut planes.
1367 //-------------------------------------------------------
1368 /*! \brief Base interface for Cut Lines and Cut Segment tools
1371 interface CutLinesBase : ScalarMap {
1373 * Sets the number of cut lines.
1374 * \param theNb The number of cut lines.
1376 void SetNbLines(in long theNb);
1379 * Gets the number of cut lines.
1383 /*! Invert all curves of corresponding table
1384 * \param theInvert - Invert all curves, if value is TRUE, else not.
1386 void SetAllCurvesInverted(in boolean theInvert);
1388 /*! Checks the orientation of all curves
1389 * \retval TRUE - if all curves are inverted, else FALSE
1391 boolean IsAllCurvesInverted();
1393 /*! Sets values which cutlines would be shown: aboslute or relative values
1394 * \param theAbsLength - boolean value, TRUE or false.
1396 void SetUseAbsoluteLength(in boolean theAbsLength);
1398 /*! Checks values of cutlines: using aboslute or relative values
1400 boolean IsUseAbsoluteLength();
1403 //-------------------------------------------------------
1404 /*! \brief Cut lines presentation.
1406 * Presentation parameters of a Cut lines presentation.
1407 * Cut Lines is a type of presentation which displays colored cells
1408 * with applied scalar values on the mesh where lines are placed.
1409 * The procedure of construction of a Cut Lines presentation reuses the algorithm
1410 * of creation of Cut Planes presentation and consists of two steps:
1412 * 1. From Cut Planes presentation one plane is taken and
1413 * it is used as base plane for construction of cut lines.
1414 * 2. This plane is cut by a regular array of planes. The result of this
1415 * operation is a regular array of lines in space, belonging to the same plane
1416 * and having the same orientation. They are located inside or on the mesh.
1418 interface CutLines : CutLinesBase {
1420 * Sets the type of orientation in 3D space of the base plane of a cut lines presentation.
1421 * \param theOrientation The orientation of the base plane in 3D space.
1422 * \param theXAngle The angle of rotation of the base plane around
1423 * the first axis of the chosen orientation.
1424 * \param theXAngle The angle of rotation of the base plane around
1425 * the second axis of the chosen orientation.
1427 void SetOrientation(in CutPlanes::Orientation theOrientation, in double theXAngle, in double theYAngle);
1430 * Sets the type of orientation in 3D space of the cutting planes of a cut lines presentation.
1431 * \param theOrientation This parameter defines the type of orientation of the cutting planes
1432 * in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
1433 * \param theXAngle The angle of rotation of the cutting planes
1434 * around the first axis of the chosen orientation.
1435 * \param theXAngle The angle of rotation of the cutting planes
1436 * around the second axis of the chosen orientation.
1438 void SetOrientation2(in CutPlanes::Orientation theOrientation, in double theXAngle, in double theYAngle);
1441 * Gets the type of orientation in 3D space of the base plane of a cut lines presentation.
1443 CutPlanes::Orientation GetOrientationType();
1446 * Gets the type of orientation in 3D space of the cutting planes of a cut lines presentation.
1448 CutPlanes::Orientation GetOrientationType2();
1451 * Gets rotation angle of the base plane around the first axis of the chosen orientation.
1453 double GetRotateX();
1456 * Gets rotation angle of the cutting planes around the first axis of the chosen orientation.
1458 double GetRotateX2();
1461 * Gets rotation angle of the base plane around the second axis of the chosen orientation.
1463 double GetRotateY();
1466 * Gets rotation angle of the cutting planes around the second axis of the chosen orientation.
1468 double GetRotateY2();
1471 * Sets the displacement of the base plane of the cut lines presentation in 3D space.
1473 * \param theDisp This parameter defines position of the base plane
1474 * in 3D space. It varies from 0 to 1.
1476 void SetDisplacement(in double theDisp);
1479 * Sets the displacement of the cutting planes of the cut lines presentation in 3D space.
1481 * \param theDisp This parameter defines position of the cutting planes
1482 * in 3D space. It varies from 0 to 1.
1484 void SetDisplacement2(in double theDisp);
1487 * Gets the displacement of the base plane of the cut lines presentation in 3D space.
1489 double GetDisplacement();
1492 * Gets the displacement of the cutting planes of the cut lines presentation in 3D space.
1494 double GetDisplacement2();
1496 /*! Sets the position of the base plane in 3D space.
1497 * \param thePlanePosition A double value defining the position of the base plane in 3D space.
1499 void SetBasePlanePosition(in double thePlanePosition);
1501 /*! Gets the position of the base plane in 3D space.
1503 double GetBasePlanePosition();
1505 /*! Sets the position of one of cutting planes in 3D space.
1506 * \param thePlaneNumber A long value defining the order number of this cutting plane.
1507 * \param thePlanePosition A double value defining the position of the base plane in 3D space.
1509 void SetLinePosition(in long thePlaneNumber, in double thePlanePosition);
1511 /*! Gets the position of one of cutting planes in 3D space.
1512 * \param thePlaneNumber A long value defining the order number of this cutting plane.
1514 double GetLinePosition(in long thePlaneNumber);
1516 /*! Sets the position of the base plane to default value.
1521 * Determines whether the base plane has default position.
1522 * \return True if the base plane has default position.
1524 boolean IsDefault();
1527 * Sets the position of the choosen cutting plane to default value.
1528 * \param thePlaneNumber The number of this cutting plane.
1530 void SetDefaultPosition(in long thePlaneNumber);
1533 * Determines whether the choosen cutting plane has default position.
1534 * \param thePlaneNumber The number of this cutting plane.
1535 * \return True if this cutting plane has default position.
1537 boolean IsDefaultPosition(in long thePlaneNumber);
1540 //-------------------------------------------------------
1541 /*! \brief Cut segment presentation.
1543 * Presentation parameters of a Cut segment presentation.
1544 * Cut Segment is a simplified variant of Cut Lines presentation, which is used
1545 * to display a single line instead of set of them. Axis of this line is defined
1546 * by coordinates of two points in 3D space.
1548 interface CutSegment : CutLinesBase {
1550 * Sets coordinates of the first point of axis of the segment.
1551 * \param theX X coordinate of the point
1552 * \param theY Y coordinate of the point
1553 * \param theZ Z coordinate of the point
1555 void SetPoint1(in double theX, in double theY, in double theZ);
1558 * Gets coordinates of the first point of axis of the segment.
1559 * \param theX X coordinate of the point
1560 * \param theY Y coordinate of the point
1561 * \param theZ Z coordinate of the point
1563 void GetPoint1(out double theX, out double theY, out double theZ);
1566 * Sets coordinates of the second point of axis of the segment.
1567 * \param theX X coordinate of the point
1568 * \param theY Y coordinate of the point
1569 * \param theZ Z coordinate of the point
1571 void SetPoint2(in double theX, in double theY, in double theZ);
1574 * Gets coordinates of the second point of axis of the segment.
1575 * \param theX X coordinate of the point
1576 * \param theY Y coordinate of the point
1577 * \param theZ Z coordinate of the point
1579 void GetPoint2(out double theX, out double theY, out double theZ);
1582 /*! \brief Interface of the stream lines representation
1584 * This interface contains presentation parameters of stream lines presentations.
1585 * <BR>Stream lines is a type of presentation transforming into lines the
1586 * cells with vectors having most similar direction. A stream line can be thought
1587 * of as the path that a massless particle takes in a vector field.
1588 * Streamlines are used to convey the structure of a vector field.
1589 * Usually streamlines are created to explore the most interesting features in the field.
1591 interface StreamLines : MonoColorPrs {
1592 /*! This enumerations contains a set of elements necessary
1593 * for definition of direction of the stream lines.
1595 enum Direction{ FORWARD,
1600 /*! Sets the parameters of the stream lines presentation.
1601 * \param theIntStep Inegration step is a parameter of smoothness of the stream lines.
1602 * This parameter defines the accuracy of construction of the streamlines.
1603 * A smaller value of this parameter allows to construct smoother
1604 * streamlines (at the cost of more computation time).
1605 * \param thePropogationTime This parameter controls the maximum length of
1606 * the stream line (measured in units of time).
1607 * \param theStepLength This parameter defines the size of the output line segments
1608 * that make up the streamline (which is represented as a polyline).
1609 * \param thePrs3d The source presentation. The points of the field located on this source
1610 * presentation will serve as starting points for generation of stream lines.
1611 * \note If this parameter is not defined, your stream lines
1612 * presentation will be generated on all points of the field.
1613 * \param thePercents This parameter defines the quantity of points of the field
1614 * (from 0 to 100%) which will be used as starting points for
1615 * construction of the stream lines. Thus, the value of this
1616 * parameter can vary from 0 to 1.
1617 * \param theDirection Direction of the stream lines (Forward, Backward or Both).
1618 * \return True if all parameters are properly set.
1620 boolean SetParams(in double theIntStep,
1621 in double thePropogationTime,
1622 in double theStepLength,
1624 in double thePercents,
1625 in Direction theDirection);
1627 /*! Gets the value of integration step of the stream lines presentation.
1629 double GetIntegrationStep();
1631 /*! Gets the value of propagation time of the stream lines presentation.
1633 double GetPropagationTime();
1635 /*! Gets the value of step length of the stream lines presentation.
1637 double GetStepLength();
1639 /*! Returns the source presentation used for generation of the stream lines.
1643 /*! Gets the quantity of points of the field used as starting
1644 * points for generation of the stream lines presentation.
1646 double GetUsedPoints();
1648 /*! Returns the direction of the stream lines.
1650 Direction GetDirection();
1653 /*! \brief Interface of the isometric surface presentation
1655 * This interface contains presentation parameters of
1656 * isometric surface presentations.
1657 * <BR>Iso surfaces presentation combines all equal scalar
1658 * values on the cells and on the basis of them constructs
1659 * isobaric surfaces, which form this presentation.
1661 interface IsoSurfaces : MonoColorPrs {
1663 * Sets the number of isometric surfaces.
1664 * \param theNb A long value defining the number of isometric surfaces
1665 * which will be used for construction of this presentation.
1667 void SetNbSurfaces(in long theNb);
1670 * Gets the number of isometric surfaces
1672 long GetNbSurfaces();
1675 * Returns TRUE if labels with values are shown
1677 boolean IsLabeled();
1680 * Set show or not value labels
1682 void ShowLabels(in boolean theShow, in long theNb);
1685 * Returns Nb of labels per surface
1691 //-------------------------------------------------------
1692 /*! \brief Interface of the vector presentation.
1694 * This interface contains presentation parameters of vector presentations.
1696 interface Vectors : DeformedShape {
1698 * Sets the width of the lines of the vectors.
1699 * \param theWidth A double value defining the width of the lines of the vectors.
1701 void SetLineWidth(in double theWidth);
1704 * Gets the width of the lines of the vectors.
1706 double GetLineWidth();
1709 * This enumeration contains a set of elements defining the type of representation of the vector head.
1711 enum GlyphType{ ARROW,
1718 * Sets the type of representation of the vector head.
1719 * \param theType This parameter defines the type of representation of the vector head.
1720 * This value is taken from the <VAR>GlyphType</VAR> enumeration.
1722 void SetGlyphType(in GlyphType theType);
1725 * Gets the type of representation of the vector head.
1727 GlyphType GetGlyphType();
1730 * This enumeration contains a set of elements defining the position of the vector head.
1732 enum GlyphPos{ CENTER, /*!<In the center of the vector.*/
1733 TAIL, /*!<In the tail of the vector.*/
1734 HEAD /*!<In the head of the vector.*/
1738 * Sets the position of the vector head.
1739 * \param thePos This parameter defines the position of the vector head.
1740 * This value is taken from the <VAR>GlyphPos</VAR> enumeration.
1742 void SetGlyphPos(in GlyphPos thePos);
1745 * Gets the position of the vector head.
1747 GlyphPos GetGlyphPos();
1750 //-------------------------------------------------------
1751 /*! \brief %Animation class
1753 * This class provides a set of methods used for:<br>
1755 * <li> generating different animations on the basis of a field,
1756 * <li> setting the parameters of the animations,
1757 * <li> playing these animations in the %VISU module.
1760 * <BR><B>Field</B> represents the results of calculations
1761 * (it can be scalar or vector values), grouped together under one physical concept.
1762 * <BR><B>Time stamp</B> represents a subfield: the results
1763 * of calculations are taken in one definite moment.
1765 interface Animation : Base
1768 * This enumeration contains a set of available animation modes.
1770 enum AnimationMode{ PARALLEL, /*!< parallel mode of animation. */
1771 SUCCESSIVE /*!< succcessive mode of animation. */
1774 /*! Defines the field which will be used as a base for generation of the animation.
1775 * \param theObject The %SObject corresponding to the field.
1777 boolean addField(in SALOMEDS::SObject theObject);
1779 /*! Remove all fields from Animation object.
1783 /*! Generates presentations on the basis of the field.
1784 * \param theFieldNum The number of the field, which will be used
1785 * as the basis for construction of the presentation.
1787 void generatePresentations(in long theFieldNum);
1789 /*! Generates a set of frames from the created by the method
1790 * <VAR>generatePresentations</VAR>3D presentations. A sequence of
1791 * these frames will be transformed into an animation.
1792 * \return True, if the frames have been successfully generated.
1794 boolean generateFrames();
1796 /*! Clears the view before starting an animation.
1800 /*! \name Playback of an animation:
1804 /*! Starts an animation.
1806 void startAnimation();
1808 /*! Stops an animation.
1810 void stopAnimation();
1812 /*! Forwards to the next frame.
1816 /*! Returns to the previous frame.
1820 /*! Returns to the first frame of the animation.
1824 /*! Forwards to the last frame of the animation.
1828 /*! Passes to a definite frame of the animation.
1829 * \param theFrame A long value defining the number of the frame.
1831 void gotoFrame(in long theFrame);
1834 /*! Gets the number of time stamps (subfields) contained in the given field.
1838 /*! Gets the number of generated frames
1842 /*! Returns True, if the animation is currently running.
1844 boolean isRunning();
1846 /*! Returns the number of the current frame.
1848 long getCurrentFrame();
1852 ColoredPrs3d getPresentation(in long theField, in long theFrame);
1854 /*! Sets the type of presentation (vectors, deformed shape etc.)
1855 * which will be generated by the method <VAR>generatePresentations</VAR>.
1856 * \note \c addField() method should be called before in order to add field
1857 * with number theFieldNum.
1859 void setPresentationType(in long theFieldNum, in VISUType theType);
1861 /*! Gets the type of presentation (vectors, deformed shape etc.) which will
1862 * be generated by the method <VAR>generatePresentations</VAR>.
1863 * \note \c addField() method should be called before in order to add field
1864 * with number theFieldNum.
1866 VISUType getPresentationType(in long theFieldNum);
1868 /*! Sets the speed of the animation.
1869 * \param theSpeed The speed of the animation. The value varies from 1 to 99.
1871 void setSpeed(in long theSpeed);
1873 /*! Gets the speed of the animation.
1877 /*! Ruturns True, if playback of the animation is proportional.
1878 * This option allows to render your animation with proportional periods
1879 * of time between every frame (not depending on the time stamps).
1881 boolean isProportional();
1883 /*! Sets the range of the animation. The range is defined on the basis of
1884 * the time stamps of the field which have been used for generation of the animation.
1885 * This method allows to bound the range of generated frames.
1886 * If this method is not used, the animation will be generated
1887 * on the basis of all time stamps contained in the field.
1888 * \param theMin The value of the first time stamp which will be used for generation of the animation.
1889 * \param theMax The value of the last time stamp which will be used for generation of the animation.
1891 void setAnimationRange(in double theMin, in double theMax);
1893 /*! Gets the number of the first time stamp which will be used for generation of the animation.
1895 double getMinRange();
1897 /*! Gets the number of the last time stamp which will be used for generation of the animation.
1899 double getMaxRange();
1901 /*! Returns True if the range of the animation has been defined
1902 * by the method <VAR>setAnimationRange</VAR>. Otherwise
1903 * the animation will be generated on the basis of all time stamps contained in the field.
1905 boolean isRangeDefined();
1907 /*! Sets the sequence of the animation. The sequence is defined on the basis of
1908 * the time stamps of the field which have been used for generation of the animation.
1909 * This method allows to set the sequence of generated frames.
1910 * If this method is not used, the animation will be generated
1911 * on the basis of all time stamps contained in the field.
1912 * Format of the sequence: '1,9,2-5,7-8'
1913 * \param theSequence The sequence of time stamps indices which will be used for generation of the animation.
1915 void setAnimationSequence(in string theSequence);
1917 /*! Gets the animation sequence.
1919 string getAnimationSequence();
1921 /*! Returns True if the sequence of the animation has been defined
1922 * by the method <VAR>setAnimationSequence</VAR>. Otherwise
1923 * the animation will be generated on the basis of all time stamps contained in the field.
1925 boolean isSequenceDefined();
1927 /*! Saves all the frames composing the animation into a definite directory.
1928 * Pictures format is set with method <VAR>setDumpFormat()</VAR>.
1929 * \param thePath The directory where all the frames will be saved.
1931 void dumpTo(in string thePath);
1933 /*! Set format for saving all the frames composing the animation.
1934 * \param theFormat The format for saving pictures.
1935 * For available formats see QImageIO documentation (Qt).
1936 * If specified format is not available, default format will be used.
1937 * Default format is JPEG or first of supported, if JPEG is not available.
1938 * \return Really set format. Differ from \a theFormat if \a theFormat is not available.
1940 string setDumpFormat(in string theFormat);
1942 /*! Returns True, if the playback of the animation is cycling.
1944 boolean isCycling();
1946 /*! Gets the first time stamp of the field defined at the input of the animation.
1947 * \note This method is used if animation range is <b>NOT</b> defined.
1949 double getMinTime();
1951 /*! Gets the last time stamp of the field defined at the input of the animation.
1952 * \note This method is used if animation range is <b>NOT</b> defined.
1954 double getMaxTime();
1956 /*! Sets proprtional playback of the animation. This option allows to render your animation
1957 * with proportional periods of time between every frame (not depending on the time stamps).
1958 * \param theProp If this boolean parameter is True, playback
1959 * of your animation will be set as proportional.
1961 void setProportional(in boolean theProp);
1963 /*! Sets cycling playback of the animation. The number of cycles
1964 * can be infinite, untill you use <VAR>startAnimation</VAR> method.
1965 * \param theCycle If this boolean parameter is True, playback
1966 * of your animation will be set as cycling.
1968 void setCycling(in boolean theCycle);
1970 boolean isCleaningMemoryAtEachFrame();
1971 void setCleaningMemoryAtEachFrame(in boolean theCycle);
1973 SALOMEDS::SObject publishInStudy();
1975 void saveAnimation();
1977 void restoreFromStudy(in SALOMEDS::SObject theSObj);
1979 boolean isSavedInStudy();
1982 * Sets the animation mode.
1983 * \param theMode The value of this parameter is taken from the <VAR>AnimationMode</VAR> enumeration.
1985 void setAnimationMode(in AnimationMode theMode);
1988 * Gets the animation mode.
1990 AnimationMode getAnimationMode();
1993 * Apply the presentation properties to all fields. The exception is raised in the following cases:
1994 * 1) presentations for the given field is not yet created;
1995 * 2) invalid dynamic cast of the given presentation to VISU::ColoredPrs3d_i;
1996 * 3) the MED file is not the same;
1997 * 4) the mesh name is not the same;
1998 * 5) the field name is not the same;
1999 * 6) the entity is not the same.
2001 void ApplyProperties(in long theFieldNum, in ColoredPrs3d thePrs)
2002 raises (SALOME::SALOME_Exception);
2006 //-------------------------------------------------------
2009 //-------------------------------------------------------
2010 /*! \brief Interface %Evolution
2013 interface Evolution : Base
2016 * Defines the field which will be used as a base for generation of the evolution.
2017 * \param theObject The %SObject corresponding to the field.
2019 boolean setField(in SALOMEDS::SObject theObject);
2022 * Sets id of the point for which the evolution will be generated.
2023 * \param thePointId id of the point.
2025 void setPointId(in long thePointId);
2028 * Sets id of the component for which the evolution will be generated.
2029 * \param thePointId id of the component.
2031 void setComponentId(in long theComponentId);
2034 * Shows the evolution.
2036 boolean showEvolution();
2039 * Restores the evolution from study.
2040 * \param theSObj the study object from which the evolution should be restored.
2042 void restoreFromStudy(in SALOMEDS::SObject theSObj);
2046 /*! \brief Interface %Result
2048 * This interface serves for inner representation of data generated
2049 * in other sources (MED object or file). This data is needed
2050 * for further construction of graphical presentations.
2052 interface Result : RemovableObject, SALOME::GenericObj
2054 /*! Reads all data from the corresponding sources. By default the data is loaded on demand.
2058 /*! Start to parse the source MED file and publish all its entities into the study*/
2059 boolean Build(in boolean theIsBuildAll, in boolean theIsAtOnce);
2061 /*! Allow to check is all requested MED entites already loaded or not */
2064 /*! Allow to check is corresponding MED entites already loaded or not */
2065 boolean IsEntitiesDone();
2067 /*! Choose to parse MED fields and perform global min / max on the MED timestamps.*/
2068 void SetBuildFields(in boolean theIsBuildFields, in boolean theIsCalculateMinMax);
2070 /*! Allow to check is corresponding MED fields already loaded or not */
2071 boolean IsFieldsDone();
2073 /*! Choose to parse MED groups.*/
2074 void SetBuildGroups(in boolean theIsBuildGroups);
2076 /*! Allow to check is corresponding MED groups and families already loaded or not */
2077 boolean IsGroupsDone();
2079 /*! Allow to check is min / max calculation over field's components already perfrormed or not */
2080 boolean IsMinMaxDone();
2082 /*! Allow to check is corresponding multi resolution structure already loaded or not */
2083 boolean IsPartsDone();
2085 typedef sequence<Entity> Entities;
2087 typedef string EntityName;
2089 typedef sequence<EntityName> EntityNames;
2091 typedef long TimeStampNumber;
2093 typedef sequence<TimeStampNumber> TimeStampNumbers;
2102 typedef sequence<Resolution> Resolutions;
2104 /*! Gets existing mesh names */
2105 EntityNames GetMeshNames();
2107 /*! Gets existing mesh entites for the given mesh name */
2108 Entities GetEntities(in EntityName theMeshName);
2110 /*! Gets existing families for the given mesh name and entity */
2111 EntityNames GetFamilies(in EntityName theMeshName, in Entity theEntity);
2113 /*! Gets existing families for the given mesh name */
2114 EntityNames GetGroups(in EntityName theMeshName);
2116 /*! Gets existing fields for the given mesh name and entity */
2117 EntityNames GetFields(in EntityName theMeshName, in Entity theEntity);
2119 /*! Gets number of components for the given mesh name, entity and name of field */
2120 long GetNumberOfComponents(in EntityName theMeshName, in Entity theEntity, in EntityName theFieldName);
2122 /*! Gets existing numbers of time stamps for the given mesh name, entity and name of field */
2123 TimeStampNumbers GetTimeStampNumbers(in EntityName theMeshName, in Entity theEntity, in EntityName theFieldName);
2125 /*! Gets existing parts of multi resolution structure for the given mesh name */
2126 EntityNames GetPartNames(in EntityName theMeshName);
2128 /*! Gets available resolutions of multi resolution structure for the given mesh and part names */
2129 Resolutions GetResolutions(in EntityName theMeshName, in EntityName thePartName);
2131 /*! Gets current resolution of multi resolution structure for the given mesh and part names */
2132 Resolution GetResolution(in EntityName theMeshName, in EntityName thePartName);
2134 /*! Gets current resolution of multi resolution structure for the given mesh and part names */
2135 void SetResolution(in EntityName theMeshName, in EntityName thePartName, in Resolution theResolution);
2137 /*! Gets information about imported MED file */
2138 SALOME_MED::MedFileInfo GetMEDFileInfo();
2140 /*! Export MED file from temp object. */
2141 boolean ExportMED(in string theFileName);
2144 //-------------------------------------------------------
2145 interface ViewManager;
2147 /*! \brief %VISU_Gen interface
2149 * This is the main interface of %VISU component. It is necessary for creation of
2150 * post-processing presentations from given %Result and %Table object reference,
2151 * using the views provided by %ViewManager.
2153 interface VISU_Gen : Engines::Component, SALOMEDS::Driver, Base
2155 /*! Sets a definite study to be current.
2157 void SetCurrentStudy(in SALOMEDS::Study theStudy);
2159 /*! Gets the current study.
2161 SALOMEDS::Study GetCurrentStudy();
2164 * Gets the %View Manager which is used for creation of
2165 * post-processing presentations.
2167 ViewManager GetViewManager();
2170 * Imports tables from a file and create TableAttribute in Sudy
2172 SALOMEDS::SObject ImportTables(in string theFileName);
2175 * Export table to a file
2177 boolean ExportTableToFile(in SALOMEDS::SObject theTable, in string theFileName);
2180 * Imports data from a file. The access to this file will be conserved outside of the application.
2181 * \param theFileName String parameter defining the name of the file
2182 * from which the data will be imported.
2184 Result ImportFile(in string theFileName);
2187 * Create result and initialize its with the file. The access to this file will be conserved outside of the application.
2188 * \param theFileName String parameter defining the name of the file
2189 * from which the data will be imported.
2191 Result CreateResult(in string theFileName);
2194 * Imports data from a file. The access to this file will closed.
2195 * \param theFileName String parameter defining the name of the file
2196 * from which the data will be imported.
2198 Result CopyAndImportFile(in string theFileName);
2201 * Imports data from a %MED object.
2203 Result ImportMed(in SALOMEDS::SObject theMedSObject);
2206 * Imports data from a %MED field.
2208 Result ImportMedField(in SALOME_MED::FIELD theField);
2211 * Rename a study object, representing a mesh, specified by given values.
2212 * \param theResult Data generated in other sources (MED object or file).
2213 * \param theMeshName One of the meshes presented in MED file.
2214 * \param theEntity Type of entity where the field is defined.
2215 * \param theSubMeshName Name of sub-mesh (group or family).
2216 * \param theNewName Name to be given to the study object.
2218 void RenameEntityInStudy(in Result theResult,
2219 in string theMeshName,
2220 in Entity theEntity,
2221 in string theNewName);
2222 void RenameFamilyInStudy(in Result theResult,
2223 in string theMeshName,
2224 in Entity theEntity,
2225 in string theSubMeshName,
2226 in string theNewName);
2227 void RenameGroupInStudy(in Result theResult,
2228 in string theMeshName,
2229 in string theSubMeshName,
2230 in string theNewName);
2233 * Creates a mesh on the basis of the data generated in other sources (MED object or file).
2234 * \param theResult Data generated in other sources. (MED object or file)
2235 * \param theMeshName One of the meshes presented in MED file
2236 * \param theEntity Type of entity where the field is defined
2238 Mesh MeshOnEntity(in Result theResult, in string theMeshName, in Entity theEntity);
2241 * Creates on the basis of a family a mesh which will be composed of geometrical
2242 * elements, corresponding to the type of cells (node, edge, face or cell) of this family.
2243 * \param theResult Data generated in other sources. (MED object or file)
2244 * \param theMeshName One of the meshes presented in MED file
2245 * \param theEntity Type of entity where the field is defined.
2247 Mesh FamilyMeshOnEntity(in Result theResult, in string theMeshName,
2248 in Entity theEntity, in string theFamilyName);
2251 * Creates a mesh on the basis of a group of families.
2252 * \param theResult Data generated in other sources. (MED object or file)
2253 * \param theMeshName One of the meshes presented in MED file
2254 * \param theGroupName Name of the group.
2256 Mesh GroupMesh(in Result theResult, in string theMeshName, in string theGroupName);
2259 * Creates a scalar map presentation.
2260 * \param theResult Data generated in other sources. (MED object or file)
2261 * \param theMeshName One of the meshes presented in MED file
2262 * \param theEntity Type of entity where the field is defined
2263 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2264 * \param theTimeStampNumber Number of iteration on the field
2266 ScalarMap ScalarMapOnField(in Result theResult, in string theMeshName,
2267 in Entity theEntity, in string theFieldName,
2268 in long theTimeStampNumber);
2271 * Creates a Gauss Points presentation.
2272 * \param theResult Data generated in other sources. (MED object or file)
2273 * \param theMeshName One of the meshes presented in MED file
2274 * \param theEntity Type of entity where the field is defined
2275 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2276 * \param theTimeStampNumber Number of iteration on the field
2278 GaussPoints GaussPointsOnField(in Result theResult, in string theMeshName,
2279 in Entity theEntity, in string theFieldName,
2280 in long theTimeStampNumber);
2283 * Creates a deformed shape presentation.
2284 * \param theResult Data generated in other sources. (MED object or file)
2285 * \param theMeshName One of the meshes presented in MED file
2286 * \param theEntity Type of entity where the field is defined
2287 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2288 * \param theTimeStampNumber Number of iteration on the field
2290 DeformedShape DeformedShapeOnField(in Result theResult, in string theMeshName,
2291 in Entity theEntity, in string theFieldName,
2292 in long theTimeStampNumber);
2295 * Creates a deformed shape presentation. This function is obsolete. Use DeformedShapeAndScalarMapOnField instead.
2296 * \param theResult Data generated in other sources. (MED object or file)
2297 * \param theMeshName One of the meshes presented in MED file
2298 * \param theEntity Type of entity where the field is defined
2299 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2300 * \param theTimeStampNumber Number of iteration on the field
2302 DeformedShapeAndScalarMap ScalarMapOnDeformedShapeOnField(in Result theResult, in string theMeshName,
2303 in Entity theEntity, in string theFieldName,
2304 in long theTimeStampNumber);
2307 * Creates a deformed shape presentation.
2308 * \param theResult Data generated in other sources. (MED object or file)
2309 * \param theMeshName One of the meshes presented in MED file
2310 * \param theEntity Type of entity where the field is defined
2311 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2312 * \param theTimeStampNumber Number of iteration on the field
2314 DeformedShapeAndScalarMap DeformedShapeAndScalarMapOnField(in Result theResult, in string theMeshName,
2315 in Entity theEntity, in string theFieldName,
2316 in long theTimeStampNumber);
2319 * Creates a vector presentation.
2320 * \param theResult Data generated in other sources. (MED object or file)
2321 * \param theMeshName One of the meshes presented in MED file
2322 * \param theEntity Type of entity where the field is defined
2323 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2324 * \param theTimeStampNumber Number of iteration on the field
2326 Vectors VectorsOnField(in Result theResult, in string theMeshName,
2327 in Entity theEntity, in string theFieldName,
2328 in long theTimeStampNumber);
2331 * Creates an iso surface presentation.
2332 * \param theResult Data generated in other sources. (MED object or file)
2333 * \param theMeshName One of the meshes presented in MED file
2334 * \param theEntity Type of entity where the field is defined
2335 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2336 * \param theTimeStampNumber Number of iteration on the field
2338 IsoSurfaces IsoSurfacesOnField(in Result theResult, in string theMeshName,
2339 in Entity theEntity, in string theFieldName,
2340 in long theTimeStampNumber);
2343 * Creates an stream lines presentation.
2344 * \param theResult Data generated in other sources. (MED object or file)
2345 * \param theMeshName One of the meshes presented in MED file
2346 * \param theEntity Type of entity where the field is defined
2347 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2348 * \param theTimeStampNumber Number of iteration on the field
2350 StreamLines StreamLinesOnField(in Result theResult, in string theMeshName,
2351 in Entity theEntity, in string theFieldName,
2352 in long theTimeStampNumber);
2355 * Creates a presentation of cut planes.
2356 * \param theResult Data generated in other sources. (MED object or file)
2357 * \param theMeshName One of the meshes presented in MED file
2358 * \param theEntity Type of entity where the field is defined
2359 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2360 * \param theTimeStampNumber Number of iteration on the field
2362 CutPlanes CutPlanesOnField(in Result theResult, in string theMeshName,
2363 in Entity theEntity, in string theFieldName,
2364 in long theTimeStampNumber);
2367 * Creates a presentation of cut lines.
2368 * \param theResult Data generated in other sources. (MED object or file)
2369 * \param theMeshName One of the meshes presented in MED file
2370 * \param theEntity Type of entity where the field is defined
2371 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2372 * \param theTimeStampNumber Number of iteration on the field
2374 CutLines CutLinesOnField(in Result theResult, in string theMeshName,
2375 in Entity theEntity, in string theFieldName,
2376 in long theTimeStampNumber);
2379 * Creates a presentation of cut segment.
2380 * \param theResult Data generated in other sources. (MED object or file)
2381 * \param theMeshName One of the meshes presented in MED file
2382 * \param theEntity Type of entity where the field is defined
2383 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2384 * \param theTimeStampNumber Number of iteration on the field
2386 CutSegment CutSegmentOnField(in Result theResult, in string theMeshName,
2387 in Entity theEntity, in string theFieldName,
2388 in long theTimeStampNumber);
2391 * Creates a Plot3D presentation.
2392 * \param theResult Data generated in other sources. (MED object or file)
2393 * \param theMeshName One of the meshes presented in MED file
2394 * \param theEntity Type of entity where the field is defined
2395 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2396 * \param theTimeStampNumber Number of iteration on the field
2398 Plot3D Plot3DOnField(in Result theResult, in string theMeshName,
2399 in Entity theEntity, in string theFieldName,
2400 in long theTimeStampNumber);
2403 * Creates a table presentation.
2404 * \param theTableEntry The entry of the table which will be displayed.
2406 Table CreateTable(in string theTableEntry);
2409 * Creates a curve on the basis of points, whose values are taken from the table.
2410 * \param theTable Table containing the data for construction of curves.
2411 * \param HRow Index of the row in the table: abscissa of the point.
2412 * \param VRow Index of the row in the table: ordinate of the point.
2414 Curve CreateCurve(in Table theTable, in long theHRow, in long theVRow);
2417 * Creates a curve on the basis of points, whose values are taken from the table.
2418 * Each point has also assigned value, that will be shown as tooltip in Plot2d
2419 * \param theTable Table containing the data for construction of curves.
2420 * \param HRow Index of the row in the table: abscissa of the point.
2421 * \param VRow Index of the row in the table: ordinate of the point.
2422 * \param ZRow Index of the row in the table: assigned value (so-called as Z).
2424 Curve CreateCurveWithZ( in Table theTable, in long theHRow, in long theVRow, in long theZRow );
2427 * Creates a presentation form containing an array of references to the curves.
2429 Container CreateContainer();
2431 /*! Creates an animation in the 3D view.
2432 * \param theView3d The 3D view, where the animation will be rendered.
2434 Animation CreateAnimation(in View3D theView3d);
2436 /*! Creates an evolution in the XY plot.
2437 * \param theXYPlot The XY plot, where the evolution will be rendered.
2439 Evolution CreateEvolution(in XYPlot theXYPlot);
2441 void DeleteResult(in Result theResult);
2443 void DeletePrs3d(in Prs3d thePrs3d);
2446 * Get or create %ColoredPrs3dCache object.
2448 ColoredPrs3dCache GetColoredPrs3dCache(in SALOMEDS::Study theStudy);
2451 /* Clipping planes management */
2453 /*Create a clipping plane and return its ID (position in corresponded array)
2454 Id of clipping plane could be changed after deletion of other clipping plane
2456 long CreateClippingPlane(in double X, in double Y, in double Z,
2457 in double dX, in double dY, in double dZ,
2458 in boolean auto, in string name);
2460 void EditClippingPlane(in long id, in double X, in double Y, in double Z,
2461 in double dX, in double dY, in double dZ,
2462 in boolean auto, in string name);
2464 /* Returns clipping plane by its Id */
2465 ClippingPlane GetClippingPlane(in long id);
2467 /* Deletes clipping plane by its Id */
2468 boolean DeleteClippingPlane(in long id);
2470 /* Applyes a clipping plane with Id to presentation thePrs */
2471 boolean ApplyClippingPlane(in Prs3d thePrs, in long id);
2473 /* Detaches a clipping plane with Id from presentation thePrs */
2474 boolean DetachClippingPlane(in Prs3d thePrs, in long id);
2477 /* Get number of clipping planes */
2478 long GetClippingPlanesNb();
2480 /*! Converts set of VTK files to the one MED-file
2481 * \param theVTKFiles sequence of VTK files
2482 * \param out MED-file
2483 * \param theMeshName mesh name. This parameter can be empty. In this case name
2484 of mesh is equal vtk2med
2485 * \param theTSNames values of time stamps. This array can be empty, in
2486 this case values of time stamps will be generated automatically ( 0, 1, 2 ... )
2487 * \return TRUE if operation has been completed successfully, FALSE otherwise
2489 boolean VTK2MED( in string_array theVTKFiles,
2490 in string theMEDFile,
2491 in string theMeshName,
2492 in double_array theTStamps );
2496 /*! \brief %View interface
2498 * Contains a set of methods used by the %View frame, which can be one of
2499 * the following types: 3d, Table, XY plot.
2500 * %View interface is a base for all types of %view interfaces.
2502 interface View: Base, SALOME::GenericObj
2504 /*! \brief %ViewRepresentation enumeration
2506 * displaying part ("ALL" isn't setable)
2508 enum ViewRepresentation {
2515 void ShowPart (in ViewRepresentation ViewRepr, in boolean state );
2517 boolean IsPartShown( in ViewRepresentation ViewRepr );
2520 * New methods for view parameters management.
2523 /*! \brief Split workarea of this view.
2525 * Horizontally split workarea of this view.
2526 * This view is moved in a new right area.
2530 /*! \brief Split workarea of this view.
2532 * Horizontally split workarea of this view.
2533 * This view stays in an old left area, others are moved in a new right area.
2537 /*! \brief Split workarea of this view.
2539 * Vertically split workarea of this view.
2540 * This view is moved in a new bottom area.
2544 /*! \brief Split workarea of this view.
2546 * Vertically split workarea of this view.
2547 * This view stays in an old top area, others are moved in a new bottom area.
2552 * Put this view window on top of its work area.
2557 * Put \a theView in workarea of this view right after it.
2558 * If \a theView was alone in its workarea, workarea of \a theView will be destroyed.
2559 * If \a theView was in the same workarea with this view, simple reordering will take place.
2560 * \param theView A view window to be attracted to this one.
2562 void Attract (in View theView);
2565 * Put all the view windows from workarea of \a theView in workarea of this view right after it.
2566 * Workarea of \a theView will be destroyed.
2567 * If \a theView was in the same workarea with this view, simple reordering will take place.
2568 * \param theView A view window to be attracted to this one together with all its workarea.
2570 void AttractAll (in View theView);
2573 * Set position of this view window relatively its splitter.
2574 * \param thePosition Desired position of this view window relatively
2575 * its splitter. Meaningfull values lays in range [0..1].
2577 * Direction of positioning is defined by the splitter orientation.
2579 void SetRelativePositionInSplitter (in double thePosition);
2582 * Set size of this view window relatively its splitter.
2583 * \param theSize Desired size of this view window relatively
2584 * its splitter. Meaningfull values lays in range [0..1].
2586 * Direction of resizing is defined by the splitter orientation.
2588 void SetRelativeSizeInSplitter (in double theSize);
2591 * Set horizontal position of this view window relatively its workstack.
2592 * \param thePosition Desired horizontal position of this view window
2593 * relatively its workstack. Meaningfull values lays in range [0..1].
2595 void SetRelativePositionX (in double thePosition);
2598 * Set vertical position of this view window relatively its workstack.
2599 * \param thePosition Desired vertical position of this view window
2600 * relatively its workstack. Meaningfull values lays in range [0..1].
2602 void SetRelativePositionY (in double thePosition);
2605 * Set horizontal size of this view window relatively its workstack.
2606 * \param theSize Desired horizontal size of this view window relatively
2607 * its workstack. Meaningfull values lays in range [0..1].
2609 void SetRelativeSizeX (in double theSize);
2612 * Set vertical size of this view window relatively its workstack.
2613 * \param theSize Desired vertical size of this view window relatively
2614 * its workstack. Meaningfull values lays in range [0..1].
2616 void SetRelativeSizeY (in double theSize);
2619 * Old methods for view parameters management, they don't work now
2621 void SetViewWidth (in long Width); //setting width of view
2622 void SetViewHeight (in long Height); //setting height of view
2623 long GetViewWidth(); //getting view width
2624 long GetViewHeight(); //getting view height
2625 enum ViewPosition {TOP, CENTER, BOTTOM, RIGHT, LEFT}; //position of the study frame
2626 void SetViewPositionHorizontal (in ViewPosition ViewPosHor); //setting of the horizontal view position
2627 void SetViewPositionVertical (in ViewPosition ViewPosVer); //setting of the vertical view position
2628 void SetRelativePosition( in double x, in double y );
2629 void SetRelativeSize( in double x, in double y );
2630 void Minimize(); // Minimizes to the task bar or to the bottom of the Desktop the %View frame.
2631 void Restore(); // Restores the %View frame.
2632 void Maximize(); // Maximizes the %View frame.
2635 * Sets the title of the %View frame.
2636 * \param theTitle String parameter defining the title of the %View frame.
2638 void SetTitle(in string theTitle);
2641 * Gets the title of the %View frame.
2646 * Sets background color of the %View frame.
2647 * \param theColor Background color defined in <VAR>SALOMEDS::Color</VAR> enumeration.
2649 void SetBackground(in SALOMEDS::Color theColor);
2652 * Gets background color of the %View frame.
2654 SALOMEDS::Color GetBackground();
2657 * Removes all presentations (presentable objects) from the %view.
2662 * Displays all presentations (presentable objects) in the %view.
2667 * Removes a definite presentation (presentable object) from the %view.
2668 * \param thePrsObj The presentation (presentable object) which should be deleted.
2670 void Erase(in PrsObject thePrsObj);
2673 * Displays a definite presentation (presentable object) in the %view.
2674 * \param thePrsObj The presentation (presentable object) which should be displayed.
2676 void Display(in PrsObject thePrsObj);
2679 * Allows to display only a definite presentation (presentable object) in the %view.
2680 * All other presentations are removed from the %view.
2681 * \param thePrsObj The presentation (presentable object) which should be displayed.
2683 void DisplayOnly(in PrsObject thePrsObj);
2692 * \param theFileName The name of the file where the view will be saved.
2693 * \return True, if the view have been saved successfully.
2695 boolean SavePicture(in string theFileName);
2698 //-------------------------------------------------------
2699 /*! \brief 3D view interface
2701 * This interface contains a set of methods necessary for representation of objects in 3D space.
2703 interface View3D : View {
2705 * This enumeration contains a set of elements determining a predefined point of view
2706 * (position of the camera in 3D space relative to the presentable object).
2708 enum ViewType{ FRONT, BACK, LEFT, RIGHT, TOP, BOTTOM};
2711 * This enumeration contains a set of elements determining the axis
2713 enum Axis{ XAxis, YAxis, ZAxis};
2716 * Data type defining coordinates in 3D space.
2718 typedef double XYZ[3];
2721 * Makes all presentations, which are currently present in the %view, completely visible.
2726 * Sets a predefined point of view (FRONT, BACK, LEFT, RIGHT, TOP, BOTTOM). (In other words it means
2727 * a predefined position of the camera in 3D space with respect to the object which is represented.)
2729 void SetView(in ViewType theType);
2732 * Sets the position of the camera in 3D space.
2733 * This point is used as the first point of the vector
2734 * defining the view direction of the camera.
2736 void SetPointOfView(in XYZ theCoord);
2739 * Gets the position of the camera in 3D space.
2740 * This point is used as the first point of the vector
2741 * defining the view direction of the camera.
2743 XYZ GetPointOfView();
2746 * Sets the vertical line of the camera in 3D space.
2748 void SetViewUp(in XYZ theDir);
2751 * Gets the vertical line of the camera in 3D space.
2756 * Sets the point of sight of the camera. This point is used as the
2757 * second point of the vector defining the view direction of the camera.
2759 void SetFocalPoint(in XYZ theDir);
2762 * Gets the point of sight of the camera. This point is used as the
2763 * second point of the vector defining the view direction of the camera.
2765 XYZ GetFocalPoint();
2768 * Zooming of the presentable object. Sets the scale.
2770 void SetParallelScale(in double theScale);
2773 * Zooming of the presentable object. Gets the scale.
2775 double GetParallelScale();
2778 * Scaling of the view along a definite axis.
2779 * \param theAxis The axis of the scaling
2780 * \param theParam The coefficient of the scaling
2782 void ScaleView(in Axis theAxis, in double theParam);
2785 * Removes the scaling of the view.
2790 * Saves view parameters.
2791 * \return True if the view parameters have been created, False if the parameters have been modified.
2792 * \param theName The name under which the view parameters will be saved.
2794 boolean SaveViewParams(in string theName);
2796 /*! Restores view parameters.
2797 * \return True if the view parameters have been found and applied to the view,
2798 * False if the parameters with this name don't exist.
2799 * \param theName The name of the view parameters which will be restored.
2801 boolean RestoreViewParams(in string theName);
2804 /*! Get representation type of the given presentation in this view.
2805 * \param thePrs Object to get a representation type of.
2806 * \return <VAR>PresentationType</VAR> Representation type of object in this view.
2808 PresentationType GetPresentationType(in ScalarMap thePrs);
2810 /*! Set representation type of the given presentation in this view.
2811 * \param thePrs Object to set a representation type of.
2812 * \param thePrsType Representation type to be set to the given object.
2813 * \return Empty string in case of success, error description in case of failure.
2815 string SetPresentationType(in ScalarMap thePrs, in PresentationType thePrsType);
2818 /*! Set representation type of 2D quadratic elements
2819 * of the given presentation in this view.
2820 * \param thePrs Object to set a representation type of 2D quadratic elements.
2821 * \param theType Representation type of 2D quadratic elements to be set to the given object.
2822 * \return Empty string in case of success, error description in case of failure.
2824 string SetQuadratic2DPresentationType(in ScalarMap thePrs,in Quadratic2DPresentationType theType);
2827 /*! Get representation type of the 2D quadratic mesh elements of given presentation in this view.
2828 * \param thePrs Object to get a representation type of 2D quadratic mesh elements.
2829 * \return <VAR>Quadratic2DPresentationType</VAR> Representation type of 2D quadratic mesh elements
2832 Quadratic2DPresentationType GetQuadratic2DPresentationType(in ScalarMap thePrs);
2835 /*! Get shrink state of the given presentation in this view.
2836 * \param thePrs Object to get a shrink state of.
2837 * \return TRUE if \a thePrs is shrinked in this view, FALSE overwise.
2839 boolean IsShrinked(in ScalarMap thePrs);
2841 /*! Make the given presentation shrinked or not shrinked in this view.
2842 * \param thePrs Object to change a shrink state of.
2843 * \param isShrinked Pass TRUE to make \a thePrs shrinked, FALSE overwise.
2844 * \return Empty string in case of success, error description in case of failure.
2846 string SetShrinked(in ScalarMap thePrs, in boolean isShrinked);
2848 /*! Get shading state of the given presentation in this view.
2849 * \param thePrs Object to get a shading state of.
2850 * \return TRUE if \a thePrs is shaded in this view, FALSE overwise.
2852 boolean IsShaded(in ScalarMap thePrs);
2854 /*! Make the given presentation shaded or not shaded in this view.
2855 * \param thePrs Object to set a shading state of.
2856 * \param isShaded Pass TRUE to make \a thePrs shaded, FALSE overwise.
2857 * \return Empty string in case of success, error description in case of failure.
2859 string SetShaded(in ScalarMap thePrs, in boolean isShaded);
2861 /*! Get opacity of the given presentation in this view.
2862 * \param thePrs Object to get an opacity of.
2863 * \return Opacity value in range [0, 1], 0 - transparent, 1 - opaque.
2865 double GetOpacity(in ScalarMap thePrs);
2867 /*! Set opacity of the given presentation in this view.
2868 * \param thePrs Object to set an opacity of.
2869 * \param theOpacity Opacity value [0, 1]. 0 - transparent, 1 - opaque.
2870 * \return Empty string in case of success, error description in case of failure.
2872 string SetOpacity(in ScalarMap thePrs, in double theOpacity);
2874 /*! Get line width of the given presentation in this view.
2875 * \param thePrs Object to get a line width of.
2876 * \return Line width of \a thePrs in this view.
2878 double GetLineWidth(in ScalarMap thePrs);
2880 /*! Set line width of the given presentation in this view.
2881 * \param thePrs Object to set a line width of.
2882 * \param theLineWidth Line width value. Recommended values are in range [1, 10].
2883 * \return Empty string in case of success, error description in case of failure.
2885 string SetLineWidth(in ScalarMap thePrs, in double theLineWidth);
2888 //-------------------------------------------------------
2889 /*! \brief Interface of the Table view
2891 * This interface is used for creation of a view necessary for presentation of a table.
2893 interface TableView : View {
2896 //-------------------------------------------------------
2897 /*! \brief Interface of the 2D plot view
2899 * This interface is used for creation of a view necessary for presentation
2900 * of a XY plot generated on the basis of one or several curve lines.
2902 interface XYPlot : View {
2903 /*! Sets the title of the XY plot
2904 * \param theTitle The title of the XY plot
2906 void SetSubTitle(in string theTitle);
2908 /*! Gets the title of the XY plot
2910 string GetSubTitle();
2913 * This enumeration contains a set of elements determining the type
2914 * of the curve lines, which will be displayed in your XY plot.
2916 enum CurveType { POINTS, MULTYLINE, SPLINE};
2918 /*! Sets the type of the curve lines.
2919 * \param theType The type of the curve lines taken from <VAR>CurveType</VAR> enumeration.
2921 void SetCurveType(in CurveType theType);
2923 /*! Gets the type of the curve lines.
2925 CurveType GetCurveType();
2927 /*! Sets the size of the markers (data points) with help of
2928 * which the curve is constructed on the graphics.
2929 * \param theSize Long value defining the size of the markers.
2931 void SetMarkerSize(in long theSize);
2933 /*! Gets the size of the markers (data points) with help of
2934 * which the curve is constructed on the graphics.
2936 long GetMarkerSize();
2938 /*! Enable/disables X-axis grid of the 2D plot.
2940 void EnableXGrid(in boolean theMajor, in long theNumMajor, in boolean theMinor, in long theNumMinor);
2942 /*! Enable/disables Y-axis grid of the 2D plot.
2944 void EnableYGrid(in boolean theMajor, in long theNumMajor, in boolean theMinor, in long theNumMinor);
2946 /*! Sets horizontal scaling of the 2D plot.
2947 * \param theScaling Type of scaling taken from <VAR>Scaling</VAR> enumeration.
2949 void SetHorScaling(in Scaling theScaling);
2951 /*! Gets the type horizontal scaling of the 2D plot.
2953 Scaling GetHorScaling();
2955 /*! Sets vertical scaling of the 2D plot.
2956 * \param theScaling Type of scaling taken from <VAR>Scaling</VAR> enumeration.
2958 void SetVerScaling(in Scaling theScaling);
2960 /*! Gets the type vertical scaling of the 2D plot.
2962 Scaling GetVerScaling();
2964 /*! Sets the title of the X-axis of the plot.
2965 * \param theTitle String value defining the title of the X-axis of the plot.
2967 void SetXTitle(in string theTitle);
2969 /*! Gets the title of the X-axis of the plot.
2973 /*! Sets the title of the Y-axis of the plot.
2974 * \param theTitle String value defining the title of the X-axis of the plot.
2976 void SetYTitle(in string theTitle);
2978 /*! Gets the title of the Y-axis of the plot.
2982 /*! Shows/hides the legend (description) of the 2D plot.
2984 void ShowLegend(in boolean theShowing);
2986 /*! Shrinks and enlarges the 2D plot to fit the 2D viewer.
2990 /*! Set range of the 2D plot to X axis of the 2D viewer.
2992 void FitXRange(in double xMin, in double xMax);
2994 /*! Set range of the 2D plot to Y axis of the 2D viewer.
2996 void FitYRange(in double yMin, in double yMax);
2998 /*! Set range of the 2D plot to XY axis of the 2D viewer.
3000 void FitRange(in double xMin, in double xMax,
3001 in double yMin, in double yMax);
3003 void GetFitRanges(out double xMin,out double xMax,
3004 out double yMin,out double yMax);
3007 //-------------------------------------------------------
3008 /*! \brief Interface of the %ViewManager
3010 * The ViewManager is necessary for work with view windows (creation and deletion).
3012 interface ViewManager: Base {
3013 /*! \brief Getting an active %View Frame
3015 * Returns an object reference to the active %View Frame.
3016 * Type of the %View must be checked.
3017 * \note <BR>Returns nil if there are no views currently opened.
3019 View GetCurrentView();
3021 /*! \brief Creation of a 3d %View.
3023 * Returns an object reference to the newly created 3D %View.
3025 View3D Create3DView();
3027 /*! \brief Creation of a Table %View.
3029 * Returns an object reference to the newly created Table %View.
3031 TableView CreateTableView(in Table theTable);
3033 /*! \brief Creation of a 2D plot %View.
3035 * Returns an object reference to the newly created 2D plot %View.
3037 XYPlot CreateXYPlot();
3039 /*! Deletes a definite view.
3040 * \param theView The view which should be deleted.
3042 void Destroy(in View theView);