1 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // File : VISU_Gen.idl
21 // Author : Alexey Petrov
23 /*! \file VISU_Gen.idl This file conatins a set of interfaces of the %VISU module.
24 * This module provides various forms of data visualization in %SALOME application.
25 * These forms include data tables, XY plots, 3d representations
26 * and combination of these forms.
32 #include "SALOME_Exception.idl"
33 #include "SALOME_GenericObj.idl"
34 #include "SALOME_Component.idl"
35 #include "SALOMEDS.idl"
36 #include "SALOMEDS_Attributes.idl"
40 The main package of interfaces of the post-processing module %VISU.
43 //-------------------------------------------------------
44 typedef string IdType;
47 * This enumeration contains a set of elements defining the type
48 * of the scaling, which can be applied on different presentations.
50 enum Scaling{ LINEAR, /*!< Linear type of scaling. */
51 LOGARITHMIC /*!< Logarithmic type of scaling. */
55 * This enumeration contains a set of elements defining the
56 * type of the %entity (topological units) constituting a mesh.
58 enum Entity{ NODE, /*!< Node corresponds to a geometrical point. */
59 EDGE, /*!< Edge corresponds to a geometrical line connecting two points. */
60 FACE, /*!< Face corresponds to a geometrical plane bounded by several lines. */
61 CELL /*!< Cell is a volumic element of a mesh */
65 * This enumeration contains a set of elements defining the type of the %VISU object.
66 * This enumeration is used for navigation between a set of %VISU interfaces.
69 TNONE, /*!< Not a %VISU object */
70 TCURVE, /*!< Curve line object for construction of 2D XY plots */
71 TTABLE, /*!< Table containing numerical data */
72 TCONTAINER, /*!< Container object used for storing a set of curve lines */
73 TMESH, /*!< Meshing object */
74 TSCALARMAP, /*!< Scalarmap 3D presentation object */
75 TISOSURFACE, /*!< Iso surface 3D presentation object */
76 TDEFORMEDSHAPE, /*!< Deformed shape 3D presentation object */
77 TSCALARMAPONDEFORMEDSHAPE, /*!< Scalar map on deformed shape 3D presentation object */
78 TGAUSSPOINTS, /*!< Gauss Points 3D presentation object */
79 TPLOT3D, /*!< Plot3D 3D presentation object */
80 TCUTPLANES, /*!< Cut planes 3D presentation object */
81 TCUTLINES, /*!< Cut lines 3D presentation object */
82 TVECTORS, /*!< Vectors 3D presentation object */
83 TSTREAMLINES, /*!< Streamlines 3D presentation object */
84 TVISUGEN, /*!< %VISU generator used for performing operations with different %VISU objects */
85 TVIEWMANAGER, /*!< View manager used for performing operations with different views */
86 TRESULT, /*!< The data on which different presentations are based */
87 TXYPLOT, /*!< 2D XY plot consisting of one or several curve lines */
88 TTABLEVIEW, /*!< Table view is used for displaying data tables */
89 TVIEW3D, /*!< 3D view is used for displaying 3D graphical presentations */
90 TGAUSSVIEW, /*!< 3D view is used for displaying Gauss Points graphical presentations */
91 TENTITY, /*!< An element composing a mesh: node, edge, face or cell */
92 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. */
93 TGROUP, /*!< A group of families */
94 TFIELD, /*!< Field represents the results of calculations (it can be scalar or vector values), grouped together under one physical concept. */
95 TTIMESTAMP, /*!<Time stamp represents a subfield: the results of calculations are taken in one definite moment. */
96 TANIMATION, /*!< Represents Animation object. */
102 * Returns ID of the object.
107 * Returns the type of the presentable object
113 * \brief Removable object interface
115 * Removable object interface is the root class of all removable objects.
117 interface RemovableObject : Base {
119 * Remove object from study.
121 void RemoveFromStudy();
124 /*! \brief Presentable object interface
126 * Presentable object interface is the root class of all presentable objects.
128 interface PrsObject : RemovableObject {
131 //-------------------------------------------------------
132 /*! \brief %Table representation interface
134 * Presentation parameters of the %Table view.
136 interface Table : PrsObject {
138 * Sets the title of the table.
139 * \param theTitle String parameter defining the title of this table.
141 void SetTitle(in string theTitle);
144 * Gets the title of the table.
145 * \return A string value containing the title of the table.
150 * This enumeration contains a set of elements defining the orientation of the table.
153 HORIZONTAL, /*!< Horizontal orientation of the table. */
154 VERTIACAL /*!< Vertical orientation of the table. */
158 * Sets orientation of the table.
159 * \param theOrientation This input parameter defines the orientation of the table.
160 * It is taken from the <VAR>Orientation</VAR> enumeration.
162 void SetOrientation(in Orientation theOrientation);
165 * Gets orientation of the table.
166 * \return Orientation of the table. The returned value will correspond
167 * to one of the elements the <VAR>Orientation</VAR> enumeration.
169 Orientation GetOrientation();
172 * Gets the number of rows of the table.
173 * \return Long value corresponding to the number of rows of the table
178 * Gets the number of columns of the table.
179 * \return Long value corresponding to the number of columns of the table
184 //-------------------------------------------------------
185 /*! \brief Interface of curve representation.
187 * Manages presentation parameters of one curve.
188 * It can be used for presentation of a set of curves using a combined presentation.
190 interface Curve : PrsObject {
192 * Sets the title of the curve.
193 * \param theTitle This string parameter defines the title of this curve.
195 void SetTitle(in string theTitle);
198 * Gets the title of the curve.
199 * \return String value corresponding to the title of the curve.
204 * Sets the color of the curve.
205 * \param theColor The color of the curve. This parameter is taken
206 * from the <VAR>Orientation</VAR> enumeration.
208 void SetColor(in SALOMEDS::Color theColor);
211 * Gets the color of the curve.
212 * \return Color of the curve. The returned value will correspond
213 * to one of the elements the <VAR>Color</VAR> enumeration.
215 SALOMEDS::Color GetColor();
218 * This enumeration contains a set of elements defining the
219 * presentation type of markers (data points) with help of
220 * which the curve is constructed on the graphics.
222 enum MarkerType { NONE,
235 * Sets the presentation type of markers (data points) with help of
236 * which the curve is constructed on the graphics.
237 * \param theType This parameter defines the type of marker with help
238 * of which the curve is constructed on the graphics.
239 * It is taken from <VAR>MarkerType</VAR> enumeration.
241 void SetMarker(in MarkerType theType);
244 * Gets the presentation type of markers (data points) with
245 * help of which the curve is constructed on the graphics.
246 * \return The type of marker with help of which the curve is constructed
247 * on the graphics. The returned value will correspond to
248 * one of the elements the <VAR>MarkerType</VAR> enumeration.
250 MarkerType GetMarker();
253 * This enumeration contains a set of elements defining the
254 * type of presentation of a curve line on the graphics.
256 enum LineType{ VOIDLINE, SOLIDLINE, DASHLINE, DOTLINE, DASHDOTLINE, DASHDOTDOTLINE};
259 * Sets the type of presentation of curve lines on the graphics.
260 * \param theType This parameter defines the type of presentation of curve lines on the graphics.
261 * \param theLineWidth Long value defining the width of the curve line.
263 void SetLine(in LineType theType, in long theLineWidth);
266 * Gets the type of representation of curve lines on the graphics.
267 * \return The type of representation of curve lines on the graphics.
272 * Gets the width of the curve line.
273 * \return Long value corresponding to the width of the curve line.
278 //-------------------------------------------------------
279 /*! \brief %Container presentable object interface
281 * This class is provided in order to create one presentation using several presentable objects.
282 * This can provide a combination of a set of curves to display them in XY plot view.
284 interface Container : PrsObject {
286 * Adds a curve into the container.
287 * \param theCurve The added curve.
289 void AddCurve(in Curve theCurve);
292 * Removes a curve from the container.
293 * \param theCurve The removed curve.
295 void RemoveCurve(in Curve theCurve);
298 * Gets the number of curves which are stored in the container.
299 * \return A long value corresponding to the number of curves which are stored in the container.
304 * Removes all curves from the container.
309 //-------------------------------------------------------
310 /*! \brief 3D presentation interface
312 * This is a root class for all 3D presentations, which can be displayed in %VISU module.
314 interface Prs3d : PrsObject, SALOME::GenericObj {
315 //interface Prs3d : PrsObject{
316 void SetOffset(in float theDx, in float theDy, in float theDz);
317 void GetOffset(out float theDx, out float theDy, out float theDz);
321 * This enumeration contains a set of elements defining the
322 * type of presentation of the mesh.
324 enum PresentationType{ POINT,
332 /*! \brief Interface of the mesh.
334 * Manages presentation parameters of a 3D presentation of a mesh.
335 * This object can be used for presentation of set of curves using Container class.
337 interface Mesh : Prs3d {
339 * Sets the color of mesh cells.
340 * \param theColor The color of the cells. This parameter is taken from <VAR>Color</VAR> enumeration.
342 void SetCellColor(in SALOMEDS::Color theColor);
345 * Gets the color of mesh cells.
347 SALOMEDS::Color GetCellColor();
350 * Sets the color of mesh nodes.
351 * \param theColor The color of the nodes. This parameter is taken from <VAR>Color</VAR> enumeration.
353 void SetNodeColor(in SALOMEDS::Color theColor);
356 * Gets the color of mesh nodes.
358 SALOMEDS::Color GetNodeColor();
361 * Sets the color of mesh links.
362 * \param theColor The color of the links. This parameter is taken from <VAR>Color</VAR> enumeration.
364 void SetLinkColor(in SALOMEDS::Color theColor);
367 * Gets the color of mesh links.
369 SALOMEDS::Color GetLinkColor();
372 * Sets the type of representation of a mesh.
373 * \param theType The of representation of a mesh. This parameter is
374 * taken from <VAR>PresentationType</VAR> enumeration.
376 void SetPresentationType(in PresentationType theType);
379 * Gets the type of representation of the mesh.
380 * \return The type of representation of the mesh.
382 PresentationType GetPresentationType();
386 //-------------------------------------------------------
387 /*! \brief Basic Interface for the %Colored 3D Presentations
389 * This interface is responsable for coloring of 3D field presentations
390 * according the scalar values applied to different cells.
391 * As well it contains presentation parameters of the scalar bar. The scalar
392 * bar is displayed along with each colored field presentation and serves for
393 * consulting the correspondance between colors and data values.
395 interface ColoredPrs3d : Prs3d {
396 /*! Sets the method of coloring of the elements composing a 3D presentation.
398 void SetScalarMode(in long theScalarMode);
400 /*! Gets the method of coloring of the elements composing a 3D presentation.
402 long GetScalarMode();
405 * Gets the min boundary of the scalar bar.
410 * Gets the max boundary of the scalar bar.
414 /*! \brief Position of the scalar bar.
416 * Sets the position of the scalar bar origin on the screen.
417 * \param X Horizontal position. The value can be between 0 and 1.
418 * \param Y Vertical position. The value can be between 0 and 1.
420 void SetPosition(in double X, in double Y);
423 * Gets horizontal position of the scalar bar origin.
428 * Gets vertical position of the scalar bar origin.
432 /*! \brief Size of this presentable object.
434 * Sets the size of the scalar bar.
435 * \param theWidth Width of this presentable object. The value can be between 0 and 1.
436 * \param theHeight Height of this presentable object. The value can be between 0 and 1.
438 void SetSize(in double theWidth, in double theHeight);
441 * Gets the width of this presentable object.
442 * \return A double value corresponding to the width of this presentable object.
447 * Gets the height of this presentable object.
448 * \return A double value corresponding to the height of this presentable object.
453 * Sets the number of colors which will be used for presentation of this presentable object.
454 * \param theNbColors A long value defining the number of colors.
456 void SetNbColors(in long theNbColors);
459 * Gets the number of colors which will be used for visualization of this presentable object.
460 * \return A long value corresponding to the number of colors which
461 * will be used for visualization of this presentable object.
466 * Sets the number of labels which will be used for indication of color gradation
468 * \param theNbLabels A long value defining the number of labels.
470 void SetLabels(in long theNbLabels);
473 * Gets the number of labels which will be used for indication of color gradation of the scalar bar.
474 * \return A long value corresponding to the number of labels which will
475 * be used for indication of color gradation of the scalar bar.
480 * Sets the title of the scalar bar. By default - the name of the selected result is used.
481 * \param theName String parameter defining the name of the scalar bar.
483 void SetTitle(in string theName);
486 * Gets the title of the scalar bar.
492 //-------------------------------------------------------
493 /*! \brief Interface of the %Scalar Map
495 * This interface is responsable for coloring of 3D field presentations
496 * according the scalar values applied to different cells.
497 * As well it contains presentation parameters of the scalar bar. The scalar
498 * bar is displayed along with each colored field presentation and serves for
499 * consulting the correspondance between colors and data values.
501 interface ScalarMap : ColoredPrs3d {
503 * Sets the type of scaling of the values reflected by the scalar bar.
504 * \param theScaling The value of this parameter is taken from the <VAR>Scaling</VAR> enumeration.
506 void SetScaling(in Scaling theScaling);
509 * Gets the type of scaling of the values reflected by this presentation.
511 Scaling GetScaling();
514 * Sets scalar range - min and max boundaries of the scalar bar.
515 * \param theMin Min boundary of the scalar bar.
516 * \param theMax Max boundary of the scalar bar.
518 void SetRange(in double theMin, in double theMax);
520 /*! %Orientation of the scalar bar (to provide backward compatibility). */
522 HORIZONTAL, /*!< Horizontal orientation of the scalar bar.*/
523 VERTICAL /*!< Vertical orientation of the scalar bar.*/
527 * Sets the type of orientation of the scalar bar (to provide backward compatibility).
528 * \param theOrientation This parameter defines the orientation of the scalar bar.
529 * It is taken from the <VAR>Orientaton</VAR> enumeration.
531 void SetBarOrientation(in Orientation theOrientation);
534 * Gets the type of orientation of the scalar bar (to provide backward compatibility).
536 Orientation GetBarOrientation();
539 //-------------------------------------------------------
540 /*! \brief Gauss Points presentation interface
542 * Presentation parameters of the Gauss Points presentation.
544 //-------------------------------------------------------
545 interface GaussPoints : ColoredPrs3d {
548 /*! \brief Deformed shape presentation interface
550 * Presentation parameters of the deformed shape presentation.
552 interface DeformedShape : ScalarMap {
554 * Sets the scale of the presentatable object.
555 * \param theScale Double value defining the scale of this presentable object.
557 void SetScale(in double theScale);
560 * Gets the scale of the presentatable object.
564 /*! This boolean method returns True if this deformed shape presentation is colored.
568 /*! Shows this presentation in colored mode.
569 * \param theColored If this boolean parameter is True this presentable
570 * object will be shown in colored mode.
572 void ShowColored(in boolean theColored);
574 /*! Gets the color of this presentable object.
575 * \return The color of this presentable object.
577 SALOMEDS::Color GetColor();
579 /*! Sets the color of this presentation.
580 * \param theColor The color of this presentation. This parameter
581 * is taken from the <VAR>Color</VAR> enumeration.
583 void SetColor(in SALOMEDS::Color theColor);
586 //-------------------------------------------------------
587 /*! \brief Scalar Map on Deformed shape presentation interface
589 * Presentation parameters of the scalar map on deformed shape presentation.
591 interface ScalarMapOnDeformedShape : ScalarMap {
594 * Sets the source ranges of pipeline
596 void SetSourceRange(in double theMinRange,in double theMaxRange);
598 * Gets the minimum source range of pipeline
600 double GetSourceRangeMin();
602 * Gets the maximum source range of pipeline
604 double GetSourceRangeMax();
607 * Sets the scale of the presentatable object.
608 * \param theScale Double value defining the scale of this presentable object.
610 void SetScale(in double theScale);
613 * Gets the scale of the presentatable object.
618 * Sets the scalar field
619 * \param theMeshName - mesh name
620 * \param theFieldName - the name of scalar field
621 * \param theIteration - the iteration number for scalar field
622 * \param theEntity - entity of scalar field
624 void SetScalarField(in string theMeshName,in string theFieldName,
625 in long theIteration,in Entity theEntity);
628 //-------------------------------------------------------
630 * \brief Plot3D interface
632 * Presentation parameters of Plot3D presentation. This type of presentation
633 * consists of deforming initial planar mesh according to values assigned to the mesh elements.
634 * If mesh not planar but volumic one, it is possible to generate intermediate planar mesh.
636 interface Plot3D : ScalarMap {
638 * This enumeration contains a set of elements defining
639 * the type of orientation in 3D space of the cutting plane.
641 enum Orientation { XY, /*!< The object is located in the plane formed by X and Y axis. */
642 YZ, /*!< The object is located in the plane formed by Y and Z axis. */
643 ZX }; /*!< The object is located in the plane formed by Z and X axis. */
646 * Sets the orientation in 3D space of cutting plane for the presentation.
647 * \param theOrientation This parameter defines the type of orientation of cutting plane
648 * in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
649 * \param theXAngle The angle of rotation of the cutting plane
650 * around the first axis of the chosen orientation.
651 * \param theXAngle The angle of rotation of the cutting plane
652 * around the second axis of the chosen orientation.
654 void SetOrientation (in Orientation theOrientation, in double theXAngle, in double theYAngle);
657 * Gets the type of orientation in 3D space of cutting plane.
659 Orientation GetOrientationType();
662 * Gets rotation angle of the cutting plane
663 * around the first axis of the chosen orientation.
668 * Gets rotation angle of the cutting plane
669 * around the second axis of the chosen orientation.
674 * Sets the position of a cutting plane.
675 * \param thePlanePosition The position of the cutting plane.
676 * \param theIsRelative Define, whether the input position is relative.
678 void SetPlanePosition (in double thePlanePosition,
679 in boolean theIsRelative);
682 * Gets the position of the cutting plane
684 double GetPlanePosition();
687 * Returns true if a position of cutting plane is relative
689 boolean IsPositionRelative();
692 * Sets the scale factor for scalar values
693 * (how much corresponding mesh elements should be translated).
694 * \param theScaleFactor The scaling factor.
696 void SetScaleFactor (in double theScaleFactor);
699 * Gets the scale factor for scalar values.
700 * (how much corresponding mesh elements is translated)
702 double GetScaleFactor();
705 * Sets presentation type: contour or surface.
706 * \param theIsContourPrs Define, whether presentation type is contour.
708 void SetContourPrs (in boolean theIsContourPrs );
711 * Returns true if presentation type is contour.
713 boolean GetIsContourPrs();
716 * Sets the number of contours.
717 * \param theNb The number of contours.
719 void SetNbOfContours (in long theNb);
722 * Gets the number of contours.
724 long GetNbOfContours();
727 //-------------------------------------------------------
728 /*! \brief Cut planes interface
730 * Presentation parameters of Cut planes presentation. This type of presentation
731 * consists of cutting your initial mesh by a definite number of planes. As the
732 * result you will see these planes which will be cutted by the borders of the mesh.
734 interface CutPlanes : ScalarMap {
736 * This enumeration contains a set of elements defining the type of orientation in 3D space
739 enum Orientation {XY, /*!< The object is located in the plane formed by X and Y axis. */
740 YZ, /*!< The object is located in the plane formed by Y and Z axis. */
741 ZX}; /*!< The object is located in the plane formed by Z and X axis. */
744 * Sets the type of orientation in 3D space of cut planes presentation.
745 * \param theOrientation This parameter defines the type of orientation of cut planes
746 * in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
747 * \param theXAngle The angle of rotation of the cut planes around
748 * the first axis of the chosen orientation.
749 * \param theXAngle The angle of rotation of the cut planes around
750 * the second axis of the chosen orientation.
752 void SetOrientation(in Orientation theOrientation, in double theXAngle, in double theYAngle);
755 * Gets the type of orientation in 3D space of cut planes presentation.
757 Orientation GetOrientationType();
760 * Gets rotation angle of the cut plane presentation around the first axis of the chosen orientation.
765 * Gets rotation angle of the cut plane presentation around the second axis of the chosen orientation.
770 * Sets the displacement of the cut planes in 3D space.
772 * \param theDisp This parameter defines position of the cut planes
773 * in 3D space. It varies from 0 to 1. If the chosen value is 0.5, the cut planes
774 * will be evenly located regarding each other; in other words, the distance between all
775 * of them will be equal. If the value is higher or lower than 0.5, the planes will be displaced
776 * to one or another side.
778 void SetDisplacement(in double theDisp);
781 * Gets the displacement of the cut planes in 3D space.
783 double GetDisplacement();
786 * Sets the position of a definite cut plane.
787 * \param thePlaneNumber The number of this cut plane.
788 * \param thePlanePosition The position of this cut plane.
790 void SetPlanePosition(in long thePlaneNumber, in double thePlanePosition);
793 * Sets the position of the choosen plane to default value.
794 * \param thePlaneNumber The number of this cut plane.
796 void SetDefault(in long thePlaneNumber);
799 * Gets the position of the choosen plane
801 double GetPlanePosition(in long thePlaneNumber);
804 * Determines whether the choosen plane has default position.
805 * \param thePlaneNumber The number of this cut plane.
807 boolean IsDefault(in long thePlaneNumber);
810 * Sets the number of cut planes.
811 * \param theNb The number of cut planes.
813 void SetNbPlanes(in long theNb);
816 * Gets the number of cut planes.
821 //-------------------------------------------------------
822 /*! \brief Cut lines presentation.
824 * Presentation parameters of a Cut lines presentation.
825 * Cut Lines is a type of presentation which displays colored cells
826 * with applied scalar values on the mesh where lines are placed.
827 * The procedure of construction of a Cut Lines presentation reuses the algorithm
828 * of creation of Cut Planes presentation and consists of two steps:
830 * 1. From Cut Planes presentation one plane is taken and
831 * it is used as base plane for construction of cut lines.
832 * 2. This plane is cut by a regular array of planes. The result of this
833 * operation is a regular array of lines in space, belonging to the same plane
834 * and having the same orientation. They are located inside or on the mesh.
836 interface CutLines : ScalarMap {
838 * Sets the type of orientation in 3D space of the base plane of a cut lines presentation.
839 * \param theOrientation The orientation of the base plane in 3D space.
840 * \param theXAngle The angle of rotation of the base plane around
841 * the first axis of the chosen orientation.
842 * \param theXAngle The angle of rotation of the base plane around
843 * the second axis of the chosen orientation.
845 void SetOrientation(in CutPlanes::Orientation theOrientation, in double theXAngle, in double theYAngle);
848 * Sets the type of orientation in 3D space of the cutting planes of a cut lines presentation.
849 * \param theOrientation This parameter defines the type of orientation of the cutting planes
850 * in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
851 * \param theXAngle The angle of rotation of the cutting planes
852 * around the first axis of the chosen orientation.
853 * \param theXAngle The angle of rotation of the cutting planes
854 * around the second axis of the chosen orientation.
856 void SetOrientation2(in CutPlanes::Orientation theOrientation, in double theXAngle, in double theYAngle);
859 * Gets the type of orientation in 3D space of the base plane of a cut lines presentation.
861 CutPlanes::Orientation GetOrientationType();
864 * Gets the type of orientation in 3D space of the cutting planes of a cut lines presentation.
866 CutPlanes::Orientation GetOrientationType2();
869 * Gets rotation angle of the base plane around the first axis of the chosen orientation.
874 * Gets rotation angle of the cutting planes around the first axis of the chosen orientation.
876 double GetRotateX2();
879 * Gets rotation angle of the base plane around the second axis of the chosen orientation.
884 * Gets rotation angle of the cutting planes around the second axis of the chosen orientation.
886 double GetRotateY2();
889 * Sets the displacement of the base plane of the cut lines presentation in 3D space.
891 * \param theDisp This parameter defines position of the base plane
892 * in 3D space. It varies from 0 to 1.
894 void SetDisplacement(in double theDisp);
897 * Sets the displacement of the cutting planes of the cut lines presentation in 3D space.
899 * \param theDisp This parameter defines position of the cutting planes
900 * in 3D space. It varies from 0 to 1.
902 void SetDisplacement2(in double theDisp);
905 * Gets the displacement of the base plane of the cut lines presentation in 3D space.
907 double GetDisplacement();
910 * Gets the displacement of the cutting planes of the cut lines presentation in 3D space.
912 double GetDisplacement2();
914 /*! Sets the position of the base plane in 3D space.
915 * \param thePlanePosition A double value defining the position of the base plane in 3D space.
917 void SetBasePlanePosition(in double thePlanePosition);
919 /*! Gets the position of the base plane in 3D space.
921 double GetBasePlanePosition();
923 /*! Sets the position of one of cutting planes in 3D space.
924 * \param thePlaneNumber A long value defining the order number of this cutting plane.
925 * \param thePlanePosition A double value defining the position of the base plane in 3D space.
927 void SetLinePosition(in long thePlaneNumber, in double thePlanePosition);
929 /*! Gets the position of one of cutting planes in 3D space.
930 * \param thePlaneNumber A long value defining the order number of this cutting plane.
932 double GetLinePosition(in long thePlaneNumber);
934 /*! Sets the position of the base plane to default value.
939 * Determines whether the base plane has default position.
940 * \return True if the base plane has default position.
945 * Sets the position of the choosen cutting plane to default value.
946 * \param thePlaneNumber The number of this cutting plane.
948 void SetDefaultPosition(in long thePlaneNumber);
951 * Determines whether the choosen cutting plane has default position.
952 * \param thePlaneNumber The number of this cutting plane.
953 * \return True if this cutting plane has default position.
955 boolean IsDefaultPosition(in long thePlaneNumber);
958 * Sets the number of cut lines.
959 * \param theNb The number of cut lines.
961 void SetNbLines(in long theNb);
964 * Gets the number of cut lines.
969 /*! \brief Interface of the stream lines representation
971 * This interface contains presentation parameters of stream lines presentations.
972 * <BR>Stream lines is a type of presentation transforming into lines the
973 * cells with vectors having most similar direction. A stream line can be thought
974 * of as the path that a massless particle takes in a vector field.
975 * Streamlines are used to convey the structure of a vector field.
976 * Usually streamlines are created to explore the most interesting features in the field.
978 interface StreamLines : DeformedShape {
979 /*! This enumerations contains a set of elements necessary
980 * for definition of direction of the stream lines.
982 enum Direction{ FORWARD,
987 /*! Sets the parameters of the stream lines presentation.
988 * \param theIntStep Inegration step is a parameter of smoothness of the stream lines.
989 * This parameter defines the accuracy of construction of the streamlines.
990 * A smaller value of this parameter allows to construct smoother
991 * streamlines (at the cost of more computation time).
992 * \param thePropogationTime This parameter controls the maximum length of
993 * the stream line (measured in units of time).
994 * \param theStepLength This parameter defines the size of the output line segments
995 * that make up the streamline (which is represented as a polyline).
996 * \param thePrs3d The source presentation. The points of the field located on this source
997 * presentation will serve as starting points for generation of stream lines.
998 * \note If this parameter is not defined, your stream lines
999 * presentation will be generated on all points of the field.
1000 * \param thePercents This parameter defines the quantity of points of the field
1001 * (from 0 to 100%) which will be used as starting points for
1002 * construction of the stream lines. Thus, the value of this
1003 * parameter can vary from 0 to 1.
1004 * \param theDirection Direction of the stream lines (Forward, Backward or Both).
1005 * \return True if all parameters are properly set.
1007 boolean SetParams(in double theIntStep,
1008 in double thePropogationTime,
1009 in double theStepLength,
1011 in double thePercents,
1012 in Direction theDirection);
1014 /*! Gets the value of integration step of the stream lines presentation.
1016 double GetIntegrationStep();
1018 /*! Gets the value of propagation time of the stream lines presentation.
1020 double GetPropagationTime();
1022 /*! Gets the value of step length of the stream lines presentation.
1024 double GetStepLength();
1026 /*! Returns the source presentation used for generation of the stream lines.
1030 /*! Gets the quantity of points of the field used as starting
1031 * points for generation of the stream lines presentation.
1033 double GetUsedPoints();
1035 /*! Returns the direction of the stream lines.
1037 Direction GetDirection();
1040 /*! \brief Interface of the isometric surface presentation
1042 * This interface contains presentation parameters of
1043 * isometric surface presentations.
1044 * <BR>Iso surfaces presentation combines all equal scalar
1045 * values on the cells and on the basis of them constructs
1046 * isobaric surfaces, which form this presentation.
1048 interface IsoSurfaces : ScalarMap {
1050 * Sets the number of isometric surfaces.
1051 * \param theNb A long value defining the number of isometric surfaces
1052 * which will be used for construction of this presentation.
1054 void SetNbSurfaces(in long theNb);
1057 * Gets the number of isometric surfaces
1059 long GetNbSurfaces();
1062 //-------------------------------------------------------
1063 /*! \brief Interface of the vector presentation.
1065 * This interface contains presentation parameters of vector presentations.
1067 interface Vectors : DeformedShape {
1069 * Sets the width of the lines of the vectors.
1070 * \param theWidth A double value defining the width of the lines of the vectors.
1072 void SetLineWidth(in double theWidth);
1075 * Gets the width of the lines of the vectors.
1077 double GetLineWidth();
1080 * This enumeration contains a set of elements defining the type of representation of the vector head.
1082 enum GlyphType{ ARROW,
1089 * Sets the type of representation of the vector head.
1090 * \param theType This parameter defines the type of representation of the vector head.
1091 * This value is taken from the <VAR>GlyphType</VAR> enumeration.
1093 void SetGlyphType(in GlyphType theType);
1096 * Gets the type of representation of the vector head.
1098 GlyphType GetGlyphType();
1101 * This enumeration contains a set of elements defining the position of the vector head.
1103 enum GlyphPos{ CENTER, /*!<In the center of the vector.*/
1104 TAIL, /*!<In the tail of the vector.*/
1105 HEAD /*!<In the head of the vector.*/
1109 * Sets the position of the vector head.
1110 * \param thePos This parameter defines the position of the vector head.
1111 * This value is taken from the <VAR>GlyphPos</VAR> enumeration.
1113 void SetGlyphPos(in GlyphPos thePos);
1116 * Gets the position of the vector head.
1118 GlyphPos GetGlyphPos();
1121 //-------------------------------------------------------
1122 /*! \brief %Animation class
1124 * This class provides a set of methods used for:<br>
1126 * <li> generating different animations on the basis of a field,
1127 * <li> setting the parameters of the animations,
1128 * <li> playing these animations in the %VISU module.
1131 * <BR><B>Field</B> represents the results of calculations
1132 * (it can be scalar or vector values), grouped together under one physical concept.
1133 * <BR><B>Time stamp</B> represents a subfield: the results
1134 * of calculations are taken in one definite moment.
1136 interface Animation : Base {
1137 /*! Defines the field which will be used as a base for generation of the animation.
1138 * \param theObject The %SObject corresponding to the field.
1140 void addField(in SALOMEDS::SObject theObject);
1142 /*! Generates presentations on the basis of the field.
1143 * \param theFieldNum The number of the field, which will be used
1144 * as the basis for construction of the presentation.
1146 void generatePresentations(in long theFieldNum);
1148 /*! Generates a set of frames from the created by the method
1149 * <VAR>generatePresentations</VAR>3D presentations. A sequence of
1150 * these frames will be transformed into an animation.
1151 * \return True, if the frames have been successfully generated.
1153 boolean generateFrames();
1155 /*! Clears the view before starting an animation.
1159 /*! \name Playback of an animation:
1163 /*! Starts an animation.
1165 void startAnimation();
1167 /*! Stops an animation.
1169 void stopAnimation();
1171 /*! Forwards to the next frame.
1175 /*! Returns to the previous frame.
1179 /*! Returns to the first frame of the animation.
1183 /*! Forwards to the last frame of the animation.
1187 /*! Passes to a definite frame of the animation.
1188 * \param theFrame A long value defining the number of the frame.
1190 void gotoFrame(in long theFrame);
1193 /*! Gets the number of time stamps (subfields) contained in the given field.
1197 /*! Gets the number of generated frames
1201 /*! Returns True, if the animation is currently running.
1203 boolean isRunning();
1205 /*! Returns the number of the current frame.
1207 long getCurrentFrame();
1211 ColoredPrs3d getPresentation(in long theField, in long theFrame);
1213 /*! Sets the type of presentation (vectors, deformed shape etc.)
1214 * which will be generated by the method <VAR>generatePresentations</VAR>.
1216 void setPresentationType(in long theFieldNum, in VISUType theType);
1218 /*! Gets the type of presentation (vectors, deformed shape etc.) which will
1219 * be generated by the method <VAR>generatePresentations</VAR>.
1221 VISUType getPresentationType(in long theFieldNum);
1223 /*! Sets the speed of the animation.
1224 * \param theSpeed The speed of the animation. The value varies from 1 to 99.
1226 void setSpeed(in long theSpeed);
1228 /*! Gets the speed of the animation.
1232 /*! Ruturns True, if playback of the animation is proportional.
1233 * This option allows to render your animation with proportional periods
1234 * of time between every frame (not depending on the time stamps).
1236 boolean isProportional();
1238 /*! Sets the range of the animation. The range is defined on the basis of
1239 * the time stamps of the field which have been used for generation of the animation.
1240 * This method allows to bound the range of generated frames.
1241 * If this method is not used, the animation will be generated
1242 * on the basis of all time stamps contained in the field.
1243 * \param theMin The value of the first time stamp which will be used for generation of the animation.
1244 * \param theMax The value of the last time stamp which will be used for generation of the animation.
1246 void setAnimationRange(in double theMin, in double theMax);
1248 /*! Gets the number of the first time stamp which will be used for generation of the animation.
1250 double getMinRange();
1252 /*! Gets the number of the last time stamp which will be used for generation of the animation.
1254 double getMaxRange();
1256 /*! Returns True if the range of the animation has been defined
1257 * by the method <VAR>setAnimationRange</VAR>. Otherwise
1258 * the animation will be generated on the basis of all time stamps contained in the field.
1260 boolean isRangeDefined();
1262 /*! Saves all the frames composing the animation into a definite directory.
1263 * Pictures format is set with method <VAR>setDumpFormat()</VAR>.
1264 * \param thePath The directory where all the frames will be saved.
1266 void dumpTo(in string thePath);
1268 /*! Set format for saving all the frames composing the animation.
1269 * \param theFormat The format for saving pictures.
1270 * For available formats see QImageIO documentation (Qt).
1271 * If specified format is not available, default format will be used.
1272 * Default format is JPEG or first of supported, if JPEG is not available.
1273 * \return Really set format. Differ from \a theFormat if \a theFormat is not available.
1275 string setDumpFormat(in string theFormat);
1277 /*! Returns True, if the playback of the animation is cycling.
1279 boolean isCycling();
1281 /*! Gets the first time stamp of the field defined at the input of the animation.
1282 * \note This method is used if animation range is <b>NOT</b> defined.
1284 double getMinTime();
1286 /*! Gets the last time stamp of the field defined at the input of the animation.
1287 * \note This method is used if animation range is <b>NOT</b> defined.
1289 double getMaxTime();
1291 /*! Sets proprtional playback of the animation. This option allows to render your animation
1292 * with proportional periods of time between every frame (not depending on the time stamps).
1293 * \param theProp If this boolean parameter is True, playback
1294 * of your animation will be set as proportional.
1296 void setProportional(in boolean theProp);
1298 /*! Sets cycling playback of the animation. The number of cycles
1299 * can be infinite, untill you use <VAR>startAnimation</VAR> method.
1300 * \param theCycle If this boolean parameter is True, playback
1301 * of your animation will be set as cycling.
1303 void setCycling(in boolean theCycle);
1305 SALOMEDS::SObject publishInStudy();
1307 void saveAnimation();
1309 void restoreFromStudy(in SALOMEDS::SObject theSObj);
1311 boolean isSavedInStudy();
1314 /*! \brief Interface %Result
1316 * This interface serves for inner representation of data generated
1317 * in other sources (MED object or file). This data is needed
1318 * for further construction of graphical presentations.
1320 interface Result : RemovableObject, SALOME::GenericObj {
1321 /*! Reads all data from the corresponding sources. By default the data is loaded on demand.
1325 /*! Start to parse the source MED file and publish all its entities into the study*/
1326 boolean Build(in boolean theIsBuildAll, in boolean theIsAtOnce);
1328 /*! Allow to check is all requested MED entites already loaded or not */
1331 /*! Allow to check is corresponding MED entites already loaded or not */
1332 boolean IsEntitiesDone();
1334 /*! Choose to parse MED fields and perform global min / max on the MED timestamps.*/
1335 void SetBuildFields(in boolean theIsBuildFields, in boolean theIsCalculateMinMax);
1337 /*! Allow to check is corresponding MED fields already loaded or not */
1338 boolean IsFieldsDone();
1340 /*! Choose to parse MED groups.*/
1341 void SetBuildGroups(in boolean theIsBuildGroups);
1343 /*! Allow to check is corresponding MED groups and families already loaded or not */
1344 boolean IsGroupsDone();
1346 /*! Allow to check is min / max calculation over field's components already perfrormed or not */
1347 boolean IsMinMaxDone();
1350 //-------------------------------------------------------
1351 interface ViewManager;
1354 /*! \brief %VISU_Gen interface
1356 * This is the main interface of %VISU component. It is necessary for creation of
1357 * post-processing presentations from given %Result and %Table object reference,
1358 * using the views provided by %ViewManager.
1360 interface VISU_Gen : Engines::Component, SALOMEDS::Driver, Base {
1361 /*! Sets a definite study to be current.
1363 void SetCurrentStudy(in SALOMEDS::Study theStudy);
1365 /*! Gets the current study.
1367 SALOMEDS::Study GetCurrentStudy();
1370 * Gets the %View Manager which is used for creation of
1371 * post-processing presentations.
1373 ViewManager GetViewManager();
1376 * Imports tables from a file and create TableAttribute in Sudy
1378 SALOMEDS::SObject ImportTables(in string theFileName);
1381 * Export table to a file
1383 boolean ExportTableToFile(in SALOMEDS::SObject theTable, in string theFileName);
1386 * Imports data from a file. The access to this file will be conserved outside of the application.
1387 * \param theFileName String parameter defining the name of the file
1388 * from which the data will be imported.
1390 Result ImportFile(in string theFileName);
1393 * Create result and initialize its with the file. The access to this file will be conserved outside of the application.
1394 * \param theFileName String parameter defining the name of the file
1395 * from which the data will be imported.
1397 Result CreateResult(in string theFileName);
1400 * Imports data from a file. The access to this file will closed.
1401 * \param theFileName String parameter defining the name of the file
1402 * from which the data will be imported.
1404 Result CopyAndImportFile(in string theFileName);
1407 * Imports data from a %MED object.
1409 Result ImportMed(in SALOMEDS::SObject theMedSObject);
1412 * Imports data from a %MED field.
1414 Result ImportMedField(in SALOME_MED::FIELD theField);
1417 * Rename a study object, representing a mesh, specified by given values.
1418 * \param theResult Data generated in other sources (MED object or file).
1419 * \param theMeshName One of the meshes presented in MED file.
1420 * \param theEntity Type of entity where the field is defined.
1421 * \param theSubMeshName Name of sub-mesh (group or family).
1422 * \param theNewName Name to be given to the study object.
1424 void RenameEntityInStudy(in Result theResult,
1425 in string theMeshName,
1426 in Entity theEntity,
1427 in string theNewName);
1428 void RenameFamilyInStudy(in Result theResult,
1429 in string theMeshName,
1430 in Entity theEntity,
1431 in string theSubMeshName,
1432 in string theNewName);
1433 void RenameGroupInStudy(in Result theResult,
1434 in string theMeshName,
1435 in string theSubMeshName,
1436 in string theNewName);
1439 * Creates a mesh on the basis of the data generated in other sources (MED object or file).
1440 * \param theResult Data generated in other sources. (MED object or file)
1441 * \param theMeshName One of the meshes presented in MED file
1442 * \param theEntity Type of entity where the field is defined
1444 Mesh MeshOnEntity(in Result theResult, in string theMeshName, in Entity theEntity);
1447 * Creates on the basis of a family a mesh which will be composed of geometrical
1448 * elements, corresponding to the type of cells (node, edge, face or cell) of this family.
1449 * \param theResult Data generated in other sources. (MED object or file)
1450 * \param theMeshName One of the meshes presented in MED file
1451 * \param theEntity Type of entity where the field is defined.
1453 Mesh FamilyMeshOnEntity(in Result theResult, in string theMeshName,
1454 in Entity theEntity, in string theFamilyName);
1457 * Creates a mesh on the basis of a group of families.
1458 * \param theResult Data generated in other sources. (MED object or file)
1459 * \param theMeshName One of the meshes presented in MED file
1460 * \param theGroupName Name of the group.
1462 Mesh GroupMesh(in Result theResult, in string theMeshName, in string theGroupName);
1465 * Creates a scalar map presentation.
1466 * \param theResult Data generated in other sources. (MED object or file)
1467 * \param theMeshName One of the meshes presented in MED file
1468 * \param theEntity Type of entity where the field is defined
1469 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1470 * \param theIteration Number of iteration on the field
1472 ScalarMap ScalarMapOnField(in Result theResult, in string theMeshName,
1473 in Entity theEntity, in string theFieldName,
1474 in double theIteration);
1477 * Creates a Gauss Points presentation.
1478 * \param theResult Data generated in other sources. (MED object or file)
1479 * \param theMeshName One of the meshes presented in MED file
1480 * \param theEntity Type of entity where the field is defined
1481 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1482 * \param theIteration Number of iteration on the field
1484 GaussPoints GaussPointsOnField(in Result theResult, in string theMeshName,
1485 in Entity theEntity, in string theFieldName,
1486 in double theIteration);
1489 * Creates a deformed shape presentation.
1490 * \param theResult Data generated in other sources. (MED object or file)
1491 * \param theMeshName One of the meshes presented in MED file
1492 * \param theEntity Type of entity where the field is defined
1493 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1494 * \param theIteration Number of iteration on the field
1496 DeformedShape DeformedShapeOnField(in Result theResult, in string theMeshName,
1497 in Entity theEntity, in string theFieldName,
1498 in double theIteration);
1501 * Creates a deformed shape presentation.
1502 * \param theResult Data generated in other sources. (MED object or file)
1503 * \param theMeshName One of the meshes presented in MED file
1504 * \param theEntity Type of entity where the field is defined
1505 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1506 * \param theIteration Number of iteration on the field
1508 ScalarMapOnDeformedShape ScalarMapOnDeformedShapeOnField(in Result theResult, in string theMeshName,
1509 in Entity theEntity, in string theFieldName,
1510 in double theIteration);
1513 * Creates a vector presentation.
1514 * \param theResult Data generated in other sources. (MED object or file)
1515 * \param theMeshName One of the meshes presented in MED file
1516 * \param theEntity Type of entity where the field is defined
1517 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1518 * \param theIteration Number of iteration on the field
1520 Vectors VectorsOnField(in Result theResult, in string theMeshName,
1521 in Entity theEntity, in string theFieldName,
1522 in double theIteration);
1525 * Creates an iso surface presentation.
1526 * \param theResult Data generated in other sources. (MED object or file)
1527 * \param theMeshName One of the meshes presented in MED file
1528 * \param theEntity Type of entity where the field is defined
1529 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1530 * \param theIteration Number of iteration on the field
1532 IsoSurfaces IsoSurfacesOnField(in Result theResult, in string theMeshName,
1533 in Entity theEntity, in string theFieldName,
1534 in double theIteration);
1537 * Creates an stream lines presentation.
1538 * \param theResult Data generated in other sources. (MED object or file)
1539 * \param theMeshName One of the meshes presented in MED file
1540 * \param theEntity Type of entity where the field is defined
1541 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1542 * \param theIteration Number of iteration on the field
1544 StreamLines StreamLinesOnField(in Result theResult, in string theMeshName,
1545 in Entity theEntity, in string theFieldName,
1546 in double theIteration);
1549 * Creates a presentation of cut planes.
1550 * \param theResult Data generated in other sources. (MED object or file)
1551 * \param theMeshName One of the meshes presented in MED file
1552 * \param theEntity Type of entity where the field is defined
1553 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1554 * \param theIteration Number of iteration on the field
1556 CutPlanes CutPlanesOnField(in Result theResult, in string theMeshName,
1557 in Entity theEntity, in string theFieldName,
1558 in double theIteration);
1561 * Creates a presentation of cut lines.
1562 * \param theResult Data generated in other sources. (MED object or file)
1563 * \param theMeshName One of the meshes presented in MED file
1564 * \param theEntity Type of entity where the field is defined
1565 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1566 * \param theIteration Number of iteration on the field
1568 CutLines CutLinesOnField(in Result theResult, in string theMeshName,
1569 in Entity theEntity, in string theFieldName,
1570 in double theIteration);
1573 * Creates a Plot3D presentation.
1574 * \param theResult Data generated in other sources. (MED object or file)
1575 * \param theMeshName One of the meshes presented in MED file
1576 * \param theEntity Type of entity where the field is defined
1577 * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1578 * \param theIteration Number of iteration on the field
1580 Plot3D Plot3DOnField(in Result theResult, in string theMeshName,
1581 in Entity theEntity, in string theFieldName,
1582 in double theIteration);
1585 * Creates a table presentation.
1586 * \param theTableEntry The entry of the table which will be displayed.
1588 Table CreateTable(in string theTableEntry);
1591 * Creates a curve on the basis of points, whose values are taken from the table.
1592 * \param theTable Table containing the data for construction of curves.
1593 * \param HRow Index of the row in the table: abscissa of the point.
1594 * \param VRow Index of the row in the table: ordinate of the point.
1596 Curve CreateCurve(in Table theTable, in long theHRow, in long theVRow);
1599 * Creates a presentation form containing an array of references to the curves.
1601 Container CreateContainer();
1603 /*! Creates an animation in the 3D view.
1604 * \param theView3d The 3D view, where the animation will be rendered.
1606 Animation CreateAnimation(in View3D theView3d);
1608 void DeleteResult(in Result theResult);
1610 void DeletePrs3d(in Prs3d thePrs3d);
1613 /*! \brief %View interface
1615 * Contains a set of methods used by the %View frame, which can be one of
1616 * the following types: 3d, Table, XY plot.
1617 * %View interface is a base for all types of %view interfaces.
1619 interface View: Base {
1621 /*! \brief %ViewRepresentation enumeration
1623 * displaying part ("ALL" isn't setable)
1625 enum ViewRepresentation {
1632 void ShowPart (in ViewRepresentation ViewRepr, in boolean state );
1634 boolean IsPartShown( in ViewRepresentation ViewRepr );
1637 * New methods for view parameters management.
1640 /*! \brief Split workarea of this view.
1642 * Horizontally split workarea of this view.
1643 * This view is moved in a new right area.
1647 /*! \brief Split workarea of this view.
1649 * Horizontally split workarea of this view.
1650 * This view stays in an old left area, others are moved in a new right area.
1654 /*! \brief Split workarea of this view.
1656 * Vertically split workarea of this view.
1657 * This view is moved in a new bottom area.
1661 /*! \brief Split workarea of this view.
1663 * Vertically split workarea of this view.
1664 * This view stays in an old top area, others are moved in a new bottom area.
1669 * Put this view window on top of its work area.
1674 * Put \a theView in workarea of this view right after it.
1675 * If \a theView was alone in its workarea, workarea of \a theView will be destroyed.
1676 * If \a theView was in the same workarea with this view, simple reordering will take place.
1677 * \param theView A view window to be attracted to this one.
1679 void Attract (in View theView);
1682 * Put all the view windows from workarea of \a theView in workarea of this view right after it.
1683 * Workarea of \a theView will be destroyed.
1684 * If \a theView was in the same workarea with this view, simple reordering will take place.
1685 * \param theView A view window to be attracted to this one together with all its workarea.
1687 void AttractAll (in View theView);
1690 * Set position of this view window relatively its splitter.
1691 * \param thePosition Desired position of this view window relatively
1692 * its splitter. Meaningfull values lays in range [0..1].
1694 * Direction of positioning is defined by the splitter orientation.
1696 void SetRelativePositionInSplitter (in double thePosition);
1699 * Set size of this view window relatively its splitter.
1700 * \param theSize Desired size of this view window relatively
1701 * its splitter. Meaningfull values lays in range [0..1].
1703 * Direction of resizing is defined by the splitter orientation.
1705 void SetRelativeSizeInSplitter (in double theSize);
1708 * Set horizontal position of this view window relatively its workstack.
1709 * \param thePosition Desired horizontal position of this view window
1710 * relatively its workstack. Meaningfull values lays in range [0..1].
1712 void SetRelativePositionX (in double thePosition);
1715 * Set vertical position of this view window relatively its workstack.
1716 * \param thePosition Desired vertical position of this view window
1717 * relatively its workstack. Meaningfull values lays in range [0..1].
1719 void SetRelativePositionY (in double thePosition);
1722 * Set horizontal size of this view window relatively its workstack.
1723 * \param theSize Desired horizontal size of this view window relatively
1724 * its workstack. Meaningfull values lays in range [0..1].
1726 void SetRelativeSizeX (in double theSize);
1729 * Set vertical size of this view window relatively its workstack.
1730 * \param theSize Desired vertical size of this view window relatively
1731 * its workstack. Meaningfull values lays in range [0..1].
1733 void SetRelativeSizeY (in double theSize);
1736 * Old methods for view parameters management, they don't work now
1738 void SetViewWidth (in long Width); //setting width of view
1739 void SetViewHeight (in long Height); //setting height of view
1740 long GetViewWidth(); //getting view width
1741 long GetViewHeight(); //getting view height
1742 enum ViewPosition {TOP, CENTER, BOTTOM, RIGHT, LEFT}; //position of the study frame
1743 void SetViewPositionHorizontal (in ViewPosition ViewPosHor); //setting of the horizontal view position
1744 void SetViewPositionVertical (in ViewPosition ViewPosVer); //setting of the vertical view position
1745 void SetRelativePosition( in double x, in double y );
1746 void SetRelativeSize( in double x, in double y );
1747 void Minimize(); // Minimizes to the task bar or to the bottom of the Desktop the %View frame.
1748 void Restore(); // Restores the %View frame.
1749 void Maximize(); // Maximizes the %View frame.
1752 * Sets the title of the %View frame.
1753 * \param theTitle String parameter defining the title of the %View frame.
1755 void SetTitle(in string theTitle);
1758 * Gets the title of the %View frame.
1763 * Sets background color of the %View frame.
1764 * \param theColor Background color defined in <VAR>SALOMEDS::Color</VAR> enumeration.
1766 void SetBackground(in SALOMEDS::Color theColor);
1769 * Gets background color of the %View frame.
1771 SALOMEDS::Color GetBackground();
1774 * Removes all presentations (presentable objects) from the %view.
1779 * Displays all presentations (presentable objects) in the %view.
1784 * Removes a definite presentation (presentable object) from the %view.
1785 * \param thePrsObj The presentation (presentable object) which should be deleted.
1787 void Erase(in PrsObject thePrsObj);
1790 * Displays a definite presentation (presentable object) in the %view.
1791 * \param thePrsObj The presentation (presentable object) which should be displayed.
1793 void Display(in PrsObject thePrsObj);
1796 * Allows to display only a definite presentation (presentable object) in the %view.
1797 * All other presentations are removed from the %view.
1798 * \param thePrsObj The presentation (presentable object) which should be displayed.
1800 void DisplayOnly(in PrsObject thePrsObj);
1809 * \param theFileName The name of the file where the view will be saved.
1810 * \return True, if the view have been saved successfully.
1812 boolean SavePicture(in string theFileName);
1815 //-------------------------------------------------------
1816 /*! \brief 3D view interface
1818 * This interface contains a set of methods necessary for representation of objects in 3D space.
1820 interface View3D : View {
1822 * This enumeration contains a set of elements determining a predefined point of view
1823 * (position of the camera in 3D space relative to the presentable object).
1825 enum ViewType{ FRONT, BACK, LEFT, RIGHT, TOP, BOTTOM};
1828 * This enumeration contains a set of elements determining the axis
1830 enum Axis{ XAxis, YAxis, ZAxis};
1833 * Data type defining coordinates in 3D space.
1835 typedef double XYZ[3];
1838 * Makes all presentations, which are currently present in the %view, completely visible.
1843 * Sets a predefined point of view (FRONT, BACK, LEFT, RIGHT, TOP, BOTTOM). (In other words it means
1844 * a predefined position of the camera in 3D space with respect to the object which is represented.)
1846 void SetView(in ViewType theType);
1849 * Sets the position of the camera in 3D space.
1850 * This point is used as the first point of the vector
1851 * defining the view direction of the camera.
1853 void SetPointOfView(in XYZ theCoord);
1856 * Gets the position of the camera in 3D space.
1857 * This point is used as the first point of the vector
1858 * defining the view direction of the camera.
1860 XYZ GetPointOfView();
1863 * Sets the vertical line of the camera in 3D space.
1865 void SetViewUp(in XYZ theDir);
1868 * Gets the vertical line of the camera in 3D space.
1873 * Sets the point of sight of the camera. This point is used as the
1874 * second point of the vector defining the view direction of the camera.
1876 void SetFocalPoint(in XYZ theDir);
1879 * Gets the point of sight of the camera. This point is used as the
1880 * second point of the vector defining the view direction of the camera.
1882 XYZ GetFocalPoint();
1885 * Zooming of the presentable object. Sets the scale.
1887 void SetParallelScale(in double theScale);
1890 * Zooming of the presentable object. Gets the scale.
1892 double GetParallelScale();
1895 * Scaling of the view along a definite axis.
1896 * \param theAxis The axis of the scaling
1897 * \param theParam The coefficient of the scaling
1899 void ScaleView(in Axis theAxis, in double theParam);
1902 * Removes the scaling of the view.
1907 * Saves view parameters.
1908 * \return True if the view parameters have been created, False if the parameters have been modified.
1909 * \param theName The name under which the view parameters will be saved.
1911 boolean SaveViewParams(in string theName);
1913 /*! Restores view parameters.
1914 * \return True if the view parameters have been found and applied to the view,
1915 * False if the parameters with this name don't exist.
1916 * \param theName The name of the view parameters which will be restored.
1918 boolean RestoreViewParams(in string theName);
1921 /*! Get representation type of the given presentation in this view.
1922 * \param thePrs Object to get a representation type of.
1923 * \return <VAR>PresentationType</VAR> Representation type of object in this view.
1925 PresentationType GetPresentationType(in ScalarMap thePrs);
1927 /*! Set representation type of the given presentation in this view.
1928 * \param thePrs Object to set a representation type of.
1929 * \param thePrsType Representation type to be set to the given object.
1930 * \return Empty string in case of success, error description in case of failure.
1932 string SetPresentationType(in ScalarMap thePrs, in PresentationType thePrsType);
1934 /*! Get shrink state of the given presentation in this view.
1935 * \param thePrs Object to get a shrink state of.
1936 * \return TRUE if \a thePrs is shrinked in this view, FALSE overwise.
1938 boolean IsShrinked(in ScalarMap thePrs);
1940 /*! Make the given presentation shrinked or not shrinked in this view.
1941 * \param thePrs Object to change a shrink state of.
1942 * \param isShrinked Pass TRUE to make \a thePrs shrinked, FALSE overwise.
1943 * \return Empty string in case of success, error description in case of failure.
1945 string SetShrinked(in ScalarMap thePrs, in boolean isShrinked);
1947 /*! Get shading state of the given presentation in this view.
1948 * \param thePrs Object to get a shading state of.
1949 * \return TRUE if \a thePrs is shaded in this view, FALSE overwise.
1951 boolean IsShaded(in ScalarMap thePrs);
1953 /*! Make the given presentation shaded or not shaded in this view.
1954 * \param thePrs Object to set a shading state of.
1955 * \param isShaded Pass TRUE to make \a thePrs shaded, FALSE overwise.
1956 * \return Empty string in case of success, error description in case of failure.
1958 string SetShaded(in ScalarMap thePrs, in boolean isShaded);
1960 /*! Get opacity of the given presentation in this view.
1961 * \param thePrs Object to get an opacity of.
1962 * \return Opacity value in range [0, 1], 0 - transparent, 1 - opaque.
1964 double GetOpacity(in ScalarMap thePrs);
1966 /*! Set opacity of the given presentation in this view.
1967 * \param thePrs Object to set an opacity of.
1968 * \param theOpacity Opacity value [0, 1]. 0 - transparent, 1 - opaque.
1969 * \return Empty string in case of success, error description in case of failure.
1971 string SetOpacity(in ScalarMap thePrs, in double theOpacity);
1973 /*! Get line width of the given presentation in this view.
1974 * \param thePrs Object to get a line width of.
1975 * \return Line width of \a thePrs in this view.
1977 double GetLineWidth(in ScalarMap thePrs);
1979 /*! Set line width of the given presentation in this view.
1980 * \param thePrs Object to set a line width of.
1981 * \param theLineWidth Line width value. Recommended values are in range [1, 10].
1982 * \return Empty string in case of success, error description in case of failure.
1984 string SetLineWidth(in ScalarMap thePrs, in double theLineWidth);
1987 //-------------------------------------------------------
1988 /*! \brief Interface of the Table view
1990 * This interface is used for creation of a view necessary for presentation of a table.
1992 interface TableView : View {
1995 //-------------------------------------------------------
1996 /*! \brief Interface of the 2D plot view
1998 * This interface is used for creation of a view necessary for presentation
1999 * of a XY plot generated on the basis of one or several curve lines.
2001 interface XYPlot : View {
2002 /*! Sets the title of the XY plot
2003 * \param theTitle The title of the XY plot
2005 void SetSubTitle(in string theTitle);
2007 /*! Gets the title of the XY plot
2009 string GetSubTitle();
2012 * This enumeration contains a set of elements determining the type
2013 * of the curve lines, which will be displayed in your XY plot.
2015 enum CurveType { POINTS, MULTYLINE, SPLINE};
2017 /*! Sets the type of the curve lines.
2018 * \param theType The type of the curve lines taken from <VAR>CurveType</VAR> enumeration.
2020 void SetCurveType(in CurveType theType);
2022 /*! Gets the type of the curve lines.
2024 CurveType GetCurveType();
2026 /*! Sets the size of the markers (data points) with help of
2027 * which the curve is constructed on the graphics.
2028 * \param theSize Long value defining the size of the markers.
2030 void SetMarkerSize(in long theSize);
2032 /*! Gets the size of the markers (data points) with help of
2033 * which the curve is constructed on the graphics.
2035 long GetMarkerSize();
2037 /*! Enable/disables X-axis grid of the 2D plot.
2039 void EnableXGrid(in boolean theMajor, in long theNumMajor, in boolean theMinor, in long theNumMinor);
2041 /*! Enable/disables Y-axis grid of the 2D plot.
2043 void EnableYGrid(in boolean theMajor, in long theNumMajor, in boolean theMinor, in long theNumMinor);
2045 /*! Sets horizontal scaling of the 2D plot.
2046 * \param theScaling Type of scaling taken from <VAR>Scaling</VAR> enumeration.
2048 void SetHorScaling(in Scaling theScaling);
2050 /*! Gets the type horizontal scaling of the 2D plot.
2052 Scaling GetHorScaling();
2054 /*! Sets vertical scaling of the 2D plot.
2055 * \param theScaling Type of scaling taken from <VAR>Scaling</VAR> enumeration.
2057 void SetVerScaling(in Scaling theScaling);
2059 /*! Gets the type vertical scaling of the 2D plot.
2061 Scaling GetVerScaling();
2063 /*! Sets the title of the X-axis of the plot.
2064 * \param theTitle String value defining the title of the X-axis of the plot.
2066 void SetXTitle(in string theTitle);
2068 /*! Gets the title of the X-axis of the plot.
2072 /*! Sets the title of the Y-axis of the plot.
2073 * \param theTitle String value defining the title of the X-axis of the plot.
2075 void SetYTitle(in string theTitle);
2077 /*! Gets the title of the Y-axis of the plot.
2081 /*! Shows/hides the legend (description) of the 2D plot.
2083 void ShowLegend(in boolean theShowing);
2085 /*! Shrinks and enlarges the 2D plot to fit the 2D viewer.
2089 /*! Set range of the 2D plot to X axis of the 2D viewer.
2091 void FitXRange(in double xMin, in double xMax);
2093 /*! Set range of the 2D plot to Y axis of the 2D viewer.
2095 void FitYRange(in double yMin, in double yMax);
2097 /*! Set range of the 2D plot to XY axis of the 2D viewer.
2099 void FitRange(in double xMin, in double xMax,
2100 in double yMin, in double yMax);
2102 void GetFitRanges(out double xMin,out double xMax,
2103 out double yMin,out double yMax);
2106 //-------------------------------------------------------
2107 /*! \brief Interface of the %ViewManager
2109 * The ViewManager is necessary for work with view windows (creation and deletion).
2111 interface ViewManager: Base {
2112 /*! \brief Getting an active %View Frame
2114 * Returns an object reference to the active %View Frame.
2115 * Type of the %View must be checked.
2116 * \note <BR>Returns nil if there are no views currently opened.
2118 View GetCurrentView();
2120 /*! \brief Creation of a 3d %View.
2122 * Returns an object reference to the newly created 3D %View.
2124 View3D Create3DView();
2126 /*! \brief Creation of a Table %View.
2128 * Returns an object reference to the newly created Table %View.
2130 TableView CreateTableView(in Table theTable);
2132 /*! \brief Creation of a 2D plot %View.
2134 * Returns an object reference to the newly created 2D plot %View.
2136 XYPlot CreateXYPlot();
2138 /*! Deletes a definite view.
2139 * \param theView The view which should be deleted.
2141 void Destroy(in View theView);