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