Salome HOME
merge from branch V5_1_sizemap tag mergeto_V5_1_main_8oct09
[plugins/blsurfplugin.git] / idl / BLSURFPlugin_Algorithm.idl
1 //  Copyright (C) 2007-2008  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 // File    : BLSURFPlugin_Algorithm.idl
21 // Authors : Francis KLOSS (OCC) & Patrick LAUG (INRIA) & Lioka RAZAFINDRAZAKA (CEA)
22 //           Size maps developement: Nicolas GEIMER (OCC) & Gilles DAVID (EURIWARE)
23 // ---
24 //
25 #ifndef _SMESH_BLSURFALGORITHM_IDL_
26 #define _SMESH_BLSURFALGORITHM_IDL_
27
28 #include "SMESH_Hypothesis.idl"
29 #include "GEOM_Gen.idl"
30 #include "SALOME_Exception.idl"
31
32 /*!
33  * BLSURFPlugin: interfaces to BLSURF related hypotheses and algorithms
34  */
35 module BLSURFPlugin
36 {
37   typedef sequence<string> string_array;
38   typedef sequence<double,3> TEnforcedVertex;
39   typedef sequence<TEnforcedVertex> TEnforcedVertexList;
40   struct TEnforcedVertexMapElement {
41     string entry;
42     TEnforcedVertexList vertexList;
43   };
44   typedef sequence<TEnforcedVertexMapElement> TEnforcedVertexMap;
45   
46   /*!
47    * BLSURFPlugin_BLSURF: interface of BLSURF algorithm
48    */
49   interface BLSURFPlugin_BLSURF : SMESH::SMESH_2D_Algo
50   {
51   };
52
53   /*!
54    * BLSURFPlugin_Hypothesis: interface of "BLSURF parameters" hypothesis
55    */
56   interface BLSURFPlugin_Hypothesis : SMESH::SMESH_Hypothesis
57   {
58     /*!
59      * Sets topology usage way defining how mesh conformity is assured
60      * value=0 - mesh conformity is assured by conformity of a shape
61      * value=1,2 - mesh conformity is assured by pre-processing a CAD model
62      */
63     void SetTopology(in long way);
64     long GetTopology();
65
66     /*!
67      * Sets a way to define size of mesh elements to generate
68      * 0 - size is defined automatically
69      * 1 - size is set by SetPhySize() method
70      */
71     void SetPhysicalMesh(in long isCustom);
72     long GetPhysicalMesh();
73
74     /*!
75      * Sets size of mesh elements to generate
76      */
77     void SetPhySize(in double size);
78     double GetPhySize();
79
80     /*!
81      * Sets lower boundary of mesh element size (PhySize)
82      */
83     void SetPhyMin(in double theMinSize);
84     double GetPhyMin();
85
86     /*!
87      * Sets upper boundary of mesh element size (PhySize)
88      */
89     void SetPhyMax(in double theMaxSize);
90     double GetPhyMax();
91
92     /*!
93      * Sets a way to define maximum angular deflection of mesh from CAD model
94      * 0 - deflection is defined automatically
95      * 1 - deflection is set by SetAngleMeshS() and SetAngleMeshC() methods
96      */
97     void SetGeometricMesh(in long isCustom);
98     long GetGeometricMesh();
99
100     /*!
101      * Sets angular deflection (in degrees) of a mesh face from CAD surface
102      */
103     void SetAngleMeshS(in double angle);
104     double GetAngleMeshS();
105
106     /*!
107      * Sets angular deflection (in degrees) of a mesh edge from CAD curve
108      */
109     void SetAngleMeshC(in double angle);
110     double GetAngleMeshC();
111
112     /*!
113      * Sets lower boundary of mesh element size computed to respect angular deflection
114      */
115     void SetGeoMin(in double theMinSize);
116     double GetGeoMin();
117
118     /*!
119      * Sets upper boundary of mesh element size computed to respect angular deflection
120      */
121     void SetGeoMax(in double theMaxSize);
122     double GetGeoMax();
123
124     /*!
125      * Sets maximal allowed ratio between the lengths of two adjacent edges
126      */
127     void SetGradation(in double ratio);
128     double GetGradation();
129
130     /*!
131      * Sets to create quadrilateral elements or not
132      */
133     void SetQuadAllowed(in boolean allowed);
134     boolean GetQuadAllowed();
135
136     /*!
137      * To respect geometrical edges or not
138      */
139     void SetDecimesh(in boolean toIgnoreEdges);
140     boolean GetDecimesh();
141
142     /*!
143      * Sets verbosity level in the range 0 to 100.
144      */
145     void SetVerbosity(in short theVal) raises (SALOME::SALOME_Exception);
146     short GetVerbosity();
147
148     /*!
149      * Sets advanced option value
150      */
151     void SetOptionValue(in string optionName,
152                         in string optionValue) raises (SALOME::SALOME_Exception);
153     string GetOptionValue(in string optionName) raises (SALOME::SALOME_Exception);
154     /*!
155      * Unsets advanced option
156      */
157     void UnsetOption(in string optionName);
158
159     /*!
160      * Return array of strings each of which is option name concatenated
161      * with option value devided by semicolon - "option_name:option_value".
162      * Option value is empty if an option is not set.
163      * Note: the method is mostly for interaction with GUI.
164      */
165     string_array GetOptionValues();
166
167     /*!
168      * Set option values each in the form "option_name[:option_value]".
169      * Note: the method is mostly for interaction with GUI.
170      */
171     void SetOptionValues(in string_array options);
172
173     /*!
174      * SizeMap
175      */
176     void SetSizeMapEntries(in string_array sizeMaps);
177     void ClearSizeMaps();
178
179     void UnsetEntry(in string entry);
180
181     /*!
182      * Set/unset a SizeMap on geom object
183      */
184     void         SetSizeMap(in GEOM::GEOM_Object GeomObj, in string sizeMap);
185     void         UnsetSizeMap(in GEOM::GEOM_Object GeomObj);
186     
187     /*!
188      * Set a SizeMap on geom object given by entry
189      */
190     void         SetSizeMapEntry(in string entry, in string sizeMap);
191     string       GetSizeMapEntry(in string entry);
192     string_array GetSizeMapEntries();
193
194     /*!
195      * Set/unset an attractor on geom object
196      */
197     void         SetAttractor(in GEOM::GEOM_Object GeomObj, in string attractor);
198     void         UnsetAttractor(in GEOM::GEOM_Object GeomObj);
199     
200     /*!
201      * Set an attractor on geom object given by entry
202      */
203     void         SetAttractorEntry(in string entry, in string attractor);
204     string       GetAttractorEntry(in string entry);
205     string_array GetAttractorEntries();
206
207 /*
208     void         SetCustomSizeMapEntry(in string entry, in string sizeMap);
209     string       GetCustomSizeMapEntry(in string entry);
210     void         SetCustomSizeMap(in GEOM::GEOM_Object GeomObj, in string sizeMap);
211     void         UnsetCustomSizeMap(in GEOM::GEOM_Object GeomObj);
212     string_array GetCustomSizeMapEntries();
213 */
214     ///////////////////////
215     // ENFORCED VERTEXES //
216     ///////////////////////
217     
218     TEnforcedVertexMap GetAllEnforcedVertices();
219     void               ClearAllEnforcedVertices();
220     
221     /*!
222      * Set/get/unset an enforced vertex on geom object
223      */
224     void         SetEnforcedVertex(in GEOM::GEOM_Object GeomObj, in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
225 //     void         SetEnforcedVertexList(in GEOM::GEOM_Object GeomObj, in TEnforcedVertexList vertexList) raises (SALOME::SALOME_Exception);
226     
227     TEnforcedVertexList GetEnforcedVertices(in GEOM::GEOM_Object GeomObj) raises (SALOME::SALOME_Exception);
228     
229     void         UnsetEnforcedVertex(in GEOM::GEOM_Object GeomObj, in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
230 //     void         UnsetEnforcedVertexList(in GEOM::GEOM_Object GeomObj, in TEnforcedVertexList vertexList) raises (SALOME::SALOME_Exception);
231     void         UnsetEnforcedVertices(in GEOM::GEOM_Object GeomObj) raises (SALOME::SALOME_Exception);
232     
233    /*!
234     * Set/get/unset an enforced vertex on geom object given by entry
235     */
236     void         SetEnforcedVertexEntry(in string entry, in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
237 //     void         SetEnforcedVertexListEntry(in string entry, in TEnforcedVertexList vertexList) raises (SALOME::SALOME_Exception);
238 //     
239     TEnforcedVertexList GetEnforcedVerticesEntry(in string entry) raises (SALOME::SALOME_Exception);
240 //     
241     void         UnsetEnforcedVertexEntry(in string entry, in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
242 //     void         UnsetEnforcedVertexListEntry(in string entry, in TEnforcedVertexList vertexList) raises (SALOME::SALOME_Exception);
243     void         UnsetEnforcedVerticesEntry(in string entry) raises (SALOME::SALOME_Exception);
244     
245     ///////////////////////
246
247   };
248 };
249
250 #endif