Salome HOME
Update doc
[plugins/blsurfplugin.git] / idl / BLSURFPlugin_Algorithm.idl
1 // Copyright (C) 2007-2011  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.
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 // ---
21 // File    : BLSURFPlugin_Algorithm.idl
22 // Authors : Francis KLOSS (OCC) & Patrick LAUG (INRIA) & Lioka RAZAFINDRAZAKA (CEA)
23 //           Size maps developement: Nicolas GEIMER (OCC) & Gilles DAVID (EURIWARE)
24 // ---
25 //
26 #ifndef _SMESH_BLSURFALGORITHM_IDL_
27 #define _SMESH_BLSURFALGORITHM_IDL_
28
29 #include "SMESH_Hypothesis.idl"
30 #include "GEOM_Gen.idl"
31 #include "SALOME_Exception.idl"
32
33 /*!
34  * BLSURFPlugin: interfaces to BLSURF related hypotheses and algorithms
35  */
36 module BLSURFPlugin
37 {
38   typedef sequence<string> string_array;
39
40   // Enforced vertex name
41   typedef string TEnfName;
42   // Entry
43   typedef string TEntry;
44   typedef sequence<TEntry> TEntryList;
45   // Group name
46   typedef string TEnfGroupName;
47   
48   // Coordinates of enforced vertex
49   typedef sequence<double,3> TEnfVertexCoords;
50   // List of coords
51   typedef sequence<TEnfVertexCoords> TEnfVertexCoordsList;
52   
53   // Enforced vertex
54   struct TEnfVertex {
55     TEnfName name;
56     TEntry geomEntry;
57     TEnfVertexCoords coords;
58     TEnfGroupName grpName;
59     TEntryList faceEntries;
60   };
61   // List of enforced vertices
62   typedef sequence<TEnfVertex> TEnfVertexList;
63
64   // Map Face Entry / List of enforced vertices
65   struct TFaceEntryEnfVertexListMapElement {
66     TEntry faceEntry;
67     TEnfVertexList enfVertexList;
68   };
69   typedef sequence<TFaceEntryEnfVertexListMapElement> TFaceEntryEnfVertexListMap;
70   
71   // Map Face Entry / List of coords
72   struct TFaceEntryCoordsListMapElement {
73     TEntry faceEntry;
74     TEnfVertexCoordsList coordsList;
75   };
76   typedef sequence<TFaceEntryCoordsListMapElement> TFaceEntryCoordsListMap;
77   
78   // Map Face Entry / List of enf vertex entries
79   struct TFaceEntryEnfVertexEntryListMapElement {
80     TEntry faceEntry;
81     TEntryList enfVertexEntryList;
82   };
83   typedef sequence<TFaceEntryEnfVertexEntryListMapElement> TFaceEntryEnfVertexEntryListMap;
84   
85   // Map Coords / Enforced vertex
86   struct TCoordsEnfVertexElement {
87     TEnfVertexCoords coords;
88     TEnfVertex enfVertex;
89   };
90   typedef sequence<TCoordsEnfVertexElement> TCoordsEnfVertexMap;
91   
92   // Map Enf Vertex Entry / Enforced vertex
93   struct TEnfVertexEntryEnfVertexElement {
94     TEntry enfVertexEntry;
95     TEnfVertex enfVertex;
96   };
97   typedef sequence<TEnfVertexEntryEnfVertexElement> TEnfVertexEntryEnfVertexMap;
98
99   // Attractors
100   struct TAttractorParams {
101     string faceEntry;
102     string attEntry;
103     double startSize;
104     double endSize;
105     double infDist;
106     double constDist;
107   };
108   typedef sequence<TAttractorParams> TAttParamsMap;
109   
110   /*!
111    * BLSURFPlugin_BLSURF: interface of BLSURF algorithm
112    */
113   interface BLSURFPlugin_BLSURF : SMESH::SMESH_2D_Algo
114   {
115   };
116
117   /*!
118    * BLSURFPlugin_Hypothesis: interface of "BLSURF parameters" hypothesis
119    */
120   interface BLSURFPlugin_Hypothesis : SMESH::SMESH_Hypothesis
121   {
122     /*!
123      * Sets topology usage way defining how mesh conformity is assured
124      * value=0 - mesh conformity is assured by conformity of a shape
125      * value=1,2 - mesh conformity is assured by pre-processing a CAD model
126      */
127     void SetTopology(in long way);
128     long GetTopology();
129
130     /*!
131      * Sets a way to define size of mesh elements to generate
132      * 0 - size is defined automatically
133      * 1 - size is set by SetPhySize() method
134      * 2 - size is set by SetPhySize() method. A sizemap is defined.
135      */
136     void SetPhysicalMesh(in long isCustom);
137     long GetPhysicalMesh();
138
139     /*!
140      * Sets size of mesh elements to generate
141      */
142     void SetPhySize(in double size);
143     double GetPhySize();
144
145     /*!
146      * Sets lower boundary of mesh element size (PhySize)
147      */
148     void SetPhyMin(in double theMinSize);
149     double GetPhyMin();
150
151     /*!
152      * Sets upper boundary of mesh element size (PhySize)
153      */
154     void SetPhyMax(in double theMaxSize);
155     double GetPhyMax();
156
157     /*!
158      * Sets a way to define maximum angular deflection of mesh from CAD model
159      * 0 - deflection is defined automatically
160      * 1 - deflection is set by SetAngleMeshS() and SetAngleMeshC() methods
161      */
162     void SetGeometricMesh(in long isCustom);
163     long GetGeometricMesh();
164
165     /*!
166      * Sets angular deflection (in degrees) of a mesh face from CAD surface
167      */
168     void SetAngleMeshS(in double angle);
169     double GetAngleMeshS();
170
171     /*!
172      * Sets angular deflection (in degrees) of a mesh edge from CAD curve
173      */
174     void SetAngleMeshC(in double angle);
175     double GetAngleMeshC();
176
177     /*!
178      * Sets lower boundary of mesh element size computed to respect angular deflection
179      */
180     void SetGeoMin(in double theMinSize);
181     double GetGeoMin();
182
183     /*!
184      * Sets upper boundary of mesh element size computed to respect angular deflection
185      */
186     void SetGeoMax(in double theMaxSize);
187     double GetGeoMax();
188
189     /*!
190      * Sets maximal allowed ratio between the lengths of two adjacent edges
191      */
192     void SetGradation(in double ratio);
193     double GetGradation();
194
195     /*!
196      * Sets to create quadrilateral elements or not
197      */
198     void SetQuadAllowed(in boolean allowed);
199     boolean GetQuadAllowed();
200
201     /*!
202      * To respect geometrical edges or not
203      */
204     void SetDecimesh(in boolean toIgnoreEdges);
205     boolean GetDecimesh();
206
207     /*!
208      * Sets verbosity level in the range 0 to 100.
209      */
210     void SetVerbosity(in short theVal) raises (SALOME::SALOME_Exception);
211     short GetVerbosity();
212
213     /*!
214      * Sets advanced option value
215      */
216     void SetOptionValue(in string optionName,
217                         in string optionValue) raises (SALOME::SALOME_Exception);
218     string GetOptionValue(in string optionName) raises (SALOME::SALOME_Exception);
219     /*!
220      * Unsets advanced option
221      */
222     void UnsetOption(in string optionName);
223
224     /*!
225      * Return array of strings each of which is option name concatenated
226      * with option value devided by semicolon - "option_name:option_value".
227      * Option value is empty if an option is not set.
228      * Note: the method is mostly for interaction with GUI.
229      */
230     string_array GetOptionValues();
231
232     /*!
233      * Set option values each in the form "option_name[:option_value]".
234      * Note: the method is mostly for interaction with GUI.
235      */
236     void SetOptionValues(in string_array options);
237
238     /*!
239      * SizeMap
240      */
241     void SetSizeMapEntries(in string_array sizeMaps);
242     void ClearSizeMaps();
243
244     void UnsetEntry(in string entry);
245
246     /*!
247      * Set/unset a SizeMap on geom object
248      */
249     void         SetSizeMap(in GEOM::GEOM_Object GeomObj, in string sizeMap);
250     void         UnsetSizeMap(in GEOM::GEOM_Object GeomObj);
251     
252     /*!
253      * Set a SizeMap on geom object given by entry
254      */
255     void         SetSizeMapEntry(in string entry, in string sizeMap);
256     string       GetSizeMapEntry(in string entry);
257     string_array GetSizeMapEntries();
258
259     /*!
260      * Set/unset an attractor on geom object
261      */
262     void         SetAttractor(in GEOM::GEOM_Object GeomObj, in string attractor);
263     void         UnsetAttractor(in GEOM::GEOM_Object GeomObj);
264     
265     /*!
266      * Set an attractor on geom object given by entry
267      */
268     void         SetAttractorEntry(in string entry, in string attractor);
269     string       GetAttractorEntry(in string entry);
270     string_array GetAttractorEntries();
271
272     /*!
273      * Set/unset an attractor given as geom object on another geom object
274      */
275     void         SetAttractorGeom(in GEOM::GEOM_Object GeomObj, in GEOM::GEOM_Object AttractorShape, in double StartSize, in double EndSize, in double ActionRadius, in double ConstantRadius);
276     void         UnsetAttractorGeom(in GEOM::GEOM_Object GeomObj);
277
278     /*!
279      * Set an attractor given by entry on a geom object given by entry
280      */
281     void         SetClassAttractorEntry(in string entry, in string att_entry, in double StartSize, in double EndSize, in double ActionRadius, in double ConstantRadius );
282     BLSURFPlugin::TAttParamsMap GetAttractorParams();
283
284
285
286 /*
287     void         SetCustomSizeMapEntry(in string entry, in string sizeMap);
288     string       GetCustomSizeMapEntry(in string entry);
289     void         SetCustomSizeMap(in GEOM::GEOM_Object GeomObj, in string sizeMap);
290     void         UnsetCustomSizeMap(in GEOM::GEOM_Object GeomObj);
291     string_array GetCustomSizeMapEntries();
292 */
293     ///////////////////////
294     // ENFORCED VERTEXES //
295     ///////////////////////
296     
297     TFaceEntryEnfVertexListMap      GetAllEnforcedVerticesByFace();
298     TEnfVertexList                  GetAllEnforcedVertices();
299     
300     TFaceEntryCoordsListMap         GetAllCoordsByFace();
301     TCoordsEnfVertexMap             GetAllEnforcedVerticesByCoords();
302     
303     TFaceEntryEnfVertexEntryListMap GetAllEnfVertexEntriesByFace();
304     TEnfVertexEntryEnfVertexMap     GetAllEnforcedVerticesByEnfVertexEntry();
305     
306     void                            ClearAllEnforcedVertices();
307     
308    /*!
309     * Set/get/unset an enforced vertex on geom face
310     */
311     boolean SetEnforcedVertex(in GEOM::GEOM_Object theFace, in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
312     boolean SetEnforcedVertexNamed(in GEOM::GEOM_Object theFace, in double x, in double y, in double z, in TEnfName theVertexName) raises (SALOME::SALOME_Exception);
313     boolean SetEnforcedVertexGeom(in GEOM::GEOM_Object theFace, in GEOM::GEOM_Object theVertex) raises (SALOME::SALOME_Exception);
314     boolean SetEnforcedVertexWithGroup(in GEOM::GEOM_Object theFace, in double x, in double y, in double z, in TEnfGroupName groupName) raises (SALOME::SALOME_Exception);
315     boolean SetEnforcedVertexNamedWithGroup(in GEOM::GEOM_Object theFace, in double x, in double y, in double z, in TEnfName theVertexName, in TEnfGroupName groupName) raises (SALOME::SALOME_Exception);
316     boolean SetEnforcedVertexGeomWithGroup(in GEOM::GEOM_Object theFace, in GEOM::GEOM_Object theVertex, in TEnfGroupName groupName) raises (SALOME::SALOME_Exception);
317
318     
319     TEnfVertexList GetEnforcedVertices(in GEOM::GEOM_Object theFace) raises (SALOME::SALOME_Exception);
320     
321     boolean UnsetEnforcedVertex(in GEOM::GEOM_Object theFace, in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
322     boolean UnsetEnforcedVertexGeom(in GEOM::GEOM_Object theFace, in GEOM::GEOM_Object theVertex) raises (SALOME::SALOME_Exception);
323     boolean UnsetEnforcedVertices(in GEOM::GEOM_Object theFace) raises (SALOME::SALOME_Exception);
324     
325    /*!
326     * Set/get/unset an enforced vertex on geom face given by entry
327     */
328     boolean SetEnforcedVertexEntry(in TEntry theFaceEntry, in double x, in double y, in double z, 
329                                    in TEnfName theVertexName, in TEntry theVertexEntry, in string groupName) raises (SALOME::SALOME_Exception);
330 //    boolean SetEnforcedVertexEntryNamed(in TEntry theFaceEntry, in double x, in double y, in double z, in TEnfName theVertexName) raises (SALOME::SALOME_Exception);
331 //    boolean SetEnforcedVertexEntryGeom(in TEntry theFaceEntry, in TEntry theVertexEntry, in TEnfName theVertexName) raises (SALOME::SALOME_Exception);
332     /* TODO GROUPS
333     void SetEnforcedVertexEntryWithGroup(in string theFaceEntry, in double x, in double y, in double z, in TEnfGroupName groupName)
334         raises (SALOME::SALOME_Exception);
335     */
336 //     
337     TEnfVertexList GetEnforcedVerticesEntry(in TEntry theFaceEntry) raises (SALOME::SALOME_Exception);
338 //     
339     boolean UnsetEnforcedVertexEntry(in TEntry theFaceEntry, in double x, in double y, in double z, in TEntry theVertexEntry) raises (SALOME::SALOME_Exception);
340 //    boolean UnsetEnforcedVertexEntryGeom(in TEntry theFaceEntry, in TEntry theVertexEntry) raises (SALOME::SALOME_Exception);
341     boolean UnsetEnforcedVerticesEntry(in TEntry theFaceEntry) raises (SALOME::SALOME_Exception);
342
343    /*!
344      * Set/get an enforced vertex on geom object and add it to a group
345     */
346     /* TODO GROUPS
347     void SetEnforcedVertexGroupName(in double x, in double y, in double z, in TEnfGroupName groupName)
348         raises (SALOME::SALOME_Exception);
349     string GetEnforcedVertexGroupName(in double x, in double y, in double z)
350         raises (SALOME::SALOME_Exception);
351     */
352     ///////////////////////
353
354   };
355 };
356
357 #endif