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 TCOLOREDPRS3DHOLDER, /*!< Colored 3D presentation holder */
118 TCOLOREDPRS3DCACHE, /*!< Colored 3D presentation cache */
119 TPART, /*!< MULTIPR: part of a mesh */
123 /* Clipping planes management */
124 struct ClippingPlane {
137 * Returns ID of the object.
142 * Returns the type of the presentable object
148 * \brief Removable object interface
150 * Removable object interface is the root class of all removable objects.
152 interface RemovableObject : Base {
154 * Remove object from study.
156 void RemoveFromStudy();
159 /*! \brief Presentable object interface
161 * Presentable object interface is the root class of all presentable objects.
163 interface PrsObject : RemovableObject {
166 //-------------------------------------------------------
167 /*! \brief Interface of curve representation.
169 * Manages presentation parameters of one curve.
170 * It can be used for presentation of a set of curves using a combined presentation.
172 interface Curve : PrsObject {
174 * Sets the title of the curve.
175 * \param theTitle This string parameter defines the title of this curve.
177 void SetTitle(in string theTitle);
180 * Gets the title of the curve.
181 * \return String value corresponding to the title of the curve.
186 * Sets the color of the curve.
187 * \param theColor The color of the curve. This parameter is taken
188 * from the <VAR>Orientation</VAR> enumeration.
190 void SetColor(in SALOMEDS::Color theColor);
193 * Gets the color of the curve.
194 * \return Color of the curve. The returned value will correspond
195 * to one of the elements the <VAR>Color</VAR> enumeration.
197 SALOMEDS::Color GetColor();
200 * This enumeration contains a set of elements defining the
201 * presentation type of markers (data points) with help of
202 * which the curve is constructed on the graphics.
204 enum MarkerType { NONE,
217 * Sets the presentation type of markers (data points) with help of
218 * which the curve is constructed on the graphics.
219 * \param theType This parameter defines the type of marker with help
220 * of which the curve is constructed on the graphics.
221 * It is taken from <VAR>MarkerType</VAR> enumeration.
223 void SetMarker(in MarkerType theType);
226 * Gets the presentation type of markers (data points) with
227 * help of which the curve is constructed on the graphics.
228 * \return The type of marker with help of which the curve is constructed
229 * on the graphics. The returned value will correspond to
230 * one of the elements the <VAR>MarkerType</VAR> enumeration.
232 MarkerType GetMarker();
235 * This enumeration contains a set of elements defining the
236 * type of presentation of a curve line on the graphics.
238 enum LineType{ VOIDLINE, SOLIDLINE, DASHLINE, DOTLINE, DASHDOTLINE, DASHDOTDOTLINE};
241 * Sets the type of presentation of curve lines on the graphics.
242 * \param theType This parameter defines the type of presentation of curve lines on the graphics.
243 * \param theLineWidth Long value defining the width of the curve line.
245 void SetLine(in LineType theType, in long theLineWidth);
248 * Gets the type of representation of curve lines on the graphics.
249 * \return The type of representation of curve lines on the graphics.
254 * Gets the width of the curve line.
255 * \return Long value corresponding to the width of the curve line.
260 //-------------------------------------------------------
261 /*! \brief %Container presentable object interface
263 * This class is provided in order to create one presentation using several presentable objects.
264 * This can provide a combination of a set of curves to display them in XY plot view.
266 interface Container : PrsObject {
268 * Adds a curve into the container.
269 * \param theCurve The added curve.
271 void AddCurve(in Curve theCurve);
274 * Removes a curve from the container.
275 * \param theCurve The removed curve.
277 void RemoveCurve(in Curve theCurve);
280 * Gets the number of curves which are stored in the container.
281 * \return A long value corresponding to the number of curves which are stored in the container.
286 * Removes all curves from the container.
291 //-------------------------------------------------------
293 /*! \brief 3D presentation interface
295 * This is a root class for all 3D presentations, which can be displayed in %VISU module.
297 interface Prs3d : PrsObject, SALOME::GenericObj
300 * Move the 3D presentation according to the given offset parameters
302 void SetOffset(in float theDx, in float theDy, in float theDz);
305 * Gets offset parameters for the 3D presentation
307 void GetOffset(out float theDx, out float theDy, out float theDz);
310 * Gets memory size actually used by the presentation (Mb).
312 float GetMemorySize();
316 * This enumeration contains a set of elements defining the
317 * type of presentation of the mesh.
319 enum PresentationType{ POINT,
329 * This enumeration contains a set of elements defining the
330 * type of presentation of the 2D quadratic mesh elements.
332 enum Quadratic2DPresentationType{
337 /*! \brief Interface of the mesh.
339 * Manages presentation parameters of a 3D presentation of a mesh.
340 * This object can be used for presentation of set of curves using Container class.
342 interface Mesh : Prs3d {
344 * Sets the color of mesh cells.
345 * \param theColor The color of the cells. This parameter is taken from <VAR>Color</VAR> enumeration.
347 void SetCellColor(in SALOMEDS::Color theColor);
350 * Gets the color of mesh cells.
352 SALOMEDS::Color GetCellColor();
355 * Sets the color of mesh nodes.
356 * \param theColor The color of the nodes. This parameter is taken from <VAR>Color</VAR> enumeration.
358 void SetNodeColor(in SALOMEDS::Color theColor);
361 * Gets the color of mesh nodes.
363 SALOMEDS::Color GetNodeColor();
366 * Sets the color of mesh links.
367 * \param theColor The color of the links. This parameter is taken from <VAR>Color</VAR> enumeration.
369 void SetLinkColor(in SALOMEDS::Color theColor);
372 * Gets the color of mesh links.
374 SALOMEDS::Color GetLinkColor();
377 * Sets the type of representation of a mesh.
378 * \param theType The of representation of a mesh. This parameter is
379 * taken from <VAR>PresentationType</VAR> enumeration.
381 void SetPresentationType(in PresentationType theType);
384 * Gets the type of representation of the mesh.
385 * \return The type of representation of the mesh.
387 PresentationType GetPresentationType();
391 * Sets the type of representation of a 2D quadratic mesh elements.
392 * \param theType The type of representation of 2D quadratic mesh elements.
393 * This parameter is taken from
394 * <VAR>Quadratic2DPresentationType</VAR> enumeration.
396 void SetQuadratic2DPresentationType(in Quadratic2DPresentationType theType);
399 * Gets the type of representation of the 2D quadratic mesh elements.
400 * \return The type of representation of the 2D quadratic mesh elements.
402 Quadratic2DPresentationType GetQuadratic2DPresentationType();
405 * Switches shrink mode of presentation
406 * Note: SetPresentationType(SHRINK) is same as SetShrink(True)
408 void SetShrink(in boolean toShrink);
411 * Returns current state of shrink mode
417 //-------------------------------------------------------
418 /*! \brief Basic Interface for the %Colored 3D Presentations
420 * This interface is responsable for coloring of 3D field presentations
421 * according the scalar values applied to different cells.
422 * As well it contains presentation parameters of the scalar bar. The scalar
423 * bar is displayed along with each colored field presentation and serves for
424 * consulting the correspondance between colors and data values.
426 interface ColoredPrs3dBase : Prs3d
429 * Sets scalar range - min and max boundaries of the scalar bar.
430 * \param theMin Min boundary of the scalar bar.
431 * \param theMax Max boundary of the scalar bar.
433 void SetRange(in double theMin, in double theMax);
436 * Gets the min boundary of the scalar bar.
441 * Gets the max boundary of the scalar bar.
446 * Sets scalar range that corresponds to the source data.
448 void SetSourceRange();
451 * Gets the min boundary of the scalar bar from source data.
453 double GetSourceMin();
456 * Gets the max boundary of the scalar bar from source data.
458 double GetSourceMax();
461 * Defines whether the scalar range corresponds to the source data or not.
463 boolean IsRangeFixed();
465 /*! \brief Position of the scalar bar.
467 * Sets the position of the scalar bar origin on the screen.
468 * \param X Horizontal position. The value can be between 0 and 1.
469 * \param Y Vertical position. The value can be between 0 and 1.
471 void SetPosition(in double X, in double Y);
474 * Gets horizontal position of the scalar bar origin.
479 * Gets vertical position of the scalar bar origin.
483 /*! \brief Size of this presentable object.
485 * Sets the size of the scalar bar.
486 * \param theWidth Width of this presentable object. The value can be between 0 and 1.
487 * \param theHeight Height of this presentable object. The value can be between 0 and 1.
489 void SetSize(in double theWidth, in double theHeight);
492 * Gets the width of this presentable object.
493 * \return A double value corresponding to the width of this presentable object.
498 * Gets the height of this presentable object.
499 * \return A double value corresponding to the height of this presentable object.
504 * Sets the number of colors which will be used for presentation of this presentable object.
505 * \param theNbColors A long value defining the number of colors.
507 void SetNbColors(in long theNbColors);
510 * Gets the number of colors which will be used for visualization of this presentable object.
511 * \return A long value corresponding to the number of colors which
512 * will be used for visualization of this presentable object.
516 * Sets the number of labels which will be used for indication of color gradation
518 * \param theNbLabels A long value defining the number of labels.
520 void SetLabels(in long theNbLabels);
523 * Gets the number of labels which will be used for indication of color gradation of the scalar bar.
524 * \return A long value corresponding to the number of labels which will
525 * be used for indication of color gradation of the scalar bar.
529 /*! %Orientation of the scalar bar (to provide backward compatibility). */
531 HORIZONTAL, /*!< Horizontal orientation of the scalar bar.*/
532 VERTICAL /*!< Vertical orientation of the scalar bar.*/
536 * Sets the type of orientation of the scalar bar (to provide backward compatibility).
537 * \param theOrientation This parameter defines the orientation of the scalar bar.
538 * It is taken from the <VAR>Orientaton</VAR> enumeration.
540 void SetBarOrientation(in Orientation theOrientation);
543 * Gets the type of orientation of the scalar bar (to provide backward compatibility).
545 Orientation GetBarOrientation();
548 /*! \brief Additional Interface for the %Colored 3D Presentations
552 interface ColoredPrs3d : ColoredPrs3dBase
555 * Sets the title of the scalar bar. By default - the name of the selected result is used.
556 * \param theName String parameter defining the name of the scalar bar.
558 void SetTitle(in string theName);
561 * Gets the title of the scalar bar.
565 /*! Sets the method of coloring of the elements composing a 3D presentation.
567 void SetScalarMode(in long theScalarMode);
569 /*! Gets the method of coloring of the elements composing a 3D presentation.
571 long GetScalarMode();
574 * Set the visibility of a distribution curve.
575 * \param theIs is used to switch on/off the visibility of a distribution curve.
577 void SetIsDistributionVisible(in boolean theIs);
579 //! Gets current visibility of a distribution curve
580 boolean GetIsDistributionVisible();
582 //! Gets current filtering by scalars mode
583 boolean IsScalarFilterUsed();
585 void UseScalarFiltering( in boolean theUseScalarFilter );
588 * Sets scalar range - min and max boundaries of the scalar bar.
589 * \param theMin Min boundary of the scalar bar.
590 * \param theMax Max boundary of the scalar bar.
591 * \param theIsFilter if true then filter by scalars.
593 void SetScalarFilterRange( in double theMin, in double theMax );
595 double GetScalarFilterMin();
597 double GetScalarFilterMax();
600 * Add group as geometry of presentation.
601 * \param theMeshName - mesh name
602 * \param theGroupName - group name
604 void AddMeshOnGroup(in string theGroupName);
608 * Remove all groups.(The scalar map will be placed on all mesh).
610 void RemoveAllGeom();
614 //-------------------------------------------------------
616 interface ColoredPrs3dCache;
619 //-------------------------------------------------------
620 /*! \brief %ColoredPrs3dHolder interface.
621 * Interface of 3d presentation's holder, which represents colored 3d presentations,
622 * created on fields. It is publishing in the object browser in a separate folder
623 * and can be controled by viewer's slider.
625 interface ColoredPrs3dHolder : PrsObject, SALOME::GenericObj
628 * Presentation input parameters.
636 long myTimeStampNumber;
640 * Apply input parameters to last visited presentation in the cache.
642 boolean Apply(in ColoredPrs3d thePrs3d,
643 in BasicInput theInput,
644 in View3D theView3D);
647 * Gets the last visited presentation in the cache.
649 ColoredPrs3d GetDevice();
652 * Gets type of the managed presentations.
654 VISUType GetPrsType();
656 /*! Defines timestamp representation.
664 /*! Defines representation range of timestamps.
666 typedef sequence<TimeStampInfo> TimeStampsRange;
669 * Gets TimeStampsRange information from the last visited presentation.
671 TimeStampsRange GetTimeStampsRange();
674 * Gets input parameters of the last visited presentation.
676 BasicInput GetBasicInput();
679 * Gets a %ColoredPrs3dCache, to which the holder belongs
681 ColoredPrs3dCache GetCache();
684 * Gets memory size actually used by the holder (Mb).
686 float GetMemorySize();
690 //-------------------------------------------------------
691 /*! \brief %ColoredPrs3dCache interface.
692 * This interface is responsible for memory management of 3d presentations.
693 * One cache corresponds to one study.
695 interface ColoredPrs3dCache : RemovableObject, SALOME::GenericObj
697 /*! This enumeration contains the cache memory modes. */
699 MINIMAL, /*!< Minimal memory mode (default behaviour). */
700 LIMITED /*!< Limited memory mode (fixed memory size for presentations). */
703 /*! This enumeration defines how to enlarge the cache limited memory. */
705 NO_ENLARGE, /*!< No need to enlarge (default behaviour). */
706 ENLARGE, /*!< Enlarge limited memory. */
707 IMPOSSIBLE /*!< Impossible to enlarge (not enough free memory). */
710 /*! Sets a memory mode.*/
711 void SetMemoryMode(in MemoryMode theMode);
713 /*! Gets a memory mode.*/
714 MemoryMode GetMemoryMode();
716 /*! Sets a memory size for limited mode (Mb). */
717 void SetLimitedMemory(in float theMemorySize);
719 /*! Gets a memory size for limited mode (Mb). */
720 float GetLimitedMemory();
723 * Gets memory size actually used by the cache system (Mb).
725 float GetMemorySize();
727 /*! Creates %ColoredPrs3dHolder.*/
728 ColoredPrs3dHolder CreateHolder(in VISUType theType,
729 in ColoredPrs3dHolder::BasicInput theInput);
731 /*! Gets a memory which is required to create a holder. */
732 EnlargeType GetRequiredMemory(in VISUType theType,
733 in ColoredPrs3dHolder::BasicInput theInput,
734 out float theRequiredMemory);
738 //-------------------------------------------------------
739 /*! \brief Interface of the %Scalar Map
741 * This interface is responsable for coloring of 3D field presentations
742 * according the scalar values applied to different cells.
743 * As well it contains presentation parameters of the scalar bar. The scalar
744 * bar is displayed along with each colored field presentation and serves for
745 * consulting the correspondance between colors and data values.
748 interface ScaledPrs3d {
750 * Sets the type of scaling of the values reflected by the scalar bar.
751 * \param theScaling The value of this parameter is taken from the <VAR>Scaling</VAR> enumeration.
753 void SetScaling(in Scaling theScaling);
756 * Gets the type of scaling of the values reflected by this presentation.
758 Scaling GetScaling();
761 interface ScalarMap : ColoredPrs3d, ScaledPrs3d {
764 * Returns visibility state of scalar bar
766 boolean IsBarVisible();
769 * Sets visibility state of scalar bar
771 void SetBarVisible(in boolean theVisible);
774 * Sets the gauss metric for the presentation.
775 * \param theGaussMetric The value of this parameter is taken from the <VAR>GaussMetric</VAR> enumeration.
777 void SetGaussMetric(in GaussMetric theGaussMetric);
780 * Gets the gauss metric of the presentation.
782 GaussMetric GetGaussMetric();
785 * Sets the color of mesh links.
786 * \param theColor The color of the links. This parameter is taken from <VAR>Color</VAR> enumeration.
788 void SetLinkColor(in SALOMEDS::Color theColor);
791 * Gets the color of mesh links.
793 SALOMEDS::Color GetLinkColor();
796 //-------------------------------------------------------
797 /*! \brief Gauss Points presentation interface
799 * Presentation parameters of the Gauss Points presentation.
801 //-------------------------------------------------------
802 interface GaussPoints : ColoredPrs3d
804 //! Set flag indicating which scalar bar is active.
805 void SetIsActiveLocalScalarBar(in boolean theFlag);
807 //! Get flag indicating which scalar bar is active.
808 boolean GetIsActiveLocalScalarBar();
810 //! Set flag indicating visibility of global scalar bar.
811 void SetIsDispGlobalScalarBar(in boolean theFlag);
813 //! Get flag indicating visibility of global scalar bar.
814 boolean GetIsDispGlobalScalarBar();
816 //! Set value of the distance between global and local scalar bars.
817 void SetSpacing(in double theSpacing);
819 //! Get value of the distance between global and local scalar bars.
823 * Returns visibility state of scalar bar
825 boolean IsBarVisible();
828 * Sets visibility state of scalar bar
830 void SetBarVisible(in boolean theVisible);
833 * Set the Multicolored mode.
834 * \param theIsColored is used to switch between Results and Geometry modes.
835 * Multiple colors are using when the presentation is
836 * drawing in the Results mode, one color - in the Geometry mode.
838 void SetIsColored(in boolean theIsColored);
840 //! Gets current color mode
841 boolean GetIsColored();
843 /*! Sets the color of this presentation in case of IsColored switched off.
844 * \param theColor The color of this presentation. This parameter
845 * is taken from the <VAR>Color</VAR> enumeration.
847 void SetColor(in SALOMEDS::Color theColor);
850 * When the Bicolor parameter is set to true, scalar bars are
851 * drawing with two colors : red color correspoonds to positive
852 * scalar values, blue color - to negative values.
854 void SetBiColor(in boolean theIsBiColor);
856 //! Get the Bicolor mode.
857 boolean GetBiColor();
859 //! Checks whether the Gauss Points will be deformed or not
860 boolean GetIsDeformed();
862 //! Apply deformation on the Gauss Points
863 void SetIsDeformed(in boolean theIsDeformed);
866 * Sets the scale factor for scalar values
867 * (how much corresponding mesh elements should be translated).
868 * \param theScaleFactor The scaling factor.
870 void SetScaleFactor(in double theScaleFactor);
873 * Gets the scale factor for scalar values.
874 * (how much corresponding mesh elements is translated)
876 double GetScaleFactor();
879 * This enumeration contains a set of elements defining the type of representation of the vector head.
887 //! Set type of the primitives which is used for drawing the Gauss Points
888 void SetPrimitiveType(in PrimitiveType thePrimitiveType);
890 //! Get type of the primitives which is used for drawing the Gauss Points
891 PrimitiveType GetPrimitiveType();
893 //! Sets Point Sprite clamp
894 void SetClamp(in double theClamp);
896 //! Gets Point Sprite clamp
899 //! Sets minimum size of Point Sprites
900 void SetMinSize(in double theMinSize);
902 //! Gets minimum size of Point Sprites
905 //! Sets maximum size of Point Sprites
906 void SetMaxSize(in double theMaxSize);
908 //! Gets maximum size of Point Sprites
911 //! Sets magnification for Point Sprites
912 void SetMagnification(in double theMagnification);
914 //! Gets magnification for Point Sprites
915 double GetMagnification();
917 //! Sets the increment of changing Magnification parameter
918 void SetMagnificationIncrement(in double theIncrement);
920 //! Gets the increment of changing Magnification parameter
921 double GetMagnificationIncrement();
923 //! Sets Point Sprites size
924 void SetGeomSize(in double theGeomSize);
926 //! Sets size of Point Sprite
927 double GetGeomSize();
929 //! Get path to the image using for Main Point Sprite texture
930 string GetMainTexture();
932 //! Get path to the image using for Alpha Point Sprite texture
933 string GetAlphaTexture();
935 //! Points Main and AlphaMask images to be used by Point Sprites
936 void SetTextures(in string theMainTexture, in string theAlphaTexture);
938 //! Sets Point Sprite Alpha threshold
939 void SetAlphaThreshold(in double theAlphaThreshold);
941 //! Gets Point Sprite Alpha threshold
942 double GetAlphaThreshold();
944 //! Sets resolution of the Geometrical Sphere
945 void SetResolution(in long theResolution);
947 //! Sets resolution of the Geometrical Sphere
948 long GetResolution();
950 //! Sets how many faces of can be drawn in the Geometrical Sphere primitive mode
951 void SetFaceLimit(in long theFaceLimit);
953 //! Defines how many faces of can be drawn in the Geometrical Sphere primitive mode
960 /*! \brief MonoColor presentation presentation interface
962 * Presentation parameters of the MonoColor presentation.
964 interface MonoColorPrs : ScalarMap {
966 /*! This boolean method returns True if this deformed shape presentation is colored.
970 /*! Shows this presentation in colored mode.
971 * \param theColored If this boolean parameter is True this presentable
972 * object will be shown in colored mode.
974 void ShowColored(in boolean theColored);
976 /*! Gets the color of this presentable object.
977 * \return The color of this presentable object.
979 SALOMEDS::Color GetColor();
981 /*! Sets the color of this presentation.
982 * \param theColor The color of this presentation. This parameter
983 * is taken from the <VAR>Color</VAR> enumeration.
985 void SetColor(in SALOMEDS::Color theColor);
989 /*! \brief Deformed shape presentation interface
991 * Presentation parameters of the deformed shape presentation.
993 interface DeformedShape : MonoColorPrs
996 * Sets the scale of the presentatable object.
997 * \param theScale Double value defining the scale of this presentable object.
999 void SetScale(in double theScale);
1002 * Gets the scale of the presentatable object.
1008 //-------------------------------------------------------
1009 /*! \brief Deformation interface
1011 * This is base interface for building of the deformed presentations
1013 interface Deformation{
1015 * Sets the scale of the presentatable object.
1016 * \param theScale Double value defining the scale of this presentable object.
1018 void SetScale(in double theScale);
1021 * Gets the scale of the presentatable object.
1026 * Sets the vectorial field
1027 * \param theEntity - entity of vectorial field
1028 * \param theFieldName - the name of vectorial field
1030 void SetVectorialField(in Entity theEntity,
1031 in string theFieldName);
1034 * Get vectorial entity
1036 Entity GetVectorialFieldEntity();
1039 * Get scalar field name
1041 string GetVectorialFieldName();
1045 //-------------------------------------------------------
1046 /*! \brief OptionalDeformation interface
1048 * This is interface for switch on/off of the deformation of the presentation
1050 interface OptionalDeformation : Deformation{
1053 * Sets the deformation flag of the presentatable object.
1054 * \param theFlag Boolean value defining the deformation flag of this presentable object.
1056 void UseDeformation(in boolean theFlag);
1059 * Gets the deformation flag of the presentatable object.
1061 boolean IsDeformed();
1064 //-------------------------------------------------------
1065 /*! \brief Scalar Map on Deformed shape presentation interface
1067 * Presentation parameters of the scalar map on deformed shape presentation.
1069 interface DeformedShapeAndScalarMap : ScalarMap {
1072 * Sets the scale of the presentatable object.
1073 * \param theScale Double value defining the scale of this presentable object.
1075 void SetScale(in double theScale);
1078 * Gets the scale of the presentatable object.
1083 * Sets the scalar field
1084 * \param theEntity - entity of scalar field
1085 * \param theFieldName - the name of scalar field
1086 * \param theTimeStampNumber - the timestamp number for the scalar field
1088 void SetScalarField(in Entity theEntity,
1089 in string theFieldName,
1090 in long theTimeStampNumber);
1096 Entity GetScalarEntity();
1099 * Get scalar field name
1101 string GetScalarFieldName();
1104 * Get timestamp number for the scalar field
1106 long GetScalarTimeStampNumber();
1110 //-------------------------------------------------------
1112 * \brief Plot3D interface
1114 * Presentation parameters of Plot3D presentation. This type of presentation
1115 * consists of deforming initial planar mesh according to values assigned to the mesh elements.
1116 * If mesh not planar but volumic one, it is possible to generate intermediate planar mesh.
1118 interface Plot3dBase {
1120 * Sets the scale factor for scalar values
1121 * (how much corresponding mesh elements should be translated).
1122 * \param theScaleFactor The scaling factor.
1124 void SetScaleFactor (in double theScaleFactor);
1127 * Gets the scale factor for scalar values.
1128 * (how much corresponding mesh elements is translated)
1130 double GetScaleFactor();
1133 * Sets presentation type: contour or surface.
1134 * \param theIsContourPrs Define, whether presentation type is contour.
1136 void SetContourPrs (in boolean theIsContourPrs );
1139 * Returns true if presentation type is contour.
1141 boolean GetIsContourPrs();
1144 * Sets the number of contours.
1145 * \param theNb The number of contours.
1147 void SetNbOfContours (in long theNb);
1150 * Gets the number of contours.
1152 long GetNbOfContours();
1155 interface Plot3D : ScalarMap, Plot3dBase {
1157 * This enumeration contains a set of elements defining
1158 * the type of orientation in 3D space of the cutting plane.
1160 enum Orientation { XY, /*!< The object is located in the plane formed by X and Y axis. */
1161 YZ, /*!< The object is located in the plane formed by Y and Z axis. */
1162 ZX }; /*!< The object is located in the plane formed by Z and X axis. */
1165 * Sets the orientation in 3D space of cutting plane for the presentation.
1166 * \param theOrientation This parameter defines the type of orientation of cutting plane
1167 * in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
1168 * \param theXAngle The angle of rotation of the cutting plane
1169 * around the first axis of the chosen orientation.
1170 * \param theXAngle The angle of rotation of the cutting plane
1171 * around the second axis of the chosen orientation.
1173 void SetOrientation (in Orientation theOrientation, in double theXAngle, in double theYAngle);
1176 * Gets the type of orientation in 3D space of cutting plane.
1178 Orientation GetOrientationType();
1181 * Gets rotation angle of the cutting plane
1182 * around the first axis of the chosen orientation.
1184 double GetRotateX();
1187 * Gets rotation angle of the cutting plane
1188 * around the second axis of the chosen orientation.
1190 double GetRotateY();
1193 * Sets the position of a cutting plane.
1194 * \param thePlanePosition The position of the cutting plane.
1195 * \param theIsRelative Define, whether the input position is relative.
1197 void SetPlanePosition (in double thePlanePosition,
1198 in boolean theIsRelative);
1201 * Gets the position of the cutting plane
1203 double GetPlanePosition();
1206 * Returns true if a position of cutting plane is relative
1208 boolean IsPositionRelative();
1211 //-------------------------------------------------------
1212 /*! \brief %Table representation interface
1214 * Presentation parameters of the %Table view.
1216 interface Table : PrsObject {
1218 * Sets the title of the table.
1219 * \param theTitle String parameter defining the title of this table.
1221 void SetTitle(in string theTitle);
1224 * Gets the title of the table.
1225 * \return A string value containing the title of the table.
1230 * This enumeration contains a set of elements defining the orientation of the table.
1233 HORIZONTAL, /*!< Horizontal orientation of the table. */
1234 VERTIACAL /*!< Vertical orientation of the table. */
1238 * Sets orientation of the table.
1239 * \param theOrientation This input parameter defines the orientation of the table.
1240 * It is taken from the <VAR>Orientation</VAR> enumeration.
1242 void SetOrientation(in Orientation theOrientation);
1245 * Gets orientation of the table.
1246 * \return Orientation of the table. The returned value will correspond
1247 * to one of the elements the <VAR>Orientation</VAR> enumeration.
1249 Orientation GetOrientation();
1252 * Gets the number of rows of the table.
1253 * \return Long value corresponding to the number of rows of the table
1258 * Gets the number of columns of the table.
1259 * \return Long value corresponding to the number of columns of the table
1261 long GetNbColumns();
1264 //-------------------------------------------------------
1265 /*! \brief %PointMap3d representation interface
1267 * Presentation parameters of the %Table Point Map in 3d view.
1269 interface PointMap3d : ColoredPrs3dBase, ScaledPrs3d, Plot3dBase, Table {
1272 //-------------------------------------------------------
1273 /*! \brief Cut planes interface
1275 * Presentation parameters of Cut planes presentation. This type of presentation
1276 * consists of cutting your initial mesh by a definite number of planes. As the
1277 * result you will see these planes which will be cutted by the borders of the mesh.
1279 interface CutPlanes : ScalarMap, OptionalDeformation {
1281 * This enumeration contains a set of elements defining the type of orientation in 3D space
1282 * of the cut planes.
1284 enum Orientation {XY, /*!< The object is located in the plane formed by X and Y axis. */
1285 YZ, /*!< The object is located in the plane formed by Y and Z axis. */
1286 ZX}; /*!< The object is located in the plane formed by Z and X axis. */
1289 * Sets the type of orientation in 3D space of cut planes presentation.
1290 * \param theOrientation This parameter defines the type of orientation of cut planes
1291 * in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
1292 * \param theXAngle The angle of rotation of the cut planes around
1293 * the first axis of the chosen orientation.
1294 * \param theXAngle The angle of rotation of the cut planes around
1295 * the second axis of the chosen orientation.
1297 void SetOrientation(in Orientation theOrientation, in double theXAngle, in double theYAngle);
1300 * Gets the type of orientation in 3D space of cut planes presentation.
1302 Orientation GetOrientationType();
1305 * Gets rotation angle of the cut plane presentation around the first axis of the chosen orientation.
1307 double GetRotateX();
1310 * Gets rotation angle of the cut plane presentation around the second axis of the chosen orientation.
1312 double GetRotateY();
1315 * Sets the displacement of the cut planes in 3D space.
1317 * \param theDisp This parameter defines position of the cut planes
1318 * in 3D space. It varies from 0 to 1. If the chosen value is 0.5, the cut planes
1319 * will be evenly located regarding each other; in other words, the distance between all
1320 * of them will be equal. If the value is higher or lower than 0.5, the planes will be displaced
1321 * to one or another side.
1323 void SetDisplacement(in double theDisp);
1326 * Gets the displacement of the cut planes in 3D space.
1328 double GetDisplacement();
1331 * Sets the position of a definite cut plane.
1332 * \param thePlaneNumber The number of this cut plane.
1333 * \param thePlanePosition The position of this cut plane.
1335 void SetPlanePosition(in long thePlaneNumber, in double thePlanePosition);
1338 * Sets the position of the choosen plane to default value.
1339 * \param thePlaneNumber The number of this cut plane.
1341 void SetDefault(in long thePlaneNumber);
1344 * Gets the position of the choosen plane
1346 double GetPlanePosition(in long thePlaneNumber);
1349 * Determines whether the choosen plane has default position.
1350 * \param thePlaneNumber The number of this cut plane.
1352 boolean IsDefault(in long thePlaneNumber);
1355 * Sets the number of cut planes.
1356 * \param theNb The number of cut planes.
1358 void SetNbPlanes(in long theNb);
1361 * Gets the number of cut planes.
1366 //-------------------------------------------------------
1367 /*! \brief Base interface for Cut Lines and Cut Segment tools
1370 interface CutLinesBase : ScalarMap {
1372 * Sets the number of cut lines.
1373 * \param theNb The number of cut lines.
1375 void SetNbLines(in long theNb);
1378 * Gets the number of cut lines.
1382 /*! Invert all curves of corresponding table
1383 * \param theInvert - Invert all curves, if value is TRUE, else not.
1385 void SetAllCurvesInverted(in boolean theInvert);
1387 /*! Checks the orientation of all curves
1388 * \retval TRUE - if all curves are inverted, else FALSE
1390 boolean IsAllCurvesInverted();
1392 /*! Sets values which cutlines would be shown: aboslute or relative values
1393 * \param theAbsLength - boolean value, TRUE or false.
1395 void SetUseAbsoluteLength(in boolean theAbsLength);
1397 /*! Checks values of cutlines: using aboslute or relative values
1399 boolean IsUseAbsoluteLength();
1402 //-------------------------------------------------------
1403 /*! \brief Cut lines presentation.
1405 * Presentation parameters of a Cut lines presentation.
1406 * Cut Lines is a type of presentation which displays colored cells
1407 * with applied scalar values on the mesh where lines are placed.
1408 * The procedure of construction of a Cut Lines presentation reuses the algorithm
1409 * of creation of Cut Planes presentation and consists of two steps:
1411 * 1. From Cut Planes presentation one plane is taken and
1412 * it is used as base plane for construction of cut lines.
1413 * 2. This plane is cut by a regular array of planes. The result of this
1414 * operation is a regular array of lines in space, belonging to the same plane
1415 * and having the same orientation. They are located inside or on the mesh.
1417 interface CutLines : CutLinesBase {
1419 * Sets the type of orientation in 3D space of the base plane of a cut lines presentation.
1420 * \param theOrientation The orientation of the base plane in 3D space.
1421 * \param theXAngle The angle of rotation of the base plane around
1422 * the first axis of the chosen orientation.
1423 * \param theXAngle The angle of rotation of the base plane around
1424 * the second axis of the chosen orientation.
1426 void SetOrientation(in CutPlanes::Orientation theOrientation, in double theXAngle, in double theYAngle);
1429 * Sets the type of orientation in 3D space of the cutting planes of a cut lines presentation.
1430 * \param theOrientation This parameter defines the type of orientation of the cutting planes
1431 * in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
1432 * \param theXAngle The angle of rotation of the cutting planes
1433 * around the first axis of the chosen orientation.
1434 * \param theXAngle The angle of rotation of the cutting planes
1435 * around the second axis of the chosen orientation.
1437 void SetOrientation2(in CutPlanes::Orientation theOrientation, in double theXAngle, in double theYAngle);
1440 * Gets the type of orientation in 3D space of the base plane of a cut lines presentation.
1442 CutPlanes::Orientation GetOrientationType();
1445 * Gets the type of orientation in 3D space of the cutting planes of a cut lines presentation.
1447 CutPlanes::Orientation GetOrientationType2();
1450 * Gets rotation angle of the base plane around the first axis of the chosen orientation.
1452 double GetRotateX();
1455 * Gets rotation angle of the cutting planes around the first axis of the chosen orientation.
1457 double GetRotateX2();
1460 * Gets rotation angle of the base plane around the second axis of the chosen orientation.
1462 double GetRotateY();
1465 * Gets rotation angle of the cutting planes around the second axis of the chosen orientation.
1467 double GetRotateY2();
1470 * Sets the displacement of the base plane of the cut lines presentation in 3D space.
1472 * \param theDisp This parameter defines position of the base plane
1473 * in 3D space. It varies from 0 to 1.
1475 void SetDisplacement(in double theDisp);
1478 * Sets the displacement of the cutting planes of the cut lines presentation in 3D space.
1480 * \param theDisp This parameter defines position of the cutting planes
1481 * in 3D space. It varies from 0 to 1.
1483 void SetDisplacement2(in double theDisp);
1486 * Gets the displacement of the base plane of the cut lines presentation in 3D space.
1488 double GetDisplacement();
1491 * Gets the displacement of the cutting planes of the cut lines presentation in 3D space.
1493 double GetDisplacement2();
1495 /*! Sets the position of the base plane in 3D space.
1496 * \param thePlanePosition A double value defining the position of the base plane in 3D space.
1498 void SetBasePlanePosition(in double thePlanePosition);
1500 /*! Gets the position of the base plane in 3D space.
1502 double GetBasePlanePosition();
1504 /*! Sets the position of one of cutting planes in 3D space.
1505 * \param thePlaneNumber A long value defining the order number of this cutting plane.
1506 * \param thePlanePosition A double value defining the position of the base plane in 3D space.
1508 void SetLinePosition(in long thePlaneNumber, in double thePlanePosition);
1510 /*! Gets the position of one of cutting planes in 3D space.
1511 * \param thePlaneNumber A long value defining the order number of this cutting plane.
1513 double GetLinePosition(in long thePlaneNumber);
1515 /*! Sets the position of the base plane to default value.
1520 * Determines whether the base plane has default position.
1521 * \return True if the base plane has default position.
1523 boolean IsDefault();
1526 * Sets the position of the choosen cutting plane to default value.
1527 * \param thePlaneNumber The number of this cutting plane.
1529 void SetDefaultPosition(in long thePlaneNumber);
1532 * Determines whether the choosen cutting plane has default position.
1533 * \param thePlaneNumber The number of this cutting plane.
1534 * \return True if this cutting plane has default position.
1536 boolean IsDefaultPosition(in long thePlaneNumber);
1539 //-------------------------------------------------------
1540 /*! \brief Cut segment presentation.
1542 * Presentation parameters of a Cut segment presentation.
1543 * Cut Segment is a simplified variant of Cut Lines presentation, which is used
1544 * to display a single line instead of set of them. Axis of this line is defined
1545 * by coordinates of two points in 3D space.
1547 interface CutSegment : CutLinesBase {
1549 * Sets coordinates of the first point of axis of the segment.
1550 * \param theX X coordinate of the point
1551 * \param theY Y coordinate of the point
1552 * \param theZ Z coordinate of the point
1554 void SetPoint1(in double theX, in double theY, in double theZ);
1557 * Gets coordinates of the first point of axis of the segment.
1558 * \param theX X coordinate of the point
1559 * \param theY Y coordinate of the point
1560 * \param theZ Z coordinate of the point
1562 void GetPoint1(out double theX, out double theY, out double theZ);
1565 * Sets coordinates of the second point of axis of the segment.
1566 * \param theX X coordinate of the point
1567 * \param theY Y coordinate of the point
1568 * \param theZ Z coordinate of the point
1570 void SetPoint2(in double theX, in double theY, in double theZ);
1573 * Gets coordinates of the second point of axis of the segment.
1574 * \param theX X coordinate of the point
1575 * \param theY Y coordinate of the point
1576 * \param theZ Z coordinate of the point
1578 void GetPoint2(out double theX, out double theY, out double theZ);
1581 /*! \brief Interface of the stream lines representation
1583 * This interface contains presentation parameters of stream lines presentations.
1584 * <BR>Stream lines is a type of presentation transforming into lines the
1585 * cells with vectors having most similar direction. A stream line can be thought
1586 * of as the path that a massless particle takes in a vector field.
1587 * Streamlines are used to convey the structure of a vector field.
1588 * Usually streamlines are created to explore the most interesting features in the field.
1590 interface StreamLines : MonoColorPrs {
1591 /*! This enumerations contains a set of elements necessary
1592 * for definition of direction of the stream lines.
1594 enum Direction{ FORWARD,
1599 /*! Sets the parameters of the stream lines presentation.
1600 * \param theIntStep Inegration step is a parameter of smoothness of the stream lines.
1601 * This parameter defines the accuracy of construction of the streamlines.
1602 * A smaller value of this parameter allows to construct smoother
1603 * streamlines (at the cost of more computation time).
1604 * \param thePropogationTime This parameter controls the maximum length of
1605 * the stream line (measured in units of time).
1606 * \param theStepLength This parameter defines the size of the output line segments
1607 * that make up the streamline (which is represented as a polyline).
1608 * \param thePrs3d The source presentation. The points of the field located on this source
1609 * presentation will serve as starting points for generation of stream lines.
1610 * \note If this parameter is not defined, your stream lines
1611 * presentation will be generated on all points of the field.
1612 * \param thePercents This parameter defines the quantity of points of the field
1613 * (from 0 to 100%) which will be used as starting points for
1614 * construction of the stream lines. Thus, the value of this
1615 * parameter can vary from 0 to 1.
1616 * \param theDirection Direction of the stream lines (Forward, Backward or Both).
1617 * \return True if all parameters are properly set.
1619 boolean SetParams(in double theIntStep,
1620 in double thePropogationTime,
1621 in double theStepLength,
1623 in double thePercents,
1624 in Direction theDirection);
1626 /*! Gets the value of integration step of the stream lines presentation.
1628 double GetIntegrationStep();
1630 /*! Gets the value of propagation time of the stream lines presentation.
1632 double GetPropagationTime();
1634 /*! Gets the value of step length of the stream lines presentation.
1636 double GetStepLength();
1638 /*! Returns the source presentation used for generation of the stream lines.
1642 /*! Gets the quantity of points of the field used as starting
1643 * points for generation of the stream lines presentation.
1645 double GetUsedPoints();
1647 /*! Returns the direction of the stream lines.
1649 Direction GetDirection();
1652 /*! \brief Interface of the isometric surface presentation
1654 * This interface contains presentation parameters of
1655 * isometric surface presentations.
1656 * <BR>Iso surfaces presentation combines all equal scalar
1657 * values on the cells and on the basis of them constructs
1658 * isobaric surfaces, which form this presentation.
1660 interface IsoSurfaces : MonoColorPrs {
1662 * Sets the number of isometric surfaces.
1663 * \param theNb A long value defining the number of isometric surfaces
1664 * which will be used for construction of this presentation.
1666 void SetNbSurfaces(in long theNb);
1669 * Gets the number of isometric surfaces
1671 long GetNbSurfaces();
1674 * Returns TRUE if labels with values are shown
1676 boolean IsLabeled();
1679 * Set show or not value labels
1681 void ShowLabels(in boolean theShow, in long theNb);
1684 * Returns Nb of labels per surface
1690 //-------------------------------------------------------
1691 /*! \brief Interface of the vector presentation.
1693 * This interface contains presentation parameters of vector presentations.
1695 interface Vectors : DeformedShape {
1697 * Sets the width of the lines of the vectors.
1698 * \param theWidth A double value defining the width of the lines of the vectors.
1700 void SetLineWidth(in double theWidth);
1703 * Gets the width of the lines of the vectors.
1705 double GetLineWidth();
1708 * This enumeration contains a set of elements defining the type of representation of the vector head.
1710 enum GlyphType{ ARROW,
1717 * Sets the type of representation of the vector head.
1718 * \param theType This parameter defines the type of representation of the vector head.
1719 * This value is taken from the <VAR>GlyphType</VAR> enumeration.
1721 void SetGlyphType(in GlyphType theType);
1724 * Gets the type of representation of the vector head.
1726 GlyphType GetGlyphType();
1729 * This enumeration contains a set of elements defining the position of the vector head.
1731 enum GlyphPos{ CENTER, /*!<In the center of the vector.*/
1732 TAIL, /*!<In the tail of the vector.*/
1733 HEAD /*!<In the head of the vector.*/
1737 * Sets the position of the vector head.
1738 * \param thePos This parameter defines the position of the vector head.
1739 * This value is taken from the <VAR>GlyphPos</VAR> enumeration.
1741 void SetGlyphPos(in GlyphPos thePos);
1744 * Gets the position of the vector head.
1746 GlyphPos GetGlyphPos();
1749 //-------------------------------------------------------
1750 /*! \brief %Animation class
1752 * This class provides a set of methods used for:<br>
1754 * <li> generating different animations on the basis of a field,
1755 * <li> setting the parameters of the animations,
1756 * <li> playing these animations in the %VISU module.
1759 * <BR><B>Field</B> represents the results of calculations
1760 * (it can be scalar or vector values), grouped together under one physical concept.
1761 * <BR><B>Time stamp</B> represents a subfield: the results
1762 * of calculations are taken in one definite moment.
1764 interface Animation : Base
1767 * This enumeration contains a set of available animation modes.
1769 enum AnimationMode{ PARALLEL, /*!< parallel mode of animation. */
1770 SUCCESSIVE /*!< succcessive mode of animation. */
1773 /*! Defines the field which will be used as a base for generation of the animation.
1774 * \param theObject The %SObject corresponding to the field.
1776 boolean addField(in SALOMEDS::SObject theObject);
1778 /*! Remove all fields from Animation object.
1782 /*! Generates presentations on the basis of the field.
1783 * \param theFieldNum The number of the field, which will be used
1784 * as the basis for construction of the presentation.
1786 void generatePresentations(in long theFieldNum);
1788 /*! Generates a set of frames from the created by the method
1789 * <VAR>generatePresentations</VAR>3D presentations. A sequence of
1790 * these frames will be transformed into an animation.
1791 * \return True, if the frames have been successfully generated.
1793 boolean generateFrames();
1795 /*! Clears the view before starting an animation.
1799 /*! \name Playback of an animation:
1803 /*! Starts an animation.
1805 void startAnimation();
1807 /*! Stops an animation.
1809 void stopAnimation();
1811 /*! Forwards to the next frame.
1815 /*! Returns to the previous frame.
1819 /*! Returns to the first frame of the animation.
1823 /*! Forwards to the last frame of the animation.
1827 /*! Passes to a definite frame of the animation.
1828 * \param theFrame A long value defining the number of the frame.
1830 void gotoFrame(in long theFrame);
1833 /*! Gets the number of time stamps (subfields) contained in the given field.
1837 /*! Gets the number of generated frames
1841 /*! Returns True, if the animation is currently running.
1843 boolean isRunning();
1845 /*! Returns the number of the current frame.
1847 long getCurrentFrame();
1851 ColoredPrs3d getPresentation(in long theField, in long theFrame);
1853 /*! Sets the type of presentation (vectors, deformed shape etc.)
1854 * which will be generated by the method <VAR>generatePresentations</VAR>.
1855 * \note \c addField() method should be called before in order to add field
1856 * with number theFieldNum.
1858 void setPresentationType(in long theFieldNum, in VISUType theType);
1860 /*! Gets the type of presentation (vectors, deformed shape etc.) which will
1861 * be generated by the method <VAR>generatePresentations</VAR>.
1862 * \note \c addField() method should be called before in order to add field
1863 * with number theFieldNum.
1865 VISUType getPresentationType(in long theFieldNum);
1867 /*! Sets the speed of the animation.
1868 * \param theSpeed The speed of the animation. The value varies from 1 to 99.
1870 void setSpeed(in long theSpeed);
1872 /*! Gets the speed of the animation.
1876 /*! Ruturns True, if playback of the animation is proportional.
1877 * This option allows to render your animation with proportional periods
1878 * of time between every frame (not depending on the time stamps).
1880 boolean isProportional();
1882 /*! Sets the range of the animation. The range is defined on the basis of
1883 * the time stamps of the field which have been used for generation of the animation.
1884 * This method allows to bound the range of generated frames.
1885 * If this method is not used, the animation will be generated
1886 * on the basis of all time stamps contained in the field.
1887 * \param theMin The value of the first time stamp which will be used for generation of the animation.
1888 * \param theMax The value of the last time stamp which will be used for generation of the animation.
1890 void setAnimationRange(in double theMin, in double theMax);
1892 /*! Gets the number of the first time stamp which will be used for generation of the animation.
1894 double getMinRange();
1896 /*! Gets the number of the last time stamp which will be used for generation of the animation.
1898 double getMaxRange();
1900 /*! Returns True if the range of the animation has been defined
1901 * by the method <VAR>setAnimationRange</VAR>. Otherwise
1902 * the animation will be generated on the basis of all time stamps contained in the field.
1904 boolean isRangeDefined();
1906 /*! Sets the sequence of the animation. The sequence is defined on the basis of
1907 * the time stamps of the field which have been used for generation of the animation.
1908 * This method allows to set the sequence of generated frames.
1909 * If this method is not used, the animation will be generated
1910 * on the basis of all time stamps contained in the field.
1911 * Format of the sequence: '1,9,2-5,7-8'
1912 * \param theSequence The sequence of time stamps indices which will be used for generation of the animation.
1914 void setAnimationSequence(in string theSequence);
1916 /*! Gets the animation sequence.
1918 string getAnimationSequence();
1920 /*! Returns True if the sequence of the animation has been defined
1921 * by the method <VAR>setAnimationSequence</VAR>. Otherwise
1922 * the animation will be generated on the basis of all time stamps contained in the field.
1924 boolean isSequenceDefined();
1926 /*! Saves all the frames composing the animation into a definite directory.
1927 * Pictures format is set with method <VAR>setDumpFormat()</VAR>.
1928 * \param thePath The directory where all the frames will be saved.
1930 void dumpTo(in string thePath);
1932 /*! Set format for saving all the frames composing the animation.
1933 * \param theFormat The format for saving pictures.
1934 * For available formats see QImageIO documentation (Qt).
1935 * If specified format is not available, default format will be used.
1936 * Default format is JPEG or first of supported, if JPEG is not available.
1937 * \return Really set format. Differ from \a theFormat if \a theFormat is not available.
1939 string setDumpFormat(in string theFormat);
1941 /*! Returns True, if the playback of the animation is cycling.
1943 boolean isCycling();
1945 /*! Gets the first time stamp of the field defined at the input of the animation.
1946 * \note This method is used if animation range is <b>NOT</b> defined.
1948 double getMinTime();
1950 /*! Gets the last time stamp of the field defined at the input of the animation.
1951 * \note This method is used if animation range is <b>NOT</b> defined.
1953 double getMaxTime();
1955 /*! Sets proprtional playback of the animation. This option allows to render your animation
1956 * with proportional periods of time between every frame (not depending on the time stamps).
1957 * \param theProp If this boolean parameter is True, playback
1958 * of your animation will be set as proportional.
1960 void setProportional(in boolean theProp);
1962 /*! Sets cycling playback of the animation. The number of cycles
1963 * can be infinite, untill you use <VAR>startAnimation</VAR> method.
1964 * \param theCycle If this boolean parameter is True, playback
1965 * of your animation will be set as cycling.
1967 void setCycling(in boolean theCycle);
1969 boolean isCleaningMemoryAtEachFrame();
1970 void setCleaningMemoryAtEachFrame(in boolean theCycle);
1972 SALOMEDS::SObject publishInStudy();
1974 void saveAnimation();
1976 void restoreFromStudy(in SALOMEDS::SObject theSObj);
1978 boolean isSavedInStudy();
1981 * Sets the animation mode.
1982 * \param theMode The value of this parameter is taken from the <VAR>AnimationMode</VAR> enumeration.
1984 void setAnimationMode(in AnimationMode theMode);
1987 * Gets the animation mode.
1989 AnimationMode getAnimationMode();
1992 * Apply the presentation properties to all fields. The exception is raised in the following cases:
1993 * 1) presentations for the given field is not yet created;
1994 * 2) invalid dynamic cast of the given presentation to VISU::ColoredPrs3d_i;
1995 * 3) the MED file is not the same;
1996 * 4) the mesh name is not the same;
1997 * 5) the field name is not the same;
1998 * 6) the entity is not the same.
2000 void ApplyProperties(in long theFieldNum, in ColoredPrs3d thePrs)
2001 raises (SALOME::SALOME_Exception);
2005 /*! \brief Interface %Result
2007 * This interface serves for inner representation of data generated
2008 * in other sources (MED object or file). This data is needed
2009 * for further construction of graphical presentations.
2011 interface Result : RemovableObject, SALOME::GenericObj
2013 /*! Reads all data from the corresponding sources. By default the data is loaded on demand.
2017 /*! Start to parse the source MED file and publish all its entities into the study*/
2018 boolean Build(in boolean theIsBuildAll, in boolean theIsAtOnce);
2020 /*! Allow to check is all requested MED entites already loaded or not */
2023 /*! Allow to check is corresponding MED entites already loaded or not */
2024 boolean IsEntitiesDone();
2026 /*! Choose to parse MED fields and perform global min / max on the MED timestamps.*/
2027 void SetBuildFields(in boolean theIsBuildFields, in boolean theIsCalculateMinMax);
2029 /*! Allow to check is corresponding MED fields already loaded or not */
2030 boolean IsFieldsDone();
2032 /*! Choose to parse MED groups.*/
2033 void SetBuildGroups(in boolean theIsBuildGroups);
2035 /*! Allow to check is corresponding MED groups and families already loaded or not */
2036 boolean IsGroupsDone();
2038 /*! Allow to check is min / max calculation over field's components already perfrormed or not */
2039 boolean IsMinMaxDone();
2041 /*! Allow to check is corresponding multi resolution structure already loaded or not */
2042 boolean IsPartsDone();
2044 typedef sequence<Entity> Entities;
2046 typedef string EntityName;
2048 typedef sequence<EntityName> EntityNames;
2050 typedef long TimeStampNumber;
2052 typedef sequence<TimeStampNumber> TimeStampNumbers;
2061 typedef sequence<Resolution> Resolutions;
2063 /*! Gets existing mesh names */
2064 EntityNames GetMeshNames();
2066 /*! Gets existing mesh entites for the given mesh name */
2067 Entities GetEntities(in EntityName theMeshName);
2069 /*! Gets existing families for the given mesh name and entity */
2070 EntityNames GetFamilies(in EntityName theMeshName, in Entity theEntity);
2072 /*! Gets existing families for the given mesh name */
2073 EntityNames GetGroups(in EntityName theMeshName);
2075 /*! Gets existing fields for the given mesh name and entity */
2076 EntityNames GetFields(in EntityName theMeshName, in Entity theEntity);
2078 /*! Gets number of components for the given mesh name, entity and name of field */
2079 long GetNumberOfComponents(in EntityName theMeshName, in Entity theEntity, in EntityName theFieldName);
2081 /*! Gets existing numbers of time stamps for the given mesh name, entity and name of field */
2082 TimeStampNumbers GetTimeStampNumbers(in EntityName theMeshName, in Entity theEntity, in EntityName theFieldName);
2084 /*! Gets existing parts of multi resolution structure for the given mesh name */
2085 EntityNames GetPartNames(in EntityName theMeshName);
2087 /*! Gets available resolutions of multi resolution structure for the given mesh and part names */
2088 Resolutions GetResolutions(in EntityName theMeshName, in EntityName thePartName);
2090 /*! Gets current resolution of multi resolution structure for the given mesh and part names */
2091 Resolution GetResolution(in EntityName theMeshName, in EntityName thePartName);
2093 /*! Gets current resolution of multi resolution structure for the given mesh and part names */
2094 void SetResolution(in EntityName theMeshName, in EntityName thePartName, in Resolution theResolution);
2096 /*! Gets information about imported MED file */
2097 SALOME_MED::MedFileInfo GetMEDFileInfo();
2099 /*! Export MED file from temp object. */
2100 boolean ExportMED(in string theFileName);
2103 //-------------------------------------------------------
2104 interface ViewManager;
2106 /*! \brief %VISU_Gen interface
2108 * This is the main interface of %VISU component. It is necessary for creation of
2109 * post-processing presentations from given %Result and %Table object reference,
2110 * using the views provided by %ViewManager.
2112 interface VISU_Gen : Engines::Component, SALOMEDS::Driver, Base
2114 /*! Sets a definite study to be current.
2116 void SetCurrentStudy(in SALOMEDS::Study theStudy);
2118 /*! Gets the current study.
2120 SALOMEDS::Study GetCurrentStudy();
2123 * Gets the %View Manager which is used for creation of
2124 * post-processing presentations.
2126 ViewManager GetViewManager();
2129 * Imports tables from a file and create TableAttribute in Sudy
2131 SALOMEDS::SObject ImportTables(in string theFileName);
2134 * Export table to a file
2136 boolean ExportTableToFile(in SALOMEDS::SObject theTable, in string theFileName);
2139 * Imports data from a file. The access to this file will be conserved outside of the application.
2140 * \param theFileName String parameter defining the name of the file
2141 * from which the data will be imported.
2143 Result ImportFile(in string theFileName);
2146 * Create result and initialize its with the file. The access to this file will be conserved outside of the application.
2147 * \param theFileName String parameter defining the name of the file
2148 * from which the data will be imported.
2150 Result CreateResult(in string theFileName);
2153 * Imports data from a file. The access to this file will closed.
2154 * \param theFileName String parameter defining the name of the file
2155 * from which the data will be imported.
2157 Result CopyAndImportFile(in string theFileName);
2160 * Imports data from a %MED object.
2162 Result ImportMed(in SALOMEDS::SObject theMedSObject);
2165 * Imports data from a %MED field.
2167 Result ImportMedField(in SALOME_MED::FIELD theField);
2170 * Rename a study object, representing a mesh, specified by given values.
2171 * \param theResult Data generated in other sources (MED object or file).
2172 * \param theMeshName One of the meshes presented in MED file.
2173 * \param theEntity Type of entity where the field is defined.
2174 * \param theSubMeshName Name of sub-mesh (group or family).
2175 * \param theNewName Name to be given to the study object.
2177 void RenameEntityInStudy(in Result theResult,
2178 in string theMeshName,
2179 in Entity theEntity,
2180 in string theNewName);
2181 void RenameFamilyInStudy(in Result theResult,
2182 in string theMeshName,
2183 in Entity theEntity,
2184 in string theSubMeshName,
2185 in string theNewName);
2186 void RenameGroupInStudy(in Result theResult,
2187 in string theMeshName,
2188 in string theSubMeshName,
2189 in string theNewName);
2192 * Creates a mesh on the basis of the data generated in other sources (MED object or file).
2193 * \param theResult Data generated in other sources. (MED object or file)
2194 * \param theMeshName One of the meshes presented in MED file
2195 * \param theEntity Type of entity where the field is defined
2197 Mesh MeshOnEntity(in Result theResult, in string theMeshName, in Entity theEntity);
2200 * Creates on the basis of a family a mesh which will be composed of geometrical
2201 * elements, corresponding to the type of cells (node, edge, face or cell) of this family.
2202 * \param theResult Data generated in other sources. (MED object or file)
2203 * \param theMeshName One of the meshes presented in MED file
2204 * \param theEntity Type of entity where the field is defined.
2206 Mesh FamilyMeshOnEntity(in Result theResult, in string theMeshName,
2207 in Entity theEntity, in string theFamilyName);
2210 * Creates a mesh on the basis of a group of families.
2211 * \param theResult Data generated in other sources. (MED object or file)
2212 * \param theMeshName One of the meshes presented in MED file
2213 * \param theGroupName Name of the group.
2215 Mesh GroupMesh(in Result theResult, in string theMeshName, in string theGroupName);
2218 * Creates a scalar map presentation.
2219 * \param theResult Data generated in other sources. (MED object or file)
2220 * \param theMeshName One of the meshes presented in MED file
2221 * \param theEntity Type of entity where the field is defined
2222 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2223 * \param theTimeStampNumber Number of iteration on the field
2225 ScalarMap ScalarMapOnField(in Result theResult, in string theMeshName,
2226 in Entity theEntity, in string theFieldName,
2227 in long theTimeStampNumber);
2230 * Creates a Gauss Points presentation.
2231 * \param theResult Data generated in other sources. (MED object or file)
2232 * \param theMeshName One of the meshes presented in MED file
2233 * \param theEntity Type of entity where the field is defined
2234 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2235 * \param theTimeStampNumber Number of iteration on the field
2237 GaussPoints GaussPointsOnField(in Result theResult, in string theMeshName,
2238 in Entity theEntity, in string theFieldName,
2239 in long theTimeStampNumber);
2242 * Creates a deformed shape presentation.
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
2246 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2247 * \param theTimeStampNumber Number of iteration on the field
2249 DeformedShape DeformedShapeOnField(in Result theResult, in string theMeshName,
2250 in Entity theEntity, in string theFieldName,
2251 in long theTimeStampNumber);
2254 * Creates a deformed shape presentation. This function is obsolete. Use DeformedShapeAndScalarMapOnField instead.
2255 * \param theResult Data generated in other sources. (MED object or file)
2256 * \param theMeshName One of the meshes presented in MED file
2257 * \param theEntity Type of entity where the field is defined
2258 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2259 * \param theTimeStampNumber Number of iteration on the field
2261 DeformedShapeAndScalarMap ScalarMapOnDeformedShapeOnField(in Result theResult, in string theMeshName,
2262 in Entity theEntity, in string theFieldName,
2263 in long theTimeStampNumber);
2266 * Creates a deformed shape presentation.
2267 * \param theResult Data generated in other sources. (MED object or file)
2268 * \param theMeshName One of the meshes presented in MED file
2269 * \param theEntity Type of entity where the field is defined
2270 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2271 * \param theTimeStampNumber Number of iteration on the field
2273 DeformedShapeAndScalarMap DeformedShapeAndScalarMapOnField(in Result theResult, in string theMeshName,
2274 in Entity theEntity, in string theFieldName,
2275 in long theTimeStampNumber);
2278 * Creates a vector presentation.
2279 * \param theResult Data generated in other sources. (MED object or file)
2280 * \param theMeshName One of the meshes presented in MED file
2281 * \param theEntity Type of entity where the field is defined
2282 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2283 * \param theTimeStampNumber Number of iteration on the field
2285 Vectors VectorsOnField(in Result theResult, in string theMeshName,
2286 in Entity theEntity, in string theFieldName,
2287 in long theTimeStampNumber);
2290 * Creates an iso surface presentation.
2291 * \param theResult Data generated in other sources. (MED object or file)
2292 * \param theMeshName One of the meshes presented in MED file
2293 * \param theEntity Type of entity where the field is defined
2294 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2295 * \param theTimeStampNumber Number of iteration on the field
2297 IsoSurfaces IsoSurfacesOnField(in Result theResult, in string theMeshName,
2298 in Entity theEntity, in string theFieldName,
2299 in long theTimeStampNumber);
2302 * Creates an stream lines presentation.
2303 * \param theResult Data generated in other sources. (MED object or file)
2304 * \param theMeshName One of the meshes presented in MED file
2305 * \param theEntity Type of entity where the field is defined
2306 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2307 * \param theTimeStampNumber Number of iteration on the field
2309 StreamLines StreamLinesOnField(in Result theResult, in string theMeshName,
2310 in Entity theEntity, in string theFieldName,
2311 in long theTimeStampNumber);
2314 * Creates a presentation of cut planes.
2315 * \param theResult Data generated in other sources. (MED object or file)
2316 * \param theMeshName One of the meshes presented in MED file
2317 * \param theEntity Type of entity where the field is defined
2318 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2319 * \param theTimeStampNumber Number of iteration on the field
2321 CutPlanes CutPlanesOnField(in Result theResult, in string theMeshName,
2322 in Entity theEntity, in string theFieldName,
2323 in long theTimeStampNumber);
2326 * Creates a presentation of cut lines.
2327 * \param theResult Data generated in other sources. (MED object or file)
2328 * \param theMeshName One of the meshes presented in MED file
2329 * \param theEntity Type of entity where the field is defined
2330 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2331 * \param theTimeStampNumber Number of iteration on the field
2333 CutLines CutLinesOnField(in Result theResult, in string theMeshName,
2334 in Entity theEntity, in string theFieldName,
2335 in long theTimeStampNumber);
2338 * Creates a presentation of cut segment.
2339 * \param theResult Data generated in other sources. (MED object or file)
2340 * \param theMeshName One of the meshes presented in MED file
2341 * \param theEntity Type of entity where the field is defined
2342 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2343 * \param theTimeStampNumber Number of iteration on the field
2345 CutSegment CutSegmentOnField(in Result theResult, in string theMeshName,
2346 in Entity theEntity, in string theFieldName,
2347 in long theTimeStampNumber);
2350 * Creates a Plot3D presentation.
2351 * \param theResult Data generated in other sources. (MED object or file)
2352 * \param theMeshName One of the meshes presented in MED file
2353 * \param theEntity Type of entity where the field is defined
2354 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2355 * \param theTimeStampNumber Number of iteration on the field
2357 Plot3D Plot3DOnField(in Result theResult, in string theMeshName,
2358 in Entity theEntity, in string theFieldName,
2359 in long theTimeStampNumber);
2362 * Creates a table presentation.
2363 * \param theTableEntry The entry of the table which will be displayed.
2365 Table CreateTable(in string theTableEntry);
2368 * Creates a curve on the basis of points, whose values are taken from the table.
2369 * \param theTable Table containing the data for construction of curves.
2370 * \param HRow Index of the row in the table: abscissa of the point.
2371 * \param VRow Index of the row in the table: ordinate of the point.
2373 Curve CreateCurve(in Table theTable, in long theHRow, in long theVRow);
2376 * Creates a curve on the basis of points, whose values are taken from the table.
2377 * Each point has also assigned value, that will be shown as tooltip in Plot2d
2378 * \param theTable Table containing the data for construction of curves.
2379 * \param HRow Index of the row in the table: abscissa of the point.
2380 * \param VRow Index of the row in the table: ordinate of the point.
2381 * \param ZRow Index of the row in the table: assigned value (so-called as Z).
2383 Curve CreateCurveWithZ( in Table theTable, in long theHRow, in long theVRow, in long theZRow );
2386 * Creates a presentation form containing an array of references to the curves.
2388 Container CreateContainer();
2390 /*! Creates an animation in the 3D view.
2391 * \param theView3d The 3D view, where the animation will be rendered.
2393 Animation CreateAnimation(in View3D theView3d);
2395 void DeleteResult(in Result theResult);
2397 void DeletePrs3d(in Prs3d thePrs3d);
2400 * Get or create %ColoredPrs3dCache object.
2402 ColoredPrs3dCache GetColoredPrs3dCache(in SALOMEDS::Study theStudy);
2405 /* Clipping planes management */
2407 /*Create a clipping plane and return its ID (position in corresponded array)
2408 Id of clipping plane could be changed after deletion of other clipping plane
2410 long CreateClippingPlane(in double X, in double Y, in double Z,
2411 in double dX, in double dY, in double dZ,
2412 in boolean auto, in string name);
2414 void EditClippingPlane(in long id, in double X, in double Y, in double Z,
2415 in double dX, in double dY, in double dZ,
2416 in boolean auto, in string name);
2418 /* Returns clipping plane by its Id */
2419 ClippingPlane GetClippingPlane(in long id);
2421 /* Deletes clipping plane by its Id */
2422 boolean DeleteClippingPlane(in long id);
2424 /* Applyes a clipping plane with Id to presentation thePrs */
2425 boolean ApplyClippingPlane(in Prs3d thePrs, in long id);
2427 /* Detaches a clipping plane with Id from presentation thePrs */
2428 boolean DetachClippingPlane(in Prs3d thePrs, in long id);
2431 /* Get number of clipping planes */
2432 long GetClippingPlanesNb();
2434 /*! Converts set of VTK files to the one MED-file
2435 * \param theVTKFiles sequence of VTK files
2436 * \param out MED-file
2437 * \param theMeshName mesh name. This parameter can be empty. In this case name
2438 of mesh is equal vtk2med
2439 * \param theTSNames values of time stamps. This array can be empty, in
2440 this case values of time stamps will be generated automatically ( 0, 1, 2 ... )
2441 * \return TRUE if operation has been completed successfully, FALSE otherwise
2443 boolean VTK2MED( in string_array theVTKFiles,
2444 in string theMEDFile,
2445 in string theMeshName,
2446 in double_array theTStamps );
2450 /*! \brief %View interface
2452 * Contains a set of methods used by the %View frame, which can be one of
2453 * the following types: 3d, Table, XY plot.
2454 * %View interface is a base for all types of %view interfaces.
2456 interface View: Base, SALOME::GenericObj
2458 /*! \brief %ViewRepresentation enumeration
2460 * displaying part ("ALL" isn't setable)
2462 enum ViewRepresentation {
2469 void ShowPart (in ViewRepresentation ViewRepr, in boolean state );
2471 boolean IsPartShown( in ViewRepresentation ViewRepr );
2474 * New methods for view parameters management.
2477 /*! \brief Split workarea of this view.
2479 * Horizontally split workarea of this view.
2480 * This view is moved in a new right area.
2484 /*! \brief Split workarea of this view.
2486 * Horizontally split workarea of this view.
2487 * This view stays in an old left area, others are moved in a new right area.
2491 /*! \brief Split workarea of this view.
2493 * Vertically split workarea of this view.
2494 * This view is moved in a new bottom area.
2498 /*! \brief Split workarea of this view.
2500 * Vertically split workarea of this view.
2501 * This view stays in an old top area, others are moved in a new bottom area.
2506 * Put this view window on top of its work area.
2511 * Put \a theView in workarea of this view right after it.
2512 * If \a theView was alone in its workarea, workarea of \a theView will be destroyed.
2513 * If \a theView was in the same workarea with this view, simple reordering will take place.
2514 * \param theView A view window to be attracted to this one.
2516 void Attract (in View theView);
2519 * Put all the view windows from workarea of \a theView in workarea of this view right after it.
2520 * Workarea of \a theView will be destroyed.
2521 * If \a theView was in the same workarea with this view, simple reordering will take place.
2522 * \param theView A view window to be attracted to this one together with all its workarea.
2524 void AttractAll (in View theView);
2527 * Set position of this view window relatively its splitter.
2528 * \param thePosition Desired position of this view window relatively
2529 * its splitter. Meaningfull values lays in range [0..1].
2531 * Direction of positioning is defined by the splitter orientation.
2533 void SetRelativePositionInSplitter (in double thePosition);
2536 * Set size of this view window relatively its splitter.
2537 * \param theSize Desired size of this view window relatively
2538 * its splitter. Meaningfull values lays in range [0..1].
2540 * Direction of resizing is defined by the splitter orientation.
2542 void SetRelativeSizeInSplitter (in double theSize);
2545 * Set horizontal position of this view window relatively its workstack.
2546 * \param thePosition Desired horizontal position of this view window
2547 * relatively its workstack. Meaningfull values lays in range [0..1].
2549 void SetRelativePositionX (in double thePosition);
2552 * Set vertical position of this view window relatively its workstack.
2553 * \param thePosition Desired vertical position of this view window
2554 * relatively its workstack. Meaningfull values lays in range [0..1].
2556 void SetRelativePositionY (in double thePosition);
2559 * Set horizontal size of this view window relatively its workstack.
2560 * \param theSize Desired horizontal size of this view window relatively
2561 * its workstack. Meaningfull values lays in range [0..1].
2563 void SetRelativeSizeX (in double theSize);
2566 * Set vertical size of this view window relatively its workstack.
2567 * \param theSize Desired vertical size of this view window relatively
2568 * its workstack. Meaningfull values lays in range [0..1].
2570 void SetRelativeSizeY (in double theSize);
2573 * Old methods for view parameters management, they don't work now
2575 void SetViewWidth (in long Width); //setting width of view
2576 void SetViewHeight (in long Height); //setting height of view
2577 long GetViewWidth(); //getting view width
2578 long GetViewHeight(); //getting view height
2579 enum ViewPosition {TOP, CENTER, BOTTOM, RIGHT, LEFT}; //position of the study frame
2580 void SetViewPositionHorizontal (in ViewPosition ViewPosHor); //setting of the horizontal view position
2581 void SetViewPositionVertical (in ViewPosition ViewPosVer); //setting of the vertical view position
2582 void SetRelativePosition( in double x, in double y );
2583 void SetRelativeSize( in double x, in double y );
2584 void Minimize(); // Minimizes to the task bar or to the bottom of the Desktop the %View frame.
2585 void Restore(); // Restores the %View frame.
2586 void Maximize(); // Maximizes the %View frame.
2589 * Sets the title of the %View frame.
2590 * \param theTitle String parameter defining the title of the %View frame.
2592 void SetTitle(in string theTitle);
2595 * Gets the title of the %View frame.
2600 * Sets background color of the %View frame.
2601 * \param theColor Background color defined in <VAR>SALOMEDS::Color</VAR> enumeration.
2603 void SetBackground(in SALOMEDS::Color theColor);
2606 * Gets background color of the %View frame.
2608 SALOMEDS::Color GetBackground();
2611 * Removes all presentations (presentable objects) from the %view.
2616 * Displays all presentations (presentable objects) in the %view.
2621 * Removes a definite presentation (presentable object) from the %view.
2622 * \param thePrsObj The presentation (presentable object) which should be deleted.
2624 void Erase(in PrsObject thePrsObj);
2627 * Displays a definite presentation (presentable object) in the %view.
2628 * \param thePrsObj The presentation (presentable object) which should be displayed.
2630 void Display(in PrsObject thePrsObj);
2633 * Allows to display only a definite presentation (presentable object) in the %view.
2634 * All other presentations are removed from the %view.
2635 * \param thePrsObj The presentation (presentable object) which should be displayed.
2637 void DisplayOnly(in PrsObject thePrsObj);
2646 * \param theFileName The name of the file where the view will be saved.
2647 * \return True, if the view have been saved successfully.
2649 boolean SavePicture(in string theFileName);
2652 //-------------------------------------------------------
2653 /*! \brief 3D view interface
2655 * This interface contains a set of methods necessary for representation of objects in 3D space.
2657 interface View3D : View {
2659 * This enumeration contains a set of elements determining a predefined point of view
2660 * (position of the camera in 3D space relative to the presentable object).
2662 enum ViewType{ FRONT, BACK, LEFT, RIGHT, TOP, BOTTOM};
2665 * This enumeration contains a set of elements determining the axis
2667 enum Axis{ XAxis, YAxis, ZAxis};
2670 * Data type defining coordinates in 3D space.
2672 typedef double XYZ[3];
2675 * Makes all presentations, which are currently present in the %view, completely visible.
2680 * Sets a predefined point of view (FRONT, BACK, LEFT, RIGHT, TOP, BOTTOM). (In other words it means
2681 * a predefined position of the camera in 3D space with respect to the object which is represented.)
2683 void SetView(in ViewType theType);
2686 * Sets the position of the camera in 3D space.
2687 * This point is used as the first point of the vector
2688 * defining the view direction of the camera.
2690 void SetPointOfView(in XYZ theCoord);
2693 * Gets the position of the camera in 3D space.
2694 * This point is used as the first point of the vector
2695 * defining the view direction of the camera.
2697 XYZ GetPointOfView();
2700 * Sets the vertical line of the camera in 3D space.
2702 void SetViewUp(in XYZ theDir);
2705 * Gets the vertical line of the camera in 3D space.
2710 * Sets the point of sight of the camera. This point is used as the
2711 * second point of the vector defining the view direction of the camera.
2713 void SetFocalPoint(in XYZ theDir);
2716 * Gets the point of sight of the camera. This point is used as the
2717 * second point of the vector defining the view direction of the camera.
2719 XYZ GetFocalPoint();
2722 * Zooming of the presentable object. Sets the scale.
2724 void SetParallelScale(in double theScale);
2727 * Zooming of the presentable object. Gets the scale.
2729 double GetParallelScale();
2732 * Scaling of the view along a definite axis.
2733 * \param theAxis The axis of the scaling
2734 * \param theParam The coefficient of the scaling
2736 void ScaleView(in Axis theAxis, in double theParam);
2739 * Removes the scaling of the view.
2744 * Saves view parameters.
2745 * \return True if the view parameters have been created, False if the parameters have been modified.
2746 * \param theName The name under which the view parameters will be saved.
2748 boolean SaveViewParams(in string theName);
2750 /*! Restores view parameters.
2751 * \return True if the view parameters have been found and applied to the view,
2752 * False if the parameters with this name don't exist.
2753 * \param theName The name of the view parameters which will be restored.
2755 boolean RestoreViewParams(in string theName);
2758 /*! Get representation type of the given presentation in this view.
2759 * \param thePrs Object to get a representation type of.
2760 * \return <VAR>PresentationType</VAR> Representation type of object in this view.
2762 PresentationType GetPresentationType(in ScalarMap thePrs);
2764 /*! Set representation type of the given presentation in this view.
2765 * \param thePrs Object to set a representation type of.
2766 * \param thePrsType Representation type to be set to the given object.
2767 * \return Empty string in case of success, error description in case of failure.
2769 string SetPresentationType(in ScalarMap thePrs, in PresentationType thePrsType);
2772 /*! Set representation type of 2D quadratic elements
2773 * of the given presentation in this view.
2774 * \param thePrs Object to set a representation type of 2D quadratic elements.
2775 * \param theType Representation type of 2D quadratic elements to be set to the given object.
2776 * \return Empty string in case of success, error description in case of failure.
2778 string SetQuadratic2DPresentationType(in ScalarMap thePrs,in Quadratic2DPresentationType theType);
2781 /*! Get representation type of the 2D quadratic mesh elements of given presentation in this view.
2782 * \param thePrs Object to get a representation type of 2D quadratic mesh elements.
2783 * \return <VAR>Quadratic2DPresentationType</VAR> Representation type of 2D quadratic mesh elements
2786 Quadratic2DPresentationType GetQuadratic2DPresentationType(in ScalarMap thePrs);
2789 /*! Get shrink state of the given presentation in this view.
2790 * \param thePrs Object to get a shrink state of.
2791 * \return TRUE if \a thePrs is shrinked in this view, FALSE overwise.
2793 boolean IsShrinked(in ScalarMap thePrs);
2795 /*! Make the given presentation shrinked or not shrinked in this view.
2796 * \param thePrs Object to change a shrink state of.
2797 * \param isShrinked Pass TRUE to make \a thePrs shrinked, FALSE overwise.
2798 * \return Empty string in case of success, error description in case of failure.
2800 string SetShrinked(in ScalarMap thePrs, in boolean isShrinked);
2802 /*! Get shading state of the given presentation in this view.
2803 * \param thePrs Object to get a shading state of.
2804 * \return TRUE if \a thePrs is shaded in this view, FALSE overwise.
2806 boolean IsShaded(in ScalarMap thePrs);
2808 /*! Make the given presentation shaded or not shaded in this view.
2809 * \param thePrs Object to set a shading state of.
2810 * \param isShaded Pass TRUE to make \a thePrs shaded, FALSE overwise.
2811 * \return Empty string in case of success, error description in case of failure.
2813 string SetShaded(in ScalarMap thePrs, in boolean isShaded);
2815 /*! Get opacity of the given presentation in this view.
2816 * \param thePrs Object to get an opacity of.
2817 * \return Opacity value in range [0, 1], 0 - transparent, 1 - opaque.
2819 double GetOpacity(in ScalarMap thePrs);
2821 /*! Set opacity of the given presentation in this view.
2822 * \param thePrs Object to set an opacity of.
2823 * \param theOpacity Opacity value [0, 1]. 0 - transparent, 1 - opaque.
2824 * \return Empty string in case of success, error description in case of failure.
2826 string SetOpacity(in ScalarMap thePrs, in double theOpacity);
2828 /*! Get line width of the given presentation in this view.
2829 * \param thePrs Object to get a line width of.
2830 * \return Line width of \a thePrs in this view.
2832 double GetLineWidth(in ScalarMap thePrs);
2834 /*! Set line width of the given presentation in this view.
2835 * \param thePrs Object to set a line width of.
2836 * \param theLineWidth Line width value. Recommended values are in range [1, 10].
2837 * \return Empty string in case of success, error description in case of failure.
2839 string SetLineWidth(in ScalarMap thePrs, in double theLineWidth);
2842 //-------------------------------------------------------
2843 /*! \brief Interface of the Table view
2845 * This interface is used for creation of a view necessary for presentation of a table.
2847 interface TableView : View {
2850 //-------------------------------------------------------
2851 /*! \brief Interface of the 2D plot view
2853 * This interface is used for creation of a view necessary for presentation
2854 * of a XY plot generated on the basis of one or several curve lines.
2856 interface XYPlot : View {
2857 /*! Sets the title of the XY plot
2858 * \param theTitle The title of the XY plot
2860 void SetSubTitle(in string theTitle);
2862 /*! Gets the title of the XY plot
2864 string GetSubTitle();
2867 * This enumeration contains a set of elements determining the type
2868 * of the curve lines, which will be displayed in your XY plot.
2870 enum CurveType { POINTS, MULTYLINE, SPLINE};
2872 /*! Sets the type of the curve lines.
2873 * \param theType The type of the curve lines taken from <VAR>CurveType</VAR> enumeration.
2875 void SetCurveType(in CurveType theType);
2877 /*! Gets the type of the curve lines.
2879 CurveType GetCurveType();
2881 /*! Sets the size of the markers (data points) with help of
2882 * which the curve is constructed on the graphics.
2883 * \param theSize Long value defining the size of the markers.
2885 void SetMarkerSize(in long theSize);
2887 /*! Gets the size of the markers (data points) with help of
2888 * which the curve is constructed on the graphics.
2890 long GetMarkerSize();
2892 /*! Enable/disables X-axis grid of the 2D plot.
2894 void EnableXGrid(in boolean theMajor, in long theNumMajor, in boolean theMinor, in long theNumMinor);
2896 /*! Enable/disables Y-axis grid of the 2D plot.
2898 void EnableYGrid(in boolean theMajor, in long theNumMajor, in boolean theMinor, in long theNumMinor);
2900 /*! Sets horizontal scaling of the 2D plot.
2901 * \param theScaling Type of scaling taken from <VAR>Scaling</VAR> enumeration.
2903 void SetHorScaling(in Scaling theScaling);
2905 /*! Gets the type horizontal scaling of the 2D plot.
2907 Scaling GetHorScaling();
2909 /*! Sets vertical scaling of the 2D plot.
2910 * \param theScaling Type of scaling taken from <VAR>Scaling</VAR> enumeration.
2912 void SetVerScaling(in Scaling theScaling);
2914 /*! Gets the type vertical scaling of the 2D plot.
2916 Scaling GetVerScaling();
2918 /*! Sets the title of the X-axis of the plot.
2919 * \param theTitle String value defining the title of the X-axis of the plot.
2921 void SetXTitle(in string theTitle);
2923 /*! Gets the title of the X-axis of the plot.
2927 /*! Sets the title of the Y-axis of the plot.
2928 * \param theTitle String value defining the title of the X-axis of the plot.
2930 void SetYTitle(in string theTitle);
2932 /*! Gets the title of the Y-axis of the plot.
2936 /*! Shows/hides the legend (description) of the 2D plot.
2938 void ShowLegend(in boolean theShowing);
2940 /*! Shrinks and enlarges the 2D plot to fit the 2D viewer.
2944 /*! Set range of the 2D plot to X axis of the 2D viewer.
2946 void FitXRange(in double xMin, in double xMax);
2948 /*! Set range of the 2D plot to Y axis of the 2D viewer.
2950 void FitYRange(in double yMin, in double yMax);
2952 /*! Set range of the 2D plot to XY axis of the 2D viewer.
2954 void FitRange(in double xMin, in double xMax,
2955 in double yMin, in double yMax);
2957 void GetFitRanges(out double xMin,out double xMax,
2958 out double yMin,out double yMax);
2961 //-------------------------------------------------------
2962 /*! \brief Interface of the %ViewManager
2964 * The ViewManager is necessary for work with view windows (creation and deletion).
2966 interface ViewManager: Base {
2967 /*! \brief Getting an active %View Frame
2969 * Returns an object reference to the active %View Frame.
2970 * Type of the %View must be checked.
2971 * \note <BR>Returns nil if there are no views currently opened.
2973 View GetCurrentView();
2975 /*! \brief Creation of a 3d %View.
2977 * Returns an object reference to the newly created 3D %View.
2979 View3D Create3DView();
2981 /*! \brief Creation of a Table %View.
2983 * Returns an object reference to the newly created Table %View.
2985 TableView CreateTableView(in Table theTable);
2987 /*! \brief Creation of a 2D plot %View.
2989 * Returns an object reference to the newly created 2D plot %View.
2991 XYPlot CreateXYPlot();
2993 /*! Deletes a definite view.
2994 * \param theView The view which should be deleted.
2996 void Destroy(in View theView);