1 // Copyright (C) 2003 CEA/DEN, EDF R&D
6 // Author : Alexey Petrov
8 /*! \file VISU_Gen.idl This file conatins a set of interfaces of the %VISU module.
9 This module provides various forms of data visualization in %SALOME application.
10 These forms include data tables, XY plots, 3d representations
11 and combination of these forms.
17 #include "SALOME_Exception.idl"
18 #include "SALOME_GenericObj.idl"
19 #include "SALOME_Component.idl"
20 #include "SALOMEDS.idl"
21 #include "SALOMEDS_Attributes.idl"
25 The main package of interfaces of the post-processing module %VISU.
28 //-------------------------------------------------------
29 typedef string IdType;
31 This enumeration contains a set of elements defining the type of the scaling, which
32 can be applied on different presentations.
34 enum Scaling{ LINEAR, /*!< Linear type of scaling. */
35 LOGARITHMIC /*!< Logarithmic type of scaling. */
38 This enumeration contains a set of elements defining the type of the %entity (topological units) constituting a mesh.
41 enum Entity{ NODE, /*!< Node corresponds to a geometrical point. */
42 EDGE, /*!< Edge corresponds to a geometrical line connecting two points. */
43 FACE, /*!< Face corresponds to a geometrical plane bounded by several lines. */
44 CELL /*!< Cell is a volumic element of a mesh */
47 This enumeration contains a set of elements defining the type of the %VISU object. This enumeration is used for navigation between a set of %VISU interfaces.
49 enum VISUType{ TNONE, /*!< Not a %VISU object */
50 TCURVE, /*!< Curve line object for construction of 2D XY plots */
51 TTABLE, /*!< Table containing numerical data */
52 TCONTAINER, /*!< Container object used for storing a set of curve lines */
53 TMESH, /*!< Meshing object */
54 TSCALARMAP, /*!< Scalarmap 3D presentation object */
55 TISOSURFACE, /*!< Iso surface 3D presentation object */
56 TDEFORMEDSHAPE, /*!< Deformed shape 3D presentation object */
57 TCUTPLANES, /*!< Cut planes 3D presentation object */
58 TCUTLINES, /*!< Cut lines 3D presentation object */
59 TVECTORS, /*!< Vectors 3D presentation object */
60 TSTREAMLINES, /*!< Streamlines 3D presentation object */
61 TVISUGEN, /*!< %VISU generator used for performing operations with different %VISU objects */
62 TVIEWMANAGER, /*!< View manager used for performing operations with different views */
63 TRESULT, /*!< The data on which different presentations are based */
64 TXYPLOT, /*!< 2D XY plot consisting of one or several curve lines */
65 TTABLEVIEW, /*!< Table view is used for displaying data tables */
66 TVIEW3D, /*!< 3D view is used for displaying 3D graphical presentations */
67 TENTITY, /*!< An element composing a mesh: node, edge, face or cell */
68 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. */
69 TGROUP, /*!< A group of families */
70 TFIELD, /*!< Field represents the results of calculations (it can be scalar or vector values), grouped together under one physical concept. */
71 TTIMESTAMP, /*!<Time stamp represents a subfield: the results of calculations are taken in one definite moment. */
76 Returns ID of the object.
80 Returns the type of the presentable object
84 /*! \brief Presentable object interface
86 Presentable object interface is the root class of all presentable objects.
88 interface PrsObject : Base{
90 //-------------------------------------------------------
91 /*! \brief %Table representation interface
93 Presentation parameters of the %Table view.
95 interface Table : PrsObject {
97 Sets the title of the table.
98 \param theTitle String parameter defining the title of this table.
100 void SetTitle(in string theTitle);
102 Gets the title of the table.
103 \return A string value containing the title of the table.
107 This enumeration contains a set of elements defining the orientation of the table.
109 enum Orientation{ HORIZONTAL, /*!<Horizontal orientation of the table.*/
110 VERTIACAL /*!<Vertical orientation of the table.*/
113 Sets orientation of the table.
114 \param theOrientation This input parameter defines the orientation of the table. It is taken from
115 the <VAR>Orientation</VAR> enumeration.
117 void SetOrientation(in Orientation theOrientation);
119 Gets orientation of the table.
120 \return Orientation of the table. The returned value will correspond to one of the elements the <VAR>Orientation</VAR> enumeration.
123 Orientation GetOrientation();
125 Gets the number of rows of the table.
126 \return Long value corresponding to the number of rows of the table
130 Gets the number of columns of the table.
131 \return Long value corresponding to the number of columns of the table
136 //-------------------------------------------------------
137 /*! \brief Interface of curve representation.
139 Manages presentation parameters of one curve.
140 It can be used for presentation of a set of curves using a combined presentation.
142 interface Curve : PrsObject{
144 Sets the title of the curve.
145 \param theTitle This string parameter defines the title of this curve.
147 void SetTitle(in string theTitle);
149 Gets the title of the curve.
150 \return String value corresponding to the title of the curve.
154 Sets the color of the curve.
155 \param theColor The color of the curve. This parameter is taken from the <VAR>Orientation</VAR> enumeration.
158 void SetColor(in SALOMEDS::Color theColor);
160 Gets the color of the curve.
161 \return Color of the curve. The returned value will correspond to one of the elements the <VAR>Color</VAR> enumeration.
164 SALOMEDS::Color GetColor();
166 This enumeration contains a set of elements defining the presentation type of markers (data points) with help of
167 which the curve is constructed on the graphics.
169 enum MarkerType{ NONE,
181 Sets the presentation type of markers (data points) with help of
182 which the curve is constructed on the graphics.
183 \param theType This parameter defines the type of marker with help of which the curve is constructed on the graphics. It is taken from <VAR>MarkerType</VAR> enumeration.
185 void SetMarker(in MarkerType theType);
187 Gets the presentation type of markers (data points) with help of
188 which the curve is constructed on the graphics.
189 \return The type of marker with help of which the curve is constructed on the graphics. The returned value will correspond to one of the elements the <VAR>MarkerType</VAR> enumeration.
192 MarkerType GetMarker();
194 This enumeration contains a set of elements defining the
195 type of presentation of a curve line on the graphics.
197 enum LineType{ VOIDLINE, SOLIDLINE, DASHLINE, DOTLINE, DASHDOTLINE, DASHDOTDOTLINE};
199 Sets the type of presentation of curve lines on the graphics.
200 \param theType This parameter defines the type of presentation of curve lines on the graphics.
201 \param theLineWidth Long value defining the width of the curve line.
203 void SetLine(in LineType theType, in long theLineWidth);
205 Gets the type of representation of curve lines on the graphics.
206 \return The type of representation of curve lines on the graphics.
211 Gets the width of the curve line.
212 \return Long value corresponding to the width of the curve line.
216 //-------------------------------------------------------
217 /*! \brief %Container presentable object interface
219 This class is provided in order to create one presentation using several presentable objects.
220 This can provide a combination of a set of curves to display them in XY plot view.
222 interface Container : PrsObject{
224 Adds a curve into the container.
225 \param theCurve The added curve.
227 void AddCurve(in Curve theCurve);
229 Removes a curve from the container.
230 \param theCurve The removed curve.
232 void RemoveCurve(in Curve theCurve);
234 Gets the number of curves which are stored in the container.
235 \return A long value corresponding to the number of curves which are stored in the container.
239 Removes all curves from the container.
244 //-------------------------------------------------------
245 /*! \brief 3D presentation interface
247 This is a root class for all 3D presentations, which can be displayed in %VISU module.
249 interface Prs3d : PrsObject, SALOME::GenericObj{
250 //interface Prs3d : PrsObject{
253 This enumeration contains a set of elements defining the
254 type of presentation of the mesh.
257 enum PresentationType{ POINT,
264 /*! \brief Interface of the mesh.
266 Manages presentation parameters of a 3D presentation of a mesh.
267 This object can be used for presentation of set of curves using Container class.
270 interface Mesh : Prs3d{
272 Sets the color of mesh cells.
273 \param theColor The color of the cells. This parameter is taken from <VAR>Color</VAR> enumeration.
276 void SetCellColor(in SALOMEDS::Color theColor);
278 Gets the color of mesh cells.
280 SALOMEDS::Color GetCellColor();
282 Sets the color of mesh nodes.
283 \param theColor The color of the nodes. This parameter is taken from <VAR>Color</VAR> enumeration.
286 void SetNodeColor(in SALOMEDS::Color theColor);
288 Gets the color of mesh nodes.
290 SALOMEDS::Color GetNodeColor();
293 Sets the color of mesh links.
294 \param theColor The color of the links. This parameter is taken from <VAR>Color</VAR> enumeration.
297 void SetLinkColor(in SALOMEDS::Color theColor);
299 Gets the color of mesh links.
301 SALOMEDS::Color GetLinkColor();
303 Sets the type of representation of a mesh.
304 \param theType The of representation of a mesh. This parameter is taken from <VAR>PresentationType</VAR> enumeration.
306 void SetPresentationType(in PresentationType theType);
308 Gets the type of representation of the mesh.
309 \return The type of representation of the mesh.
311 PresentationType GetPresentationType();
313 //-------------------------------------------------------
314 /*! \brief Interface of the %Scalar Map
316 This interface is responsable for coloring of 3D field presentations according the scalar values applied to different cells.
317 As well it contains presentation parameters of the scalar bar. The scalar bar is displayed
318 along with each colored field presentation and serves for consulting the correspondance
319 between colors and data values.
322 interface ScalarMap : Prs3d{
323 /*! Sets the method of coloring of the elements composing a 3D presentation.
325 void SetScalarMode(in long theScalarMode);
326 /*! Gets the method of coloring of the elements composing a 3D presentation.
328 long GetScalarMode();
330 Sets the type of scaling of the values reflected by the scalar bar.
331 \param theScaling The value of this parameter is taken from the <VAR>Scaling</VAR> enumeration.
333 void SetScaling(in Scaling theScaling);
335 Gets the type of scaling of the values reflected by this presentation.
337 Scaling GetScaling();
339 Sets scalar range - min and max boundaries of the scalar bar.
340 \param theMin Min boundary of the scalar bar.
341 \param theMax Max boundary of the scalar bar.
343 void SetRange(in double theMin, in double theMax);
345 Gets the min boundary of the scalar bar.
349 Gets the max boundary of the scalar bar.
353 /*! %Orientation of the scalar bar. */
355 HORIZONTAL, /*!< Horizontal orientation of the scalar bar.*/
356 VERTICAL /*!< Vertical orientation of the scalar bar.*/
359 Sets the type of orientation of the scalar bar.
360 \param theOrientation This parameter defines the orientation of the scalar bar. It is taken from the <VAR>Orientaton</VAR> enumeration.
362 void SetBarOrientation(in Orientation theOrientation);
364 Gets the type of orientation of the scalar bar.
366 Orientation GetBarOrientation();
368 /*! \brief Position of the scalar bar.
370 Sets the position of the scalar bar origin on the screen.
371 \param X Horizontal position. The value can be between 0 and 1.
372 \param Y Vertical position. The value can be between 0 and 1.
374 void SetPosition(in double X, in double Y);
376 Gets horizontal position of the scalar bar origin.
380 Gets vertical position of the scalar bar origin.
383 /*! \brief Size of this presentable object.
385 Sets the size of the scalar bar.
386 \param theWidth Width of this presentable object. The value can be between 0 and 1.
387 \param theHeight Height of this presentable object. The value can be between 0 and 1.
389 void SetSize(in double theWidth, in double theHeight);
391 Gets the width of this presentable object.
392 \return A double value corresponding to the width of this presentable object.
396 Gets the height of this presentable object.
397 \return A double value corresponding to the height of this presentable object.
401 Sets the number of colors which will be used for presentation of this presentable object.
402 \param theNbColors A long value defining the number of colors.
404 void SetNbColors(in long theNbColors);
406 Gets the number of colors which will be used for visualization of this presentable object.
407 \return A long value corresponding to the number of colors which will be used for visualization of this presentable object.
411 Sets the number of labels which will be used for indication of color gradation
413 \param theNbLabels A long value defining the number of labels.
415 void SetLabels(in long theNbLabels);
417 Gets the number of labels which will be used for indication of color gradation
419 \return A long value corresponding to the number of labels which will be used for indication of color gradation
424 Sets the title of the scalar bar. By default - the name of the selected result is used.
425 \param theName String parameter defining the name of the scalar bar.
427 void SetTitle(in string theName);
429 Gets the title of the scalar bar.
433 //-------------------------------------------------------
434 /*! \brief Deformed shape presentation interface
436 Presentation parameters of the deformed shape presentation.
438 interface DeformedShape : ScalarMap{
440 Sets the scale of the presentatable object.
441 \param theScale Double value defining the scale of this presentable object.
443 void SetScale(in double theScale);
445 Gets the scale of the presentatable object.
448 /*! This boolean method returns True if this deformed shape presentation is colored.
451 /*! Shows this presentation in colored mode.
452 \param theColored If this boolean parameter is True this presentable object will be shown in colored mode.
454 void ShowColored(in boolean theColored);
455 /*! Gets the color of this presentable object.
456 \return The color of this presentable object.
458 SALOMEDS::Color GetColor();
459 /*! Sets the color of this presentation.
460 \param theColor The color of this presentation. This parameter is taken from the <VAR>Color</VAR> enumeration.
462 void SetColor(in SALOMEDS::Color theColor);
464 //-------------------------------------------------------
465 /*! \brief Cut planes interface
467 Presentation parameters of Cut planes presentation. This type of presentation consists of
468 cutting your initial mesh by a definite number of planes. As the result you will see these planes
469 which will be cutted by the borders of the mesh.
471 interface CutPlanes : ScalarMap{
473 This enumeration contains a set of elements defining the type of orientation in 3D space
476 enum Orientation {XY, /*!< The object is located in the plane formed by X and Y axis. */
477 YZ, /*!< The object is located in the plane formed by Y and Z axis. */
478 ZX}; /*!< The object is located in the plane formed by Z and X axis. */
480 Sets the type of orientation in 3D space of cut planes presentation.
481 \param theOrientation This parameter defines the type of orientation of cut planes in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
482 \param theXAngle The angle of rotation of the cut planes around the first axis of the chosen orientation.
483 \param theXAngle The angle of rotation of the cut planes around the second axis of the chosen orientation.
485 void SetOrientation(in Orientation theOrientation, in double theXAngle, in double theYAngle);
487 Gets the type of orientation in 3D space of cut planes presentation.
489 Orientation GetOrientationType();
491 Gets rotation angle of the cut plane presentation around the first axis of the chosen orientation.
495 Gets rotation angle of the cut plane presentation around the second axis of the chosen orientation.
499 Sets the displacement of the cut planes in 3D space.
501 \param theDisp This parameter defines position of the cut planes
502 in 3D space. It varies from 0 to 1. If the chosen value is 0.5, the cut planes
503 will be evenly located regarding each other; in other words, the distance between all
504 of them will be equal. If the value is higher or lower than 0.5, the planes will be displaced
505 to one or another side.
507 void SetDisplacement(in double theDisp);
509 Gets the displacement of the cut planes in 3D space.
511 double GetDisplacement();
513 Sets the position of a definite cut plane.
514 \param thePlaneNumber The number of this cut plane.
515 \param thePlanePosition The position of this cut plane.
517 void SetPlanePosition(in long thePlaneNumber, in double thePlanePosition);
520 Sets the position of the choosen plane to default value.
521 \param thePlaneNumber The number of this cut plane.
523 void SetDefault(in long thePlaneNumber);
526 Gets the position of the choosen plane
529 double GetPlanePosition(in long thePlaneNumber);
532 Determines whether the choosen plane has default position.
533 \param thePlaneNumber The number of this cut plane.
536 boolean IsDefault(in long thePlaneNumber);
539 Sets the number of cut planes.
540 \param theNb The number of cut planes.
542 void SetNbPlanes(in long theNb);
544 Gets the number of cut planes.
548 //-------------------------------------------------------
549 /*! \brief Cut lines presentation.
551 Presentation parameters of a Cut lines presentation.
552 Cut Lines is a type of presentation which displays colored cells with applied scalar values on the mesh where lines are placed.
553 The procedure of construction of a Cut Lines presentation reuses the algorithm of creation of Cut Planes presentation and consists of two steps:
555 1. From Cut Planes presentation one plane is taken and it is used as base plane for construction of cut lines.
556 2. This plane is cut by a regular array of planes. The result of this operation is a regular array of lines in space, belonging to the same plane and having the same orientation. They are located inside or on the mesh.
559 interface CutLines : ScalarMap{
562 Sets the type of orientation in 3D space of the base plane of a cut lines presentation.
563 \param theOrientation The orientation of the base plane in 3D space.
564 \param theXAngle The angle of rotation of the base plane around the first axis of the chosen orientation.
565 \param theXAngle The angle of rotation of the base plane around the second axis of the chosen orientation.
568 void SetOrientation(in CutPlanes::Orientation theOrientation, in double theXAngle, in double theYAngle);
570 Sets the type of orientation in 3D space of the cutting planes of a cut lines presentation.
571 \param theOrientation This parameter defines the type of orientation of the cutting planes in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
572 \param theXAngle The angle of rotation of the cutting planes around the first axis of the chosen orientation.
573 \param theXAngle The angle of rotation of the cutting planes around the second axis of the chosen orientation.
576 void SetOrientation2(in CutPlanes::Orientation theOrientation, in double theXAngle, in double theYAngle);
578 Gets the type of orientation in 3D space of the base plane of a cut lines presentation.
581 CutPlanes::Orientation GetOrientationType();
583 Gets the type of orientation in 3D space of the cutting planes of a cut lines presentation.
585 CutPlanes::Orientation GetOrientationType2();
587 Gets rotation angle of the base plane around the first axis of the chosen orientation.
591 Gets rotation angle of the cutting planes around the first axis of the chosen orientation.
593 double GetRotateX2();
596 Gets rotation angle of the base plane around the second axis of the chosen orientation.
600 Gets rotation angle of the cutting planes around the second axis of the chosen orientation.
602 double GetRotateY2();
605 Sets the displacement of the base plane of the cut lines presentation in 3D space.
607 \param theDisp This parameter defines position of the base plane
608 in 3D space. It varies from 0 to 1.
610 void SetDisplacement(in double theDisp);
612 Sets the displacement of the cutting planes of the cut lines presentation in 3D space.
614 \param theDisp This parameter defines position of the cutting planes
615 in 3D space. It varies from 0 to 1.
618 void SetDisplacement2(in double theDisp);
621 Gets the displacement of the base plane of the cut lines presentation in 3D space.
623 double GetDisplacement();
625 Gets the displacement of the cutting planes of the cut lines presentation in 3D space.
627 double GetDisplacement2();
628 /*! Sets the position of the base plane in 3D space.
629 \param thePlanePosition A double value defining the position of the base plane in 3D space.
631 void SetBasePlanePosition(in double thePlanePosition);
632 /*! Gets the position of the base plane in 3D space.
634 double GetBasePlanePosition();
635 /*! Sets the position of one of cutting planes in 3D space.
636 \param thePlaneNumber A long value defining the order number of this cutting plane.
637 \param thePlanePosition A double value defining the position of the base plane in 3D space.
640 void SetLinePosition(in long thePlaneNumber, in double thePlanePosition);
641 /*! Gets the position of one of cutting planes in 3D space.
642 \param thePlaneNumber A long value defining the order number of this cutting plane.
645 double GetLinePosition(in long thePlaneNumber);
647 /*! Sets the position of the base plane to default value.
651 Determines whether the base plane has default position.
652 \return True if the base plane has default position.
657 Sets the position of the choosen cutting plane to default value.
658 \param thePlaneNumber The number of this cutting plane.
661 void SetDefaultPosition(in long thePlaneNumber);
663 Determines whether the choosen cutting plane has default position.
664 \param thePlaneNumber The number of this cutting plane.
665 \return True if this cutting plane has default position.
668 boolean IsDefaultPosition(in long thePlaneNumber);
670 Sets the number of cut lines.
671 \param theNb The number of cut lines.
673 void SetNbLines(in long theNb);
675 Gets the number of cut lines.
679 /*! \brief Interface of the stream lines representation
681 This interface contains presentation parameters of
682 stream lines presentations.
683 <BR>Stream lines is a type of presentation transforming into lines the cells with vectors having most similar direction.
684 A stream line can be thought of as the path that a massless particle takes in a vector field. Streamlines are used to convey the structure of a vector field.
685 Usually streamlines are created to explore the most interesting features in the field.
687 interface StreamLines : DeformedShape{
688 /*! This enumerations contains a set of elements necessary
689 for definition of direction of the stream lines.
692 enum Direction{ FORWARD,
696 /*! Sets the parameters of the stream lines presentation.
697 \param theIntStep Inegration step is a parameter of smoothness of the stream lines. This parameter defines the accuracy of construction of the streamlines. A smaller value of this parameter allows to construct smoother streamlines (at the cost of more computation time).
698 \param thePropogationTime This parameter controls the maximum length of the stream line (measured in units of time).
699 \param theStepLength This parameter defines the size of the output line segments that make up the streamline (which is represented as a polyline).
700 \param thePrs3d The source presentation. The points of the field located on this source presentation
701 will serve as starting points for generation of stream lines.
702 \note If this parameter is not defined, your stream lines presentation will be generated on all points of the field.
703 \param thePercents This parameter defines the quantity of points of the field (from 0 to 100%) which will be used as starting points for construction of the stream lines. Thus, the value of this parameter can vary from 0 to 1.
704 \param theDirection Direction of the stream lines.(Forward, Backward or Both)
705 \return True if all parameters are properly set.
707 boolean SetParams(in double theIntStep,
708 in double thePropogationTime,
709 in double theStepLength,
711 in double thePercents,
712 in Direction theDirection);
713 /*! Gets the value of integration step of the stream lines presentation.
715 double GetIntegrationStep();
716 /*! Gets the value of propagation time of the stream lines presentation.
718 double GetPropagationTime();
719 /*! Gets the value of step length of the stream lines presentation.
721 double GetStepLength();
722 /*! Returns the source presentation used for generation of the stream lines.
725 /*! Gets the quantity of points of the field used as starting points for generation of the stream lines presentation.
727 double GetUsedPoints();
728 /*! Returns the direction of the stream lines.
730 Direction GetDirection();
734 /*! \brief Interface of the isometric surface presentation
736 This interface contains presentation parameters of
737 isometric surface presentations.
738 <BR>Iso surfaces presentation combines all equal scalar values on the cells and on the basis of them constructs
739 isobaric surfaces, which form this presentation.
741 interface IsoSurfaces : ScalarMap{
743 Sets the number of isometric surfaces.
744 \param theNb A long value defining the number of isometric surfaces which will be used for construction of this presentation.
746 void SetNbSurfaces(in long theNb);
748 Gets the number of isometric surfaces
750 long GetNbSurfaces();
752 //-------------------------------------------------------
753 /*! \brief Interface of the vector presentation.
755 This interface contains presentation parameters of vector presentations.
757 interface Vectors : DeformedShape{
759 Sets the width of the lines of the vectors.
760 \param theWidth A double value defining the width of the lines of the vectors.
762 void SetLineWidth(in double theWidth);
764 Gets the width of the lines of the vectors.
766 double GetLineWidth();
768 This enumeration contains a set of elements defining the type of representation of the vector head.
770 enum GlyphType{ ARROW,
776 Sets the type of representation of the vector head.
777 \param theType This parameter defines the type of representation of the vector head.
778 This value is taken from the <VAR>GlyphType</VAR> enumeration.
780 void SetGlyphType(in GlyphType theType);
782 Gets the type of representation of the vector head.
784 GlyphType GetGlyphType();
786 This enumeration contains a set of elements defining the position of the vector head.
789 enum GlyphPos{ CENTER, /*!<In the center of the vector.*/
790 TAIL, /*!<In the tail of the vector.*/
791 HEAD /*!<In the head of the vector.*/
794 Sets the position of the vector head.
795 \param thePos This parameter defines the position of the vector head.
796 This value is taken from the <VAR>GlyphPos</VAR> enumeration.
798 void SetGlyphPos(in GlyphPos thePos);
800 Gets the position of the vector head.
802 GlyphPos GetGlyphPos();
804 //-------------------------------------------------------
805 /*! \brief %Animation class
807 This class provides a set of methods used for:<br>
809 <li> generating different animations on the basis of a field,
810 <li> setting the parameters of the animations,
811 <li> playing these animations in the %VISU module.
814 <BR><B>Field</B> represents the results of calculations (it can be scalar or vector values), grouped together under one physical concept.
815 <BR><B>Time stamp</B> represents a subfield: the results of calculations are taken in one definite moment.
818 interface Animation : Base{
819 /*! Defines the field which will be used as a base for generation of the animation.
820 \param theObject The %SObject corresponding to the field.
822 void addField(in SALOMEDS::SObject theObject);
823 /*! Generates presentations on the basis of the field.
824 \param theFieldNum The number of the field, which will be used as the basis for construction of the presentation.
826 void generatePresentations(in long theFieldNum);
827 /*! Generates a set of frames from the created by the method <VAR>generatePresentations</VAR>3D presentations. A sequence of these frames will be
828 transformed into an animation.
829 \return True, if the frames have been successfully generated.
831 boolean generateFrames();
832 /*! Clears the view before starting an animation.
836 /*! \name Playback of an animation:
840 /*! Starts an animation.
842 void startAnimation();
843 /*! Stops an animation.
845 void stopAnimation();
847 /*! Forwards to the next frame.
850 /*! Returns to the previous frame.
853 /*! Returns to the first frame of the animation.
856 /*! Forwards to the last frame of the animation.
859 /*! Passes to a definite frame of the animation.
860 \param theFrame A long value defining the number of the frame.
862 void gotoFrame(in long theFrame);
865 /*! Gets the number of time stamps (subfields) contained in the given field.
868 /*! Gets the number of generated frames
871 /*! Returns True, if the animation is currently running.
874 /*! Returns the number of the current frame.
876 long getCurrentFrame();
879 ScalarMap getPresentation(in long theField, in long theFrame);
880 /*! Sets the type of presentation (vectors, deformed shape etc.) which will be generated by the method <VAR>generatePresentations</VAR>.
882 void setPresentationType(in long theFieldNum, in VISUType theType);
883 /*! Gets the type of presentation (vectors, deformed shape etc.) which will
884 be generated by the method <VAR>generatePresentations</VAR>.
886 VISUType getPresentationType(in long theFieldNum);
888 /*! Sets the speed of the animation.
889 \param theSpeed The speed of the animation. The value varies from 1 to 99.
891 void setSpeed(in long theSpeed);
892 /*! Gets the speed of the animation.
895 /*! Ruturns True, if playback of the animation is proportional.
896 This option allows to render your animation with proportional periods of time between every frame (not depending on the time stamps).
898 boolean isProportional();
899 /*! Sets the range of the animation. The range is defined on the basis of
900 the time stamps of the field which have been used for generation of the animation. This method allows to bound the range of generated frames.
901 If this method is not used, the animation will be generated on the basis of all time stamps contained in the field.
902 /param theMin The value of the first time stamp which will be used for generation of the animation.
903 /param theMax The value of the last time stamp which will be used for generation of the animation.
906 void setAnimationRange(in double theMin, in double theMax);
907 /*! Gets the number of the first time stamp which will be used for generation of the animation.
909 double getMinRange();
910 /*! Gets the number of the last time stamp which will be used for generation of the animation.
912 double getMaxRange();
913 /*! Returns True if the range of the animation has been defined by the method <VAR>setAnimationRange</VAR>. Otherwise
914 the animation will be generated on the basis of all time stamps contained in the field.
916 boolean isRangeDefined();
917 /*! Saves all the frames composing the animation into a definite directory.
918 \param thePath The directory where all the frames will be saved.
920 void dumpTo(in string thePath);
922 /*! Returns True, if the playback of the animation is cycling.
925 /*! Gets the first time stamp of the field defined at the input of the animation.
926 \note This method is used if animation range is <b>NOT</b> defined.
929 /*! Gets the last time stamp of the field defined at the input of the animation.
930 \note This method is used if animation range is <b>NOT</b> defined.
933 /*! Sets proprtional playback of the animation. This option allows to render your animation with proportional periods of time between every frame (not depending on the time stamps).
934 \param theProp If this boolean parameter is True, playback of your animation will be set as proportional.
936 void setProportional(in boolean theProp);
937 /*! Sets cycling playback of the animation. The number of cycles can be infinite, untill you use <VAR>startAnimation</VAR> method.
938 \param theCycle If this boolean parameter is True, playback of your animation will be set as cycling.
940 void setCycling(in boolean theCycle);
943 /*! \brief Interface %Result
945 This interface serves for inner representation of data generated in other sources. (MED object or file)
946 This data is needed for further construction of graphical presentations.
948 interface Result : Base, SALOME::GenericObj{
949 //interface Result : Base{
950 /*! Reads all data from the corresponding sources. By default the data is loaded on demand.
954 //-------------------------------------------------------
955 interface ViewManager;
957 /*! \brief %VISU_Gen interface
959 This is the main interface of %VISU component. It is necessary for creation of
960 post-processing presentations from given %Result and %Table object reference, using the views
961 provided by %ViewManager.
963 interface VISU_Gen : Engines::Component, SALOMEDS::Driver, Base{
964 /*! Sets a definite study to be current.
966 void SetCurrentStudy(in SALOMEDS::Study theStudy);
967 /*! Gets the current study.
969 SALOMEDS::Study GetCurrentStudy();
971 Gets the %View Manager which is used for creation of
972 post-processing presentations.
974 ViewManager GetViewManager();
977 Imports tables from a file and create TableAttribute in Sudy
979 SALOMEDS::SObject ImportTables(in string theFileName);
981 Export table to a file
983 boolean ExportTableToFile(in SALOMEDS::SObject theTable, in string theFileName);
986 Imports data from a file. The access to this file will be conserved outside of the application.
987 \param theFileName String parameter defining the name of the file from which the data will
990 Result ImportFile(in string theFileName);
992 Imports data from a file. The access to this file will closed.
993 \param theFileName String parameter defining the name of the file from which the data will
997 Result CopyAndImportFile(in string theFileName);
999 Imports data from a %MED object.
1001 Result ImportMed(in SALOMEDS::SObject theMedSObject);
1003 Imports data from a %MED field.
1005 Result ImportMedField(in SALOME_MED::FIELD theField);
1007 Creates a mesh on the basis of the data generated in other sources (MED object or file).
1008 \param theResult Data generated in other sources. (MED object or file)
1009 \param theMeshName One of the meshes presented in MED file
1010 \param theEntity Type of entity where the field is defined
1012 Mesh MeshOnEntity(in Result theResult, in string theMeshName, in Entity theEntity);
1014 Creates on the basis of a family a mesh which will
1015 be composed of geometrical elements, corresponding to the type of cells (node, edge, face or cell) of this family.
1016 \param theResult Data generated in other sources. (MED object or file)
1017 \param theMeshName One of the meshes presented in MED file
1018 \param theEntity Type of entity where the field is defined.
1021 Mesh FamilyMeshOnEntity(in Result theResult, in string theMeshName, in Entity theEntity, in string theFamilyName);
1023 Creates a mesh on the basis of a group of families.
1024 \param theResult Data generated in other sources. (MED object or file)
1025 \param theMeshName One of the meshes presented in MED file
1026 \param theGroupName Name of the group.
1028 Mesh GroupMesh(in Result theResult, in string theMeshName, in string theGroupName);
1030 Creates a scalar map presentation.
1031 \param theResult Data generated in other sources. (MED object or file)
1032 \param theMeshName One of the meshes presented in MED file
1033 \param theEntity Type of entity where the field is defined
1034 \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1035 \param theIteration Number of iteration on the field
1037 ScalarMap ScalarMapOnField(in Result theResult, in string theMeshName, in Entity theEntity, in string theFieldName, in double theIteration);
1039 Creates a deformed shape presentation.
1040 \param theResult Data generated in other sources. (MED object or file)
1041 \param theMeshName One of the meshes presented in MED file
1042 \param theEntity Type of entity where the field is defined
1043 \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1044 \param theIteration Number of iteration on the field
1046 DeformedShape DeformedShapeOnField(in Result theResult, in string theMeshName, in Entity theEntity, in string theFieldName, in double theIteration);
1048 Creates a vector presentation.
1049 \param theResult Data generated in other sources. (MED object or file)
1050 \param theMeshName One of the meshes presented in MED file
1051 \param theEntity Type of entity where the field is defined
1052 \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1053 \param theIteration Number of iteration on the field
1056 Vectors VectorsOnField(in Result theResult, in string theMeshName, in Entity theEntity, in string theFieldName, in double theIteration);
1058 Creates an iso surface presentation.
1059 \param theResult Data generated in other sources. (MED object or file)
1060 \param theMeshName One of the meshes presented in MED file
1061 \param theEntity Type of entity where the field is defined
1062 \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1063 \param theIteration Number of iteration on the field
1066 IsoSurfaces IsoSurfacesOnField(in Result theResult, in string theMeshName, in Entity theEntity, in string theFieldName, in double theIteration);
1068 Creates an stream lines presentation.
1069 \param theResult Data generated in other sources. (MED object or file)
1070 \param theMeshName One of the meshes presented in MED file
1071 \param theEntity Type of entity where the field is defined
1072 \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1073 \param theIteration Number of iteration on the field
1075 StreamLines StreamLinesOnField(in Result theResult, in string theMeshName, in Entity theEntity, in string theFieldName, in double theIteration);
1078 Creates a presentation of cut planes.
1079 \param theResult Data generated in other sources. (MED object or file)
1080 \param theMeshName One of the meshes presented in MED file
1081 \param theEntity Type of entity where the field is defined
1082 \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1083 \param theIteration Number of iteration on the field
1085 CutPlanes CutPlanesOnField(in Result theResult, in string theMeshName, in Entity theEntity, in string theFieldName, in double theIteration);
1088 Creates a presentation of cut lines.
1089 \param theResult Data generated in other sources. (MED object or file)
1090 \param theMeshName One of the meshes presented in MED file
1091 \param theEntity Type of entity where the field is defined
1092 \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
1093 \param theIteration Number of iteration on the field
1095 CutLines CutLinesOnField(in Result theResult, in string theMeshName, in Entity theEntity, in string theFieldName, in double theIteration);
1098 Creates a table presentation.
1099 \param theTableEntry The entry of the table which will be displayed.
1102 Table CreateTable(in string theTableEntry);
1104 Creates a curve on the basis of points, whose values are taken from the table.
1105 \param theTable Table containing the data for construction of curves.
1106 \param HRow Index of the row in the table: abscissa of the point.
1107 \param VRow Index of the row in the table: ordinate of the point.
1109 Curve CreateCurve(in Table theTable, in long theHRow, in long theVRow);
1111 Creates a presentation form containing an array of references to the curves.
1113 Container CreateContainer();
1114 /*! Creates an animation in the 3D view.
1115 \param theView3d The 3D view, where the animation will be rendered.
1117 Animation CreateAnimation(in View3D theView3d);
1119 void DeleteResult(in Result theResult);
1121 void DeletePrs3d(in Prs3d thePrs3d);
1124 /*! \brief %View interface
1126 Contains a set of methods used by the %View frame, which can be one of
1127 the following types: 3d, Table, XY plot.
1128 %View interface is a base for all types of %view interfaces.
1130 interface View: Base{
1132 enum ViewRepresentation { OBJECTBROWSER, VIEWER, PYTHON, MESSAGES }; // displaying part ("ALL" isn't setable)
1134 void ShowPart (in ViewRepresentation ViewRepr, in boolean state );
1136 boolean IsPartShown( in ViewRepresentation ViewRepr );
1138 void SetViewWidth (in long Width); //setting width of view
1140 void SetViewHeight (in long Height); //setting height of view
1142 long GetViewWidth(); //getting view width
1144 long GetViewHeight(); //getting view height
1146 enum ViewPosition {TOP, CENTER, BOTTOM, RIGHT, LEFT}; //position of the study frame
1148 void SetViewPositionHorizontal (in ViewPosition ViewPosHor); //setting of the horizontal view position
1150 void SetViewPositionVertical (in ViewPosition ViewPosVer); //setting of the vertical view position
1152 void SetRelativePosition( in double x, in double y );
1153 void SetRelativeSize( in double x, in double y );
1155 Sets the title of the %View frame.
1156 \param theTitle String parameter defining the title of the %View frame.
1158 void SetTitle(in string theTitle);
1160 Gets the title of the %View frame.
1164 Sets background color of the %View frame.
1165 \param theColor Background color defined in <VAR>SALOMEDS::Color</VAR> enumeration.
1167 void SetBackground(in SALOMEDS::Color theColor);
1169 Gets background color of the %View frame.
1171 SALOMEDS::Color GetBackground();
1173 Minimizes to the task bar or to the bottom of the Desktop the %View frame.
1177 Restores the %View frame.
1181 Maximizes the %View frame.
1185 Removes all presentations (presentable objects) from the %view.
1189 Displays all presentations (presentable objects) in the %view.
1193 Removes a definite presentation (presentable object) from the %view.
1194 \param thePrsObj The presentation (presentable object) which should be deleted.
1196 void Erase(in PrsObject thePrsObj);
1198 Displays a definite presentation (presentable object) in the %view.
1199 \param thePrsObj The presentation (presentable object) which should be displayed.
1201 void Display(in PrsObject thePrsObj);
1203 Allows to display only a definite presentation (presentable object) in the %view.
1204 All other presentations are removed from the %view.
1205 \param thePrsObj The presentation (presentable object) which should be displayed.
1207 void DisplayOnly(in PrsObject thePrsObj);
1215 \param theFileName The name of the file where the view will be saved.
1216 \return True, if the view have been saved successfully.
1218 boolean SavePicture(in string theFileName);
1221 //-------------------------------------------------------
1222 /*! \brief 3D view interface
1224 This interface contains a set of methods necessary for representation of objects in 3D space.
1227 interface View3D : View {
1229 This enumeration contains a set of elements determining a predefined point of view
1230 (position of the camera in 3D space relative to the presentable object).
1232 enum ViewType{ FRONT, BACK, LEFT, RIGHT, TOP, BOTTOM};
1234 This enumeration contains a set of elements determining the axis
1236 enum Axis{ XAxis, YAxis, ZAxis};
1238 Data type defining coordinates in 3D space.
1240 typedef double XYZ[3];
1243 Makes all presentations, which are currently present in the %view, completely visible.
1249 Sets a predefined point of view (FRONT, BACK, LEFT, RIGHT, TOP, BOTTOM). (In other words it means
1250 a predefined position of the camera in 3D space with respect to the object which is represented.)
1252 void SetView(in ViewType theType);
1255 Sets the position of the camera in 3D space. This point is used as the first point of the vector defining
1256 the view direction of the camera.
1258 void SetPointOfView(in XYZ theCoord);
1260 Gets the position of the camera in 3D space.This point is used as the first point of the vector defining
1261 the view direction of the camera.
1263 XYZ GetPointOfView();
1265 Sets the vertical line of the camera in 3D space.
1267 void SetViewUp(in XYZ theDir);
1269 Gets the vertical line of the camera in 3D space.
1273 Sets the point of sight of the camera. This point is used as the second point of the vector defining
1274 the view direction of the camera.
1276 void SetFocalPoint(in XYZ theDir);
1278 Gets the point of sight of the camera. This point is used as the second point of the vector defining
1279 the view direction of the camera.
1281 XYZ GetFocalPoint();
1283 Zooming of the presentable object. Sets the scale.
1285 void SetParallelScale(in double theScale);
1287 Zooming of the presentable object. Gets the scale.
1289 double GetParallelScale();
1291 Scaling of the view along a definite axis.
1292 \param theAxis The axis of the scaling
1293 \param theParam The coefficient of the scaling
1295 void ScaleView(in Axis theAxis, in double theParam);
1297 Removes the scaling of the view.
1301 Saves view parameters.
1302 \return True if the view parameters have been created, False if the parameters have been modified.
1303 \param theName The name under which the view parameters will be saved.
1305 boolean SaveViewParams(in string theName);
1306 /*! Restores view parameters.
1307 \return True if the view parameters have been found and applied to the view,
1308 False if the parameters with this name don't exist.
1309 \param theName The name of the view parameters which will be restored.
1311 boolean RestoreViewParams(in string theName);
1315 //-------------------------------------------------------
1316 /*! \brief Interface of the Table view
1318 This interface is used for creation of a view necessary for presentation of a table.
1320 interface TableView : View {
1325 //-------------------------------------------------------
1326 /*! \brief Interface of the 2D plot view
1328 This interface is used for creation of a view necessary for presentation of a XY plot generated on the basis
1329 of one or several curve lines.
1331 interface XYPlot : View {
1332 /*! Sets the title of the XY plot
1333 \param theTitle The title of the XY plot
1336 void SetSubTitle(in string theTitle);
1337 /*! Gets the title of the XY plot
1339 string GetSubTitle();
1341 This enumeration contains a set of elements determining the type of the curve lines, which
1342 will be displayed in your XY plot.
1344 enum CurveType { POINTS, MULTYLINE, SPLINE};
1345 /*! Sets the type of the curve lines.
1346 \param theType The type of the curve lines taken from <VAR>CurveType</VAR> enumeration.
1348 void SetCurveType(in CurveType theType);
1350 /*! Gets the type of the curve lines.
1353 CurveType GetCurveType();
1354 /*! Sets the size of the markers (data points) with help of
1355 which the curve is constructed on the graphics.
1356 \param theSize Long value defining the size of the markers.
1358 void SetMarkerSize(in long theSize);
1359 /*! Gets the size of the markers (data points) with help of
1360 which the curve is constructed on the graphics.
1362 long GetMarkerSize();
1363 /*! Enable/disables X-axis grid of the 2D plot.
1365 void EnableXGrid(in boolean theMajor, in long theNumMajor, in boolean theMinor, in long theNumMinor);
1367 /*! Enable/disables Y-axis grid of the 2D plot.
1369 void EnableYGrid(in boolean theMajor, in long theNumMajor, in boolean theMinor, in long theNumMinor);
1371 /*! Sets horizontal scaling of the 2D plot.
1372 \param theScaling Type of scaling taken from <VAR>Scaling</VAR> enumeration.
1374 void SetHorScaling(in Scaling theScaling);
1375 /*! Gets the type horizontal scaling of the 2D plot.
1377 Scaling GetHorScaling();
1378 /*! Sets vertical scaling of the 2D plot.
1379 \param theScaling Type of scaling taken from <VAR>Scaling</VAR> enumeration.
1381 void SetVerScaling(in Scaling theScaling);
1382 /*! Gets the type vertical scaling of the 2D plot.
1384 Scaling GetVerScaling();
1386 /*! Sets the title of the X-axis of the plot.
1387 \param theTitle String value defining the title of the X-axis of the plot.
1389 void SetXTitle(in string theTitle);
1390 /*! Gets the title of the X-axis of the plot.
1393 /*! Sets the title of the Y-axis of the plot.
1394 \param theTitle String value defining the title of the X-axis of the plot.
1396 void SetYTitle(in string theTitle);
1397 /*! Gets the title of the Y-axis of the plot.
1400 /*! Shows/hides the legend (description) of the 2D plot.
1402 void ShowLegend(in boolean theShowing);
1403 /*! Shrinks and enlarges the 2D plot to fit the 2D viewer.
1408 //-------------------------------------------------------
1409 /*! \brief Interface of the %ViewManager
1411 The %ViewManager is necessary for work with view windows (creation and deletion).
1414 interface ViewManager: Base{
1415 /*! \brief Getting an active %View Frame
1417 Returns an object reference to the active %View Frame.
1418 Type of the %View must be checked.
1419 \note <BR>Returns nil if there are no views currently opened.
1422 View GetCurrentView();
1423 /*! \brief Creation of a 3d %View.
1425 Returns an object reference to the newly created 3D %View.
1427 View3D Create3DView();
1428 /*! \brief Creation of a Table %View.
1430 Returns an object reference to the newly created Table %View.
1433 TableView CreateTableView(in Table theTable);
1435 /*! \brief Creation of a 2D plot %View.
1437 Returns an object reference to the newly created 2D plot %View.
1440 XYPlot CreateXYPlot();
1442 /*! Deletes a definite view.
1443 \param theView The view which should be deleted.
1445 void Destroy(in View theView);