1 // Copyright (C) 2019-2020 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef __SHAPERSTUDY_GEN__
21 #define __SHAPERSTUDY_GEN__
23 #include "GEOM_Gen.idl"
24 #include "SALOMEDS.idl"
25 #include "SALOME_Exception.idl"
27 module SHAPERSTUDY_ORB
30 interface SHAPER_Object : GEOM::GEOM_Object
33 * \brief Puts the shape to the object by BRep stream.
35 void SetShapeByStream(in string theStream);
37 * \brief Sets the internal entry of the object, common for all objects in SHAPER-STUDY
39 void SetEntry( in string theInternalEntry );
41 * \brief Sets SObject of this object (when it is published)
43 void SetSO( in SALOMEDS::SObject theInternalEntry );
45 * \brief Returns SObject of this object
47 SALOMEDS::SObject GetSO();
49 * \brief Returns true if shape is already dead
53 * \brief Makes the dead-copy of the shape and returns it
55 SHAPER_Object MakeDead();
57 * \brief Returns the stream of the previous version of the shape stored here
59 SALOMEDS::TMPFile GetOldShapeStream();
61 * \brief Sets internal type of operation created this object. For group it is 37, shape 1.
63 void SetType( in long theType );
66 * \brief Sets the shape by the pointer to the TopoDS_Shape
68 void SetShapeByPointer(in long long theShape);
72 * A group extension of the SHAPER object:
73 * it contains the selection-type and selected sub-shapes indices.
75 interface SHAPER_Group : SHAPER_Object
78 * \brief Sets what is returned in the GEOM_IGroupOperations::GetType
80 void SetSelectionType(in long theType);
82 * \brief Returns the type of the selected sub-shapes
84 long GetSelectionType();
86 * \brief Sets what is returned in the GEOM_IGroupOperations::GetObjects
88 void SetSelection(in GEOM::ListOfLong theSelection);
90 * \brief Returns the selected sub-shapes indices
92 GEOM::ListOfLong GetSelection();
94 * \brief Returns the old selected sub-shapes indices (to restore on break-link)
96 GEOM::ListOfLong GetSelectionOld();
99 * \brief Sets value of a modification counter.
101 void SetTick( in long theValue );
105 interface Gen : GEOM::GEOM_Gen
108 * \brief Searches existing or creates a new SHAPERSTUDY_Object to interact with SHAPER
110 SHAPER_Object FindOrCreateShape(in string theInternalEntry);
113 * \brief Stores the variable names of the SHAPER dump to python
115 void StoreVariableName(in string theEntry, in string theVarName);
118 interface IShapesOperations : GEOM::GEOM_IShapesOperations
122 interface IGroupOperations : GEOM::GEOM_IGroupOperations
125 * \brief Searches existing group of theOwner shape by the entry. Returns NULL if can not find.
127 SHAPER_Group FindGroup(in SHAPER_Object theOwner, in string theEntry);
130 interface SHAPER_Field : GEOM::GEOM_Field
133 * \brief Sets the type of values in the field
135 void SetValuesType(in short theType);
137 * \brief Returns the type of values in the field
139 short GetValuesType();
142 * \brief Sets the list of time step IDs in the field
144 void SetSteps(in GEOM::ListOfLong theSteps);
147 * \brief Sets the names of components
149 void SetComponents( in GEOM::string_array theComponents );
151 * \brief Erases all steps of this field
153 void ClearFieldSteps();
156 * \brief Appends a step data to this field
158 void AddFieldStep( in long theStampID, in long theStepID, in GEOM::ListOfDouble theValues);
162 * \brief Sets what is returned in the GEOM_IGroupOperations::GetType
164 void SetSelectionType(in long theType);
166 * \brief Returns the type of the selected sub-shapes
168 long GetSelectionType();
170 * \brief Sets what is returned in the GEOM_IGroupOperations::GetObjects
172 void SetSelection(in GEOM::ListOfLong theSelection);
174 * \brief Returns the selected sub-shapes indices
176 GEOM::ListOfLong GetSelection();
178 * \brief Returns the old selected sub-shapes indices (to restore on break-link)
180 GEOM::ListOfLong GetSelectionOld();
183 * \brief Sets the internal entry of the object, common for all objects in SHAPER-STUDY
185 void SetEntry( in string theInternalEntry );
187 * \brief Sets SObject of this object (when it is published)
189 void SetSO( in SALOMEDS::SObject theInternalEntry );
191 * \brief Returns SObject of this object
193 SALOMEDS::SObject GetSO();
195 * \brief Returns true if shape is already dead
199 * \brief Makes the dead-copy of the shape and returns it
201 SHAPER_Object MakeDead();
205 interface IFieldOperations : GEOM::GEOM_IFieldOperations
208 * \brief Searches existing field of theOwner shape by the entry. Returns NULL if can not find.
210 SHAPER_Field FindField(in SHAPER_Object theOwner, in string theEntry);
212 * \brief Creates a field of theMainShape.
214 SHAPER_Field CreateFieldByType(in GEOM::GEOM_Object theMainShape, in long theShapeType);
217 interface IMeasureOperations : GEOM::GEOM_IMeasureOperations
221 interface SHAPER_DoubleFieldStep : GEOM::GEOM_DoubleFieldStep
225 interface SHAPER_IntFieldStep : GEOM::GEOM_IntFieldStep
229 interface SHAPER_BoolFieldStep : GEOM::GEOM_BoolFieldStep