1 // Copyright (C) 2007-2013 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 * Marker type (used for point rendering)
96 MT_POINT_SPRITE /*!< VISU specific */
100 * Marker scale (used for point rendering)
123 AscendingOrder, /*!< The table items are sorted ascending */
124 DescendingOrder /*!< The table items are sorted descending */
128 * Tables' sort policy (specifies how empty cells are taken into account when sorting)
131 EmptyLowest, /*!< Empty cells are considered as lowest values */
132 EmptyHighest, /*!< Empty cells are considered as highest values */
133 EmptyFirst, /*!< Empty cells are always first */
134 EmptyLast, /*!< Empty cells are always last */
135 EmptyIgnore /*!< Empty cells are ignored (stay at initial positions) */
139 * This enumeration contains a set of elements defining the type of the %VISU object.
140 * This enumeration is used for navigation between a set of %VISU interfaces.
143 TNONE, /*!< Not a %VISU object */
144 TCURVE, /*!< Curve line object for construction of 2D XY plots */
145 TTABLE, /*!< Table containing numerical data */
146 TCONTAINER, /*!< Container object used for storing a set of curve lines */
147 TMESH, /*!< Meshing object */
148 TSCALARMAP, /*!< Scalarmap 3D presentation object */
149 TISOSURFACES, /*!< Iso surface 3D presentation object */
150 TDEFORMEDSHAPE, /*!< Deformed shape 3D presentation object */
151 TSCALARMAPONDEFORMEDSHAPE, /*!< Scalar map on deformed shape 3D presentation object. It is obsolete. Use TDEFORMEDSHAPEANDSCALARMAP instead */
152 TDEFORMEDSHAPEANDSCALARMAP, /*!< Deformed shape and scalar map 3D presentation object */
153 TGAUSSPOINTS, /*!< Gauss Points 3D presentation object */
154 TPLOT3D, /*!< Plot3D 3D presentation object */
155 TPOINTMAP3D, /*!< 3D presentation for table object */
156 TCUTPLANES, /*!< Cut planes 3D presentation object */
157 TCUTLINES, /*!< Cut lines 3D presentation object */
158 TCUTSEGMENT, /*!< Cut segment 3D presentation object */
159 TVECTORS, /*!< Vectors 3D presentation object */
160 TSTREAMLINES, /*!< Streamlines 3D presentation object */
161 TVISUGEN, /*!< %VISU generator used for performing operations with different %VISU objects */
162 TVIEWMANAGER, /*!< View manager used for performing operations with different views */
163 TRESULT, /*!< The data on which different presentations are based */
164 TXYPLOT, /*!< 2D XY plot consisting of one or several curve lines */
165 TTABLEVIEW, /*!< Table view is used for displaying data tables */
166 TVIEW3D, /*!< 3D view is used for displaying 3D graphical presentations */
167 TGAUSSVIEW, /*!< 3D view is used for displaying Gauss Points graphical presentations */
168 TENTITY, /*!< An element composing a mesh: node, edge, face or cell */
169 TFAMILY, /*!< The whole mesh can be divided into one or several submeshes, called families, which are defined by the user. Each family in its turn is composed of entities of a definite type. */
170 TGROUP, /*!< A group of families */
171 TFIELD, /*!< Field represents the results of calculations (it can be scalar or vector values), grouped together under one physical concept. */
172 TTIMESTAMP, /*!<Time stamp represents a subfield: the results of calculations are taken in one definite moment. */
173 TANIMATION, /*!< Represents Animation object. */
174 TEVOLUTION, /*!< Represents Evolution object. */
175 TCOLOREDPRS3DHOLDER, /*!< Colored 3D presentation holder */
176 TCOLOREDPRS3DCACHE, /*!< Colored 3D presentation cache */
177 TPART, /*!< MULTIPR: part of a mesh */
181 /* Clipping planes management */
182 struct ClippingPlane {
195 * Returns ID of the object.
200 * Returns the type of the presentable object
206 * \brief Removable object interface
208 * Removable object interface is the root class of all removable objects.
210 interface RemovableObject : Base {
212 * Remove object from study.
214 void RemoveFromStudy();
217 /*! \brief Presentable object interface
219 * Presentable object interface is the root class of all presentable objects.
221 interface PrsObject : RemovableObject {
224 //-------------------------------------------------------
225 /*! \brief Interface of curve representation.
227 * Manages presentation parameters of one curve.
228 * It can be used for presentation of a set of curves using a combined presentation.
230 interface Curve : PrsObject {
232 * Sets the title of the curve.
233 * \param theTitle This string parameter defines the title of this curve.
235 void SetTitle(in string theTitle);
238 * Gets the title of the curve.
239 * \return String value corresponding to the title of the curve.
244 * Sets the color of the curve.
245 * \param theColor The color of the curve. This parameter is taken
246 * from the <VAR>Orientation</VAR> enumeration.
248 void SetColor(in SALOMEDS::Color theColor);
251 * Gets the color of the curve.
252 * \return Color of the curve. The returned value will correspond
253 * to one of the elements the <VAR>Color</VAR> enumeration.
255 SALOMEDS::Color GetColor();
258 * This enumeration contains a set of elements defining the
259 * presentation type of markers (data points) with help of
260 * which the curve is constructed on the graphics.
262 enum MarkerType { NONE,
275 * Sets the presentation type of markers (data points) with help of
276 * which the curve is constructed on the graphics.
277 * \param theType This parameter defines the type of marker with help
278 * of which the curve is constructed on the graphics.
279 * It is taken from <VAR>MarkerType</VAR> enumeration.
281 void SetMarker(in MarkerType theType);
284 * Gets the presentation type of markers (data points) with
285 * help of which the curve is constructed on the graphics.
286 * \return The type of marker with help of which the curve is constructed
287 * on the graphics. The returned value will correspond to
288 * one of the elements the <VAR>MarkerType</VAR> enumeration.
290 MarkerType GetMarker();
293 * This enumeration contains a set of elements defining the
294 * type of presentation of a curve line on the graphics.
296 enum LineType{ VOIDLINE, SOLIDLINE, DASHLINE, DOTLINE, DASHDOTLINE, DASHDOTDOTLINE};
299 * Sets the type of presentation of curve lines on the graphics.
300 * \param theType This parameter defines the type of presentation of curve lines on the graphics.
301 * \param theLineWidth Long value defining the width of the curve line.
303 void SetLine(in LineType theType, in long theLineWidth);
306 * Gets the type of representation of curve lines on the graphics.
307 * \return The type of representation of curve lines on the graphics.
312 * Gets the width of the curve line.
313 * \return Long value corresponding to the width of the curve line.
317 /*! Sets scaling coefficient of the curve.
318 * \param coef Double value defining the scale.
320 void SetScale(in double theCoef);
322 /*! Gets the scale coefficient of the curve lines.
326 /*! Sets scaling coefficient of the curve to 1.0.
331 * Switches on/off displaying of the deviation labels
333 * \param flag is used to switch on/off the deviation
334 * labels on the curve.
336 void ShowDeviation(in boolean flag);
339 //-------------------------------------------------------
340 /*! \brief %Container presentable object interface
342 * This class is provided in order to create one presentation using several presentable objects.
343 * This can provide a combination of a set of curves to display them in XY plot view.
345 interface Container : PrsObject {
347 * Adds a curve into the container.
348 * \param theCurve The added curve.
350 void AddCurve(in Curve theCurve);
353 * Removes a curve from the container.
354 * \param theCurve The removed curve.
356 void RemoveCurve(in Curve theCurve);
359 * Gets the number of curves which are stored in the container.
360 * \return A long value corresponding to the number of curves which are stored in the container.
365 * Removes all curves from the container.
370 //-------------------------------------------------------
372 /*! \brief 3D presentation interface
374 * This is a root class for all 3D presentations, which can be displayed in %VISU module.
376 interface Prs3d : PrsObject, SALOME::GenericObj
379 * Move the 3D presentation according to the given offset parameters
381 void SetOffset(in float theDx, in float theDy, in float theDz);
384 * Gets offset parameters for the 3D presentation
386 void GetOffset(out float theDx, out float theDy, out float theDz);
389 * Set standard point marker for the object
390 * \param theType standard marker type
391 * \param theScale standard marker scale
393 void SetMarkerStd(in MarkerType theType, in MarkerScale theScale);
396 * Set custom point marker for the object. The texture can be added
397 * by LoadTexture() function
398 * \param theTextureId texture ID
400 void SetMarkerTexture(in long theTextureId);
403 * Get type of the point marker assigned to the object
404 * \return current marker type (MT_NONE if no marker is set)
406 MarkerType GetMarkerType();
409 * Get scale of the point marker assigned to the object
410 * \return current marker scale (MS_NONE if no marker is set)
412 MarkerScale GetMarkerScale();
415 * Get texture idenifier of the point marker assigned to the object
416 * \return marker texture ID (0 if no marker set)
418 long GetMarkerTexture();
421 * Gets memory size actually used by the presentation (Mb).
423 float GetMemorySize();
427 * This enumeration contains a set of elements defining the
428 * type of presentation of the mesh.
430 enum PresentationType{ POINT,
440 * This enumeration contains a set of elements defining the
441 * type of presentation of the 2D quadratic mesh elements.
443 enum Quadratic2DPresentationType{
448 /*! \brief Interface of the mesh.
450 * Manages presentation parameters of a 3D presentation of a mesh.
451 * This object can be used for presentation of set of curves using Container class.
453 interface Mesh : Prs3d {
455 * Sets the color of mesh cells.
456 * \param theColor The color of the cells. This parameter is taken from <VAR>Color</VAR> enumeration.
458 void SetCellColor(in SALOMEDS::Color theColor);
461 * Gets the color of mesh cells.
463 SALOMEDS::Color GetCellColor();
466 * Sets the color of mesh nodes.
467 * \param theColor The color of the nodes. This parameter is taken from <VAR>Color</VAR> enumeration.
469 void SetNodeColor(in SALOMEDS::Color theColor);
472 * Gets the color of mesh nodes.
474 SALOMEDS::Color GetNodeColor();
477 * Sets the color of mesh links.
478 * \param theColor The color of the links. This parameter is taken from <VAR>Color</VAR> enumeration.
480 void SetLinkColor(in SALOMEDS::Color theColor);
483 * Gets the color of mesh links.
485 SALOMEDS::Color GetLinkColor();
488 * Sets the type of representation of a mesh.
489 * \param theType The of representation of a mesh. This parameter is
490 * taken from <VAR>PresentationType</VAR> enumeration.
492 void SetPresentationType(in PresentationType theType);
495 * Gets the type of representation of the mesh.
496 * \return The type of representation of the mesh.
498 PresentationType GetPresentationType();
502 * Sets the type of representation of a 2D quadratic mesh elements.
503 * \param theType The type of representation of 2D quadratic mesh elements.
504 * This parameter is taken from
505 * <VAR>Quadratic2DPresentationType</VAR> enumeration.
507 void SetQuadratic2DPresentationType(in Quadratic2DPresentationType theType);
510 * Gets the type of representation of the 2D quadratic mesh elements.
511 * \return The type of representation of the 2D quadratic mesh elements.
513 Quadratic2DPresentationType GetQuadratic2DPresentationType();
516 * Switches shrink mode of presentation
517 * Note: SetPresentationType(SHRINK) is same as SetShrink(True)
519 void SetShrink(in boolean toShrink);
522 * Returns current state of shrink mode
528 //-------------------------------------------------------
529 /*! \brief Basic Interface for the %Colored 3D Presentations
531 * This interface is responsable for coloring of 3D field presentations
532 * according the scalar values applied to different cells.
533 * As well it contains presentation parameters of the scalar bar. The scalar
534 * bar is displayed along with each colored field presentation and serves for
535 * consulting the correspondance between colors and data values.
537 interface ColoredPrs3dBase : Prs3d
540 * Sets scalar range - min and max boundaries of the scalar bar.
541 * \param theMin Min boundary of the scalar bar.
542 * \param theMax Max boundary of the scalar bar.
544 void SetRange(in double theMin, in double theMax);
547 * Gets the min boundary of the scalar bar.
552 * Gets the max boundary of the scalar bar.
557 * Sets scalar range that corresponds to the source data.
559 void SetSourceRange();
562 * Gets the min boundary of the scalar bar from source data.
564 double GetSourceMin();
567 * Gets the max boundary of the scalar bar from source data.
569 double GetSourceMax();
572 * Defines whether the scalar range corresponds to the source data or not.
574 boolean IsRangeFixed();
576 /*! \brief Position of the scalar bar.
578 * Sets the position of the scalar bar origin on the screen.
579 * \param X Horizontal position. The value can be between 0 and 1.
580 * \param Y Vertical position. The value can be between 0 and 1.
582 void SetPosition(in double X, in double Y);
585 * Gets horizontal position of the scalar bar origin.
590 * Gets vertical position of the scalar bar origin.
594 /*! \brief Size of this presentable object.
596 * Sets the size of the scalar bar.
597 * \param theWidth Width of this presentable object. The value can be between 0 and 1.
598 * \param theHeight Height of this presentable object. The value can be between 0 and 1.
600 void SetSize(in double theWidth, in double theHeight);
603 * Gets the width of this presentable object.
604 * \return A double value corresponding to the width of this presentable object.
609 * Gets the height of this presentable object.
610 * \return A double value corresponding to the height of this presentable object.
615 * Sets the number of colors which will be used for presentation of this presentable object.
616 * \param theNbColors A long value defining the number of colors.
618 void SetNbColors(in long theNbColors);
621 * Gets the number of colors which will be used for visualization of this presentable object.
622 * \return A long value corresponding to the number of colors which
623 * will be used for visualization of this presentable object.
627 * Sets the number of labels which will be used for indication of color gradation
629 * \param theNbLabels A long value defining the number of labels.
631 void SetLabels(in long theNbLabels);
634 * Gets the number of labels which will be used for indication of color gradation of the scalar bar.
635 * \return A long value corresponding to the number of labels which will
636 * be used for indication of color gradation of the scalar bar.
640 /*! %Orientation of the scalar bar (to provide backward compatibility). */
642 HORIZONTAL, /*!< Horizontal orientation of the scalar bar.*/
643 VERTICAL /*!< Vertical orientation of the scalar bar.*/
647 * Sets the type of orientation of the scalar bar (to provide backward compatibility).
648 * \param theOrientation This parameter defines the orientation of the scalar bar.
649 * It is taken from the <VAR>Orientaton</VAR> enumeration.
651 void SetBarOrientation(in Orientation theOrientation);
654 * Gets the type of orientation of the scalar bar (to provide backward compatibility).
656 Orientation GetBarOrientation();
659 /*! \brief Additional Interface for the %Colored 3D Presentations
663 interface ColoredPrs3d : ColoredPrs3dBase
666 * Sets the title of the scalar bar. By default - the name of the selected result is used.
667 * \param theName String parameter defining the name of the scalar bar.
669 void SetTitle(in string theName);
672 * Gets the title of the scalar bar.
676 /*! Sets the method of coloring of the elements composing a 3D presentation.
678 void SetScalarMode(in long theScalarMode);
680 /*! Gets the method of coloring of the elements composing a 3D presentation.
682 long GetScalarMode();
685 * Set the visibility of a distribution curve.
686 * \param theIs is used to switch on/off the visibility of a distribution curve.
688 void SetIsDistributionVisible(in boolean theIs);
690 //! Gets current visibility of a distribution curve
691 boolean GetIsDistributionVisible();
693 //! Gets current filtering by scalars mode
694 boolean IsScalarFilterUsed();
696 void UseScalarFiltering( in boolean theUseScalarFilter );
699 * Sets scalar range - min and max boundaries of the scalar bar.
700 * \param theMin Min boundary of the scalar bar.
701 * \param theMax Max boundary of the scalar bar.
702 * \param theIsFilter if true then filter by scalars.
704 void SetScalarFilterRange( in double theMin, in double theMax );
706 double GetScalarFilterMin();
708 double GetScalarFilterMax();
711 * Add group as geometry of presentation.
712 * \param theMeshName - mesh name
713 * \param theGroupName - group name
715 void AddMeshOnGroup(in string theGroupName);
719 * Remove all groups.(The scalar map will be placed on all mesh).
721 void RemoveAllGeom();
725 //-------------------------------------------------------
727 interface ColoredPrs3dCache;
730 //-------------------------------------------------------
731 /*! \brief %ColoredPrs3dHolder interface.
732 * Interface of 3d presentation's holder, which represents colored 3d presentations,
733 * created on fields. It is publishing in the object browser in a separate folder
734 * and can be controled by viewer's slider.
736 interface ColoredPrs3dHolder : PrsObject, SALOME::GenericObj
739 * Presentation input parameters.
747 long myTimeStampNumber;
751 * Apply input parameters to last visited presentation in the cache.
753 boolean Apply(in ColoredPrs3d thePrs3d,
754 in BasicInput theInput,
755 in View3D theView3D);
758 * Gets the last visited presentation in the cache.
760 ColoredPrs3d GetDevice();
763 * Gets type of the managed presentations.
765 VISUType GetPrsType();
767 /*! Defines timestamp representation.
775 /*! Defines representation range of timestamps.
777 typedef sequence<TimeStampInfo> TimeStampsRange;
780 * Gets TimeStampsRange information from the last visited presentation.
782 TimeStampsRange GetTimeStampsRange();
785 * Gets input parameters of the last visited presentation.
787 BasicInput GetBasicInput();
790 * Gets a %ColoredPrs3dCache, to which the holder belongs
792 ColoredPrs3dCache GetCache();
795 * Gets memory size actually used by the holder (Mb).
797 float GetMemorySize();
801 //-------------------------------------------------------
802 /*! \brief %ColoredPrs3dCache interface.
803 * This interface is responsible for memory management of 3d presentations.
804 * One cache corresponds to one study.
806 interface ColoredPrs3dCache : RemovableObject, SALOME::GenericObj
808 /*! This enumeration contains the cache memory modes. */
810 MINIMAL, /*!< Minimal memory mode (default behaviour). */
811 LIMITED /*!< Limited memory mode (fixed memory size for presentations). */
814 /*! This enumeration defines how to enlarge the cache limited memory. */
816 NO_ENLARGE, /*!< No need to enlarge (default behaviour). */
817 ENLARGE, /*!< Enlarge limited memory. */
818 IMPOSSIBLE /*!< Impossible to enlarge (not enough free memory). */
821 /*! Sets a memory mode.*/
822 void SetMemoryMode(in MemoryMode theMode);
824 /*! Gets a memory mode.*/
825 MemoryMode GetMemoryMode();
827 /*! Sets a memory size for limited mode (Mb). */
828 void SetLimitedMemory(in float theMemorySize);
830 /*! Gets a memory size for limited mode (Mb). */
831 float GetLimitedMemory();
834 * Gets memory size actually used by the cache system (Mb).
836 float GetMemorySize();
838 /*! Creates %ColoredPrs3dHolder.*/
839 ColoredPrs3dHolder CreateHolder(in VISUType theType,
840 in ColoredPrs3dHolder::BasicInput theInput);
842 /*! Gets a memory which is required to create a holder. */
843 EnlargeType GetRequiredMemory(in VISUType theType,
844 in ColoredPrs3dHolder::BasicInput theInput,
845 out float theRequiredMemory);
849 //-------------------------------------------------------
850 /*! \brief Interface of the %Scalar Map
852 * This interface is responsable for coloring of 3D field presentations
853 * according the scalar values applied to different cells.
854 * As well it contains presentation parameters of the scalar bar. The scalar
855 * bar is displayed along with each colored field presentation and serves for
856 * consulting the correspondance between colors and data values.
859 interface ScaledPrs3d {
861 * Sets the type of scaling of the values reflected by the scalar bar.
862 * \param theScaling The value of this parameter is taken from the <VAR>Scaling</VAR> enumeration.
864 void SetScaling(in Scaling theScaling);
867 * Gets the type of scaling of the values reflected by this presentation.
869 Scaling GetScaling();
872 interface ScalarMap : ColoredPrs3d, ScaledPrs3d {
875 * Returns visibility state of scalar bar
877 boolean IsBarVisible();
880 * Sets visibility state of scalar bar
882 void SetBarVisible(in boolean theVisible);
885 * Sets the gauss metric for the presentation.
886 * \param theGaussMetric The value of this parameter is taken from the <VAR>GaussMetric</VAR> enumeration.
888 void SetGaussMetric(in GaussMetric theGaussMetric);
891 * Gets the gauss metric of the presentation.
893 GaussMetric GetGaussMetric();
896 * Sets the color of mesh links.
897 * \param theColor The color of the links. This parameter is taken from <VAR>Color</VAR> enumeration.
899 void SetLinkColor(in SALOMEDS::Color theColor);
902 * Gets the color of mesh links.
904 SALOMEDS::Color GetLinkColor();
907 //-------------------------------------------------------
908 /*! \brief Gauss Points presentation interface
910 * Presentation parameters of the Gauss Points presentation.
912 //-------------------------------------------------------
913 interface GaussPoints : ColoredPrs3d
915 //! Set flag indicating which scalar bar is active.
916 void SetIsActiveLocalScalarBar(in boolean theFlag);
918 //! Get flag indicating which scalar bar is active.
919 boolean GetIsActiveLocalScalarBar();
921 //! Set flag indicating visibility of global scalar bar.
922 void SetIsDispGlobalScalarBar(in boolean theFlag);
924 //! Get flag indicating visibility of global scalar bar.
925 boolean GetIsDispGlobalScalarBar();
927 //! Set value of the distance between global and local scalar bars.
928 void SetSpacing(in double theSpacing);
930 //! Get value of the distance between global and local scalar bars.
934 * Returns visibility state of scalar bar
936 boolean IsBarVisible();
939 * Sets visibility state of scalar bar
941 void SetBarVisible(in boolean theVisible);
944 * Set the Multicolored mode.
945 * \param theIsColored is used to switch between Results and Geometry modes.
946 * Multiple colors are using when the presentation is
947 * drawing in the Results mode, one color - in the Geometry mode.
949 void SetIsColored(in boolean theIsColored);
951 //! Gets current color mode
952 boolean GetIsColored();
954 /*! Sets the color of this presentation in case of IsColored switched off.
955 * \param theColor The color of this presentation. This parameter
956 * is taken from the <VAR>Color</VAR> enumeration.
958 void SetColor(in SALOMEDS::Color theColor);
961 * When the Bicolor parameter is set to true, scalar bars are
962 * drawing with two colors : red color correspoonds to positive
963 * scalar values, blue color - to negative values.
965 void SetBiColor(in boolean theIsBiColor);
967 //! Get the Bicolor mode.
968 boolean GetBiColor();
970 //! Checks whether the Gauss Points will be deformed or not
971 boolean GetIsDeformed();
973 //! Apply deformation on the Gauss Points
974 void SetIsDeformed(in boolean theIsDeformed);
977 * Sets the scale factor for scalar values
978 * (how much corresponding mesh elements should be translated).
979 * \param theScaleFactor The scaling factor.
981 void SetScaleFactor(in double theScaleFactor);
984 * Gets the scale factor for scalar values.
985 * (how much corresponding mesh elements is translated)
987 double GetScaleFactor();
990 * This enumeration contains a set of elements defining the type of representation of the vector head.
998 //! Set type of the primitives which is used for drawing the Gauss Points
999 void SetPrimitiveType(in PrimitiveType thePrimitiveType);
1001 //! Get type of the primitives which is used for drawing the Gauss Points
1002 PrimitiveType GetPrimitiveType();
1004 //! Sets Point Sprite clamp
1005 void SetClamp(in double theClamp);
1007 //! Gets Point Sprite clamp
1010 //! Sets minimum size of Point Sprites
1011 void SetMinSize(in double theMinSize);
1013 //! Gets minimum size of Point Sprites
1014 double GetMinSize();
1016 //! Sets maximum size of Point Sprites
1017 void SetMaxSize(in double theMaxSize);
1019 //! Gets maximum size of Point Sprites
1020 double GetMaxSize();
1022 //! Sets magnification for Point Sprites
1023 void SetMagnification(in double theMagnification);
1025 //! Gets magnification for Point Sprites
1026 double GetMagnification();
1028 //! Sets the increment of changing Magnification parameter
1029 void SetMagnificationIncrement(in double theIncrement);
1031 //! Gets the increment of changing Magnification parameter
1032 double GetMagnificationIncrement();
1034 //! Sets Point Sprites size
1035 void SetGeomSize(in double theGeomSize);
1037 //! Sets size of Point Sprite
1038 double GetGeomSize();
1040 //! Get path to the image using for Main Point Sprite texture
1041 string GetMainTexture();
1043 //! Get path to the image using for Alpha Point Sprite texture
1044 string GetAlphaTexture();
1046 //! Points Main and AlphaMask images to be used by Point Sprites
1047 void SetTextures(in string theMainTexture, in string theAlphaTexture);
1049 //! Sets Point Sprite Alpha threshold
1050 void SetAlphaThreshold(in double theAlphaThreshold);
1052 //! Gets Point Sprite Alpha threshold
1053 double GetAlphaThreshold();
1055 //! Sets resolution of the Geometrical Sphere
1056 void SetResolution(in long theResolution);
1058 //! Sets resolution of the Geometrical Sphere
1059 long GetResolution();
1061 //! Sets how many faces of can be drawn in the Geometrical Sphere primitive mode
1062 void SetFaceLimit(in long theFaceLimit);
1064 //! Defines how many faces of can be drawn in the Geometrical Sphere primitive mode
1065 long GetFaceLimit();
1071 /*! \brief MonoColor presentation presentation interface
1073 * Presentation parameters of the MonoColor presentation.
1075 interface MonoColorPrs : ScalarMap {
1077 /*! This boolean method returns True if this deformed shape presentation is colored.
1079 boolean IsColored();
1081 /*! Shows this presentation in colored mode.
1082 * \param theColored If this boolean parameter is True this presentable
1083 * object will be shown in colored mode.
1085 void ShowColored(in boolean theColored);
1087 /*! Gets the color of this presentable object.
1088 * \return The color of this presentable object.
1090 SALOMEDS::Color GetColor();
1092 /*! Sets the color of this presentation.
1093 * \param theColor The color of this presentation. This parameter
1094 * is taken from the <VAR>Color</VAR> enumeration.
1096 void SetColor(in SALOMEDS::Color theColor);
1100 /*! \brief Deformed shape presentation interface
1102 * Presentation parameters of the deformed shape presentation.
1104 interface DeformedShape : MonoColorPrs
1107 * Sets the scale of the presentatable object.
1108 * \param theScale Double value defining the scale of this presentable object.
1110 void SetScale(in double theScale);
1113 * Gets the scale of the presentatable object.
1119 //-------------------------------------------------------
1120 /*! \brief Deformation interface
1122 * This is base interface for building of the deformed presentations
1124 interface Deformation{
1126 * Sets the scale of the presentatable object.
1127 * \param theScale Double value defining the scale of this presentable object.
1129 void SetScale(in double theScale);
1132 * Gets the scale of the presentatable object.
1137 * Sets the vectorial field
1138 * \param theEntity - entity of vectorial field
1139 * \param theFieldName - the name of vectorial field
1141 void SetVectorialField(in Entity theEntity,
1142 in string theFieldName);
1145 * Get vectorial entity
1147 Entity GetVectorialFieldEntity();
1150 * Get scalar field name
1152 string GetVectorialFieldName();
1156 //-------------------------------------------------------
1157 /*! \brief OptionalDeformation interface
1159 * This is interface for switch on/off of the deformation of the presentation
1161 interface OptionalDeformation : Deformation{
1164 * Sets the deformation flag of the presentatable object.
1165 * \param theFlag Boolean value defining the deformation flag of this presentable object.
1167 void UseDeformation(in boolean theFlag);
1170 * Gets the deformation flag of the presentatable object.
1172 boolean IsDeformed();
1175 //-------------------------------------------------------
1176 /*! \brief Scalar Map on Deformed shape presentation interface
1178 * Presentation parameters of the scalar map on deformed shape presentation.
1180 interface DeformedShapeAndScalarMap : ScalarMap {
1183 * Sets the scale of the presentatable object.
1184 * \param theScale Double value defining the scale of this presentable object.
1186 void SetScale(in double theScale);
1189 * Gets the scale of the presentatable object.
1194 * Sets the scalar field
1195 * \param theEntity - entity of scalar field
1196 * \param theFieldName - the name of scalar field
1197 * \param theTimeStampNumber - the timestamp number for the scalar field
1199 void SetScalarField(in Entity theEntity,
1200 in string theFieldName,
1201 in long theTimeStampNumber);
1207 Entity GetScalarEntity();
1210 * Get scalar field name
1212 string GetScalarFieldName();
1215 * Get timestamp number for the scalar field
1217 long GetScalarTimeStampNumber();
1221 //-------------------------------------------------------
1223 * \brief Plot3D interface
1225 * Presentation parameters of Plot3D presentation. This type of presentation
1226 * consists of deforming initial planar mesh according to values assigned to the mesh elements.
1227 * If mesh not planar but volumic one, it is possible to generate intermediate planar mesh.
1229 interface Plot3dBase {
1231 * Sets the scale factor for scalar values
1232 * (how much corresponding mesh elements should be translated).
1233 * \param theScaleFactor The scaling factor.
1235 void SetScaleFactor (in double theScaleFactor);
1238 * Gets the scale factor for scalar values.
1239 * (how much corresponding mesh elements is translated)
1241 double GetScaleFactor();
1244 * Sets presentation type: contour or surface.
1245 * \param theIsContourPrs Define, whether presentation type is contour.
1247 void SetContourPrs (in boolean theIsContourPrs );
1250 * Returns true if presentation type is contour.
1252 boolean GetIsContourPrs();
1255 * Sets the number of contours.
1256 * \param theNb The number of contours.
1258 void SetNbOfContours (in long theNb);
1261 * Gets the number of contours.
1263 long GetNbOfContours();
1266 interface Plot3D : ScalarMap, Plot3dBase {
1268 * This enumeration contains a set of elements defining
1269 * the type of orientation in 3D space of the cutting plane.
1271 enum Orientation { XY, /*!< The object is located in the plane formed by X and Y axis. */
1272 YZ, /*!< The object is located in the plane formed by Y and Z axis. */
1273 ZX }; /*!< The object is located in the plane formed by Z and X axis. */
1276 * Sets the orientation in 3D space of cutting plane for the presentation.
1277 * \param theOrientation This parameter defines the type of orientation of cutting plane
1278 * in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
1279 * \param theXAngle The angle of rotation of the cutting plane
1280 * around the first axis of the chosen orientation.
1281 * \param theXAngle The angle of rotation of the cutting plane
1282 * around the second axis of the chosen orientation.
1284 void SetOrientation (in Orientation theOrientation, in double theXAngle, in double theYAngle);
1287 * Gets the type of orientation in 3D space of cutting plane.
1289 Orientation GetOrientationType();
1292 * Gets rotation angle of the cutting plane
1293 * around the first axis of the chosen orientation.
1295 double GetRotateX();
1298 * Gets rotation angle of the cutting plane
1299 * around the second axis of the chosen orientation.
1301 double GetRotateY();
1304 * Sets the position of a cutting plane.
1305 * \param thePlanePosition The position of the cutting plane.
1306 * \param theIsRelative Define, whether the input position is relative.
1308 void SetPlanePosition (in double thePlanePosition,
1309 in boolean theIsRelative);
1312 * Gets the position of the cutting plane
1314 double GetPlanePosition();
1317 * Returns true if a position of cutting plane is relative
1319 boolean IsPositionRelative();
1322 //-------------------------------------------------------
1323 /*! \brief %Table representation interface
1325 * Presentation parameters of the %Table view.
1327 interface Table : PrsObject {
1329 * Sets the title of the table.
1330 * \param theTitle String parameter defining the title of this table.
1332 void SetTitle(in string theTitle);
1335 * Gets the title of the table.
1336 * \return A string value containing the title of the table.
1341 * This enumeration contains a set of elements defining the orientation of the table.
1344 HORIZONTAL, /*!< Horizontal orientation of the table. */
1345 VERTIACAL /*!< Vertical orientation of the table. */
1349 * Sets orientation of the table.
1350 * \param theOrientation This input parameter defines the orientation of the table.
1351 * It is taken from the <VAR>Orientation</VAR> enumeration.
1353 void SetOrientation(in Orientation theOrientation);
1356 * Gets orientation of the table.
1357 * \return Orientation of the table. The returned value will correspond
1358 * to one of the elements the <VAR>Orientation</VAR> enumeration.
1360 Orientation GetOrientation();
1363 * Gets the number of rows of the table.
1364 * \return Long value corresponding to the number of rows of the table
1369 * Gets the number of columns of the table.
1370 * \return Long value corresponding to the number of columns of the table
1372 long GetNbColumns();
1375 * Sorts the specified row of the table.
1376 * \param theRow Index of the row to sort
1377 * \param theSortOrder Sort order (see <VAR>SortOrder</VAR> enumeration)
1378 * \param theSortPolicy Sort policy (see <VAR>SortPolicy</VAR> enumeration)
1380 void SortRow(in long theRow, in SortOrder theSortOrder, in SortPolicy theSortPolicy);
1383 * Sorts the specified column of the table.
1384 * \param theRow Index of the column to sort
1385 * \param theSortOrder Sort order (see <VAR>SortOrder</VAR> enumeration)
1386 * \param theSortPolicy Sort policy (see <VAR>SortPolicy</VAR> enumeration)
1388 void SortColumn(in long theColumn, in SortOrder theSortOrder, in SortPolicy theSortPolicy);
1391 * Sorts the table by the specified row.
1392 * \param theRow Index of the row, by which the table has to be sort
1393 * \param theSortOrder Sort order (see <VAR>SortOrder</VAR> enumeration)
1394 * \param theSortPolicy Sort policy (see <VAR>SortPolicy</VAR> enumeration)
1396 void SortByRow(in long theRow, in SortOrder theSortOrder, in SortPolicy theSortPolicy);
1399 * Sorts the table by the specified column.
1400 * \param theColumn Index of the column, by which the table has to be sort
1401 * \param theSortOrder Sort order (see <VAR>SortOrder</VAR> enumeration)
1402 * \param theSortPolicy Sort policy (see <VAR>SortPolicy</VAR> enumeration)
1404 void SortByColumn(in long theColumn, in SortOrder theSortOrder, in SortPolicy theSortPolicy);
1407 //-------------------------------------------------------
1408 /*! \brief %PointMap3d representation interface
1410 * Presentation parameters of the %Table Point Map in 3d view.
1412 interface PointMap3d : ColoredPrs3dBase, ScaledPrs3d, Plot3dBase, Table {
1415 //-------------------------------------------------------
1416 /*! \brief Cut planes interface
1418 * Presentation parameters of Cut planes presentation. This type of presentation
1419 * consists of cutting your initial mesh by a definite number of planes. As the
1420 * result you will see these planes which will be cutted by the borders of the mesh.
1422 interface CutPlanes : ScalarMap, OptionalDeformation {
1424 * This enumeration contains a set of elements defining the type of orientation in 3D space
1425 * of the cut planes.
1427 enum Orientation {XY, /*!< The object is located in the plane formed by X and Y axis. */
1428 YZ, /*!< The object is located in the plane formed by Y and Z axis. */
1429 ZX}; /*!< The object is located in the plane formed by Z and X axis. */
1432 * Sets the type of orientation in 3D space of cut planes presentation.
1433 * \param theOrientation This parameter defines the type of orientation of cut planes
1434 * in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
1435 * \param theXAngle The angle of rotation of the cut planes around
1436 * the first axis of the chosen orientation.
1437 * \param theXAngle The angle of rotation of the cut planes around
1438 * the second axis of the chosen orientation.
1440 void SetOrientation(in Orientation theOrientation, in double theXAngle, in double theYAngle);
1443 * Gets the type of orientation in 3D space of cut planes presentation.
1445 Orientation GetOrientationType();
1448 * Gets rotation angle of the cut plane presentation around the first axis of the chosen orientation.
1450 double GetRotateX();
1453 * Gets rotation angle of the cut plane presentation around the second axis of the chosen orientation.
1455 double GetRotateY();
1458 * Sets the displacement of the cut planes in 3D space.
1460 * \param theDisp This parameter defines position of the cut planes
1461 * in 3D space. It varies from 0 to 1. If the chosen value is 0.5, the cut planes
1462 * will be evenly located regarding each other; in other words, the distance between all
1463 * of them will be equal. If the value is higher or lower than 0.5, the planes will be displaced
1464 * to one or another side.
1466 void SetDisplacement(in double theDisp);
1469 * Gets the displacement of the cut planes in 3D space.
1471 double GetDisplacement();
1474 * Sets the position of a definite cut plane.
1475 * \param thePlaneNumber The number of this cut plane.
1476 * \param thePlanePosition The position of this cut plane.
1478 void SetPlanePosition(in long thePlaneNumber, in double thePlanePosition);
1481 * Sets the position of the choosen plane to default value.
1482 * \param thePlaneNumber The number of this cut plane.
1484 void SetDefault(in long thePlaneNumber);
1487 * Gets the position of the choosen plane
1489 double GetPlanePosition(in long thePlaneNumber);
1492 * Determines whether the choosen plane has default position.
1493 * \param thePlaneNumber The number of this cut plane.
1495 boolean IsDefault(in long thePlaneNumber);
1498 * Sets the number of cut planes.
1499 * \param theNb The number of cut planes.
1501 void SetNbPlanes(in long theNb);
1504 * Gets the number of cut planes.
1509 //-------------------------------------------------------
1510 /*! \brief Base interface for Cut Lines and Cut Segment tools
1513 interface CutLinesBase : ScalarMap {
1515 * Sets the number of cut lines.
1516 * \param theNb The number of cut lines.
1518 void SetNbLines(in long theNb);
1521 * Gets the number of cut lines.
1525 /*! Invert all curves of corresponding table
1526 * \param theInvert - Invert all curves, if value is TRUE, else not.
1528 void SetAllCurvesInverted(in boolean theInvert);
1530 /*! Checks the orientation of all curves
1531 * \retval TRUE - if all curves are inverted, else FALSE
1533 boolean IsAllCurvesInverted();
1535 /*! Sets values which cutlines would be shown: aboslute or relative values
1536 * \param theAbsLength - boolean value, TRUE or false.
1538 void SetUseAbsoluteLength(in boolean theAbsLength);
1540 /*! Checks values of cutlines: using aboslute or relative values
1542 boolean IsUseAbsoluteLength();
1545 //-------------------------------------------------------
1546 /*! \brief Cut lines presentation.
1548 * Presentation parameters of a Cut lines presentation.
1549 * Cut Lines is a type of presentation which displays colored cells
1550 * with applied scalar values on the mesh where lines are placed.
1551 * The procedure of construction of a Cut Lines presentation reuses the algorithm
1552 * of creation of Cut Planes presentation and consists of two steps:
1554 * 1. From Cut Planes presentation one plane is taken and
1555 * it is used as base plane for construction of cut lines.
1556 * 2. This plane is cut by a regular array of planes. The result of this
1557 * operation is a regular array of lines in space, belonging to the same plane
1558 * and having the same orientation. They are located inside or on the mesh.
1560 interface CutLines : CutLinesBase {
1562 * Sets the type of orientation in 3D space of the base plane of a cut lines presentation.
1563 * \param theOrientation The orientation of the base plane in 3D space.
1564 * \param theXAngle The angle of rotation of the base plane around
1565 * the first axis of the chosen orientation.
1566 * \param theXAngle The angle of rotation of the base plane around
1567 * the second axis of the chosen orientation.
1569 void SetOrientation(in CutPlanes::Orientation theOrientation, in double theXAngle, in double theYAngle);
1572 * Sets the type of orientation in 3D space of the cutting planes of a cut lines presentation.
1573 * \param theOrientation This parameter defines the type of orientation of the cutting planes
1574 * in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
1575 * \param theXAngle The angle of rotation of the cutting planes
1576 * around the first axis of the chosen orientation.
1577 * \param theXAngle The angle of rotation of the cutting planes
1578 * around the second axis of the chosen orientation.
1580 void SetOrientation2(in CutPlanes::Orientation theOrientation, in double theXAngle, in double theYAngle);
1583 * Gets the type of orientation in 3D space of the base plane of a cut lines presentation.
1585 CutPlanes::Orientation GetOrientationType();
1588 * Gets the type of orientation in 3D space of the cutting planes of a cut lines presentation.
1590 CutPlanes::Orientation GetOrientationType2();
1593 * Gets rotation angle of the base plane around the first axis of the chosen orientation.
1595 double GetRotateX();
1598 * Gets rotation angle of the cutting planes around the first axis of the chosen orientation.
1600 double GetRotateX2();
1603 * Gets rotation angle of the base plane around the second axis of the chosen orientation.
1605 double GetRotateY();
1608 * Gets rotation angle of the cutting planes around the second axis of the chosen orientation.
1610 double GetRotateY2();
1613 * Sets the displacement of the base plane of the cut lines presentation in 3D space.
1615 * \param theDisp This parameter defines position of the base plane
1616 * in 3D space. It varies from 0 to 1.
1618 void SetDisplacement(in double theDisp);
1621 * Sets the displacement of the cutting planes of the cut lines presentation in 3D space.
1623 * \param theDisp This parameter defines position of the cutting planes
1624 * in 3D space. It varies from 0 to 1.
1626 void SetDisplacement2(in double theDisp);
1629 * Gets the displacement of the base plane of the cut lines presentation in 3D space.
1631 double GetDisplacement();
1634 * Gets the displacement of the cutting planes of the cut lines presentation in 3D space.
1636 double GetDisplacement2();
1638 /*! Sets the position of the base plane in 3D space.
1639 * \param thePlanePosition A double value defining the position of the base plane in 3D space.
1641 void SetBasePlanePosition(in double thePlanePosition);
1643 /*! Gets the position of the base plane in 3D space.
1645 double GetBasePlanePosition();
1647 /*! Sets the position of one of cutting planes in 3D space.
1648 * \param thePlaneNumber A long value defining the order number of this cutting plane.
1649 * \param thePlanePosition A double value defining the position of the base plane in 3D space.
1651 void SetLinePosition(in long thePlaneNumber, in double thePlanePosition);
1653 /*! Gets the position of one of cutting planes in 3D space.
1654 * \param thePlaneNumber A long value defining the order number of this cutting plane.
1656 double GetLinePosition(in long thePlaneNumber);
1658 /*! Sets the position of the base plane to default value.
1663 * Determines whether the base plane has default position.
1664 * \return True if the base plane has default position.
1666 boolean IsDefault();
1669 * Sets the position of the choosen cutting plane to default value.
1670 * \param thePlaneNumber The number of this cutting plane.
1672 void SetDefaultPosition(in long thePlaneNumber);
1675 * Determines whether the choosen cutting plane has default position.
1676 * \param thePlaneNumber The number of this cutting plane.
1677 * \return True if this cutting plane has default position.
1679 boolean IsDefaultPosition(in long thePlaneNumber);
1682 //-------------------------------------------------------
1683 /*! \brief Cut segment presentation.
1685 * Presentation parameters of a Cut segment presentation.
1686 * Cut Segment is a simplified variant of Cut Lines presentation, which is used
1687 * to display a single line instead of set of them. Axis of this line is defined
1688 * by coordinates of two points in 3D space.
1690 interface CutSegment : CutLinesBase {
1692 * Sets coordinates of the first point of axis of the segment.
1693 * \param theX X coordinate of the point
1694 * \param theY Y coordinate of the point
1695 * \param theZ Z coordinate of the point
1697 void SetPoint1(in double theX, in double theY, in double theZ);
1700 * Gets coordinates of the first point of axis of the segment.
1701 * \param theX X coordinate of the point
1702 * \param theY Y coordinate of the point
1703 * \param theZ Z coordinate of the point
1705 void GetPoint1(out double theX, out double theY, out double theZ);
1708 * Sets coordinates of the second point of axis of the segment.
1709 * \param theX X coordinate of the point
1710 * \param theY Y coordinate of the point
1711 * \param theZ Z coordinate of the point
1713 void SetPoint2(in double theX, in double theY, in double theZ);
1716 * Gets coordinates of the second point of axis of the segment.
1717 * \param theX X coordinate of the point
1718 * \param theY Y coordinate of the point
1719 * \param theZ Z coordinate of the point
1721 void GetPoint2(out double theX, out double theY, out double theZ);
1724 /*! \brief Interface of the stream lines representation
1726 * This interface contains presentation parameters of stream lines presentations.
1727 * <BR>Stream lines is a type of presentation transforming into lines the
1728 * cells with vectors having most similar direction. A stream line can be thought
1729 * of as the path that a massless particle takes in a vector field.
1730 * Streamlines are used to convey the structure of a vector field.
1731 * Usually streamlines are created to explore the most interesting features in the field.
1733 interface StreamLines : MonoColorPrs {
1734 /*! This enumerations contains a set of elements necessary
1735 * for definition of direction of the stream lines.
1737 enum Direction{ FORWARD,
1742 /*! Sets the parameters of the stream lines presentation.
1743 * \param theIntStep Inegration step is a parameter of smoothness of the stream lines.
1744 * This parameter defines the accuracy of construction of the streamlines.
1745 * A smaller value of this parameter allows to construct smoother
1746 * streamlines (at the cost of more computation time).
1747 * \param thePropogationTime This parameter controls the maximum length of
1748 * the stream line (measured in units of time).
1749 * \param theStepLength This parameter defines the size of the output line segments
1750 * that make up the streamline (which is represented as a polyline).
1751 * \param thePrs3d The source presentation. The points of the field located on this source
1752 * presentation will serve as starting points for generation of stream lines.
1753 * \note If this parameter is not defined, your stream lines
1754 * presentation will be generated on all points of the field.
1755 * \param thePercents This parameter defines the quantity of points of the field
1756 * (from 0 to 100%) which will be used as starting points for
1757 * construction of the stream lines. Thus, the value of this
1758 * parameter can vary from 0 to 1.
1759 * \param theDirection Direction of the stream lines (Forward, Backward or Both).
1760 * \return True if all parameters are properly set.
1762 boolean SetParams(in double theIntStep,
1763 in double thePropogationTime,
1764 in double theStepLength,
1766 in double thePercents,
1767 in Direction theDirection);
1769 /*! Gets the value of integration step of the stream lines presentation.
1771 double GetIntegrationStep();
1773 /*! Gets the value of propagation time of the stream lines presentation.
1775 double GetPropagationTime();
1777 /*! Gets the value of step length of the stream lines presentation.
1779 double GetStepLength();
1781 /*! Returns the source presentation used for generation of the stream lines.
1785 /*! Gets the quantity of points of the field used as starting
1786 * points for generation of the stream lines presentation.
1788 double GetUsedPoints();
1790 /*! Returns the direction of the stream lines.
1792 Direction GetDirection();
1795 /*! \brief Interface of the isometric surface presentation
1797 * This interface contains presentation parameters of
1798 * isometric surface presentations.
1799 * <BR>Iso surfaces presentation combines all equal scalar
1800 * values on the cells and on the basis of them constructs
1801 * isobaric surfaces, which form this presentation.
1803 interface IsoSurfaces : MonoColorPrs {
1805 * Sets the number of isometric surfaces.
1806 * \param theNb A long value defining the number of isometric surfaces
1807 * which will be used for construction of this presentation.
1809 void SetNbSurfaces(in long theNb);
1812 * Gets the number of isometric surfaces
1814 long GetNbSurfaces();
1817 * Returns TRUE if labels with values are shown
1819 boolean IsLabeled();
1822 * Set show or not value labels
1824 void ShowLabels(in boolean theShow, in long theNb);
1827 * Returns Nb of labels per surface
1833 //-------------------------------------------------------
1834 /*! \brief Interface of the vector presentation.
1836 * This interface contains presentation parameters of vector presentations.
1838 interface Vectors : DeformedShape {
1840 * Sets the width of the lines of the vectors.
1841 * \param theWidth A double value defining the width of the lines of the vectors.
1843 void SetLineWidth(in double theWidth);
1846 * Gets the width of the lines of the vectors.
1848 double GetLineWidth();
1851 * This enumeration contains a set of elements defining the type of representation of the vector head.
1853 enum GlyphType{ ARROW,
1860 * Sets the type of representation of the vector head.
1861 * \param theType This parameter defines the type of representation of the vector head.
1862 * This value is taken from the <VAR>GlyphType</VAR> enumeration.
1864 void SetGlyphType(in GlyphType theType);
1867 * Gets the type of representation of the vector head.
1869 GlyphType GetGlyphType();
1872 * This enumeration contains a set of elements defining the position of the vector head.
1874 enum GlyphPos{ CENTER, /*!<In the center of the vector.*/
1875 TAIL, /*!<In the tail of the vector.*/
1876 HEAD /*!<In the head of the vector.*/
1880 * Sets the position of the vector head.
1881 * \param thePos This parameter defines the position of the vector head.
1882 * This value is taken from the <VAR>GlyphPos</VAR> enumeration.
1884 void SetGlyphPos(in GlyphPos thePos);
1887 * Gets the position of the vector head.
1889 GlyphPos GetGlyphPos();
1892 //-------------------------------------------------------
1893 /*! \brief %Animation class
1895 * This class provides a set of methods used for:<br>
1897 * <li> generating different animations on the basis of a field,
1898 * <li> setting the parameters of the animations,
1899 * <li> playing these animations in the %VISU module.
1902 * <BR><B>Field</B> represents the results of calculations
1903 * (it can be scalar or vector values), grouped together under one physical concept.
1904 * <BR><B>Time stamp</B> represents a subfield: the results
1905 * of calculations are taken in one definite moment.
1907 interface Animation : Base
1910 * This enumeration contains a set of available animation modes.
1912 enum AnimationMode{ PARALLEL, /*!< parallel mode of animation. */
1913 SUCCESSIVE /*!< succcessive mode of animation. */
1916 /*! Defines the field which will be used as a base for generation of the animation.
1917 * \param theObject The %SObject corresponding to the field.
1919 boolean addField(in SALOMEDS::SObject theObject);
1921 /*! Remove all fields from Animation object.
1925 /*! Generates presentations on the basis of the field.
1926 * \param theFieldNum The number of the field, which will be used
1927 * as the basis for construction of the presentation.
1929 void generatePresentations(in long theFieldNum);
1931 /*! Generates a set of frames from the created by the method
1932 * <VAR>generatePresentations</VAR>3D presentations. A sequence of
1933 * these frames will be transformed into an animation.
1934 * \return True, if the frames have been successfully generated.
1936 boolean generateFrames();
1938 /*! Clears the view before starting an animation.
1942 /*! \name Playback of an animation:
1946 /*! Starts an animation.
1948 void startAnimation();
1950 /*! Stops an animation.
1952 void stopAnimation();
1954 /*! Forwards to the next frame.
1958 /*! Returns to the previous frame.
1962 /*! Returns to the first frame of the animation.
1966 /*! Forwards to the last frame of the animation.
1970 /*! Passes to a definite frame of the animation.
1971 * \param theFrame A long value defining the number of the frame.
1973 void gotoFrame(in long theFrame);
1976 /*! Gets the number of time stamps (subfields) contained in the given field.
1980 /*! Gets the number of generated frames
1984 /*! Returns True, if the animation is currently running.
1986 boolean isRunning();
1988 /*! Returns the number of the current frame.
1990 long getCurrentFrame();
1994 ColoredPrs3d getPresentation(in long theField, in long theFrame);
1996 /*! Sets the type of presentation (vectors, deformed shape etc.)
1997 * which will be generated by the method <VAR>generatePresentations</VAR>.
1998 * \note \c addField() method should be called before in order to add field
1999 * with number theFieldNum.
2001 void setPresentationType(in long theFieldNum, in VISUType theType);
2003 /*! Gets the type of presentation (vectors, deformed shape etc.) which will
2004 * be generated by the method <VAR>generatePresentations</VAR>.
2005 * \note \c addField() method should be called before in order to add field
2006 * with number theFieldNum.
2008 VISUType getPresentationType(in long theFieldNum);
2010 /*! Sets the speed of the animation.
2011 * \param theSpeed The speed of the animation. The value varies from 1 to 99.
2013 void setSpeed(in long theSpeed);
2015 /*! Gets the speed of the animation.
2019 /*! Ruturns True, if playback of the animation is proportional.
2020 * This option allows to render your animation with proportional periods
2021 * of time between every frame (not depending on the time stamps).
2023 boolean isProportional();
2025 /*! Sets the range of the animation. The range is defined on the basis of
2026 * the time stamps of the field which have been used for generation of the animation.
2027 * This method allows to bound the range of generated frames.
2028 * If this method is not used, the animation will be generated
2029 * on the basis of all time stamps contained in the field.
2030 * \param theMin The value of the first time stamp which will be used for generation of the animation.
2031 * \param theMax The value of the last time stamp which will be used for generation of the animation.
2033 void setAnimationRange(in double theMin, in double theMax);
2035 /*! Gets the number of the first time stamp which will be used for generation of the animation.
2037 double getMinRange();
2039 /*! Gets the number of the last time stamp which will be used for generation of the animation.
2041 double getMaxRange();
2043 /*! Returns True if the range of the animation has been defined
2044 * by the method <VAR>setAnimationRange</VAR>. Otherwise
2045 * the animation will be generated on the basis of all time stamps contained in the field.
2047 boolean isRangeDefined();
2049 /*! Sets the sequence of the animation. The sequence is defined on the basis of
2050 * the time stamps of the field which have been used for generation of the animation.
2051 * This method allows to set the sequence of generated frames.
2052 * If this method is not used, the animation will be generated
2053 * on the basis of all time stamps contained in the field.
2054 * Format of the sequence: '1,9,2-5,7-8'
2055 * \param theSequence The sequence of time stamps indices which will be used for generation of the animation.
2057 void setAnimationSequence(in string theSequence);
2059 /*! Gets the animation sequence.
2061 string getAnimationSequence();
2063 /*! Returns True if the sequence of the animation has been defined
2064 * by the method <VAR>setAnimationSequence</VAR>. Otherwise
2065 * the animation will be generated on the basis of all time stamps contained in the field.
2067 boolean isSequenceDefined();
2069 /*! Saves all the frames composing the animation into a definite directory.
2070 * Pictures format is set with method <VAR>setDumpFormat()</VAR>.
2071 * \param thePath The directory where all the frames will be saved.
2073 void dumpTo(in string thePath);
2075 /*! Set format for saving all the frames composing the animation.
2076 * \param theFormat The format for saving pictures.
2077 * For available formats see QImageIO documentation (Qt).
2078 * If specified format is not available, default format will be used.
2079 * Default format is JPEG or first of supported, if JPEG is not available.
2080 * \return Really set format. Differ from \a theFormat if \a theFormat is not available.
2082 string setDumpFormat(in string theFormat);
2084 /*! Set frequency of timestamps used to generate AVI file.
2085 * \param theFrequency The frequency of timestamps to use.
2087 void setTimeStampFrequency(in long theFrequency);
2089 /*! Get frequency of timestamps used to generate AVI file.
2090 * \return The frequency of timestamps to use.
2092 long getTimeStampFrequency();
2094 /*! Returns True, if the playback of the animation is cycling.
2096 boolean isCycling();
2098 /*! Gets the first time stamp of the field defined at the input of the animation.
2099 * \note This method is used if animation range is <b>NOT</b> defined.
2101 double getMinTime();
2103 /*! Gets the last time stamp of the field defined at the input of the animation.
2104 * \note This method is used if animation range is <b>NOT</b> defined.
2106 double getMaxTime();
2108 /*! Sets proprtional playback of the animation. This option allows to render your animation
2109 * with proportional periods of time between every frame (not depending on the time stamps).
2110 * \param theProp If this boolean parameter is True, playback
2111 * of your animation will be set as proportional.
2113 void setProportional(in boolean theProp);
2115 /*! Sets cycling playback of the animation. The number of cycles
2116 * can be infinite, untill you use <VAR>startAnimation</VAR> method.
2117 * \param theCycle If this boolean parameter is True, playback
2118 * of your animation will be set as cycling.
2120 void setCycling(in boolean theCycle);
2122 boolean isCleaningMemoryAtEachFrame();
2123 void setCleaningMemoryAtEachFrame(in boolean theCycle);
2125 SALOMEDS::SObject publishInStudy();
2127 void saveAnimation();
2129 void restoreFromStudy(in SALOMEDS::SObject theSObj);
2131 boolean isSavedInStudy();
2134 * Sets the animation mode.
2135 * \param theMode The value of this parameter is taken from the <VAR>AnimationMode</VAR> enumeration.
2137 void setAnimationMode(in AnimationMode theMode);
2140 * Gets the animation mode.
2142 AnimationMode getAnimationMode();
2145 * Apply the presentation properties to all fields. The exception is raised in the following cases:
2146 * 1) presentations for the given field is not yet created;
2147 * 2) invalid dynamic cast of the given presentation to VISU::ColoredPrs3d_i;
2148 * 3) the MED file is not the same;
2149 * 4) the mesh name is not the same;
2150 * 5) the field name is not the same;
2151 * 6) the entity is not the same.
2153 void ApplyProperties(in long theFieldNum, in ColoredPrs3d thePrs)
2154 raises (SALOME::SALOME_Exception);
2158 //-------------------------------------------------------
2161 //-------------------------------------------------------
2162 /*! \brief Interface %Evolution
2165 interface Evolution : Base
2168 * Defines the field which will be used as a base for generation of the evolution.
2169 * \param theObject The %SObject corresponding to the field.
2171 boolean setField(in SALOMEDS::SObject theObject);
2174 * Sets id of the point for which the evolution will be generated.
2175 * \param thePointId id of the point.
2177 void setPointId(in long thePointId);
2180 * Sets id of the component for which the evolution will be generated.
2181 * \param thePointId id of the component.
2183 void setComponentId(in long theComponentId);
2186 * Shows the evolution.
2188 boolean showEvolution();
2191 * Restores the evolution from study.
2192 * \param theSObj the study object from which the evolution should be restored.
2194 void restoreFromStudy(in SALOMEDS::SObject theSObj);
2198 /*! \brief Interface %Result
2200 * This interface serves for inner representation of data generated
2201 * in other sources (MED object or file). This data is needed
2202 * for further construction of graphical presentations.
2204 interface Result : RemovableObject, SALOME::GenericObj
2206 /*! Reads all data from the corresponding sources. By default the data is loaded on demand.
2210 /*! Start to parse the source MED file and publish all its entities into the study*/
2211 boolean Build(in boolean theIsBuildAll, in boolean theIsAtOnce);
2213 /*! Allow to check is all requested MED entites already loaded or not */
2216 /*! Allow to check is corresponding MED entites already loaded or not */
2217 boolean IsEntitiesDone();
2219 /*! Choose to parse MED fields and perform global min / max on the MED timestamps.*/
2220 void SetBuildFields(in boolean theIsBuildFields, in boolean theIsCalculateMinMax);
2222 /*! Allow to check is corresponding MED fields already loaded or not */
2223 boolean IsFieldsDone();
2225 /*! Choose to parse MED groups.*/
2226 void SetBuildGroups(in boolean theIsBuildGroups);
2228 /*! Allow to check is corresponding MED groups and families already loaded or not */
2229 boolean IsGroupsDone();
2231 /*! Allow to check is min / max calculation over field's components already perfrormed or not */
2232 boolean IsMinMaxDone();
2234 /*! Allow to check is corresponding multi resolution structure already loaded or not */
2235 boolean IsPartsDone();
2237 typedef sequence<Entity> Entities;
2239 typedef string EntityName;
2241 typedef sequence<EntityName> EntityNames;
2243 typedef long TimeStampNumber;
2245 typedef sequence<TimeStampNumber> TimeStampNumbers;
2254 typedef sequence<Resolution> Resolutions;
2256 /*! Gets existing mesh names */
2257 EntityNames GetMeshNames();
2259 /*! Gets existing mesh entites for the given mesh name */
2260 Entities GetEntities(in EntityName theMeshName);
2262 /*! Gets existing families for the given mesh name and entity */
2263 EntityNames GetFamilies(in EntityName theMeshName, in Entity theEntity);
2265 /*! Gets existing families for the given mesh name */
2266 EntityNames GetGroups(in EntityName theMeshName);
2268 /*! Gets existing fields for the given mesh name and entity */
2269 EntityNames GetFields(in EntityName theMeshName, in Entity theEntity);
2271 /*! Gets number of components for the given mesh name, entity and name of field */
2272 long GetNumberOfComponents(in EntityName theMeshName, in Entity theEntity, in EntityName theFieldName);
2274 /*! Gets existing numbers of time stamps for the given mesh name, entity and name of field */
2275 TimeStampNumbers GetTimeStampNumbers(in EntityName theMeshName, in Entity theEntity,
2276 in EntityName theFieldName);
2278 /*! Gets time values of time stamps for the given mesh name, entity and name of field */
2279 double_array GetTimeStampValues(in EntityName theMeshName, in Entity theEntity, in EntityName theFieldName);
2281 /*! Gets existing parts of multi resolution structure for the given mesh name */
2282 EntityNames GetPartNames(in EntityName theMeshName);
2284 /*! Gets available resolutions of multi resolution structure for the given mesh and part names */
2285 Resolutions GetResolutions(in EntityName theMeshName, in EntityName thePartName);
2287 /*! Gets current resolution of multi resolution structure for the given mesh and part names */
2288 Resolution GetResolution(in EntityName theMeshName, in EntityName thePartName);
2290 /*! Gets current resolution of multi resolution structure for the given mesh and part names */
2291 void SetResolution(in EntityName theMeshName, in EntityName thePartName, in Resolution theResolution);
2293 /*! Gets information about imported MED file */
2294 SALOME_MED::MedFileInfo GetMEDFileInfo();
2296 /*! Export MED file from temp object. */
2297 boolean ExportMED(in string theFileName);
2300 //-------------------------------------------------------
2301 interface ViewManager;
2303 /*! \brief %VISU_Gen interface
2305 * This is the main interface of %VISU component. It is necessary for creation of
2306 * post-processing presentations from given %Result and %Table object reference,
2307 * using the views provided by %ViewManager.
2309 interface VISU_Gen : Engines::EngineComponent, SALOMEDS::Driver, Base
2311 /*! Sets a definite study to be current.
2313 void SetCurrentStudy(in SALOMEDS::Study theStudy);
2315 /*! Gets the current study.
2317 SALOMEDS::Study GetCurrentStudy();
2320 * Gets the %View Manager which is used for creation of
2321 * post-processing presentations.
2323 ViewManager GetViewManager();
2326 * Imports tables from a file and create TableAttribute in Study
2328 SALOMEDS::SObject ImportTables(in string theFileName,
2329 in boolean theFirstStrAsTitle);
2332 * Export table to a file
2334 boolean ExportTableToFile(in SALOMEDS::SObject theTable, in string theFileName);
2337 * Imports data from a file. The access to this file will be conserved outside of the application.
2338 * \param theFileName String parameter defining the name of the file
2339 * from which the data will be imported.
2341 Result ImportFile(in string theFileName);
2344 * Create result and initialize its with the file. The access to this file will be conserved outside of the application.
2345 * \param theFileName String parameter defining the name of the file
2346 * from which the data will be imported.
2348 Result CreateResult(in string theFileName);
2351 * Imports data from a file. The access to this file will closed.
2352 * \param theFileName String parameter defining the name of the file
2353 * from which the data will be imported.
2355 Result CopyAndImportFile(in string theFileName);
2358 * Imports data from a %MED object.
2360 Result ImportMed(in SALOMEDS::SObject theMedSObject);
2363 * Imports data from a %MED field.
2365 Result ImportMedField(in SALOME_MED::FIELD theField);
2368 * Rename a study object, representing a mesh, specified by given values.
2369 * \param theResult Data generated in other sources (MED object or file).
2370 * \param theMeshName One of the meshes presented in MED file.
2371 * \param theEntity Type of entity where the field is defined.
2372 * \param theSubMeshName Name of sub-mesh (group or family).
2373 * \param theNewName Name to be given to the study object.
2375 void RenameEntityInStudy(in Result theResult,
2376 in string theMeshName,
2377 in Entity theEntity,
2378 in string theNewName);
2379 void RenameFamilyInStudy(in Result theResult,
2380 in string theMeshName,
2381 in Entity theEntity,
2382 in string theSubMeshName,
2383 in string theNewName);
2384 void RenameGroupInStudy(in Result theResult,
2385 in string theMeshName,
2386 in string theSubMeshName,
2387 in string theNewName);
2390 * Creates a mesh on the basis of the data generated in other sources (MED object or file).
2391 * \param theResult Data generated in other sources. (MED object or file)
2392 * \param theMeshName One of the meshes presented in MED file
2393 * \param theEntity Type of entity where the field is defined
2395 Mesh MeshOnEntity(in Result theResult, in string theMeshName, in Entity theEntity);
2398 * Creates on the basis of a family a mesh which will be composed of geometrical
2399 * elements, corresponding to the type of cells (node, edge, face or cell) of this family.
2400 * \param theResult Data generated in other sources. (MED object or file)
2401 * \param theMeshName One of the meshes presented in MED file
2402 * \param theEntity Type of entity where the field is defined.
2404 Mesh FamilyMeshOnEntity(in Result theResult, in string theMeshName,
2405 in Entity theEntity, in string theFamilyName);
2408 * Creates a mesh on the basis of a group of families.
2409 * \param theResult Data generated in other sources. (MED object or file)
2410 * \param theMeshName One of the meshes presented in MED file
2411 * \param theGroupName Name of the group.
2413 Mesh GroupMesh(in Result theResult, in string theMeshName, in string theGroupName);
2416 * Creates a scalar map presentation.
2417 * \param theResult Data generated in other sources. (MED object or file)
2418 * \param theMeshName One of the meshes presented in MED file
2419 * \param theEntity Type of entity where the field is defined
2420 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2421 * \param theTimeStampNumber Number of iteration on the field
2423 ScalarMap ScalarMapOnField(in Result theResult, in string theMeshName,
2424 in Entity theEntity, in string theFieldName,
2425 in long theTimeStampNumber);
2428 * Creates a Gauss Points presentation.
2429 * \param theResult Data generated in other sources. (MED object or file)
2430 * \param theMeshName One of the meshes presented in MED file
2431 * \param theEntity Type of entity where the field is defined
2432 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2433 * \param theTimeStampNumber Number of iteration on the field
2435 GaussPoints GaussPointsOnField(in Result theResult, in string theMeshName,
2436 in Entity theEntity, in string theFieldName,
2437 in long theTimeStampNumber);
2440 * Creates a deformed shape presentation.
2441 * \param theResult Data generated in other sources. (MED object or file)
2442 * \param theMeshName One of the meshes presented in MED file
2443 * \param theEntity Type of entity where the field is defined
2444 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2445 * \param theTimeStampNumber Number of iteration on the field
2447 DeformedShape DeformedShapeOnField(in Result theResult, in string theMeshName,
2448 in Entity theEntity, in string theFieldName,
2449 in long theTimeStampNumber);
2452 * Creates a deformed shape presentation. This function is obsolete. Use DeformedShapeAndScalarMapOnField instead.
2453 * \param theResult Data generated in other sources. (MED object or file)
2454 * \param theMeshName One of the meshes presented in MED file
2455 * \param theEntity Type of entity where the field is defined
2456 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2457 * \param theTimeStampNumber Number of iteration on the field
2459 DeformedShapeAndScalarMap ScalarMapOnDeformedShapeOnField(in Result theResult, in string theMeshName,
2460 in Entity theEntity, in string theFieldName,
2461 in long theTimeStampNumber);
2464 * Creates a deformed shape presentation.
2465 * \param theResult Data generated in other sources. (MED object or file)
2466 * \param theMeshName One of the meshes presented in MED file
2467 * \param theEntity Type of entity where the field is defined
2468 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2469 * \param theTimeStampNumber Number of iteration on the field
2471 DeformedShapeAndScalarMap DeformedShapeAndScalarMapOnField(in Result theResult, in string theMeshName,
2472 in Entity theEntity, in string theFieldName,
2473 in long theTimeStampNumber);
2476 * Creates a vector presentation.
2477 * \param theResult Data generated in other sources. (MED object or file)
2478 * \param theMeshName One of the meshes presented in MED file
2479 * \param theEntity Type of entity where the field is defined
2480 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2481 * \param theTimeStampNumber Number of iteration on the field
2483 Vectors VectorsOnField(in Result theResult, in string theMeshName,
2484 in Entity theEntity, in string theFieldName,
2485 in long theTimeStampNumber);
2488 * Creates an iso surface presentation.
2489 * \param theResult Data generated in other sources. (MED object or file)
2490 * \param theMeshName One of the meshes presented in MED file
2491 * \param theEntity Type of entity where the field is defined
2492 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2493 * \param theTimeStampNumber Number of iteration on the field
2495 IsoSurfaces IsoSurfacesOnField(in Result theResult, in string theMeshName,
2496 in Entity theEntity, in string theFieldName,
2497 in long theTimeStampNumber);
2500 * Creates an stream lines presentation.
2501 * \param theResult Data generated in other sources. (MED object or file)
2502 * \param theMeshName One of the meshes presented in MED file
2503 * \param theEntity Type of entity where the field is defined
2504 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2505 * \param theTimeStampNumber Number of iteration on the field
2507 StreamLines StreamLinesOnField(in Result theResult, in string theMeshName,
2508 in Entity theEntity, in string theFieldName,
2509 in long theTimeStampNumber);
2512 * Creates a presentation of cut planes.
2513 * \param theResult Data generated in other sources. (MED object or file)
2514 * \param theMeshName One of the meshes presented in MED file
2515 * \param theEntity Type of entity where the field is defined
2516 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2517 * \param theTimeStampNumber Number of iteration on the field
2519 CutPlanes CutPlanesOnField(in Result theResult, in string theMeshName,
2520 in Entity theEntity, in string theFieldName,
2521 in long theTimeStampNumber);
2524 * Creates a presentation of cut lines.
2525 * \param theResult Data generated in other sources. (MED object or file)
2526 * \param theMeshName One of the meshes presented in MED file
2527 * \param theEntity Type of entity where the field is defined
2528 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2529 * \param theTimeStampNumber Number of iteration on the field
2531 CutLines CutLinesOnField(in Result theResult, in string theMeshName,
2532 in Entity theEntity, in string theFieldName,
2533 in long theTimeStampNumber);
2536 * Creates a presentation of cut segment.
2537 * \param theResult Data generated in other sources. (MED object or file)
2538 * \param theMeshName One of the meshes presented in MED file
2539 * \param theEntity Type of entity where the field is defined
2540 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2541 * \param theTimeStampNumber Number of iteration on the field
2543 CutSegment CutSegmentOnField(in Result theResult, in string theMeshName,
2544 in Entity theEntity, in string theFieldName,
2545 in long theTimeStampNumber);
2548 * Creates a Plot3D presentation.
2549 * \param theResult Data generated in other sources. (MED object or file)
2550 * \param theMeshName One of the meshes presented in MED file
2551 * \param theEntity Type of entity where the field is defined
2552 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2553 * \param theTimeStampNumber Number of iteration on the field
2555 Plot3D Plot3DOnField(in Result theResult, in string theMeshName,
2556 in Entity theEntity, in string theFieldName,
2557 in long theTimeStampNumber);
2560 * Creates a table presentation.
2561 * \param theTableEntry The entry of the table which will be displayed.
2563 Table CreateTable(in string theTableEntry);
2566 * Creates a curve on the basis of points, whose values are taken from the table.
2567 * \param theTable Table containing the data for construction of curves.
2568 * \param theHRow Index of the row in the table: abscissa of the point.
2569 * \param theVRow Index of the row in the table: ordinate of the point.
2571 Curve CreateCurve(in Table theTable, in long theHRow, in long theVRow);
2574 * Creates a curve on the basis of points, whose values are taken from the table.
2575 * Each point has also assigned value, that will be shown as tooltip in Plot2d
2576 * \param theTable Table containing the data for construction of curves.
2577 * \param theHRow Index of the row in the table: abscissa of the point.
2578 * \param theVRow Index of the row in the table: ordinate of the point.
2579 * \param theZRow Index of the row in the table: assigned value (so-called as Z).
2581 Curve CreateCurveWithZ( in Table theTable, in long theHRow, in long theVRow, in long theZRow );
2584 * Creates a curve on the basis of points, whose values are taken from the table.
2585 * Each point has also assigned value, that will be shown as tooltip in Plot2d.
2586 * The curve can be displayed using right axis of Plot2d view.
2587 * \param theTable Table containing the data for construction of curves.
2588 * \param theHRow Index of the row in the table: abscissa of the point.
2589 * \param theVRow Index of the row in the table: ordinate of the point.
2590 * \param theZRow Index of the row in the table: assigned value (so-called as Z).
2591 * \param theIsV2 Flag allowed to display the curve using right axis of Plot2d view.
2593 Curve CreateCurveWithZExt( in Table theTable, in long theHRow, in long theVRow, in long theZRow,
2594 in boolean theIsV2 );
2597 * Creates a presentation form containing an array of references to the curves.
2599 Container CreateContainer();
2601 /*! Creates an animation in the 3D view.
2602 * \param theView3d The 3D view, where the animation will be rendered.
2604 Animation CreateAnimation(in View3D theView3d);
2606 /*! Creates an evolution in the XY plot.
2607 * \param theXYPlot The XY plot, where the evolution will be rendered.
2609 Evolution CreateEvolution(in XYPlot theXYPlot);
2611 void DeleteResult(in Result theResult);
2613 void DeletePrs3d(in Prs3d thePrs3d);
2616 * Get or create %ColoredPrs3dCache object.
2618 ColoredPrs3dCache GetColoredPrs3dCache(in SALOMEDS::Study theStudy);
2621 /* Clipping planes management */
2623 /*Create a clipping plane and return its ID (position in corresponded array)
2624 Id of clipping plane could be changed after deletion of other clipping plane
2626 long CreateClippingPlane(in double X, in double Y, in double Z,
2627 in double dX, in double dY, in double dZ,
2628 in boolean auto, in string name);
2630 void EditClippingPlane(in long id, in double X, in double Y, in double Z,
2631 in double dX, in double dY, in double dZ,
2632 in boolean auto, in string name);
2634 /* Returns clipping plane by its Id */
2635 ClippingPlane GetClippingPlane(in long id);
2637 /* Deletes clipping plane by its Id */
2638 boolean DeleteClippingPlane(in long id);
2640 /* Applyes a clipping plane with Id to presentation thePrs */
2641 boolean ApplyClippingPlane(in Prs3d thePrs, in long id);
2643 /* Detaches a clipping plane with Id from presentation thePrs */
2644 boolean DetachClippingPlane(in Prs3d thePrs, in long id);
2647 /* Get number of clipping planes */
2648 long GetClippingPlanesNb();
2650 /*! Converts set of VTK files to the one MED-file
2651 * \param theVTKFiles sequence of VTK files
2652 * \param out MED-file
2653 * \param theMeshName mesh name. This parameter can be empty. In this case name
2654 of mesh is equal vtk2med
2655 * \param theTSNames values of time stamps. This array can be empty, in
2656 this case values of time stamps will be generated automatically ( 0, 1, 2 ... )
2657 * \return TRUE if operation has been completed successfully, FALSE otherwise
2659 boolean VTK2MED( in string_array theVTKFiles,
2660 in string theMEDFile,
2661 in string theMeshName,
2662 in double_array theTStamps );
2665 * Load texture from file
2666 * \param theTextureFile texture file name
2667 * \return unique texture identifier
2669 long LoadTexture(in string theTextureFile);
2672 /*! \brief %View interface
2674 * Contains a set of methods used by the %View frame, which can be one of
2675 * the following types: 3d, Table, XY plot.
2676 * %View interface is a base for all types of %view interfaces.
2678 interface View: Base, SALOME::GenericObj
2680 /*! \brief %ViewRepresentation enumeration
2682 * displaying part ("ALL" isn't setable)
2684 enum ViewRepresentation {
2691 void ShowPart (in ViewRepresentation ViewRepr, in boolean state );
2693 boolean IsPartShown( in ViewRepresentation ViewRepr );
2696 * New methods for view parameters management.
2699 /*! \brief Split workarea of this view.
2701 * Horizontally split workarea of this view.
2702 * This view is moved in a new right area.
2706 /*! \brief Split workarea of this view.
2708 * Horizontally split workarea of this view.
2709 * This view stays in an old left area, others are moved in a new right area.
2713 /*! \brief Split workarea of this view.
2715 * Vertically split workarea of this view.
2716 * This view is moved in a new bottom area.
2720 /*! \brief Split workarea of this view.
2722 * Vertically split workarea of this view.
2723 * This view stays in an old top area, others are moved in a new bottom area.
2728 * Put this view window on top of its work area.
2733 * Put \a theView in workarea of this view right after it.
2734 * If \a theView was alone in its workarea, workarea of \a theView will be destroyed.
2735 * If \a theView was in the same workarea with this view, simple reordering will take place.
2736 * \param theView A view window to be attracted to this one.
2738 void Attract (in View theView);
2741 * Put all the view windows from workarea of \a theView in workarea of this view right after it.
2742 * Workarea of \a theView will be destroyed.
2743 * If \a theView was in the same workarea with this view, simple reordering will take place.
2744 * \param theView A view window to be attracted to this one together with all its workarea.
2746 void AttractAll (in View theView);
2749 * Set position of this view window relatively its splitter.
2750 * \param thePosition Desired position of this view window relatively
2751 * its splitter. Meaningfull values lays in range [0..1].
2753 * Direction of positioning is defined by the splitter orientation.
2755 void SetRelativePositionInSplitter (in double thePosition);
2758 * Set size of this view window relatively its splitter.
2759 * \param theSize Desired size of this view window relatively
2760 * its splitter. Meaningfull values lays in range [0..1].
2762 * Direction of resizing is defined by the splitter orientation.
2764 void SetRelativeSizeInSplitter (in double theSize);
2767 * Set horizontal position of this view window relatively its workstack.
2768 * \param thePosition Desired horizontal position of this view window
2769 * relatively its workstack. Meaningfull values lays in range [0..1].
2771 void SetRelativePositionX (in double thePosition);
2774 * Set vertical position of this view window relatively its workstack.
2775 * \param thePosition Desired vertical position of this view window
2776 * relatively its workstack. Meaningfull values lays in range [0..1].
2778 void SetRelativePositionY (in double thePosition);
2781 * Set horizontal size of this view window relatively its workstack.
2782 * \param theSize Desired horizontal size of this view window relatively
2783 * its workstack. Meaningfull values lays in range [0..1].
2785 void SetRelativeSizeX (in double theSize);
2788 * Set vertical size of this view window relatively its workstack.
2789 * \param theSize Desired vertical size of this view window relatively
2790 * its workstack. Meaningfull values lays in range [0..1].
2792 void SetRelativeSizeY (in double theSize);
2795 * Old methods for view parameters management, they don't work now
2797 void SetViewWidth (in long Width); //setting width of view
2798 void SetViewHeight (in long Height); //setting height of view
2799 long GetViewWidth(); //getting view width
2800 long GetViewHeight(); //getting view height
2801 enum ViewPosition {TOP, CENTER, BOTTOM, RIGHT, LEFT}; //position of the study frame
2802 void SetViewPositionHorizontal (in ViewPosition ViewPosHor); //setting of the horizontal view position
2803 void SetViewPositionVertical (in ViewPosition ViewPosVer); //setting of the vertical view position
2804 void SetRelativePosition( in double x, in double y );
2805 void SetRelativeSize( in double x, in double y );
2806 void Minimize(); // Minimizes to the task bar or to the bottom of the Desktop the %View frame.
2807 void Restore(); // Restores the %View frame.
2808 void Maximize(); // Maximizes the %View frame.
2811 * Sets the title of the %View frame.
2812 * \param theTitle String parameter defining the title of the %View frame.
2814 void SetTitle(in string theTitle);
2817 * Gets the title of the %View frame.
2822 * Sets background color of the %View frame.
2823 * \param theColor Background color defined in <VAR>SALOMEDS::Color</VAR> enumeration.
2825 void SetBackground(in SALOMEDS::Color theColor);
2828 * Gets background color of the %View frame.
2830 SALOMEDS::Color GetBackground();
2833 * Removes all presentations (presentable objects) from the %view.
2838 * Displays all presentations (presentable objects) in the %view.
2843 * Removes a definite presentation (presentable object) from the %view.
2844 * \param thePrsObj The presentation (presentable object) which should be deleted.
2846 void Erase(in PrsObject thePrsObj);
2849 * Displays a definite presentation (presentable object) in the %view.
2850 * \param thePrsObj The presentation (presentable object) which should be displayed.
2852 void Display(in PrsObject thePrsObj);
2855 * Allows to display only a definite presentation (presentable object) in the %view.
2856 * All other presentations are removed from the %view.
2857 * \param thePrsObj The presentation (presentable object) which should be displayed.
2859 void DisplayOnly(in PrsObject thePrsObj);
2868 * \param theFileName The name of the file where the view will be saved.
2869 * \return True, if the view have been saved successfully.
2871 boolean SavePicture(in string theFileName);
2874 //-------------------------------------------------------
2875 /*! \brief 3D view interface
2877 * This interface contains a set of methods necessary for representation of objects in 3D space.
2879 interface View3D : View {
2881 * This enumeration contains a set of elements determining a predefined point of view
2882 * (position of the camera in 3D space relative to the presentable object).
2884 enum ViewType{ FRONT, BACK, LEFT, RIGHT, TOP, BOTTOM};
2887 * This enumeration contains a set of elements determining the axis
2889 enum Axis{ XAxis, YAxis, ZAxis};
2892 * Data type defining coordinates in 3D space.
2894 typedef double XYZ[3];
2897 * Makes all presentations, which are currently present in the %view, completely visible.
2902 * Sets a predefined point of view (FRONT, BACK, LEFT, RIGHT, TOP, BOTTOM). (In other words it means
2903 * a predefined position of the camera in 3D space with respect to the object which is represented.)
2905 void SetView(in ViewType theType);
2908 * Sets the position of the camera in 3D space.
2909 * This point is used as the first point of the vector
2910 * defining the view direction of the camera.
2912 void SetPointOfView(in XYZ theCoord);
2915 * Gets the position of the camera in 3D space.
2916 * This point is used as the first point of the vector
2917 * defining the view direction of the camera.
2919 XYZ GetPointOfView();
2922 * Sets the vertical line of the camera in 3D space.
2924 void SetViewUp(in XYZ theDir);
2927 * Gets the vertical line of the camera in 3D space.
2932 * Sets the point of sight of the camera. This point is used as the
2933 * second point of the vector defining the view direction of the camera.
2935 void SetFocalPoint(in XYZ theDir);
2938 * Gets the point of sight of the camera. This point is used as the
2939 * second point of the vector defining the view direction of the camera.
2941 XYZ GetFocalPoint();
2944 * Zooming of the presentable object. Sets the scale.
2946 void SetParallelScale(in double theScale);
2949 * Zooming of the presentable object. Gets the scale.
2951 double GetParallelScale();
2954 * Scaling of the view along a definite axis.
2955 * \param theAxis The axis of the scaling
2956 * \param theParam The coefficient of the scaling
2958 void ScaleView(in Axis theAxis, in double theParam);
2961 * Removes the scaling of the view.
2966 * Saves view parameters.
2967 * \return True if the view parameters have been created, False if the parameters have been modified.
2968 * \param theName The name under which the view parameters will be saved.
2970 boolean SaveViewParams(in string theName);
2972 /*! Restores view parameters.
2973 * \return True if the view parameters have been found and applied to the view,
2974 * False if the parameters with this name don't exist.
2975 * \param theName The name of the view parameters which will be restored.
2977 boolean RestoreViewParams(in string theName);
2980 /*! Get representation type of the given presentation in this view.
2981 * \param thePrs Object to get a representation type of.
2982 * \return <VAR>PresentationType</VAR> Representation type of object in this view.
2984 PresentationType GetPresentationType(in ScalarMap thePrs);
2986 /*! Set representation type of the given presentation in this view.
2987 * \param thePrs Object to set a representation type of.
2988 * \param thePrsType Representation type to be set to the given object.
2989 * \return Empty string in case of success, error description in case of failure.
2991 string SetPresentationType(in ScalarMap thePrs, in PresentationType thePrsType);
2994 /*! Set representation type of 2D quadratic elements
2995 * of the given presentation in this view.
2996 * \param thePrs Object to set a representation type of 2D quadratic elements.
2997 * \param theType Representation type of 2D quadratic elements to be set to the given object.
2998 * \return Empty string in case of success, error description in case of failure.
3000 string SetQuadratic2DPresentationType(in ScalarMap thePrs,in Quadratic2DPresentationType theType);
3003 /*! Get representation type of the 2D quadratic mesh elements of given presentation in this view.
3004 * \param thePrs Object to get a representation type of 2D quadratic mesh elements.
3005 * \return <VAR>Quadratic2DPresentationType</VAR> Representation type of 2D quadratic mesh elements
3008 Quadratic2DPresentationType GetQuadratic2DPresentationType(in ScalarMap thePrs);
3011 /*! Get shrink state of the given presentation in this view.
3012 * \param thePrs Object to get a shrink state of.
3013 * \return TRUE if \a thePrs is shrinked in this view, FALSE overwise.
3015 boolean IsShrinked(in ScalarMap thePrs);
3017 /*! Make the given presentation shrinked or not shrinked in this view.
3018 * \param thePrs Object to change a shrink state of.
3019 * \param isShrinked Pass TRUE to make \a thePrs shrinked, FALSE overwise.
3020 * \return Empty string in case of success, error description in case of failure.
3022 string SetShrinked(in ScalarMap thePrs, in boolean isShrinked);
3024 /*! Get shading state of the given presentation in this view.
3025 * \param thePrs Object to get a shading state of.
3026 * \return TRUE if \a thePrs is shaded in this view, FALSE overwise.
3028 boolean IsShaded(in ScalarMap thePrs);
3030 /*! Make the given presentation shaded or not shaded in this view.
3031 * \param thePrs Object to set a shading state of.
3032 * \param isShaded Pass TRUE to make \a thePrs shaded, FALSE overwise.
3033 * \return Empty string in case of success, error description in case of failure.
3035 string SetShaded(in ScalarMap thePrs, in boolean isShaded);
3037 /*! Get opacity of the given presentation in this view.
3038 * \param thePrs Object to get an opacity of.
3039 * \return Opacity value in range [0, 1], 0 - transparent, 1 - opaque.
3041 double GetOpacity(in ScalarMap thePrs);
3043 /*! Set opacity of the given presentation in this view.
3044 * \param thePrs Object to set an opacity of.
3045 * \param theOpacity Opacity value [0, 1]. 0 - transparent, 1 - opaque.
3046 * \return Empty string in case of success, error description in case of failure.
3048 string SetOpacity(in ScalarMap thePrs, in double theOpacity);
3050 /*! Get line width of the given presentation in this view.
3051 * \param thePrs Object to get a line width of.
3052 * \return Line width of \a thePrs in this view.
3054 double GetLineWidth(in ScalarMap thePrs);
3056 /*! Set line width of the given presentation in this view.
3057 * \param thePrs Object to set a line width of.
3058 * \param theLineWidth Line width value. Recommended values are in range [1, 10].
3059 * \return Empty string in case of success, error description in case of failure.
3061 string SetLineWidth(in ScalarMap thePrs, in double theLineWidth);
3064 //-------------------------------------------------------
3065 /*! \brief Interface of the Table view
3067 * This interface is used for creation of a view necessary for presentation of a table.
3069 interface TableView : View {
3072 //-------------------------------------------------------
3073 /*! \brief Interface of the 2D plot view
3075 * This interface is used for creation of a view necessary for presentation
3076 * of a XY plot generated on the basis of one or several curve lines.
3078 interface XYPlot : View {
3079 /*! Sets the title of the XY plot
3080 * \param theTitle The title of the XY plot
3082 void SetSubTitle(in string theTitle);
3084 /*! Gets the title of the XY plot
3086 string GetSubTitle();
3089 * This enumeration contains a set of elements determining the type
3090 * of the curve lines, which will be displayed in your XY plot.
3092 enum CurveType { POINTS, MULTYLINE, SPLINE};
3094 /*! Sets the type of the curve lines.
3095 * \param theType The type of the curve lines taken from <VAR>CurveType</VAR> enumeration.
3097 void SetCurveType(in CurveType theType);
3099 /*! Gets the type of the curve lines.
3101 CurveType GetCurveType();
3103 /*! Sets the size of the markers (data points) with help of
3104 * which the curve is constructed on the graphics.
3105 * \param theSize Long value defining the size of the markers.
3107 void SetMarkerSize(in long theSize);
3109 /*! Gets the size of the markers (data points) with help of
3110 * which the curve is constructed on the graphics.
3112 long GetMarkerSize();
3114 /*! Enable/disables X-axis grid of the 2D plot.
3116 void EnableXGrid(in boolean theMajor, in long theNumMajor, in boolean theMinor, in long theNumMinor);
3118 /*! Enable/disables Y-axis grid of the 2D plot.
3120 void EnableYGrid(in boolean theMajor, in long theNumMajor, in boolean theMinor, in long theNumMinor);
3122 /*! Sets horizontal scaling of the 2D plot.
3123 * \param theScaling Type of scaling taken from <VAR>Scaling</VAR> enumeration.
3125 void SetHorScaling(in Scaling theScaling);
3127 /*! Gets the type horizontal scaling of the 2D plot.
3129 Scaling GetHorScaling();
3131 /*! Sets vertical scaling of the 2D plot.
3132 * \param theScaling Type of scaling taken from <VAR>Scaling</VAR> enumeration.
3134 void SetVerScaling(in Scaling theScaling);
3136 /*! Gets the type vertical scaling of the 2D plot.
3138 Scaling GetVerScaling();
3140 /*! Sets the title of the X-axis of the plot.
3141 * \param theTitle String value defining the title of the X-axis of the plot.
3143 void SetXTitle(in string theTitle);
3145 /*! Gets the title of the X-axis of the plot.
3149 /*! Sets the title of the Y-axis of the plot.
3150 * \param theTitle String value defining the title of the X-axis of the plot.
3152 void SetYTitle(in string theTitle);
3154 /*! Gets the title of the Y-axis of the plot.
3158 /*! Shows/hides the legend (description) of the 2D plot.
3160 void ShowLegend(in boolean theShowing);
3162 /*! Shrinks and enlarges the 2D plot to fit the 2D viewer.
3166 /*! Set range of the 2D plot to X axis of the 2D viewer.
3168 void FitXRange(in double xMin, in double xMax);
3170 /*! Set range of the 2D plot to Y axis of the 2D viewer.
3172 void FitYRange(in double yMin, in double yMax);
3174 /*! Set range of the 2D plot to XY axis of the 2D viewer.
3176 void FitRange(in double xMin, in double xMax,
3177 in double yMin, in double yMax);
3179 void GetFitRanges(out double xMin,out double xMax,
3180 out double yMin,out double yMax);
3183 //-------------------------------------------------------
3184 /*! \brief Interface of the %ViewManager
3186 * The ViewManager is necessary for work with view windows (creation and deletion).
3188 interface ViewManager: Base {
3189 /*! \brief Getting an active %View Frame
3191 * Returns an object reference to the active %View Frame.
3192 * Type of the %View must be checked.
3193 * \note <BR>Returns nil if there are no views currently opened.
3195 View GetCurrentView();
3197 /*! \brief Creation of a 3d %View.
3199 * Returns an object reference to the newly created 3D %View.
3201 View3D Create3DView();
3203 /*! \brief Creation of a Table %View.
3205 * Returns an object reference to the newly created Table %View.
3207 TableView CreateTableView(in Table theTable);
3209 /*! \brief Creation of a 2D plot %View.
3211 * Returns an object reference to the newly created 2D plot %View.
3213 XYPlot CreateXYPlot();
3215 /*! Deletes a definite view.
3216 * \param theView The view which should be deleted.
3218 void Destroy(in View theView);