Salome HOME
Merging with WPdev
[modules/smesh.git] / idl / SMESH_BasicHypothesis.idl
1 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
3 // 
4 //  This library is free software; you can redistribute it and/or 
5 //  modify it under the terms of the GNU Lesser General Public 
6 //  License as published by the Free Software Foundation; either 
7 //  version 2.1 of the License. 
8 // 
9 //  This library is distributed in the hope that it will be useful, 
10 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
11 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12 //  Lesser General Public License for more details. 
13 // 
14 //  You should have received a copy of the GNU Lesser General Public 
15 //  License along with this library; if not, write to the Free Software 
16 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
17 // 
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 //
20 //
21 //
22 //  File   : SMESH_BasicHypothesis.idl
23 //  Author : Paul RASCLE, EDF
24
25 #ifndef _SMESH_BASICHYPOTHESIS_IDL_
26 #define _SMESH_BASICHYPOTHESIS_IDL_
27
28 #include "SALOME_Exception.idl"
29 #include "SMESH_Hypothesis.idl"
30 #include "SMESH_Mesh.idl"
31
32
33 /*!
34  * StdMeshers: interfaces to standard hypotheses and algorithms
35  */
36 module StdMeshers
37 {
38   /*!
39    * StdMeshers_LocalLength: interface of "Average length" hypothesis
40    */
41   interface StdMeshers_LocalLength : SMESH::SMESH_Hypothesis
42   {
43     /*!
44      * Sets <length> parameter value
45      */
46     void SetLength(in double length) 
47       raises (SALOME::SALOME_Exception);
48
49     /*!
50      * Returns <length> parameter value
51      */
52     double GetLength();
53   };
54
55   /*!
56    * StdMeshers_AutomaticLength: interface of "Automatic length" hypothesis
57    */
58   interface StdMeshers_AutomaticLength : SMESH::SMESH_Hypothesis
59   {
60     /*!
61      * Sets Fineness parameter value
62      */
63     void SetFineness(in double theFineness)
64       raises (SALOME::SALOME_Exception);
65
66     /*!
67      * Returns <Fineness> parameter value
68      */
69     double GetFineness();
70   };
71
72   /*!
73    * StdMeshers_NumberOfSegments: interface of "Nb. Segments" hypothesis
74    */
75   interface StdMeshers_NumberOfSegments : SMESH::SMESH_Hypothesis
76   {
77     /*!
78      * Builds and returns point distribution according to passed density function
79      */
80     SMESH::double_array BuildDistributionExpr( in string func, in long nbSeg, in long conv )
81       raises (SALOME::SALOME_Exception);
82     SMESH::double_array BuildDistributionTab( in SMESH::double_array func, in long nbSeg, in long conv )
83       raises (SALOME::SALOME_Exception);
84   
85     /*!
86      * Sets <number of segments> parameter value
87      */
88     void SetNumberOfSegments(in long segmentsNumber) 
89       raises (SALOME::SALOME_Exception);
90
91     /*!
92      * Returns <number of segments> parameter value
93      */
94     long GetNumberOfSegments();
95
96     /*!
97      * Sets <distribution type> parameter value
98      */
99     void SetDistrType(in long typ)
100       raises (SALOME::SALOME_Exception);
101
102     /*!
103      * Returns <distribution type> parameter value
104      */
105     long GetDistrType();
106
107     /*!
108      * Sets <scale factor> parameter value
109      */
110     void SetScaleFactor(in double scaleFactor)
111       raises (SALOME::SALOME_Exception);
112
113     /*!
114      * Returns <scale factor> parameter value
115      */
116     double GetScaleFactor()
117       raises (SALOME::SALOME_Exception);
118
119     /*!
120      * Sets <table function> parameter value for distribution DT_TabFunc
121      */
122     void SetTableFunction(in SMESH::double_array table)
123       raises (SALOME::SALOME_Exception);
124
125     /*!
126      * Returns <table function> parameter value for distribution DT_TabFunc
127      */
128     SMESH::double_array GetTableFunction()
129       raises (SALOME::SALOME_Exception);
130
131     /*!
132      * Sets <expression function> parameter value for distribution DT_ExprFunc
133      */
134     void SetExpressionFunction(in string expr)
135       raises (SALOME::SALOME_Exception);
136
137     /*!
138      * Returns <expression function> parameter value for distribution DT_ExprFunc
139      */
140     string GetExpressionFunction()
141       raises (SALOME::SALOME_Exception);
142
143     /*!
144      * Sets <conversion mode> parameter value for functional distributions
145      */
146     void SetConversionMode(in long conv )
147       raises (SALOME::SALOME_Exception);
148
149     /*!
150      * Returns <conversion mode> parameter value for functional distributions
151      */
152     long ConversionMode()
153       raises (SALOME::SALOME_Exception);
154   };
155
156   /*!
157    * StdMeshers_Arithmetic1D: interface of "Arithmetic 1D" hypothesis
158    */
159   interface StdMeshers_Arithmetic1D : SMESH::SMESH_Hypothesis
160   {
161     /*!
162      * Sets <start segment length> or <end segment length> parameter value
163      */
164     void SetLength(in double length, in boolean isStartLength) 
165       raises (SALOME::SALOME_Exception);
166
167     /*!
168      * Returns <start segment length> or <end segment length> parameter value
169      */
170     double GetLength(in boolean isStartLength);
171   };
172
173   /*!
174    * StdMeshers_MaxElementArea: interface of "Max. Triangle Area" hypothesis
175    */
176   interface StdMeshers_MaxElementArea : SMESH::SMESH_Hypothesis
177   {
178     /*!
179      * Sets <maximum element area> parameter value
180      */
181     void SetMaxElementArea(in double area) 
182       raises (SALOME::SALOME_Exception);
183
184     /*!
185      * Returns <maximum element area> parameter value
186      */
187     double GetMaxElementArea();
188   };
189
190   /*!
191    * StdMeshers_LengthFromEdges: interface of "Length From Edges (2D Hyp. for Triangulator)" hypothesis
192    */
193   interface StdMeshers_LengthFromEdges : SMESH::SMESH_Hypothesis
194   {
195     /*!
196      * Sets <mode> parameter value
197      */
198     void SetMode(in long mode) 
199       raises (SALOME::SALOME_Exception);
200
201     /*!
202      * Returns <mode> parameter value
203      */
204     long GetMode();
205   };
206
207   /*!
208    * StdMeshers_StartEndLength: interface of "Start and End Length" hypothesis
209    */
210   interface StdMeshers_StartEndLength : SMESH::SMESH_Hypothesis
211   {
212     /*!
213      * Sets <start segment length> or <end segment length> parameter value
214      */
215     void SetLength(in double length, in boolean isStartLength) 
216       raises (SALOME::SALOME_Exception);
217
218     /*!
219      * Returns <start segment length> or <end segment length> parameter value
220      */
221     double GetLength(in boolean isStartLength);
222   };
223
224
225   /*!
226    * StdMeshers_Deflection1D: interface of "Deflection 1D" hypothesis
227    */
228   interface StdMeshers_Deflection1D : SMESH::SMESH_Hypothesis
229   {
230     /*!
231      * Sets <deflection> parameter value
232      */
233     void SetDeflection(in double deflection)
234       raises (SALOME::SALOME_Exception);
235
236     /*!
237      * Returns <deflection> parameter value
238      */
239     double GetDeflection();
240   };
241
242
243   /*!
244    * StdMeshers_MaxElementVolume: interface of "Max. Hexahedron or Tetrahedron Volume" hypothesis
245    */
246   interface StdMeshers_MaxElementVolume : SMESH::SMESH_Hypothesis
247   {
248     /*!
249      * Sets <maximum element volume> parameter value
250      */
251     void SetMaxElementVolume(in double volume) 
252       raises (SALOME::SALOME_Exception);
253
254     /*!
255      * Returns <maximum element volume> parameter value
256      */
257     double GetMaxElementVolume();
258   };
259
260   /*!
261    * StdMeshers_NotConformAllowed: interface of "Not Conform Mesh Allowed" hypothesis.
262    * Presence of this hypothesis permits to algorithm generation of not conform mesh.
263    */
264   interface StdMeshers_NotConformAllowed : SMESH::SMESH_Hypothesis
265   {
266   };
267
268   /*!
269    * StdMeshers_Propagation: interface of "Propagation" hypothesis.
270    * Presence of this hypothesis on any edge propagates any other 1D
271    * hypothesis from this edge on all edges, opposite to it.
272    * It concerns only edges of quadrangle faces.
273    */
274   interface StdMeshers_Propagation : SMESH::SMESH_Hypothesis
275   {
276   };
277
278   /*!
279    * StdMeshers_QuadranglePreference: interface of "QuadranglePreference" hypothesis.
280    * This hypothesis is used by StdMeshers_Quadrangle_2D algorithm.
281    * Presence of this hypothesis forces construction of quadrangles if the number
282    * of nodes on opposite edges is not the same in the case where the global number
283    * of nodes on edges is even
284    */
285   interface StdMeshers_QuadranglePreference : SMESH::SMESH_Hypothesis
286   {
287   };
288
289   /*!
290    * StdMeshers_QuadraticMesh: interface of "QuadraticMesh" hypothesis.
291    * This is an auxiliary 1D hypothesis whose presence forces construction 
292    * of quadratic edges.
293    * If the 2D mesher sees that all boundary edges are quadratic ones,
294    * it generates quadratic faces, else it generates linear faces using
295    * medium nodes as if they were vertex ones.
296    * The 3D mesher generates quadratic volumes only if all boundary faces
297    * are quadratic ones, else it fails.
298    */
299   interface StdMeshers_QuadraticMesh : SMESH::SMESH_Hypothesis
300   {
301   };
302
303
304   /*!
305    * StdMeshers_NumberOfLayers: interface of "Nb. Layers" hypothesis.
306    * This hypothesis is used by "Radial prism" algorithm.
307    * It specifies number of segments between the internal 
308    * and the external surfaces.
309    */
310   interface StdMeshers_NumberOfLayers : SMESH::SMESH_Hypothesis
311   {
312     /*!
313      * Sets <number of segments> parameter value
314      */
315     void SetNumberOfLayers(in long numberOfLayers) 
316       raises (SALOME::SALOME_Exception);
317
318     /*!
319      * Returns <number of layers> parameter value
320      */
321     long GetNumberOfLayers();
322
323   };
324
325   /*!
326    * StdMeshers_LayerDistribution: interface of "Distribution of Layers" hypothesis.
327    * This hypothesis is used by "Radial prism" algorithm.
328    * It specifies 1D hypothesis defining distribution of segments between the internal 
329    * and the external surfaces.
330    */
331   interface StdMeshers_LayerDistribution : SMESH::SMESH_Hypothesis
332   {
333     /*!
334      * Sets  1D hypothesis specifying distribution of layers
335      */
336     void SetLayerDistribution(in SMESH::SMESH_Hypothesis distributionHyp) 
337       raises (SALOME::SALOME_Exception);
338
339     /*!
340      * Returns 1D hypothesis specifying distribution of layers
341      */
342     SMESH::SMESH_Hypothesis GetLayerDistribution();
343
344   };
345
346   /*!
347    * interface of "ProjectionSource1D" hypothesis.
348    * This hypothesis specifies a meshed edge to take a mesh pattern from
349    * and optionally association of vertices between the source edge and a
350    * target one (where a hipothesis is assigned to)
351    */
352   interface StdMeshers_ProjectionSource1D : SMESH::SMESH_Hypothesis
353   {
354     /*!
355      * Sets source <edge> to take a mesh pattern from
356      */
357     void SetSourceEdge(in GEOM::GEOM_Object edge)
358       raises (SALOME::SALOME_Exception);
359
360     /*!
361      * Returns the source edge
362      */
363     GEOM::GEOM_Object GetSourceEdge();
364
365     /*!
366      * Sets source <mesh> to take a mesh pattern from
367      */
368     void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
369
370     /*!
371      * Return source mesh
372      */
373     SMESH::SMESH_Mesh GetSourceMesh();
374
375     /*!
376      * Sets vertex association between the source edge and the target one.
377      * This parameter is optional
378      */
379     void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex,
380                               in GEOM::GEOM_Object targetVertex)
381       raises (SALOME::SALOME_Exception);
382
383     /*!
384      * Returns the vertex associated with the target vertex.
385      * Result may be nil if association not set
386      */
387     GEOM::GEOM_Object  GetSourceVertex();
388
389     /*!
390      * Returns the vertex associated with the source vertex.
391      * Result may be nil if association not set
392      */
393     GEOM::GEOM_Object  GetTargetVertex();
394   };
395
396   /*!
397    * interface of "ProjectionSource2D" hypothesis.
398    * This hypothesis specifies a meshed face to take a mesh pattern from
399    * and optionally association of vertices between the source face and a
400    * target one (where a hipothesis is assigned to)
401    */
402   interface StdMeshers_ProjectionSource2D : SMESH::SMESH_Hypothesis
403   {
404     /*!
405      * Sets a source <face> to take a mesh pattern from
406      */
407     void SetSourceFace(in GEOM::GEOM_Object face)
408       raises (SALOME::SALOME_Exception);
409
410     /*!
411      * Returns the source face
412      */
413     GEOM::GEOM_Object GetSourceFace();
414
415     /*!
416      * Sets source <mesh> to take a mesh pattern from
417      */
418     void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
419
420     /*!
421      * Return source mesh
422      */
423     SMESH::SMESH_Mesh GetSourceMesh();
424
425     /*!
426      * Sets vertex association between the source face and the target one.
427      * This parameter is optional.
428      * Two vertices must belong to one edge of a face
429      */
430     void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex1,
431                               in GEOM::GEOM_Object sourceVertex2,
432                               in GEOM::GEOM_Object targetVertex1,
433                               in GEOM::GEOM_Object targetVertex2)
434       raises (SALOME::SALOME_Exception);
435
436     /*!
437      * Returns the <i>-th source vertex associated with the <i>-th target vertex.
438      * Result may be nil if association not set.
439      * Valid indices are 1 and 2
440      */
441     GEOM::GEOM_Object  GetSourceVertex(in long i)
442       raises (SALOME::SALOME_Exception);
443
444     /*!
445      * Returns the <i>-th target vertex associated with the <i>-th source vertex.
446      * Result may be nil if association not set.
447      * Valid indices are 1 and 2
448      */
449     GEOM::GEOM_Object  GetTargetVertex(in long i)
450       raises (SALOME::SALOME_Exception);
451   };
452
453   /*!
454    * interface of "ProjectionSource3D" hypothesis.
455    * This hypothesis specifies a meshed shell or solid to take a mesh pattern from
456    * and optionally association of vertices between the source shape and a
457    * target one (where a hipothesis is assigned to)
458    */
459   interface StdMeshers_ProjectionSource3D : SMESH::SMESH_Hypothesis
460   {
461     /*!
462      * Sets a source <shape> to take a mesh pattern from
463      */
464     void SetSource3DShape(in GEOM::GEOM_Object shape)
465       raises (SALOME::SALOME_Exception);
466
467     /*!
468      * Returns the source shape
469      */
470     GEOM::GEOM_Object GetSource3DShape();
471
472     /*!
473      * Sets source <mesh> to take a mesh pattern from
474      */
475     void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
476
477     /*!
478      * Return source mesh
479      */
480     SMESH::SMESH_Mesh GetSourceMesh();
481
482     /*!
483      * Sets vertex association between the source shape and the target one.
484      * This parameter is optional.
485      * Two vertices must belong to one edge of a shape
486      */
487     void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex1,
488                               in GEOM::GEOM_Object sourceVertex2,
489                               in GEOM::GEOM_Object targetVertex1,
490                               in GEOM::GEOM_Object targetVertex2)
491       raises (SALOME::SALOME_Exception);
492
493     /*!
494      * Returns the <i>-th source vertex associated with the <i>-th target vertex.
495      * Result may be nil if association not set.
496      * Valid indices are 1 and 2
497      */
498     GEOM::GEOM_Object  GetSourceVertex(in long i)
499       raises (SALOME::SALOME_Exception);
500
501     /*!
502      * Returns the <i>-th target vertex associated with the <i>-th source vertex.
503      * Result may be nil if association not set.
504      * Valid indices are 1 and 2
505      */
506     GEOM::GEOM_Object  GetTargetVertex(in long i)
507       raises (SALOME::SALOME_Exception);
508   };
509
510   /*!
511    * StdMeshers_Regular_1D: interface of "Wire discretisation" algorithm
512    */
513   interface StdMeshers_Regular_1D : SMESH::SMESH_1D_Algo
514   {
515   };
516
517   /*!
518    * StdMeshers_MEFISTO_2D: interface of "Triangle (Mefisto)" algorithm
519    */
520   interface StdMeshers_MEFISTO_2D : SMESH::SMESH_2D_Algo
521   {
522   };
523
524   /*!
525    * StdMeshers_Quadrangle_2D: interface of "Quadrangle (Mapping)" algorithm
526    */
527   interface StdMeshers_Quadrangle_2D : SMESH::SMESH_2D_Algo
528   {
529   };
530
531   /*!
532    * StdMeshers_Hexa_3D: interface of "Hexahedron (i,j,k)" algorithm
533    */
534   interface StdMeshers_Hexa_3D : SMESH::SMESH_3D_Algo
535   {
536   };
537
538   /*!
539    * StdMeshers_Prism_3D: interface of "Prism 3D" algorithm
540    */
541   interface StdMeshers_Prism_3D : SMESH::SMESH_3D_Algo
542   {
543   };
544
545   /*!
546    * StdMeshers_RadialPrism_3D: interface of "Radial Prism" algorithm
547    */
548   interface StdMeshers_RadialPrism_3D : SMESH::SMESH_3D_Algo
549   {
550   };
551
552   /*!
553    * StdMeshers_Projection_3D: interface of "Projection 3D" algorithm
554    */
555   interface StdMeshers_Projection_3D : SMESH::SMESH_3D_Algo
556   {
557   };
558
559   /*!
560    * StdMeshers_Projection_2D: interface of "Projection 2D" algorithm
561    */
562   interface StdMeshers_Projection_2D : SMESH::SMESH_2D_Algo
563   {
564   };
565
566   /*!
567    * StdMeshers_Projection_1D: interface of "Projection 1D" algorithm
568    */
569   interface StdMeshers_Projection_1D : SMESH::SMESH_1D_Algo
570   {
571   };
572
573 };
574
575 #endif