1 // Copyright (C) 2007-2010 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
23 // File : VISU_Gen.idl
24 // Author : Alexey Petrov
26 /*! \file VISU_Gen.idl This file conatins a set of interfaces of the %VISU module.
27 * This module provides various forms of data visualization in %SALOME application.
28 * These forms include data tables, XY plots, 3d representations
29 * and combination of these forms.
35 #include "SALOME_Exception.idl"
36 #include "SALOME_GenericObj.idl"
37 #include "SALOME_Component.idl"
38 #include "SALOMEDS.idl"
39 #include "SALOMEDS_Attributes.idl"
43 The main package of interfaces of the post-processing module %VISU.
46 //-------------------------------------------------------
47 typedef string IdType;
49 typedef sequence<string> string_array;
50 typedef sequence<double> double_array;
53 * This enumeration contains a set of elements defining the type
54 * of the scaling, which can be applied on different presentations.
56 enum Scaling{ LINEAR, /*!< Linear type of scaling. */
57 LOGARITHMIC /*!< Logarithmic type of scaling. */
61 * This enumeration contains a set of elements defining
62 * what kind of value will be extracted from gauss points data.
65 AVERAGE, /*!< Average value (default). */
66 MINIMUM, /*!< Minimum value. */
67 MAXIMUM /*!< Maximum value. */
71 * This enumeration contains a set of elements defining the
72 * type of the %entity (topological units) constituting a mesh.
75 NODE, /*!< Node corresponds to a geometrical point. */
76 EDGE, /*!< Edge corresponds to a geometrical line connecting two points. */
77 FACE, /*!< Face corresponds to a geometrical plane bounded by several lines. */
78 CELL, /*!< Cell is a volumic element of a mesh */
79 NONE /*!< Indicates undefined entity value */
83 * Marker type (used for point rendering)
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.
318 //-------------------------------------------------------
319 /*! \brief %Container presentable object interface
321 * This class is provided in order to create one presentation using several presentable objects.
322 * This can provide a combination of a set of curves to display them in XY plot view.
324 interface Container : PrsObject {
326 * Adds a curve into the container.
327 * \param theCurve The added curve.
329 void AddCurve(in Curve theCurve);
332 * Removes a curve from the container.
333 * \param theCurve The removed curve.
335 void RemoveCurve(in Curve theCurve);
338 * Gets the number of curves which are stored in the container.
339 * \return A long value corresponding to the number of curves which are stored in the container.
344 * Removes all curves from the container.
349 //-------------------------------------------------------
351 /*! \brief 3D presentation interface
353 * This is a root class for all 3D presentations, which can be displayed in %VISU module.
355 interface Prs3d : PrsObject, SALOME::GenericObj
358 * Move the 3D presentation according to the given offset parameters
360 void SetOffset(in float theDx, in float theDy, in float theDz);
363 * Gets offset parameters for the 3D presentation
365 void GetOffset(out float theDx, out float theDy, out float theDz);
368 * Set standard point marker for the object
369 * \param theType standard marker type
370 * \param theScale standard marker scale
372 void SetMarkerStd(in MarkerType theType, in MarkerScale theScale);
375 * Set custom point marker for the object. The texture can be added
376 * by LoadTexture() function
377 * \param theTextureId texture ID
379 void SetMarkerTexture(in long theTextureId);
382 * Get type of the point marker assigned to the object
383 * \return current marker type (MT_NONE if no marker is set)
385 MarkerType GetMarkerType();
388 * Get scale of the point marker assigned to the object
389 * \return current marker scale (MS_NONE if no marker is set)
391 MarkerScale GetMarkerScale();
394 * Get texture idenifier of the point marker assigned to the object
395 * \return marker texture ID (0 if no marker set)
397 long GetMarkerTexture();
400 * Gets memory size actually used by the presentation (Mb).
402 float GetMemorySize();
406 * This enumeration contains a set of elements defining the
407 * type of presentation of the mesh.
409 enum PresentationType{ POINT,
419 * This enumeration contains a set of elements defining the
420 * type of presentation of the 2D quadratic mesh elements.
422 enum Quadratic2DPresentationType{
427 /*! \brief Interface of the mesh.
429 * Manages presentation parameters of a 3D presentation of a mesh.
430 * This object can be used for presentation of set of curves using Container class.
432 interface Mesh : Prs3d {
434 * Sets the color of mesh cells.
435 * \param theColor The color of the cells. This parameter is taken from <VAR>Color</VAR> enumeration.
437 void SetCellColor(in SALOMEDS::Color theColor);
440 * Gets the color of mesh cells.
442 SALOMEDS::Color GetCellColor();
445 * Sets the color of mesh nodes.
446 * \param theColor The color of the nodes. This parameter is taken from <VAR>Color</VAR> enumeration.
448 void SetNodeColor(in SALOMEDS::Color theColor);
451 * Gets the color of mesh nodes.
453 SALOMEDS::Color GetNodeColor();
456 * Sets the color of mesh links.
457 * \param theColor The color of the links. This parameter is taken from <VAR>Color</VAR> enumeration.
459 void SetLinkColor(in SALOMEDS::Color theColor);
462 * Gets the color of mesh links.
464 SALOMEDS::Color GetLinkColor();
467 * Sets the type of representation of a mesh.
468 * \param theType The of representation of a mesh. This parameter is
469 * taken from <VAR>PresentationType</VAR> enumeration.
471 void SetPresentationType(in PresentationType theType);
474 * Gets the type of representation of the mesh.
475 * \return The type of representation of the mesh.
477 PresentationType GetPresentationType();
481 * Sets the type of representation of a 2D quadratic mesh elements.
482 * \param theType The type of representation of 2D quadratic mesh elements.
483 * This parameter is taken from
484 * <VAR>Quadratic2DPresentationType</VAR> enumeration.
486 void SetQuadratic2DPresentationType(in Quadratic2DPresentationType theType);
489 * Gets the type of representation of the 2D quadratic mesh elements.
490 * \return The type of representation of the 2D quadratic mesh elements.
492 Quadratic2DPresentationType GetQuadratic2DPresentationType();
495 * Switches shrink mode of presentation
496 * Note: SetPresentationType(SHRINK) is same as SetShrink(True)
498 void SetShrink(in boolean toShrink);
501 * Returns current state of shrink mode
507 //-------------------------------------------------------
508 /*! \brief Basic Interface for the %Colored 3D Presentations
510 * This interface is responsable for coloring of 3D field presentations
511 * according the scalar values applied to different cells.
512 * As well it contains presentation parameters of the scalar bar. The scalar
513 * bar is displayed along with each colored field presentation and serves for
514 * consulting the correspondance between colors and data values.
516 interface ColoredPrs3dBase : Prs3d
519 * Sets scalar range - min and max boundaries of the scalar bar.
520 * \param theMin Min boundary of the scalar bar.
521 * \param theMax Max boundary of the scalar bar.
523 void SetRange(in double theMin, in double theMax);
526 * Gets the min boundary of the scalar bar.
531 * Gets the max boundary of the scalar bar.
536 * Sets scalar range that corresponds to the source data.
538 void SetSourceRange();
541 * Gets the min boundary of the scalar bar from source data.
543 double GetSourceMin();
546 * Gets the max boundary of the scalar bar from source data.
548 double GetSourceMax();
551 * Defines whether the scalar range corresponds to the source data or not.
553 boolean IsRangeFixed();
555 /*! \brief Position of the scalar bar.
557 * Sets the position of the scalar bar origin on the screen.
558 * \param X Horizontal position. The value can be between 0 and 1.
559 * \param Y Vertical position. The value can be between 0 and 1.
561 void SetPosition(in double X, in double Y);
564 * Gets horizontal position of the scalar bar origin.
569 * Gets vertical position of the scalar bar origin.
573 /*! \brief Size of this presentable object.
575 * Sets the size of the scalar bar.
576 * \param theWidth Width of this presentable object. The value can be between 0 and 1.
577 * \param theHeight Height of this presentable object. The value can be between 0 and 1.
579 void SetSize(in double theWidth, in double theHeight);
582 * Gets the width of this presentable object.
583 * \return A double value corresponding to the width of this presentable object.
588 * Gets the height of this presentable object.
589 * \return A double value corresponding to the height of this presentable object.
594 * Sets the number of colors which will be used for presentation of this presentable object.
595 * \param theNbColors A long value defining the number of colors.
597 void SetNbColors(in long theNbColors);
600 * Gets the number of colors which will be used for visualization of this presentable object.
601 * \return A long value corresponding to the number of colors which
602 * will be used for visualization of this presentable object.
606 * Sets the number of labels which will be used for indication of color gradation
608 * \param theNbLabels A long value defining the number of labels.
610 void SetLabels(in long theNbLabels);
613 * Gets the number of labels which will be used for indication of color gradation of the scalar bar.
614 * \return A long value corresponding to the number of labels which will
615 * be used for indication of color gradation of the scalar bar.
619 /*! %Orientation of the scalar bar (to provide backward compatibility). */
621 HORIZONTAL, /*!< Horizontal orientation of the scalar bar.*/
622 VERTICAL /*!< Vertical orientation of the scalar bar.*/
626 * Sets the type of orientation of the scalar bar (to provide backward compatibility).
627 * \param theOrientation This parameter defines the orientation of the scalar bar.
628 * It is taken from the <VAR>Orientaton</VAR> enumeration.
630 void SetBarOrientation(in Orientation theOrientation);
633 * Gets the type of orientation of the scalar bar (to provide backward compatibility).
635 Orientation GetBarOrientation();
638 /*! \brief Additional Interface for the %Colored 3D Presentations
642 interface ColoredPrs3d : ColoredPrs3dBase
645 * Sets the title of the scalar bar. By default - the name of the selected result is used.
646 * \param theName String parameter defining the name of the scalar bar.
648 void SetTitle(in string theName);
651 * Gets the title of the scalar bar.
655 /*! Sets the method of coloring of the elements composing a 3D presentation.
657 void SetScalarMode(in long theScalarMode);
659 /*! Gets the method of coloring of the elements composing a 3D presentation.
661 long GetScalarMode();
664 * Set the visibility of a distribution curve.
665 * \param theIs is used to switch on/off the visibility of a distribution curve.
667 void SetIsDistributionVisible(in boolean theIs);
669 //! Gets current visibility of a distribution curve
670 boolean GetIsDistributionVisible();
672 //! Gets current filtering by scalars mode
673 boolean IsScalarFilterUsed();
675 void UseScalarFiltering( in boolean theUseScalarFilter );
678 * Sets scalar range - min and max boundaries of the scalar bar.
679 * \param theMin Min boundary of the scalar bar.
680 * \param theMax Max boundary of the scalar bar.
681 * \param theIsFilter if true then filter by scalars.
683 void SetScalarFilterRange( in double theMin, in double theMax );
685 double GetScalarFilterMin();
687 double GetScalarFilterMax();
690 * Add group as geometry of presentation.
691 * \param theMeshName - mesh name
692 * \param theGroupName - group name
694 void AddMeshOnGroup(in string theGroupName);
698 * Remove all groups.(The scalar map will be placed on all mesh).
700 void RemoveAllGeom();
704 //-------------------------------------------------------
706 interface ColoredPrs3dCache;
709 //-------------------------------------------------------
710 /*! \brief %ColoredPrs3dHolder interface.
711 * Interface of 3d presentation's holder, which represents colored 3d presentations,
712 * created on fields. It is publishing in the object browser in a separate folder
713 * and can be controled by viewer's slider.
715 interface ColoredPrs3dHolder : PrsObject, SALOME::GenericObj
718 * Presentation input parameters.
726 long myTimeStampNumber;
730 * Apply input parameters to last visited presentation in the cache.
732 boolean Apply(in ColoredPrs3d thePrs3d,
733 in BasicInput theInput,
734 in View3D theView3D);
737 * Gets the last visited presentation in the cache.
739 ColoredPrs3d GetDevice();
742 * Gets type of the managed presentations.
744 VISUType GetPrsType();
746 /*! Defines timestamp representation.
754 /*! Defines representation range of timestamps.
756 typedef sequence<TimeStampInfo> TimeStampsRange;
759 * Gets TimeStampsRange information from the last visited presentation.
761 TimeStampsRange GetTimeStampsRange();
764 * Gets input parameters of the last visited presentation.
766 BasicInput GetBasicInput();
769 * Gets a %ColoredPrs3dCache, to which the holder belongs
771 ColoredPrs3dCache GetCache();
774 * Gets memory size actually used by the holder (Mb).
776 float GetMemorySize();
780 //-------------------------------------------------------
781 /*! \brief %ColoredPrs3dCache interface.
782 * This interface is responsible for memory management of 3d presentations.
783 * One cache corresponds to one study.
785 interface ColoredPrs3dCache : RemovableObject, SALOME::GenericObj
787 /*! This enumeration contains the cache memory modes. */
789 MINIMAL, /*!< Minimal memory mode (default behaviour). */
790 LIMITED /*!< Limited memory mode (fixed memory size for presentations). */
793 /*! This enumeration defines how to enlarge the cache limited memory. */
795 NO_ENLARGE, /*!< No need to enlarge (default behaviour). */
796 ENLARGE, /*!< Enlarge limited memory. */
797 IMPOSSIBLE /*!< Impossible to enlarge (not enough free memory). */
800 /*! Sets a memory mode.*/
801 void SetMemoryMode(in MemoryMode theMode);
803 /*! Gets a memory mode.*/
804 MemoryMode GetMemoryMode();
806 /*! Sets a memory size for limited mode (Mb). */
807 void SetLimitedMemory(in float theMemorySize);
809 /*! Gets a memory size for limited mode (Mb). */
810 float GetLimitedMemory();
813 * Gets memory size actually used by the cache system (Mb).
815 float GetMemorySize();
817 /*! Creates %ColoredPrs3dHolder.*/
818 ColoredPrs3dHolder CreateHolder(in VISUType theType,
819 in ColoredPrs3dHolder::BasicInput theInput);
821 /*! Gets a memory which is required to create a holder. */
822 EnlargeType GetRequiredMemory(in VISUType theType,
823 in ColoredPrs3dHolder::BasicInput theInput,
824 out float theRequiredMemory);
828 //-------------------------------------------------------
829 /*! \brief Interface of the %Scalar Map
831 * This interface is responsable for coloring of 3D field presentations
832 * according the scalar values applied to different cells.
833 * As well it contains presentation parameters of the scalar bar. The scalar
834 * bar is displayed along with each colored field presentation and serves for
835 * consulting the correspondance between colors and data values.
838 interface ScaledPrs3d {
840 * Sets the type of scaling of the values reflected by the scalar bar.
841 * \param theScaling The value of this parameter is taken from the <VAR>Scaling</VAR> enumeration.
843 void SetScaling(in Scaling theScaling);
846 * Gets the type of scaling of the values reflected by this presentation.
848 Scaling GetScaling();
851 interface ScalarMap : ColoredPrs3d, ScaledPrs3d {
854 * Returns visibility state of scalar bar
856 boolean IsBarVisible();
859 * Sets visibility state of scalar bar
861 void SetBarVisible(in boolean theVisible);
864 * Sets the gauss metric for the presentation.
865 * \param theGaussMetric The value of this parameter is taken from the <VAR>GaussMetric</VAR> enumeration.
867 void SetGaussMetric(in GaussMetric theGaussMetric);
870 * Gets the gauss metric of the presentation.
872 GaussMetric GetGaussMetric();
875 * Sets the color of mesh links.
876 * \param theColor The color of the links. This parameter is taken from <VAR>Color</VAR> enumeration.
878 void SetLinkColor(in SALOMEDS::Color theColor);
881 * Gets the color of mesh links.
883 SALOMEDS::Color GetLinkColor();
886 //-------------------------------------------------------
887 /*! \brief Gauss Points presentation interface
889 * Presentation parameters of the Gauss Points presentation.
891 //-------------------------------------------------------
892 interface GaussPoints : ColoredPrs3d
894 //! Set flag indicating which scalar bar is active.
895 void SetIsActiveLocalScalarBar(in boolean theFlag);
897 //! Get flag indicating which scalar bar is active.
898 boolean GetIsActiveLocalScalarBar();
900 //! Set flag indicating visibility of global scalar bar.
901 void SetIsDispGlobalScalarBar(in boolean theFlag);
903 //! Get flag indicating visibility of global scalar bar.
904 boolean GetIsDispGlobalScalarBar();
906 //! Set value of the distance between global and local scalar bars.
907 void SetSpacing(in double theSpacing);
909 //! Get value of the distance between global and local scalar bars.
913 * Returns visibility state of scalar bar
915 boolean IsBarVisible();
918 * Sets visibility state of scalar bar
920 void SetBarVisible(in boolean theVisible);
923 * Set the Multicolored mode.
924 * \param theIsColored is used to switch between Results and Geometry modes.
925 * Multiple colors are using when the presentation is
926 * drawing in the Results mode, one color - in the Geometry mode.
928 void SetIsColored(in boolean theIsColored);
930 //! Gets current color mode
931 boolean GetIsColored();
933 /*! Sets the color of this presentation in case of IsColored switched off.
934 * \param theColor The color of this presentation. This parameter
935 * is taken from the <VAR>Color</VAR> enumeration.
937 void SetColor(in SALOMEDS::Color theColor);
940 * When the Bicolor parameter is set to true, scalar bars are
941 * drawing with two colors : red color correspoonds to positive
942 * scalar values, blue color - to negative values.
944 void SetBiColor(in boolean theIsBiColor);
946 //! Get the Bicolor mode.
947 boolean GetBiColor();
949 //! Checks whether the Gauss Points will be deformed or not
950 boolean GetIsDeformed();
952 //! Apply deformation on the Gauss Points
953 void SetIsDeformed(in boolean theIsDeformed);
956 * Sets the scale factor for scalar values
957 * (how much corresponding mesh elements should be translated).
958 * \param theScaleFactor The scaling factor.
960 void SetScaleFactor(in double theScaleFactor);
963 * Gets the scale factor for scalar values.
964 * (how much corresponding mesh elements is translated)
966 double GetScaleFactor();
969 * This enumeration contains a set of elements defining the type of representation of the vector head.
977 //! Set type of the primitives which is used for drawing the Gauss Points
978 void SetPrimitiveType(in PrimitiveType thePrimitiveType);
980 //! Get type of the primitives which is used for drawing the Gauss Points
981 PrimitiveType GetPrimitiveType();
983 //! Sets Point Sprite clamp
984 void SetClamp(in double theClamp);
986 //! Gets Point Sprite clamp
989 //! Sets minimum size of Point Sprites
990 void SetMinSize(in double theMinSize);
992 //! Gets minimum size of Point Sprites
995 //! Sets maximum size of Point Sprites
996 void SetMaxSize(in double theMaxSize);
998 //! Gets maximum size of Point Sprites
1001 //! Sets magnification for Point Sprites
1002 void SetMagnification(in double theMagnification);
1004 //! Gets magnification for Point Sprites
1005 double GetMagnification();
1007 //! Sets the increment of changing Magnification parameter
1008 void SetMagnificationIncrement(in double theIncrement);
1010 //! Gets the increment of changing Magnification parameter
1011 double GetMagnificationIncrement();
1013 //! Sets Point Sprites size
1014 void SetGeomSize(in double theGeomSize);
1016 //! Sets size of Point Sprite
1017 double GetGeomSize();
1019 //! Get path to the image using for Main Point Sprite texture
1020 string GetMainTexture();
1022 //! Get path to the image using for Alpha Point Sprite texture
1023 string GetAlphaTexture();
1025 //! Points Main and AlphaMask images to be used by Point Sprites
1026 void SetTextures(in string theMainTexture, in string theAlphaTexture);
1028 //! Sets Point Sprite Alpha threshold
1029 void SetAlphaThreshold(in double theAlphaThreshold);
1031 //! Gets Point Sprite Alpha threshold
1032 double GetAlphaThreshold();
1034 //! Sets resolution of the Geometrical Sphere
1035 void SetResolution(in long theResolution);
1037 //! Sets resolution of the Geometrical Sphere
1038 long GetResolution();
1040 //! Sets how many faces of can be drawn in the Geometrical Sphere primitive mode
1041 void SetFaceLimit(in long theFaceLimit);
1043 //! Defines how many faces of can be drawn in the Geometrical Sphere primitive mode
1044 long GetFaceLimit();
1050 /*! \brief MonoColor presentation presentation interface
1052 * Presentation parameters of the MonoColor presentation.
1054 interface MonoColorPrs : ScalarMap {
1056 /*! This boolean method returns True if this deformed shape presentation is colored.
1058 boolean IsColored();
1060 /*! Shows this presentation in colored mode.
1061 * \param theColored If this boolean parameter is True this presentable
1062 * object will be shown in colored mode.
1064 void ShowColored(in boolean theColored);
1066 /*! Gets the color of this presentable object.
1067 * \return The color of this presentable object.
1069 SALOMEDS::Color GetColor();
1071 /*! Sets the color of this presentation.
1072 * \param theColor The color of this presentation. This parameter
1073 * is taken from the <VAR>Color</VAR> enumeration.
1075 void SetColor(in SALOMEDS::Color theColor);
1079 /*! \brief Deformed shape presentation interface
1081 * Presentation parameters of the deformed shape presentation.
1083 interface DeformedShape : MonoColorPrs
1086 * Sets the scale of the presentatable object.
1087 * \param theScale Double value defining the scale of this presentable object.
1089 void SetScale(in double theScale);
1092 * Gets the scale of the presentatable object.
1098 //-------------------------------------------------------
1099 /*! \brief Deformation interface
1101 * This is base interface for building of the deformed presentations
1103 interface Deformation{
1105 * Sets the scale of the presentatable object.
1106 * \param theScale Double value defining the scale of this presentable object.
1108 void SetScale(in double theScale);
1111 * Gets the scale of the presentatable object.
1116 * Sets the vectorial field
1117 * \param theEntity - entity of vectorial field
1118 * \param theFieldName - the name of vectorial field
1120 void SetVectorialField(in Entity theEntity,
1121 in string theFieldName);
1124 * Get vectorial entity
1126 Entity GetVectorialFieldEntity();
1129 * Get scalar field name
1131 string GetVectorialFieldName();
1135 //-------------------------------------------------------
1136 /*! \brief OptionalDeformation interface
1138 * This is interface for switch on/off of the deformation of the presentation
1140 interface OptionalDeformation : Deformation{
1143 * Sets the deformation flag of the presentatable object.
1144 * \param theFlag Boolean value defining the deformation flag of this presentable object.
1146 void UseDeformation(in boolean theFlag);
1149 * Gets the deformation flag of the presentatable object.
1151 boolean IsDeformed();
1154 //-------------------------------------------------------
1155 /*! \brief Scalar Map on Deformed shape presentation interface
1157 * Presentation parameters of the scalar map on deformed shape presentation.
1159 interface DeformedShapeAndScalarMap : ScalarMap {
1162 * Sets the scale of the presentatable object.
1163 * \param theScale Double value defining the scale of this presentable object.
1165 void SetScale(in double theScale);
1168 * Gets the scale of the presentatable object.
1173 * Sets the scalar field
1174 * \param theEntity - entity of scalar field
1175 * \param theFieldName - the name of scalar field
1176 * \param theTimeStampNumber - the timestamp number for the scalar field
1178 void SetScalarField(in Entity theEntity,
1179 in string theFieldName,
1180 in long theTimeStampNumber);
1186 Entity GetScalarEntity();
1189 * Get scalar field name
1191 string GetScalarFieldName();
1194 * Get timestamp number for the scalar field
1196 long GetScalarTimeStampNumber();
1200 //-------------------------------------------------------
1202 * \brief Plot3D interface
1204 * Presentation parameters of Plot3D presentation. This type of presentation
1205 * consists of deforming initial planar mesh according to values assigned to the mesh elements.
1206 * If mesh not planar but volumic one, it is possible to generate intermediate planar mesh.
1208 interface Plot3dBase {
1210 * Sets the scale factor for scalar values
1211 * (how much corresponding mesh elements should be translated).
1212 * \param theScaleFactor The scaling factor.
1214 void SetScaleFactor (in double theScaleFactor);
1217 * Gets the scale factor for scalar values.
1218 * (how much corresponding mesh elements is translated)
1220 double GetScaleFactor();
1223 * Sets presentation type: contour or surface.
1224 * \param theIsContourPrs Define, whether presentation type is contour.
1226 void SetContourPrs (in boolean theIsContourPrs );
1229 * Returns true if presentation type is contour.
1231 boolean GetIsContourPrs();
1234 * Sets the number of contours.
1235 * \param theNb The number of contours.
1237 void SetNbOfContours (in long theNb);
1240 * Gets the number of contours.
1242 long GetNbOfContours();
1245 interface Plot3D : ScalarMap, Plot3dBase {
1247 * This enumeration contains a set of elements defining
1248 * the type of orientation in 3D space of the cutting plane.
1250 enum Orientation { XY, /*!< The object is located in the plane formed by X and Y axis. */
1251 YZ, /*!< The object is located in the plane formed by Y and Z axis. */
1252 ZX }; /*!< The object is located in the plane formed by Z and X axis. */
1255 * Sets the orientation in 3D space of cutting plane for the presentation.
1256 * \param theOrientation This parameter defines the type of orientation of cutting plane
1257 * in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
1258 * \param theXAngle The angle of rotation of the cutting plane
1259 * around the first axis of the chosen orientation.
1260 * \param theXAngle The angle of rotation of the cutting plane
1261 * around the second axis of the chosen orientation.
1263 void SetOrientation (in Orientation theOrientation, in double theXAngle, in double theYAngle);
1266 * Gets the type of orientation in 3D space of cutting plane.
1268 Orientation GetOrientationType();
1271 * Gets rotation angle of the cutting plane
1272 * around the first axis of the chosen orientation.
1274 double GetRotateX();
1277 * Gets rotation angle of the cutting plane
1278 * around the second axis of the chosen orientation.
1280 double GetRotateY();
1283 * Sets the position of a cutting plane.
1284 * \param thePlanePosition The position of the cutting plane.
1285 * \param theIsRelative Define, whether the input position is relative.
1287 void SetPlanePosition (in double thePlanePosition,
1288 in boolean theIsRelative);
1291 * Gets the position of the cutting plane
1293 double GetPlanePosition();
1296 * Returns true if a position of cutting plane is relative
1298 boolean IsPositionRelative();
1301 //-------------------------------------------------------
1302 /*! \brief %Table representation interface
1304 * Presentation parameters of the %Table view.
1306 interface Table : PrsObject {
1308 * Sets the title of the table.
1309 * \param theTitle String parameter defining the title of this table.
1311 void SetTitle(in string theTitle);
1314 * Gets the title of the table.
1315 * \return A string value containing the title of the table.
1320 * This enumeration contains a set of elements defining the orientation of the table.
1323 HORIZONTAL, /*!< Horizontal orientation of the table. */
1324 VERTIACAL /*!< Vertical orientation of the table. */
1328 * Sets orientation of the table.
1329 * \param theOrientation This input parameter defines the orientation of the table.
1330 * It is taken from the <VAR>Orientation</VAR> enumeration.
1332 void SetOrientation(in Orientation theOrientation);
1335 * Gets orientation of the table.
1336 * \return Orientation of the table. The returned value will correspond
1337 * to one of the elements the <VAR>Orientation</VAR> enumeration.
1339 Orientation GetOrientation();
1342 * Gets the number of rows of the table.
1343 * \return Long value corresponding to the number of rows of the table
1348 * Gets the number of columns of the table.
1349 * \return Long value corresponding to the number of columns of the table
1351 long GetNbColumns();
1354 * Sorts the specified row of the table.
1355 * \param theRow Index of the row to sort
1356 * \param theSortOrder Sort order (see <VAR>SortOrder</VAR> enumeration)
1357 * \param theSortPolicy Sort policy (see <VAR>SortPolicy</VAR> enumeration)
1359 void SortRow(in long theRow, in SortOrder theSortOrder, in SortPolicy theSortPolicy);
1362 * Sorts the specified column of the table.
1363 * \param theRow Index of the column to sort
1364 * \param theSortOrder Sort order (see <VAR>SortOrder</VAR> enumeration)
1365 * \param theSortPolicy Sort policy (see <VAR>SortPolicy</VAR> enumeration)
1367 void SortColumn(in long theColumn, in SortOrder theSortOrder, in SortPolicy theSortPolicy);
1370 * Sorts the table by the specified row.
1371 * \param theRow Index of the row, by which the table has to be sort
1372 * \param theSortOrder Sort order (see <VAR>SortOrder</VAR> enumeration)
1373 * \param theSortPolicy Sort policy (see <VAR>SortPolicy</VAR> enumeration)
1375 void SortByRow(in long theRow, in SortOrder theSortOrder, in SortPolicy theSortPolicy);
1378 * Sorts the table by the specified column.
1379 * \param theColumn Index of the column, by which the table has to be sort
1380 * \param theSortOrder Sort order (see <VAR>SortOrder</VAR> enumeration)
1381 * \param theSortPolicy Sort policy (see <VAR>SortPolicy</VAR> enumeration)
1383 void SortByColumn(in long theColumn, in SortOrder theSortOrder, in SortPolicy theSortPolicy);
1386 //-------------------------------------------------------
1387 /*! \brief %PointMap3d representation interface
1389 * Presentation parameters of the %Table Point Map in 3d view.
1391 interface PointMap3d : ColoredPrs3dBase, ScaledPrs3d, Plot3dBase, Table {
1394 //-------------------------------------------------------
1395 /*! \brief Cut planes interface
1397 * Presentation parameters of Cut planes presentation. This type of presentation
1398 * consists of cutting your initial mesh by a definite number of planes. As the
1399 * result you will see these planes which will be cutted by the borders of the mesh.
1401 interface CutPlanes : ScalarMap, OptionalDeformation {
1403 * This enumeration contains a set of elements defining the type of orientation in 3D space
1404 * of the cut planes.
1406 enum Orientation {XY, /*!< The object is located in the plane formed by X and Y axis. */
1407 YZ, /*!< The object is located in the plane formed by Y and Z axis. */
1408 ZX}; /*!< The object is located in the plane formed by Z and X axis. */
1411 * Sets the type of orientation in 3D space of cut planes presentation.
1412 * \param theOrientation This parameter defines the type of orientation of cut planes
1413 * in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
1414 * \param theXAngle The angle of rotation of the cut planes around
1415 * the first axis of the chosen orientation.
1416 * \param theXAngle The angle of rotation of the cut planes around
1417 * the second axis of the chosen orientation.
1419 void SetOrientation(in Orientation theOrientation, in double theXAngle, in double theYAngle);
1422 * Gets the type of orientation in 3D space of cut planes presentation.
1424 Orientation GetOrientationType();
1427 * Gets rotation angle of the cut plane presentation around the first axis of the chosen orientation.
1429 double GetRotateX();
1432 * Gets rotation angle of the cut plane presentation around the second axis of the chosen orientation.
1434 double GetRotateY();
1437 * Sets the displacement of the cut planes in 3D space.
1439 * \param theDisp This parameter defines position of the cut planes
1440 * in 3D space. It varies from 0 to 1. If the chosen value is 0.5, the cut planes
1441 * will be evenly located regarding each other; in other words, the distance between all
1442 * of them will be equal. If the value is higher or lower than 0.5, the planes will be displaced
1443 * to one or another side.
1445 void SetDisplacement(in double theDisp);
1448 * Gets the displacement of the cut planes in 3D space.
1450 double GetDisplacement();
1453 * Sets the position of a definite cut plane.
1454 * \param thePlaneNumber The number of this cut plane.
1455 * \param thePlanePosition The position of this cut plane.
1457 void SetPlanePosition(in long thePlaneNumber, in double thePlanePosition);
1460 * Sets the position of the choosen plane to default value.
1461 * \param thePlaneNumber The number of this cut plane.
1463 void SetDefault(in long thePlaneNumber);
1466 * Gets the position of the choosen plane
1468 double GetPlanePosition(in long thePlaneNumber);
1471 * Determines whether the choosen plane has default position.
1472 * \param thePlaneNumber The number of this cut plane.
1474 boolean IsDefault(in long thePlaneNumber);
1477 * Sets the number of cut planes.
1478 * \param theNb The number of cut planes.
1480 void SetNbPlanes(in long theNb);
1483 * Gets the number of cut planes.
1488 //-------------------------------------------------------
1489 /*! \brief Base interface for Cut Lines and Cut Segment tools
1492 interface CutLinesBase : ScalarMap {
1494 * Sets the number of cut lines.
1495 * \param theNb The number of cut lines.
1497 void SetNbLines(in long theNb);
1500 * Gets the number of cut lines.
1504 /*! Invert all curves of corresponding table
1505 * \param theInvert - Invert all curves, if value is TRUE, else not.
1507 void SetAllCurvesInverted(in boolean theInvert);
1509 /*! Checks the orientation of all curves
1510 * \retval TRUE - if all curves are inverted, else FALSE
1512 boolean IsAllCurvesInverted();
1514 /*! Sets values which cutlines would be shown: aboslute or relative values
1515 * \param theAbsLength - boolean value, TRUE or false.
1517 void SetUseAbsoluteLength(in boolean theAbsLength);
1519 /*! Checks values of cutlines: using aboslute or relative values
1521 boolean IsUseAbsoluteLength();
1524 //-------------------------------------------------------
1525 /*! \brief Cut lines presentation.
1527 * Presentation parameters of a Cut lines presentation.
1528 * Cut Lines is a type of presentation which displays colored cells
1529 * with applied scalar values on the mesh where lines are placed.
1530 * The procedure of construction of a Cut Lines presentation reuses the algorithm
1531 * of creation of Cut Planes presentation and consists of two steps:
1533 * 1. From Cut Planes presentation one plane is taken and
1534 * it is used as base plane for construction of cut lines.
1535 * 2. This plane is cut by a regular array of planes. The result of this
1536 * operation is a regular array of lines in space, belonging to the same plane
1537 * and having the same orientation. They are located inside or on the mesh.
1539 interface CutLines : CutLinesBase {
1541 * Sets the type of orientation in 3D space of the base plane of a cut lines presentation.
1542 * \param theOrientation The orientation of the base plane in 3D space.
1543 * \param theXAngle The angle of rotation of the base plane around
1544 * the first axis of the chosen orientation.
1545 * \param theXAngle The angle of rotation of the base plane around
1546 * the second axis of the chosen orientation.
1548 void SetOrientation(in CutPlanes::Orientation theOrientation, in double theXAngle, in double theYAngle);
1551 * Sets the type of orientation in 3D space of the cutting planes of a cut lines presentation.
1552 * \param theOrientation This parameter defines the type of orientation of the cutting planes
1553 * in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
1554 * \param theXAngle The angle of rotation of the cutting planes
1555 * around the first axis of the chosen orientation.
1556 * \param theXAngle The angle of rotation of the cutting planes
1557 * around the second axis of the chosen orientation.
1559 void SetOrientation2(in CutPlanes::Orientation theOrientation, in double theXAngle, in double theYAngle);
1562 * Gets the type of orientation in 3D space of the base plane of a cut lines presentation.
1564 CutPlanes::Orientation GetOrientationType();
1567 * Gets the type of orientation in 3D space of the cutting planes of a cut lines presentation.
1569 CutPlanes::Orientation GetOrientationType2();
1572 * Gets rotation angle of the base plane around the first axis of the chosen orientation.
1574 double GetRotateX();
1577 * Gets rotation angle of the cutting planes around the first axis of the chosen orientation.
1579 double GetRotateX2();
1582 * Gets rotation angle of the base plane around the second axis of the chosen orientation.
1584 double GetRotateY();
1587 * Gets rotation angle of the cutting planes around the second axis of the chosen orientation.
1589 double GetRotateY2();
1592 * Sets the displacement of the base plane of the cut lines presentation in 3D space.
1594 * \param theDisp This parameter defines position of the base plane
1595 * in 3D space. It varies from 0 to 1.
1597 void SetDisplacement(in double theDisp);
1600 * Sets the displacement of the cutting planes of the cut lines presentation in 3D space.
1602 * \param theDisp This parameter defines position of the cutting planes
1603 * in 3D space. It varies from 0 to 1.
1605 void SetDisplacement2(in double theDisp);
1608 * Gets the displacement of the base plane of the cut lines presentation in 3D space.
1610 double GetDisplacement();
1613 * Gets the displacement of the cutting planes of the cut lines presentation in 3D space.
1615 double GetDisplacement2();
1617 /*! Sets the position of the base plane in 3D space.
1618 * \param thePlanePosition A double value defining the position of the base plane in 3D space.
1620 void SetBasePlanePosition(in double thePlanePosition);
1622 /*! Gets the position of the base plane in 3D space.
1624 double GetBasePlanePosition();
1626 /*! Sets the position of one of cutting planes in 3D space.
1627 * \param thePlaneNumber A long value defining the order number of this cutting plane.
1628 * \param thePlanePosition A double value defining the position of the base plane in 3D space.
1630 void SetLinePosition(in long thePlaneNumber, in double thePlanePosition);
1632 /*! Gets the position of one of cutting planes in 3D space.
1633 * \param thePlaneNumber A long value defining the order number of this cutting plane.
1635 double GetLinePosition(in long thePlaneNumber);
1637 /*! Sets the position of the base plane to default value.
1642 * Determines whether the base plane has default position.
1643 * \return True if the base plane has default position.
1645 boolean IsDefault();
1648 * Sets the position of the choosen cutting plane to default value.
1649 * \param thePlaneNumber The number of this cutting plane.
1651 void SetDefaultPosition(in long thePlaneNumber);
1654 * Determines whether the choosen cutting plane has default position.
1655 * \param thePlaneNumber The number of this cutting plane.
1656 * \return True if this cutting plane has default position.
1658 boolean IsDefaultPosition(in long thePlaneNumber);
1661 //-------------------------------------------------------
1662 /*! \brief Cut segment presentation.
1664 * Presentation parameters of a Cut segment presentation.
1665 * Cut Segment is a simplified variant of Cut Lines presentation, which is used
1666 * to display a single line instead of set of them. Axis of this line is defined
1667 * by coordinates of two points in 3D space.
1669 interface CutSegment : CutLinesBase {
1671 * Sets coordinates of the first point of axis of the segment.
1672 * \param theX X coordinate of the point
1673 * \param theY Y coordinate of the point
1674 * \param theZ Z coordinate of the point
1676 void SetPoint1(in double theX, in double theY, in double theZ);
1679 * Gets coordinates of the first point of axis of the segment.
1680 * \param theX X coordinate of the point
1681 * \param theY Y coordinate of the point
1682 * \param theZ Z coordinate of the point
1684 void GetPoint1(out double theX, out double theY, out double theZ);
1687 * Sets coordinates of the second point of axis of the segment.
1688 * \param theX X coordinate of the point
1689 * \param theY Y coordinate of the point
1690 * \param theZ Z coordinate of the point
1692 void SetPoint2(in double theX, in double theY, in double theZ);
1695 * Gets coordinates of the second point of axis of the segment.
1696 * \param theX X coordinate of the point
1697 * \param theY Y coordinate of the point
1698 * \param theZ Z coordinate of the point
1700 void GetPoint2(out double theX, out double theY, out double theZ);
1703 /*! \brief Interface of the stream lines representation
1705 * This interface contains presentation parameters of stream lines presentations.
1706 * <BR>Stream lines is a type of presentation transforming into lines the
1707 * cells with vectors having most similar direction. A stream line can be thought
1708 * of as the path that a massless particle takes in a vector field.
1709 * Streamlines are used to convey the structure of a vector field.
1710 * Usually streamlines are created to explore the most interesting features in the field.
1712 interface StreamLines : MonoColorPrs {
1713 /*! This enumerations contains a set of elements necessary
1714 * for definition of direction of the stream lines.
1716 enum Direction{ FORWARD,
1721 /*! Sets the parameters of the stream lines presentation.
1722 * \param theIntStep Inegration step is a parameter of smoothness of the stream lines.
1723 * This parameter defines the accuracy of construction of the streamlines.
1724 * A smaller value of this parameter allows to construct smoother
1725 * streamlines (at the cost of more computation time).
1726 * \param thePropogationTime This parameter controls the maximum length of
1727 * the stream line (measured in units of time).
1728 * \param theStepLength This parameter defines the size of the output line segments
1729 * that make up the streamline (which is represented as a polyline).
1730 * \param thePrs3d The source presentation. The points of the field located on this source
1731 * presentation will serve as starting points for generation of stream lines.
1732 * \note If this parameter is not defined, your stream lines
1733 * presentation will be generated on all points of the field.
1734 * \param thePercents This parameter defines the quantity of points of the field
1735 * (from 0 to 100%) which will be used as starting points for
1736 * construction of the stream lines. Thus, the value of this
1737 * parameter can vary from 0 to 1.
1738 * \param theDirection Direction of the stream lines (Forward, Backward or Both).
1739 * \return True if all parameters are properly set.
1741 boolean SetParams(in double theIntStep,
1742 in double thePropogationTime,
1743 in double theStepLength,
1745 in double thePercents,
1746 in Direction theDirection);
1748 /*! Gets the value of integration step of the stream lines presentation.
1750 double GetIntegrationStep();
1752 /*! Gets the value of propagation time of the stream lines presentation.
1754 double GetPropagationTime();
1756 /*! Gets the value of step length of the stream lines presentation.
1758 double GetStepLength();
1760 /*! Returns the source presentation used for generation of the stream lines.
1764 /*! Gets the quantity of points of the field used as starting
1765 * points for generation of the stream lines presentation.
1767 double GetUsedPoints();
1769 /*! Returns the direction of the stream lines.
1771 Direction GetDirection();
1774 /*! \brief Interface of the isometric surface presentation
1776 * This interface contains presentation parameters of
1777 * isometric surface presentations.
1778 * <BR>Iso surfaces presentation combines all equal scalar
1779 * values on the cells and on the basis of them constructs
1780 * isobaric surfaces, which form this presentation.
1782 interface IsoSurfaces : MonoColorPrs {
1784 * Sets the number of isometric surfaces.
1785 * \param theNb A long value defining the number of isometric surfaces
1786 * which will be used for construction of this presentation.
1788 void SetNbSurfaces(in long theNb);
1791 * Gets the number of isometric surfaces
1793 long GetNbSurfaces();
1796 * Returns TRUE if labels with values are shown
1798 boolean IsLabeled();
1801 * Set show or not value labels
1803 void ShowLabels(in boolean theShow, in long theNb);
1806 * Returns Nb of labels per surface
1812 //-------------------------------------------------------
1813 /*! \brief Interface of the vector presentation.
1815 * This interface contains presentation parameters of vector presentations.
1817 interface Vectors : DeformedShape {
1819 * Sets the width of the lines of the vectors.
1820 * \param theWidth A double value defining the width of the lines of the vectors.
1822 void SetLineWidth(in double theWidth);
1825 * Gets the width of the lines of the vectors.
1827 double GetLineWidth();
1830 * This enumeration contains a set of elements defining the type of representation of the vector head.
1832 enum GlyphType{ ARROW,
1839 * Sets the type of representation of the vector head.
1840 * \param theType This parameter defines the type of representation of the vector head.
1841 * This value is taken from the <VAR>GlyphType</VAR> enumeration.
1843 void SetGlyphType(in GlyphType theType);
1846 * Gets the type of representation of the vector head.
1848 GlyphType GetGlyphType();
1851 * This enumeration contains a set of elements defining the position of the vector head.
1853 enum GlyphPos{ CENTER, /*!<In the center of the vector.*/
1854 TAIL, /*!<In the tail of the vector.*/
1855 HEAD /*!<In the head of the vector.*/
1859 * Sets the position of the vector head.
1860 * \param thePos This parameter defines the position of the vector head.
1861 * This value is taken from the <VAR>GlyphPos</VAR> enumeration.
1863 void SetGlyphPos(in GlyphPos thePos);
1866 * Gets the position of the vector head.
1868 GlyphPos GetGlyphPos();
1871 //-------------------------------------------------------
1872 /*! \brief %Animation class
1874 * This class provides a set of methods used for:<br>
1876 * <li> generating different animations on the basis of a field,
1877 * <li> setting the parameters of the animations,
1878 * <li> playing these animations in the %VISU module.
1881 * <BR><B>Field</B> represents the results of calculations
1882 * (it can be scalar or vector values), grouped together under one physical concept.
1883 * <BR><B>Time stamp</B> represents a subfield: the results
1884 * of calculations are taken in one definite moment.
1886 interface Animation : Base
1889 * This enumeration contains a set of available animation modes.
1891 enum AnimationMode{ PARALLEL, /*!< parallel mode of animation. */
1892 SUCCESSIVE /*!< succcessive mode of animation. */
1895 /*! Defines the field which will be used as a base for generation of the animation.
1896 * \param theObject The %SObject corresponding to the field.
1898 boolean addField(in SALOMEDS::SObject theObject);
1900 /*! Remove all fields from Animation object.
1904 /*! Generates presentations on the basis of the field.
1905 * \param theFieldNum The number of the field, which will be used
1906 * as the basis for construction of the presentation.
1908 void generatePresentations(in long theFieldNum);
1910 /*! Generates a set of frames from the created by the method
1911 * <VAR>generatePresentations</VAR>3D presentations. A sequence of
1912 * these frames will be transformed into an animation.
1913 * \return True, if the frames have been successfully generated.
1915 boolean generateFrames();
1917 /*! Clears the view before starting an animation.
1921 /*! \name Playback of an animation:
1925 /*! Starts an animation.
1927 void startAnimation();
1929 /*! Stops an animation.
1931 void stopAnimation();
1933 /*! Forwards to the next frame.
1937 /*! Returns to the previous frame.
1941 /*! Returns to the first frame of the animation.
1945 /*! Forwards to the last frame of the animation.
1949 /*! Passes to a definite frame of the animation.
1950 * \param theFrame A long value defining the number of the frame.
1952 void gotoFrame(in long theFrame);
1955 /*! Gets the number of time stamps (subfields) contained in the given field.
1959 /*! Gets the number of generated frames
1963 /*! Returns True, if the animation is currently running.
1965 boolean isRunning();
1967 /*! Returns the number of the current frame.
1969 long getCurrentFrame();
1973 ColoredPrs3d getPresentation(in long theField, in long theFrame);
1975 /*! Sets the type of presentation (vectors, deformed shape etc.)
1976 * which will be generated by the method <VAR>generatePresentations</VAR>.
1977 * \note \c addField() method should be called before in order to add field
1978 * with number theFieldNum.
1980 void setPresentationType(in long theFieldNum, in VISUType theType);
1982 /*! Gets the type of presentation (vectors, deformed shape etc.) which will
1983 * be generated by the method <VAR>generatePresentations</VAR>.
1984 * \note \c addField() method should be called before in order to add field
1985 * with number theFieldNum.
1987 VISUType getPresentationType(in long theFieldNum);
1989 /*! Sets the speed of the animation.
1990 * \param theSpeed The speed of the animation. The value varies from 1 to 99.
1992 void setSpeed(in long theSpeed);
1994 /*! Gets the speed of the animation.
1998 /*! Ruturns True, if playback of the animation is proportional.
1999 * This option allows to render your animation with proportional periods
2000 * of time between every frame (not depending on the time stamps).
2002 boolean isProportional();
2004 /*! Sets the range of the animation. The range is defined on the basis of
2005 * the time stamps of the field which have been used for generation of the animation.
2006 * This method allows to bound the range of generated frames.
2007 * If this method is not used, the animation will be generated
2008 * on the basis of all time stamps contained in the field.
2009 * \param theMin The value of the first time stamp which will be used for generation of the animation.
2010 * \param theMax The value of the last time stamp which will be used for generation of the animation.
2012 void setAnimationRange(in double theMin, in double theMax);
2014 /*! Gets the number of the first time stamp which will be used for generation of the animation.
2016 double getMinRange();
2018 /*! Gets the number of the last time stamp which will be used for generation of the animation.
2020 double getMaxRange();
2022 /*! Returns True if the range of the animation has been defined
2023 * by the method <VAR>setAnimationRange</VAR>. Otherwise
2024 * the animation will be generated on the basis of all time stamps contained in the field.
2026 boolean isRangeDefined();
2028 /*! Sets the sequence of the animation. The sequence is defined on the basis of
2029 * the time stamps of the field which have been used for generation of the animation.
2030 * This method allows to set the sequence of generated frames.
2031 * If this method is not used, the animation will be generated
2032 * on the basis of all time stamps contained in the field.
2033 * Format of the sequence: '1,9,2-5,7-8'
2034 * \param theSequence The sequence of time stamps indices which will be used for generation of the animation.
2036 void setAnimationSequence(in string theSequence);
2038 /*! Gets the animation sequence.
2040 string getAnimationSequence();
2042 /*! Returns True if the sequence of the animation has been defined
2043 * by the method <VAR>setAnimationSequence</VAR>. Otherwise
2044 * the animation will be generated on the basis of all time stamps contained in the field.
2046 boolean isSequenceDefined();
2048 /*! Saves all the frames composing the animation into a definite directory.
2049 * Pictures format is set with method <VAR>setDumpFormat()</VAR>.
2050 * \param thePath The directory where all the frames will be saved.
2052 void dumpTo(in string thePath);
2054 /*! Set format for saving all the frames composing the animation.
2055 * \param theFormat The format for saving pictures.
2056 * For available formats see QImageIO documentation (Qt).
2057 * If specified format is not available, default format will be used.
2058 * Default format is JPEG or first of supported, if JPEG is not available.
2059 * \return Really set format. Differ from \a theFormat if \a theFormat is not available.
2061 string setDumpFormat(in string theFormat);
2063 /*! Set frequency of timestamps used to generate AVI file.
2064 * \param theFrequency The frequency of timestamps to use.
2066 void setTimeStampFrequency(in long theFrequency);
2068 /*! Get frequency of timestamps used to generate AVI file.
2069 * \return The frequency of timestamps to use.
2071 long getTimeStampFrequency();
2073 /*! Returns True, if the playback of the animation is cycling.
2075 boolean isCycling();
2077 /*! Gets the first time stamp of the field defined at the input of the animation.
2078 * \note This method is used if animation range is <b>NOT</b> defined.
2080 double getMinTime();
2082 /*! Gets the last time stamp of the field defined at the input of the animation.
2083 * \note This method is used if animation range is <b>NOT</b> defined.
2085 double getMaxTime();
2087 /*! Sets proprtional playback of the animation. This option allows to render your animation
2088 * with proportional periods of time between every frame (not depending on the time stamps).
2089 * \param theProp If this boolean parameter is True, playback
2090 * of your animation will be set as proportional.
2092 void setProportional(in boolean theProp);
2094 /*! Sets cycling playback of the animation. The number of cycles
2095 * can be infinite, untill you use <VAR>startAnimation</VAR> method.
2096 * \param theCycle If this boolean parameter is True, playback
2097 * of your animation will be set as cycling.
2099 void setCycling(in boolean theCycle);
2101 boolean isCleaningMemoryAtEachFrame();
2102 void setCleaningMemoryAtEachFrame(in boolean theCycle);
2104 SALOMEDS::SObject publishInStudy();
2106 void saveAnimation();
2108 void restoreFromStudy(in SALOMEDS::SObject theSObj);
2110 boolean isSavedInStudy();
2113 * Sets the animation mode.
2114 * \param theMode The value of this parameter is taken from the <VAR>AnimationMode</VAR> enumeration.
2116 void setAnimationMode(in AnimationMode theMode);
2119 * Gets the animation mode.
2121 AnimationMode getAnimationMode();
2124 * Apply the presentation properties to all fields. The exception is raised in the following cases:
2125 * 1) presentations for the given field is not yet created;
2126 * 2) invalid dynamic cast of the given presentation to VISU::ColoredPrs3d_i;
2127 * 3) the MED file is not the same;
2128 * 4) the mesh name is not the same;
2129 * 5) the field name is not the same;
2130 * 6) the entity is not the same.
2132 void ApplyProperties(in long theFieldNum, in ColoredPrs3d thePrs)
2133 raises (SALOME::SALOME_Exception);
2137 //-------------------------------------------------------
2140 //-------------------------------------------------------
2141 /*! \brief Interface %Evolution
2144 interface Evolution : Base
2147 * Defines the field which will be used as a base for generation of the evolution.
2148 * \param theObject The %SObject corresponding to the field.
2150 boolean setField(in SALOMEDS::SObject theObject);
2153 * Sets id of the point for which the evolution will be generated.
2154 * \param thePointId id of the point.
2156 void setPointId(in long thePointId);
2159 * Sets id of the component for which the evolution will be generated.
2160 * \param thePointId id of the component.
2162 void setComponentId(in long theComponentId);
2165 * Shows the evolution.
2167 boolean showEvolution();
2170 * Restores the evolution from study.
2171 * \param theSObj the study object from which the evolution should be restored.
2173 void restoreFromStudy(in SALOMEDS::SObject theSObj);
2177 /*! \brief Interface %Result
2179 * This interface serves for inner representation of data generated
2180 * in other sources (MED object or file). This data is needed
2181 * for further construction of graphical presentations.
2183 interface Result : RemovableObject, SALOME::GenericObj
2185 /*! Reads all data from the corresponding sources. By default the data is loaded on demand.
2189 /*! Start to parse the source MED file and publish all its entities into the study*/
2190 boolean Build(in boolean theIsBuildAll, in boolean theIsAtOnce);
2192 /*! Allow to check is all requested MED entites already loaded or not */
2195 /*! Allow to check is corresponding MED entites already loaded or not */
2196 boolean IsEntitiesDone();
2198 /*! Choose to parse MED fields and perform global min / max on the MED timestamps.*/
2199 void SetBuildFields(in boolean theIsBuildFields, in boolean theIsCalculateMinMax);
2201 /*! Allow to check is corresponding MED fields already loaded or not */
2202 boolean IsFieldsDone();
2204 /*! Choose to parse MED groups.*/
2205 void SetBuildGroups(in boolean theIsBuildGroups);
2207 /*! Allow to check is corresponding MED groups and families already loaded or not */
2208 boolean IsGroupsDone();
2210 /*! Allow to check is min / max calculation over field's components already perfrormed or not */
2211 boolean IsMinMaxDone();
2213 /*! Allow to check is corresponding multi resolution structure already loaded or not */
2214 boolean IsPartsDone();
2216 typedef sequence<Entity> Entities;
2218 typedef string EntityName;
2220 typedef sequence<EntityName> EntityNames;
2222 typedef long TimeStampNumber;
2224 typedef sequence<TimeStampNumber> TimeStampNumbers;
2233 typedef sequence<Resolution> Resolutions;
2235 /*! Gets existing mesh names */
2236 EntityNames GetMeshNames();
2238 /*! Gets existing mesh entites for the given mesh name */
2239 Entities GetEntities(in EntityName theMeshName);
2241 /*! Gets existing families for the given mesh name and entity */
2242 EntityNames GetFamilies(in EntityName theMeshName, in Entity theEntity);
2244 /*! Gets existing families for the given mesh name */
2245 EntityNames GetGroups(in EntityName theMeshName);
2247 /*! Gets existing fields for the given mesh name and entity */
2248 EntityNames GetFields(in EntityName theMeshName, in Entity theEntity);
2250 /*! Gets number of components for the given mesh name, entity and name of field */
2251 long GetNumberOfComponents(in EntityName theMeshName, in Entity theEntity, in EntityName theFieldName);
2253 /*! Gets existing numbers of time stamps for the given mesh name, entity and name of field */
2254 TimeStampNumbers GetTimeStampNumbers(in EntityName theMeshName, in Entity theEntity, in EntityName theFieldName);
2256 /*! Gets time values of time stamps for the given mesh name, entity and name of field */
2257 double_array GetTimeStampValues(in EntityName theMeshName, in Entity theEntity, in EntityName theFieldName);
2259 /*! Gets existing parts of multi resolution structure for the given mesh name */
2260 EntityNames GetPartNames(in EntityName theMeshName);
2262 /*! Gets available resolutions of multi resolution structure for the given mesh and part names */
2263 Resolutions GetResolutions(in EntityName theMeshName, in EntityName thePartName);
2265 /*! Gets current resolution of multi resolution structure for the given mesh and part names */
2266 Resolution GetResolution(in EntityName theMeshName, in EntityName thePartName);
2268 /*! Gets current resolution of multi resolution structure for the given mesh and part names */
2269 void SetResolution(in EntityName theMeshName, in EntityName thePartName, in Resolution theResolution);
2271 /*! Gets information about imported MED file */
2272 SALOME_MED::MedFileInfo GetMEDFileInfo();
2274 /*! Export MED file from temp object. */
2275 boolean ExportMED(in string theFileName);
2278 //-------------------------------------------------------
2279 interface ViewManager;
2281 /*! \brief %VISU_Gen interface
2283 * This is the main interface of %VISU component. It is necessary for creation of
2284 * post-processing presentations from given %Result and %Table object reference,
2285 * using the views provided by %ViewManager.
2287 interface VISU_Gen : Engines::Component, SALOMEDS::Driver, Base
2289 /*! Sets a definite study to be current.
2291 void SetCurrentStudy(in SALOMEDS::Study theStudy);
2293 /*! Gets the current study.
2295 SALOMEDS::Study GetCurrentStudy();
2298 * Gets the %View Manager which is used for creation of
2299 * post-processing presentations.
2301 ViewManager GetViewManager();
2304 * Imports tables from a file and create TableAttribute in Study
2306 SALOMEDS::SObject ImportTables(in string theFileName,
2307 in boolean theFirstStrAsTitle);
2310 * Export table to a file
2312 boolean ExportTableToFile(in SALOMEDS::SObject theTable, in string theFileName);
2315 * Imports data from a file. The access to this file will be conserved outside of the application.
2316 * \param theFileName String parameter defining the name of the file
2317 * from which the data will be imported.
2319 Result ImportFile(in string theFileName);
2322 * Create result and initialize its with the file. The access to this file will be conserved outside of the application.
2323 * \param theFileName String parameter defining the name of the file
2324 * from which the data will be imported.
2326 Result CreateResult(in string theFileName);
2329 * Imports data from a file. The access to this file will closed.
2330 * \param theFileName String parameter defining the name of the file
2331 * from which the data will be imported.
2333 Result CopyAndImportFile(in string theFileName);
2336 * Imports data from a %MED object.
2338 Result ImportMed(in SALOMEDS::SObject theMedSObject);
2341 * Imports data from a %MED field.
2343 Result ImportMedField(in SALOME_MED::FIELD theField);
2346 * Rename a study object, representing a mesh, specified by given values.
2347 * \param theResult Data generated in other sources (MED object or file).
2348 * \param theMeshName One of the meshes presented in MED file.
2349 * \param theEntity Type of entity where the field is defined.
2350 * \param theSubMeshName Name of sub-mesh (group or family).
2351 * \param theNewName Name to be given to the study object.
2353 void RenameEntityInStudy(in Result theResult,
2354 in string theMeshName,
2355 in Entity theEntity,
2356 in string theNewName);
2357 void RenameFamilyInStudy(in Result theResult,
2358 in string theMeshName,
2359 in Entity theEntity,
2360 in string theSubMeshName,
2361 in string theNewName);
2362 void RenameGroupInStudy(in Result theResult,
2363 in string theMeshName,
2364 in string theSubMeshName,
2365 in string theNewName);
2368 * Creates a mesh on the basis of the data generated in other sources (MED object or file).
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
2373 Mesh MeshOnEntity(in Result theResult, in string theMeshName, in Entity theEntity);
2376 * Creates on the basis of a family a mesh which will be composed of geometrical
2377 * elements, corresponding to the type of cells (node, edge, face or cell) of this family.
2378 * \param theResult Data generated in other sources. (MED object or file)
2379 * \param theMeshName One of the meshes presented in MED file
2380 * \param theEntity Type of entity where the field is defined.
2382 Mesh FamilyMeshOnEntity(in Result theResult, in string theMeshName,
2383 in Entity theEntity, in string theFamilyName);
2386 * Creates a mesh on the basis of a group of families.
2387 * \param theResult Data generated in other sources. (MED object or file)
2388 * \param theMeshName One of the meshes presented in MED file
2389 * \param theGroupName Name of the group.
2391 Mesh GroupMesh(in Result theResult, in string theMeshName, in string theGroupName);
2394 * Creates a scalar map presentation.
2395 * \param theResult Data generated in other sources. (MED object or file)
2396 * \param theMeshName One of the meshes presented in MED file
2397 * \param theEntity Type of entity where the field is defined
2398 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2399 * \param theTimeStampNumber Number of iteration on the field
2401 ScalarMap ScalarMapOnField(in Result theResult, in string theMeshName,
2402 in Entity theEntity, in string theFieldName,
2403 in long theTimeStampNumber);
2406 * Creates a Gauss Points presentation.
2407 * \param theResult Data generated in other sources. (MED object or file)
2408 * \param theMeshName One of the meshes presented in MED file
2409 * \param theEntity Type of entity where the field is defined
2410 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2411 * \param theTimeStampNumber Number of iteration on the field
2413 GaussPoints GaussPointsOnField(in Result theResult, in string theMeshName,
2414 in Entity theEntity, in string theFieldName,
2415 in long theTimeStampNumber);
2418 * Creates a deformed shape presentation.
2419 * \param theResult Data generated in other sources. (MED object or file)
2420 * \param theMeshName One of the meshes presented in MED file
2421 * \param theEntity Type of entity where the field is defined
2422 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2423 * \param theTimeStampNumber Number of iteration on the field
2425 DeformedShape DeformedShapeOnField(in Result theResult, in string theMeshName,
2426 in Entity theEntity, in string theFieldName,
2427 in long theTimeStampNumber);
2430 * Creates a deformed shape presentation. This function is obsolete. Use DeformedShapeAndScalarMapOnField instead.
2431 * \param theResult Data generated in other sources. (MED object or file)
2432 * \param theMeshName One of the meshes presented in MED file
2433 * \param theEntity Type of entity where the field is defined
2434 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2435 * \param theTimeStampNumber Number of iteration on the field
2437 DeformedShapeAndScalarMap ScalarMapOnDeformedShapeOnField(in Result theResult, in string theMeshName,
2438 in Entity theEntity, in string theFieldName,
2439 in long theTimeStampNumber);
2442 * Creates a deformed shape presentation.
2443 * \param theResult Data generated in other sources. (MED object or file)
2444 * \param theMeshName One of the meshes presented in MED file
2445 * \param theEntity Type of entity where the field is defined
2446 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2447 * \param theTimeStampNumber Number of iteration on the field
2449 DeformedShapeAndScalarMap DeformedShapeAndScalarMapOnField(in Result theResult, in string theMeshName,
2450 in Entity theEntity, in string theFieldName,
2451 in long theTimeStampNumber);
2454 * Creates a vector presentation.
2455 * \param theResult Data generated in other sources. (MED object or file)
2456 * \param theMeshName One of the meshes presented in MED file
2457 * \param theEntity Type of entity where the field is defined
2458 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2459 * \param theTimeStampNumber Number of iteration on the field
2461 Vectors VectorsOnField(in Result theResult, in string theMeshName,
2462 in Entity theEntity, in string theFieldName,
2463 in long theTimeStampNumber);
2466 * Creates an iso surface presentation.
2467 * \param theResult Data generated in other sources. (MED object or file)
2468 * \param theMeshName One of the meshes presented in MED file
2469 * \param theEntity Type of entity where the field is defined
2470 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2471 * \param theTimeStampNumber Number of iteration on the field
2473 IsoSurfaces IsoSurfacesOnField(in Result theResult, in string theMeshName,
2474 in Entity theEntity, in string theFieldName,
2475 in long theTimeStampNumber);
2478 * Creates an stream lines presentation.
2479 * \param theResult Data generated in other sources. (MED object or file)
2480 * \param theMeshName One of the meshes presented in MED file
2481 * \param theEntity Type of entity where the field is defined
2482 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2483 * \param theTimeStampNumber Number of iteration on the field
2485 StreamLines StreamLinesOnField(in Result theResult, in string theMeshName,
2486 in Entity theEntity, in string theFieldName,
2487 in long theTimeStampNumber);
2490 * Creates a presentation of cut planes.
2491 * \param theResult Data generated in other sources. (MED object or file)
2492 * \param theMeshName One of the meshes presented in MED file
2493 * \param theEntity Type of entity where the field is defined
2494 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2495 * \param theTimeStampNumber Number of iteration on the field
2497 CutPlanes CutPlanesOnField(in Result theResult, in string theMeshName,
2498 in Entity theEntity, in string theFieldName,
2499 in long theTimeStampNumber);
2502 * Creates a presentation of cut lines.
2503 * \param theResult Data generated in other sources. (MED object or file)
2504 * \param theMeshName One of the meshes presented in MED file
2505 * \param theEntity Type of entity where the field is defined
2506 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2507 * \param theTimeStampNumber Number of iteration on the field
2509 CutLines CutLinesOnField(in Result theResult, in string theMeshName,
2510 in Entity theEntity, in string theFieldName,
2511 in long theTimeStampNumber);
2514 * Creates a presentation of cut segment.
2515 * \param theResult Data generated in other sources. (MED object or file)
2516 * \param theMeshName One of the meshes presented in MED file
2517 * \param theEntity Type of entity where the field is defined
2518 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2519 * \param theTimeStampNumber Number of iteration on the field
2521 CutSegment CutSegmentOnField(in Result theResult, in string theMeshName,
2522 in Entity theEntity, in string theFieldName,
2523 in long theTimeStampNumber);
2526 * Creates a Plot3D presentation.
2527 * \param theResult Data generated in other sources. (MED object or file)
2528 * \param theMeshName One of the meshes presented in MED file
2529 * \param theEntity Type of entity where the field is defined
2530 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2531 * \param theTimeStampNumber Number of iteration on the field
2533 Plot3D Plot3DOnField(in Result theResult, in string theMeshName,
2534 in Entity theEntity, in string theFieldName,
2535 in long theTimeStampNumber);
2538 * Creates a table presentation.
2539 * \param theTableEntry The entry of the table which will be displayed.
2541 Table CreateTable(in string theTableEntry);
2544 * Creates a curve on the basis of points, whose values are taken from the table.
2545 * \param theTable Table containing the data for construction of curves.
2546 * \param theHRow Index of the row in the table: abscissa of the point.
2547 * \param theVRow Index of the row in the table: ordinate of the point.
2549 Curve CreateCurve(in Table theTable, in long theHRow, in long theVRow);
2552 * Creates a curve on the basis of points, whose values are taken from the table.
2553 * Each point has also assigned value, that will be shown as tooltip in Plot2d
2554 * \param theTable Table containing the data for construction of curves.
2555 * \param theHRow Index of the row in the table: abscissa of the point.
2556 * \param theVRow Index of the row in the table: ordinate of the point.
2557 * \param theZRow Index of the row in the table: assigned value (so-called as Z).
2559 Curve CreateCurveWithZ( in Table theTable, in long theHRow, in long theVRow, in long theZRow );
2562 * Creates a curve on the basis of points, whose values are taken from the table.
2563 * Each point has also assigned value, that will be shown as tooltip in Plot2d.
2564 * The curve can be displayed using right axis of Plot2d view.
2565 * \param theTable Table containing the data for construction of curves.
2566 * \param theHRow Index of the row in the table: abscissa of the point.
2567 * \param theVRow Index of the row in the table: ordinate of the point.
2568 * \param theZRow Index of the row in the table: assigned value (so-called as Z).
2569 * \param theIsV2 Flag allowed to display the curve using right axis of Plot2d view.
2571 Curve CreateCurveWithZExt( in Table theTable, in long theHRow, in long theVRow, in long theZRow,
2572 in boolean theIsV2 );
2575 * Creates a presentation form containing an array of references to the curves.
2577 Container CreateContainer();
2579 /*! Creates an animation in the 3D view.
2580 * \param theView3d The 3D view, where the animation will be rendered.
2582 Animation CreateAnimation(in View3D theView3d);
2584 /*! Creates an evolution in the XY plot.
2585 * \param theXYPlot The XY plot, where the evolution will be rendered.
2587 Evolution CreateEvolution(in XYPlot theXYPlot);
2589 void DeleteResult(in Result theResult);
2591 void DeletePrs3d(in Prs3d thePrs3d);
2594 * Get or create %ColoredPrs3dCache object.
2596 ColoredPrs3dCache GetColoredPrs3dCache(in SALOMEDS::Study theStudy);
2599 /* Clipping planes management */
2601 /*Create a clipping plane and return its ID (position in corresponded array)
2602 Id of clipping plane could be changed after deletion of other clipping plane
2604 long CreateClippingPlane(in double X, in double Y, in double Z,
2605 in double dX, in double dY, in double dZ,
2606 in boolean auto, in string name);
2608 void EditClippingPlane(in long id, in double X, in double Y, in double Z,
2609 in double dX, in double dY, in double dZ,
2610 in boolean auto, in string name);
2612 /* Returns clipping plane by its Id */
2613 ClippingPlane GetClippingPlane(in long id);
2615 /* Deletes clipping plane by its Id */
2616 boolean DeleteClippingPlane(in long id);
2618 /* Applyes a clipping plane with Id to presentation thePrs */
2619 boolean ApplyClippingPlane(in Prs3d thePrs, in long id);
2621 /* Detaches a clipping plane with Id from presentation thePrs */
2622 boolean DetachClippingPlane(in Prs3d thePrs, in long id);
2625 /* Get number of clipping planes */
2626 long GetClippingPlanesNb();
2628 /*! Converts set of VTK files to the one MED-file
2629 * \param theVTKFiles sequence of VTK files
2630 * \param out MED-file
2631 * \param theMeshName mesh name. This parameter can be empty. In this case name
2632 of mesh is equal vtk2med
2633 * \param theTSNames values of time stamps. This array can be empty, in
2634 this case values of time stamps will be generated automatically ( 0, 1, 2 ... )
2635 * \return TRUE if operation has been completed successfully, FALSE otherwise
2637 boolean VTK2MED( in string_array theVTKFiles,
2638 in string theMEDFile,
2639 in string theMeshName,
2640 in double_array theTStamps );
2643 * Load texture from file
2644 * \param theTextureFile texture file name
2645 * \return unique texture identifier
2647 long LoadTexture(in string theTextureFile);
2650 /*! \brief %View interface
2652 * Contains a set of methods used by the %View frame, which can be one of
2653 * the following types: 3d, Table, XY plot.
2654 * %View interface is a base for all types of %view interfaces.
2656 interface View: Base, SALOME::GenericObj
2658 /*! \brief %ViewRepresentation enumeration
2660 * displaying part ("ALL" isn't setable)
2662 enum ViewRepresentation {
2669 void ShowPart (in ViewRepresentation ViewRepr, in boolean state );
2671 boolean IsPartShown( in ViewRepresentation ViewRepr );
2674 * New methods for view parameters management.
2677 /*! \brief Split workarea of this view.
2679 * Horizontally split workarea of this view.
2680 * This view is moved in a new right area.
2684 /*! \brief Split workarea of this view.
2686 * Horizontally split workarea of this view.
2687 * This view stays in an old left area, others are moved in a new right area.
2691 /*! \brief Split workarea of this view.
2693 * Vertically split workarea of this view.
2694 * This view is moved in a new bottom area.
2698 /*! \brief Split workarea of this view.
2700 * Vertically split workarea of this view.
2701 * This view stays in an old top area, others are moved in a new bottom area.
2706 * Put this view window on top of its work area.
2711 * Put \a theView in workarea of this view right after it.
2712 * If \a theView was alone in its workarea, workarea of \a theView will be destroyed.
2713 * If \a theView was in the same workarea with this view, simple reordering will take place.
2714 * \param theView A view window to be attracted to this one.
2716 void Attract (in View theView);
2719 * Put all the view windows from workarea of \a theView in workarea of this view right after it.
2720 * Workarea of \a theView will be destroyed.
2721 * If \a theView was in the same workarea with this view, simple reordering will take place.
2722 * \param theView A view window to be attracted to this one together with all its workarea.
2724 void AttractAll (in View theView);
2727 * Set position of this view window relatively its splitter.
2728 * \param thePosition Desired position of this view window relatively
2729 * its splitter. Meaningfull values lays in range [0..1].
2731 * Direction of positioning is defined by the splitter orientation.
2733 void SetRelativePositionInSplitter (in double thePosition);
2736 * Set size of this view window relatively its splitter.
2737 * \param theSize Desired size of this view window relatively
2738 * its splitter. Meaningfull values lays in range [0..1].
2740 * Direction of resizing is defined by the splitter orientation.
2742 void SetRelativeSizeInSplitter (in double theSize);
2745 * Set horizontal position of this view window relatively its workstack.
2746 * \param thePosition Desired horizontal position of this view window
2747 * relatively its workstack. Meaningfull values lays in range [0..1].
2749 void SetRelativePositionX (in double thePosition);
2752 * Set vertical position of this view window relatively its workstack.
2753 * \param thePosition Desired vertical position of this view window
2754 * relatively its workstack. Meaningfull values lays in range [0..1].
2756 void SetRelativePositionY (in double thePosition);
2759 * Set horizontal size of this view window relatively its workstack.
2760 * \param theSize Desired horizontal size of this view window relatively
2761 * its workstack. Meaningfull values lays in range [0..1].
2763 void SetRelativeSizeX (in double theSize);
2766 * Set vertical size of this view window relatively its workstack.
2767 * \param theSize Desired vertical size of this view window relatively
2768 * its workstack. Meaningfull values lays in range [0..1].
2770 void SetRelativeSizeY (in double theSize);
2773 * Old methods for view parameters management, they don't work now
2775 void SetViewWidth (in long Width); //setting width of view
2776 void SetViewHeight (in long Height); //setting height of view
2777 long GetViewWidth(); //getting view width
2778 long GetViewHeight(); //getting view height
2779 enum ViewPosition {TOP, CENTER, BOTTOM, RIGHT, LEFT}; //position of the study frame
2780 void SetViewPositionHorizontal (in ViewPosition ViewPosHor); //setting of the horizontal view position
2781 void SetViewPositionVertical (in ViewPosition ViewPosVer); //setting of the vertical view position
2782 void SetRelativePosition( in double x, in double y );
2783 void SetRelativeSize( in double x, in double y );
2784 void Minimize(); // Minimizes to the task bar or to the bottom of the Desktop the %View frame.
2785 void Restore(); // Restores the %View frame.
2786 void Maximize(); // Maximizes the %View frame.
2789 * Sets the title of the %View frame.
2790 * \param theTitle String parameter defining the title of the %View frame.
2792 void SetTitle(in string theTitle);
2795 * Gets the title of the %View frame.
2800 * Sets background color of the %View frame.
2801 * \param theColor Background color defined in <VAR>SALOMEDS::Color</VAR> enumeration.
2803 void SetBackground(in SALOMEDS::Color theColor);
2806 * Gets background color of the %View frame.
2808 SALOMEDS::Color GetBackground();
2811 * Removes all presentations (presentable objects) from the %view.
2816 * Displays all presentations (presentable objects) in the %view.
2821 * Removes a definite presentation (presentable object) from the %view.
2822 * \param thePrsObj The presentation (presentable object) which should be deleted.
2824 void Erase(in PrsObject thePrsObj);
2827 * Displays a definite presentation (presentable object) in the %view.
2828 * \param thePrsObj The presentation (presentable object) which should be displayed.
2830 void Display(in PrsObject thePrsObj);
2833 * Allows to display only a definite presentation (presentable object) in the %view.
2834 * All other presentations are removed from the %view.
2835 * \param thePrsObj The presentation (presentable object) which should be displayed.
2837 void DisplayOnly(in PrsObject thePrsObj);
2846 * \param theFileName The name of the file where the view will be saved.
2847 * \return True, if the view have been saved successfully.
2849 boolean SavePicture(in string theFileName);
2852 //-------------------------------------------------------
2853 /*! \brief 3D view interface
2855 * This interface contains a set of methods necessary for representation of objects in 3D space.
2857 interface View3D : View {
2859 * This enumeration contains a set of elements determining a predefined point of view
2860 * (position of the camera in 3D space relative to the presentable object).
2862 enum ViewType{ FRONT, BACK, LEFT, RIGHT, TOP, BOTTOM};
2865 * This enumeration contains a set of elements determining the axis
2867 enum Axis{ XAxis, YAxis, ZAxis};
2870 * Data type defining coordinates in 3D space.
2872 typedef double XYZ[3];
2875 * Makes all presentations, which are currently present in the %view, completely visible.
2880 * Sets a predefined point of view (FRONT, BACK, LEFT, RIGHT, TOP, BOTTOM). (In other words it means
2881 * a predefined position of the camera in 3D space with respect to the object which is represented.)
2883 void SetView(in ViewType theType);
2886 * Sets the position of the camera in 3D space.
2887 * This point is used as the first point of the vector
2888 * defining the view direction of the camera.
2890 void SetPointOfView(in XYZ theCoord);
2893 * Gets the position of the camera in 3D space.
2894 * This point is used as the first point of the vector
2895 * defining the view direction of the camera.
2897 XYZ GetPointOfView();
2900 * Sets the vertical line of the camera in 3D space.
2902 void SetViewUp(in XYZ theDir);
2905 * Gets the vertical line of the camera in 3D space.
2910 * Sets the point of sight of the camera. This point is used as the
2911 * second point of the vector defining the view direction of the camera.
2913 void SetFocalPoint(in XYZ theDir);
2916 * Gets the point of sight of the camera. This point is used as the
2917 * second point of the vector defining the view direction of the camera.
2919 XYZ GetFocalPoint();
2922 * Zooming of the presentable object. Sets the scale.
2924 void SetParallelScale(in double theScale);
2927 * Zooming of the presentable object. Gets the scale.
2929 double GetParallelScale();
2932 * Scaling of the view along a definite axis.
2933 * \param theAxis The axis of the scaling
2934 * \param theParam The coefficient of the scaling
2936 void ScaleView(in Axis theAxis, in double theParam);
2939 * Removes the scaling of the view.
2944 * Saves view parameters.
2945 * \return True if the view parameters have been created, False if the parameters have been modified.
2946 * \param theName The name under which the view parameters will be saved.
2948 boolean SaveViewParams(in string theName);
2950 /*! Restores view parameters.
2951 * \return True if the view parameters have been found and applied to the view,
2952 * False if the parameters with this name don't exist.
2953 * \param theName The name of the view parameters which will be restored.
2955 boolean RestoreViewParams(in string theName);
2958 /*! Get representation type of the given presentation in this view.
2959 * \param thePrs Object to get a representation type of.
2960 * \return <VAR>PresentationType</VAR> Representation type of object in this view.
2962 PresentationType GetPresentationType(in ScalarMap thePrs);
2964 /*! Set representation type of the given presentation in this view.
2965 * \param thePrs Object to set a representation type of.
2966 * \param thePrsType Representation type to be set to the given object.
2967 * \return Empty string in case of success, error description in case of failure.
2969 string SetPresentationType(in ScalarMap thePrs, in PresentationType thePrsType);
2972 /*! Set representation type of 2D quadratic elements
2973 * of the given presentation in this view.
2974 * \param thePrs Object to set a representation type of 2D quadratic elements.
2975 * \param theType Representation type of 2D quadratic elements to be set to the given object.
2976 * \return Empty string in case of success, error description in case of failure.
2978 string SetQuadratic2DPresentationType(in ScalarMap thePrs,in Quadratic2DPresentationType theType);
2981 /*! Get representation type of the 2D quadratic mesh elements of given presentation in this view.
2982 * \param thePrs Object to get a representation type of 2D quadratic mesh elements.
2983 * \return <VAR>Quadratic2DPresentationType</VAR> Representation type of 2D quadratic mesh elements
2986 Quadratic2DPresentationType GetQuadratic2DPresentationType(in ScalarMap thePrs);
2989 /*! Get shrink state of the given presentation in this view.
2990 * \param thePrs Object to get a shrink state of.
2991 * \return TRUE if \a thePrs is shrinked in this view, FALSE overwise.
2993 boolean IsShrinked(in ScalarMap thePrs);
2995 /*! Make the given presentation shrinked or not shrinked in this view.
2996 * \param thePrs Object to change a shrink state of.
2997 * \param isShrinked Pass TRUE to make \a thePrs shrinked, FALSE overwise.
2998 * \return Empty string in case of success, error description in case of failure.
3000 string SetShrinked(in ScalarMap thePrs, in boolean isShrinked);
3002 /*! Get shading state of the given presentation in this view.
3003 * \param thePrs Object to get a shading state of.
3004 * \return TRUE if \a thePrs is shaded in this view, FALSE overwise.
3006 boolean IsShaded(in ScalarMap thePrs);
3008 /*! Make the given presentation shaded or not shaded in this view.
3009 * \param thePrs Object to set a shading state of.
3010 * \param isShaded Pass TRUE to make \a thePrs shaded, FALSE overwise.
3011 * \return Empty string in case of success, error description in case of failure.
3013 string SetShaded(in ScalarMap thePrs, in boolean isShaded);
3015 /*! Get opacity of the given presentation in this view.
3016 * \param thePrs Object to get an opacity of.
3017 * \return Opacity value in range [0, 1], 0 - transparent, 1 - opaque.
3019 double GetOpacity(in ScalarMap thePrs);
3021 /*! Set opacity of the given presentation in this view.
3022 * \param thePrs Object to set an opacity of.
3023 * \param theOpacity Opacity value [0, 1]. 0 - transparent, 1 - opaque.
3024 * \return Empty string in case of success, error description in case of failure.
3026 string SetOpacity(in ScalarMap thePrs, in double theOpacity);
3028 /*! Get line width of the given presentation in this view.
3029 * \param thePrs Object to get a line width of.
3030 * \return Line width of \a thePrs in this view.
3032 double GetLineWidth(in ScalarMap thePrs);
3034 /*! Set line width of the given presentation in this view.
3035 * \param thePrs Object to set a line width of.
3036 * \param theLineWidth Line width value. Recommended values are in range [1, 10].
3037 * \return Empty string in case of success, error description in case of failure.
3039 string SetLineWidth(in ScalarMap thePrs, in double theLineWidth);
3042 //-------------------------------------------------------
3043 /*! \brief Interface of the Table view
3045 * This interface is used for creation of a view necessary for presentation of a table.
3047 interface TableView : View {
3050 //-------------------------------------------------------
3051 /*! \brief Interface of the 2D plot view
3053 * This interface is used for creation of a view necessary for presentation
3054 * of a XY plot generated on the basis of one or several curve lines.
3056 interface XYPlot : View {
3057 /*! Sets the title of the XY plot
3058 * \param theTitle The title of the XY plot
3060 void SetSubTitle(in string theTitle);
3062 /*! Gets the title of the XY plot
3064 string GetSubTitle();
3067 * This enumeration contains a set of elements determining the type
3068 * of the curve lines, which will be displayed in your XY plot.
3070 enum CurveType { POINTS, MULTYLINE, SPLINE};
3072 /*! Sets the type of the curve lines.
3073 * \param theType The type of the curve lines taken from <VAR>CurveType</VAR> enumeration.
3075 void SetCurveType(in CurveType theType);
3077 /*! Gets the type of the curve lines.
3079 CurveType GetCurveType();
3081 /*! Sets the size of the markers (data points) with help of
3082 * which the curve is constructed on the graphics.
3083 * \param theSize Long value defining the size of the markers.
3085 void SetMarkerSize(in long theSize);
3087 /*! Gets the size of the markers (data points) with help of
3088 * which the curve is constructed on the graphics.
3090 long GetMarkerSize();
3092 /*! Enable/disables X-axis grid of the 2D plot.
3094 void EnableXGrid(in boolean theMajor, in long theNumMajor, in boolean theMinor, in long theNumMinor);
3096 /*! Enable/disables Y-axis grid of the 2D plot.
3098 void EnableYGrid(in boolean theMajor, in long theNumMajor, in boolean theMinor, in long theNumMinor);
3100 /*! Sets horizontal scaling of the 2D plot.
3101 * \param theScaling Type of scaling taken from <VAR>Scaling</VAR> enumeration.
3103 void SetHorScaling(in Scaling theScaling);
3105 /*! Gets the type horizontal scaling of the 2D plot.
3107 Scaling GetHorScaling();
3109 /*! Sets vertical scaling of the 2D plot.
3110 * \param theScaling Type of scaling taken from <VAR>Scaling</VAR> enumeration.
3112 void SetVerScaling(in Scaling theScaling);
3114 /*! Gets the type vertical scaling of the 2D plot.
3116 Scaling GetVerScaling();
3118 /*! Sets the title of the X-axis of the plot.
3119 * \param theTitle String value defining the title of the X-axis of the plot.
3121 void SetXTitle(in string theTitle);
3123 /*! Gets the title of the X-axis of the plot.
3127 /*! Sets the title of the Y-axis of the plot.
3128 * \param theTitle String value defining the title of the X-axis of the plot.
3130 void SetYTitle(in string theTitle);
3132 /*! Gets the title of the Y-axis of the plot.
3136 /*! Shows/hides the legend (description) of the 2D plot.
3138 void ShowLegend(in boolean theShowing);
3140 /*! Shrinks and enlarges the 2D plot to fit the 2D viewer.
3144 /*! Set range of the 2D plot to X axis of the 2D viewer.
3146 void FitXRange(in double xMin, in double xMax);
3148 /*! Set range of the 2D plot to Y axis of the 2D viewer.
3150 void FitYRange(in double yMin, in double yMax);
3152 /*! Set range of the 2D plot to XY axis of the 2D viewer.
3154 void FitRange(in double xMin, in double xMax,
3155 in double yMin, in double yMax);
3157 void GetFitRanges(out double xMin,out double xMax,
3158 out double yMin,out double yMax);
3161 //-------------------------------------------------------
3162 /*! \brief Interface of the %ViewManager
3164 * The ViewManager is necessary for work with view windows (creation and deletion).
3166 interface ViewManager: Base {
3167 /*! \brief Getting an active %View Frame
3169 * Returns an object reference to the active %View Frame.
3170 * Type of the %View must be checked.
3171 * \note <BR>Returns nil if there are no views currently opened.
3173 View GetCurrentView();
3175 /*! \brief Creation of a 3d %View.
3177 * Returns an object reference to the newly created 3D %View.
3179 View3D Create3DView();
3181 /*! \brief Creation of a Table %View.
3183 * Returns an object reference to the newly created Table %View.
3185 TableView CreateTableView(in Table theTable);
3187 /*! \brief Creation of a 2D plot %View.
3189 * Returns an object reference to the newly created 2D plot %View.
3191 XYPlot CreateXYPlot();
3193 /*! Deletes a definite view.
3194 * \param theView The view which should be deleted.
3196 void Destroy(in View theView);