Salome HOME
ad27058f4681dc8f9f3129facaec2d5703b5fab6
[modules/shaper_study.git] / idl / SHAPERSTUDY_Gen.idl
1 // Copyright (C) 2019-2020  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef __SHAPERSTUDY_GEN__
21 #define __SHAPERSTUDY_GEN__
22
23 #include "GEOM_Gen.idl"
24 #include "SALOMEDS.idl"
25 #include "SALOME_Exception.idl"
26
27 module SHAPERSTUDY_ORB
28 {
29
30 interface SHAPER_Object : GEOM::GEOM_Object
31 {
32   /*!
33   *  \brief Puts the shape to the object by BRep stream.
34   */
35   void SetShapeByStream(in string theStream);
36   /*!
37   *  \brief Sets the internal entry of the object, common for all objects in SHAPER-STUDY
38   */
39   void SetEntry( in string theInternalEntry );
40   /*!
41   *  \brief Sets SObject of this object (when it is published)
42   */
43   void SetSO( in SALOMEDS::SObject theInternalEntry );
44   /*!
45   *  \brief Returns SObject of this object
46   */
47   SALOMEDS::SObject GetSO();
48   /*!
49   *  \brief Returns true if shape is already dead
50   */
51   boolean IsDead();
52   /*!
53   *  \brief Makes the dead-copy of the shape and returns it
54   */
55   SHAPER_Object MakeDead();
56   /*!
57   *  \brief Returns the stream of the previous version of the shape stored here
58   */
59   SALOMEDS::TMPFile GetOldShapeStream();
60   /*!
61   *  \brief Sets internal type of operation created this object. For group it is 37, shape 1.
62   */
63   void SetType( in long theType );
64
65   /*!
66   *  \brief Sets the shape by the pointer to the TopoDS_Shape
67   */
68   void SetShapeByPointer(in long long theShape);
69 };
70
71 /*!
72  * A group extension of the SHAPER object:
73  * it contains the selection-type and selected sub-shapes indices.
74  */
75 interface SHAPER_Group : SHAPER_Object
76 {
77   /*!
78   *  \brief Sets what is returned in the GEOM_IGroupOperations::GetType
79   */
80   void SetSelectionType(in long theType);
81   /*!
82   *  \brief Returns the type of the selected sub-shapes
83   */
84   long GetSelectionType();
85   /*!
86   *  \brief Sets what is returned in the GEOM_IGroupOperations::GetObjects
87   */
88   void SetSelection(in GEOM::ListOfLong theSelection);
89   /*!
90   *  \brief Returns the selected sub-shapes indices
91   */
92   GEOM::ListOfLong GetSelection();
93   /*!
94   *  \brief Returns the old selected sub-shapes indices (to restore on break-link)
95   */
96   GEOM::ListOfLong GetSelectionOld();
97
98   /*!
99   *  \brief Sets value of a modification counter.
100   */
101   void SetTick( in long theValue );
102
103 };
104
105 interface Gen : GEOM::GEOM_Gen
106 {
107   /*!
108    *  \brief Searches existing or creates a new SHAPERSTUDY_Object to interact with SHAPER
109    */
110   SHAPER_Object FindOrCreateShape(in string theInternalEntry);
111
112   /*!
113   *  \brief Stores the variable names of the SHAPER dump to python
114   */
115   void StoreVariableName(in string theEntry, in string theVarName);
116 };
117
118 interface IShapesOperations : GEOM::GEOM_IShapesOperations
119 {
120 };
121
122 interface IGroupOperations  : GEOM::GEOM_IGroupOperations
123 {
124   /*!
125   *  \brief Searches existing group of theOwner shape by the entry. Returns NULL if can not find.
126   */
127   SHAPER_Group FindGroup(in SHAPER_Object theOwner, in string theEntry);
128 };
129
130 interface SHAPER_Field             : GEOM::GEOM_Field
131 {
132   /*!
133   *  \brief Sets the type of values in the field
134   */
135   void SetValuesType(in short theType);
136   /*!
137   *  \brief Returns the type of values in the field
138   */
139   short GetValuesType();
140
141   /*!
142   *  \brief Sets the list of time step IDs in the field
143   */
144   void SetSteps(in GEOM::ListOfLong theSteps);
145
146   /*!
147   *  \brief Sets the names of components
148   */
149   void SetComponents( in GEOM::string_array theComponents );
150   /*!
151   *  \brief Erases all steps of this field
152   */
153   void ClearFieldSteps();
154
155   /*!
156   *  \brief Appends a step data to this field
157   */
158   void AddFieldStep( in long theStampID, in long theStepID, in GEOM::ListOfDouble theValues);
159
160
161   /*!
162   *  \brief Sets what is returned in the GEOM_IGroupOperations::GetType
163   */
164   void SetSelectionType(in long theType);
165   /*!
166   *  \brief Returns the type of the selected sub-shapes
167   */
168   long GetSelectionType();
169   /*!
170   *  \brief Sets what is returned in the GEOM_IGroupOperations::GetObjects
171   */
172   void SetSelection(in GEOM::ListOfLong theSelection);
173   /*!
174   *  \brief Returns the selected sub-shapes indices
175   */
176   GEOM::ListOfLong GetSelection();
177   /*!
178   *  \brief Returns the old selected sub-shapes indices (to restore on break-link)
179   */
180   GEOM::ListOfLong GetSelectionOld();
181
182   /*!
183   *  \brief Sets the internal entry of the object, common for all objects in SHAPER-STUDY
184   */
185   void SetEntry( in string theInternalEntry );
186   /*!
187   *  \brief Sets SObject of this object (when it is published)
188   */
189   void SetSO( in SALOMEDS::SObject theInternalEntry );
190   /*!
191   *  \brief Returns SObject of this object
192   */
193   SALOMEDS::SObject GetSO();
194   /*!
195   *  \brief Returns true if shape is already dead
196   */
197   boolean IsDead();
198   /*!
199   *  \brief Makes the dead-copy of the shape and returns it
200   */
201   SHAPER_Object MakeDead();
202
203 };
204
205 interface IFieldOperations  : GEOM::GEOM_IFieldOperations
206 {
207   /*!
208   *  \brief Searches existing field of theOwner shape by the entry. Returns NULL if can not find.
209   */
210   SHAPER_Field FindField(in SHAPER_Object theOwner, in string theEntry);
211   /*!
212   *  \brief Creates a field of theMainShape.
213   */
214   SHAPER_Field CreateFieldByType(in GEOM::GEOM_Object theMainShape, in long theShapeType);
215 };
216
217 interface IMeasureOperations  : GEOM::GEOM_IMeasureOperations
218 {
219 };
220
221 interface SHAPER_DoubleFieldStep   : GEOM::GEOM_DoubleFieldStep
222 {
223 };
224
225 interface SHAPER_IntFieldStep      : GEOM::GEOM_IntFieldStep
226 {
227 };
228
229 interface SHAPER_BoolFieldStep     : GEOM::GEOM_BoolFieldStep
230 {
231 };
232
233 };
234
235 #endif