Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[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      * Sets <precision> parameter value
51      *
52      * Precision parameter is used to allow rounding a number of segments,
53      * calculated from the edge length and average length of segment,
54      * to the lower integer, if this value outstands from it in bounds of the precision.
55      * Otherwise, the number of segments is rounded to the higher integer.
56      * Use value 0.5 to provide rounding to the nearest integer,
57      * 1.0 for the lower integer, 0.0 for the higher integer.
58      * Default value is 1e-07. In old studies, restored from file,
59      * this value will be set to zero, what corresponds to the old behaviour.
60      */
61     void SetPrecision(in double precision)
62       raises (SALOME::SALOME_Exception);
63
64     /*!
65      * Returns <length> parameter value
66      */
67     double GetLength();
68
69     /*!
70      * Returns <precision> parameter value
71      */
72     double GetPrecision();
73   };
74
75   /*!
76    * StdMeshers_AutomaticLength: interface of "Automatic length" hypothesis
77    */
78   interface StdMeshers_AutomaticLength : SMESH::SMESH_Hypothesis
79   {
80     /*!
81      * Sets Fineness parameter value
82      */
83     void SetFineness(in double theFineness)
84       raises (SALOME::SALOME_Exception);
85
86     /*!
87      * Returns <Fineness> parameter value
88      */
89     double GetFineness();
90   };
91
92   /*!
93    * StdMeshers_NumberOfSegments: interface of "Nb. Segments" hypothesis
94    */
95   interface StdMeshers_NumberOfSegments : SMESH::SMESH_Hypothesis
96   {
97     /*!
98      * Builds and returns point distribution according to passed density function
99      */
100     SMESH::double_array BuildDistributionExpr( in string func, in long nbSeg, in long conv )
101       raises (SALOME::SALOME_Exception);
102     SMESH::double_array BuildDistributionTab( in SMESH::double_array func, in long nbSeg, in long conv )
103       raises (SALOME::SALOME_Exception);
104   
105     /*!
106      * Sets <number of segments> parameter value
107      */
108     void SetNumberOfSegments(in long segmentsNumber)
109       raises (SALOME::SALOME_Exception);
110
111     /*!
112      * Returns <number of segments> parameter value
113      */
114     long GetNumberOfSegments();
115
116     /*!
117      * Sets <distribution type> parameter value
118      */
119     void SetDistrType(in long typ)
120       raises (SALOME::SALOME_Exception);
121
122     /*!
123      * Returns <distribution type> parameter value
124      */
125     long GetDistrType();
126
127     /*!
128      * Sets <scale factor> parameter value
129      */
130     void SetScaleFactor(in double scaleFactor)
131       raises (SALOME::SALOME_Exception);
132
133     /*!
134      * Returns <scale factor> parameter value
135      */
136     double GetScaleFactor()
137       raises (SALOME::SALOME_Exception);
138
139     /*!
140      * Sets <table function> parameter value for distribution DT_TabFunc
141      */
142     void SetTableFunction(in SMESH::double_array table)
143       raises (SALOME::SALOME_Exception);
144
145     /*!
146      * Returns <table function> parameter value for distribution DT_TabFunc
147      */
148     SMESH::double_array GetTableFunction()
149       raises (SALOME::SALOME_Exception);
150
151     /*!
152      * Sets <expression function> parameter value for distribution DT_ExprFunc
153      */
154     void SetExpressionFunction(in string expr)
155       raises (SALOME::SALOME_Exception);
156
157     /*!
158      * Returns <expression function> parameter value for distribution DT_ExprFunc
159      */
160     string GetExpressionFunction()
161       raises (SALOME::SALOME_Exception);
162
163     /*!
164      * Sets <conversion mode> parameter value for functional distributions
165      */
166     void SetConversionMode(in long conv )
167       raises (SALOME::SALOME_Exception);
168
169     /*!
170      * Returns <conversion mode> parameter value for functional distributions
171      */
172     long ConversionMode()
173       raises (SALOME::SALOME_Exception);
174   };
175
176   /*!
177    * StdMeshers_Arithmetic1D: interface of "Arithmetic 1D" hypothesis
178    */
179   interface StdMeshers_Arithmetic1D : SMESH::SMESH_Hypothesis
180   {
181     /*!
182      * Sets <start segment length> or <end segment length> parameter value
183      */
184     void SetLength(in double length, in boolean isStartLength) 
185       raises (SALOME::SALOME_Exception);
186
187     /*!
188      * Returns <start segment length> or <end segment length> parameter value
189      */
190     double GetLength(in boolean isStartLength);
191   };
192
193   /*!
194    * StdMeshers_MaxElementArea: interface of "Max. Triangle Area" hypothesis
195    */
196   interface StdMeshers_MaxElementArea : SMESH::SMESH_Hypothesis
197   {
198     /*!
199      * Sets <maximum element area> parameter value
200      */
201     void SetMaxElementArea(in double area) 
202       raises (SALOME::SALOME_Exception);
203
204     /*!
205      * Returns <maximum element area> parameter value
206      */
207     double GetMaxElementArea();
208   };
209
210   /*!
211    * StdMeshers_LengthFromEdges: interface of "Length From Edges (2D Hyp. for Triangulator)" hypothesis
212    */
213   interface StdMeshers_LengthFromEdges : SMESH::SMESH_Hypothesis
214   {
215     /*!
216      * Sets <mode> parameter value
217      */
218     void SetMode(in long mode) 
219       raises (SALOME::SALOME_Exception);
220
221     /*!
222      * Returns <mode> parameter value
223      */
224     long GetMode();
225   };
226
227   /*!
228    * StdMeshers_StartEndLength: interface of "Start and End Length" hypothesis
229    */
230   interface StdMeshers_StartEndLength : SMESH::SMESH_Hypothesis
231   {
232     /*!
233      * Sets <start segment length> or <end segment length> parameter value
234      */
235     void SetLength(in double length, in boolean isStartLength) 
236       raises (SALOME::SALOME_Exception);
237
238     /*!
239      * Returns <start segment length> or <end segment length> parameter value
240      */
241     double GetLength(in boolean isStartLength);
242   };
243
244
245   /*!
246    * StdMeshers_Deflection1D: interface of "Deflection 1D" hypothesis
247    */
248   interface StdMeshers_Deflection1D : SMESH::SMESH_Hypothesis
249   {
250     /*!
251      * Sets <deflection> parameter value
252      */
253     void SetDeflection(in double deflection)
254       raises (SALOME::SALOME_Exception);
255
256     /*!
257      * Returns <deflection> parameter value
258      */
259     double GetDeflection();
260   };
261
262
263   /*!
264    * StdMeshers_MaxElementVolume: interface of "Max. Hexahedron or Tetrahedron Volume" hypothesis
265    */
266   interface StdMeshers_MaxElementVolume : SMESH::SMESH_Hypothesis
267   {
268     /*!
269      * Sets <maximum element volume> parameter value
270      */
271     void SetMaxElementVolume(in double volume) 
272       raises (SALOME::SALOME_Exception);
273
274     /*!
275      * Returns <maximum element volume> parameter value
276      */
277     double GetMaxElementVolume();
278   };
279
280   /*!
281    * StdMeshers_NotConformAllowed: interface of "Not Conform Mesh Allowed" hypothesis.
282    * Presence of this hypothesis permits to algorithm generation of not conform mesh.
283    */
284   interface StdMeshers_NotConformAllowed : SMESH::SMESH_Hypothesis
285   {
286   };
287
288   /*!
289    * StdMeshers_Propagation: interface of "Propagation" hypothesis.
290    * Presence of this hypothesis on any edge propagates any other 1D
291    * hypothesis from this edge on all edges, opposite to it.
292    * It concerns only edges of quadrangle faces.
293    */
294   interface StdMeshers_Propagation : SMESH::SMESH_Hypothesis
295   {
296   };
297
298   /*!
299    * StdMeshers_QuadranglePreference: interface of "QuadranglePreference" hypothesis.
300    * This hypothesis is used by StdMeshers_Quadrangle_2D algorithm.
301    * Presence of this hypothesis forces construction of quadrangles if the number
302    * of nodes on opposite edges is not the same in the case where the global number
303    * of nodes on edges is even
304    */
305   interface StdMeshers_QuadranglePreference : SMESH::SMESH_Hypothesis
306   {
307   };
308
309   /*!
310    * StdMeshers_QuadraticMesh: interface of "QuadraticMesh" hypothesis.
311    * This is an auxiliary 1D hypothesis whose presence forces construction 
312    * of quadratic edges.
313    * If the 2D mesher sees that all boundary edges are quadratic ones,
314    * it generates quadratic faces, else it generates linear faces using
315    * medium nodes as if they were vertex ones.
316    * The 3D mesher generates quadratic volumes only if all boundary faces
317    * are quadratic ones, else it fails.
318    */
319   interface StdMeshers_QuadraticMesh : SMESH::SMESH_Hypothesis
320   {
321   };
322
323
324   /*!
325    * StdMeshers_NumberOfLayers: interface of "Nb. Layers" hypothesis.
326    * This hypothesis is used by "Radial prism" algorithm.
327    * It specifies number of segments between the internal 
328    * and the external surfaces.
329    */
330   interface StdMeshers_NumberOfLayers : SMESH::SMESH_Hypothesis
331   {
332     /*!
333      * Sets <number of segments> parameter value
334      */
335     void SetNumberOfLayers(in long numberOfLayers) 
336       raises (SALOME::SALOME_Exception);
337
338     /*!
339      * Returns <number of layers> parameter value
340      */
341     long GetNumberOfLayers();
342
343   };
344
345   /*!
346    * StdMeshers_LayerDistribution: interface of "Distribution of Layers" hypothesis.
347    * This hypothesis is used by "Radial prism" algorithm.
348    * It specifies 1D hypothesis defining distribution of segments between the internal 
349    * and the external surfaces.
350    */
351   interface StdMeshers_LayerDistribution : SMESH::SMESH_Hypothesis
352   {
353     /*!
354      * Sets  1D hypothesis specifying distribution of layers
355      */
356     void SetLayerDistribution(in SMESH::SMESH_Hypothesis distributionHyp) 
357       raises (SALOME::SALOME_Exception);
358
359     /*!
360      * Returns 1D hypothesis specifying distribution of layers
361      */
362     SMESH::SMESH_Hypothesis GetLayerDistribution();
363
364   };
365
366   /*!
367    * interface of "ProjectionSource1D" hypothesis.
368    * This hypothesis specifies a meshed edge to take a mesh pattern from
369    * and optionally association of vertices between the source edge and a
370    * target one (where a hipothesis is assigned to)
371    */
372   interface StdMeshers_ProjectionSource1D : SMESH::SMESH_Hypothesis
373   {
374     /*!
375      * Sets source <edge> to take a mesh pattern from
376      */
377     void SetSourceEdge(in GEOM::GEOM_Object edge)
378       raises (SALOME::SALOME_Exception);
379
380     /*!
381      * Returns the source edge
382      */
383     GEOM::GEOM_Object GetSourceEdge();
384
385     /*!
386      * Sets source <mesh> to take a mesh pattern from
387      */
388     void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
389
390     /*!
391      * Return source mesh
392      */
393     SMESH::SMESH_Mesh GetSourceMesh();
394
395     /*!
396      * Sets vertex association between the source edge and the target one.
397      * This parameter is optional
398      */
399     void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex,
400                               in GEOM::GEOM_Object targetVertex)
401       raises (SALOME::SALOME_Exception);
402
403     /*!
404      * Returns the vertex associated with the target vertex.
405      * Result may be nil if association not set
406      */
407     GEOM::GEOM_Object  GetSourceVertex();
408
409     /*!
410      * Returns the vertex associated with the source vertex.
411      * Result may be nil if association not set
412      */
413     GEOM::GEOM_Object  GetTargetVertex();
414   };
415
416   /*!
417    * interface of "ProjectionSource2D" hypothesis.
418    * This hypothesis specifies a meshed face to take a mesh pattern from
419    * and optionally association of vertices between the source face and a
420    * target one (where a hipothesis is assigned to)
421    */
422   interface StdMeshers_ProjectionSource2D : SMESH::SMESH_Hypothesis
423   {
424     /*!
425      * Sets a source <face> to take a mesh pattern from
426      */
427     void SetSourceFace(in GEOM::GEOM_Object face)
428       raises (SALOME::SALOME_Exception);
429
430     /*!
431      * Returns the source face
432      */
433     GEOM::GEOM_Object GetSourceFace();
434
435     /*!
436      * Sets source <mesh> to take a mesh pattern from
437      */
438     void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
439
440     /*!
441      * Return source mesh
442      */
443     SMESH::SMESH_Mesh GetSourceMesh();
444
445     /*!
446      * Sets vertex association between the source face and the target one.
447      * This parameter is optional.
448      * Two vertices must belong to one edge of a face
449      */
450     void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex1,
451                               in GEOM::GEOM_Object sourceVertex2,
452                               in GEOM::GEOM_Object targetVertex1,
453                               in GEOM::GEOM_Object targetVertex2)
454       raises (SALOME::SALOME_Exception);
455
456     /*!
457      * Returns the <i>-th source vertex associated with the <i>-th target vertex.
458      * Result may be nil if association not set.
459      * Valid indices are 1 and 2
460      */
461     GEOM::GEOM_Object  GetSourceVertex(in long i)
462       raises (SALOME::SALOME_Exception);
463
464     /*!
465      * Returns the <i>-th target vertex associated with the <i>-th source vertex.
466      * Result may be nil if association not set.
467      * Valid indices are 1 and 2
468      */
469     GEOM::GEOM_Object  GetTargetVertex(in long i)
470       raises (SALOME::SALOME_Exception);
471   };
472
473   /*!
474    * interface of "ProjectionSource3D" hypothesis.
475    * This hypothesis specifies a meshed shell or solid to take a mesh pattern from
476    * and optionally association of vertices between the source shape and a
477    * target one (where a hipothesis is assigned to)
478    */
479   interface StdMeshers_ProjectionSource3D : SMESH::SMESH_Hypothesis
480   {
481     /*!
482      * Sets a source <shape> to take a mesh pattern from
483      */
484     void SetSource3DShape(in GEOM::GEOM_Object shape)
485       raises (SALOME::SALOME_Exception);
486
487     /*!
488      * Returns the source shape
489      */
490     GEOM::GEOM_Object GetSource3DShape();
491
492     /*!
493      * Sets source <mesh> to take a mesh pattern from
494      */
495     void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
496
497     /*!
498      * Return source mesh
499      */
500     SMESH::SMESH_Mesh GetSourceMesh();
501
502     /*!
503      * Sets vertex association between the source shape and the target one.
504      * This parameter is optional.
505      * Two vertices must belong to one edge of a shape
506      */
507     void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex1,
508                               in GEOM::GEOM_Object sourceVertex2,
509                               in GEOM::GEOM_Object targetVertex1,
510                               in GEOM::GEOM_Object targetVertex2)
511       raises (SALOME::SALOME_Exception);
512
513     /*!
514      * Returns the <i>-th source vertex associated with the <i>-th target vertex.
515      * Result may be nil if association not set.
516      * Valid indices are 1 and 2
517      */
518     GEOM::GEOM_Object  GetSourceVertex(in long i)
519       raises (SALOME::SALOME_Exception);
520
521     /*!
522      * Returns the <i>-th target vertex associated with the <i>-th source vertex.
523      * Result may be nil if association not set.
524      * Valid indices are 1 and 2
525      */
526     GEOM::GEOM_Object  GetTargetVertex(in long i)
527       raises (SALOME::SALOME_Exception);
528   };
529
530   /*!
531    * interface of "SegmentLengthAroundVertex" hypothesis.
532    * This hypothesis specifies length of segments adjacent to the vertex the
533    * hypothesis is assigned to
534    */
535   interface StdMeshers_SegmentLengthAroundVertex : SMESH::SMESH_Hypothesis
536   {
537     /*!
538      * Sets <length> parameter value
539      */
540     void SetLength(in double length)
541       raises (SALOME::SALOME_Exception);
542
543     /*!
544      * Returns <length> parameter value
545      */
546     double GetLength();
547   };
548
549   /*!
550    * StdMeshers_SegmentAroundVertex_0D: interface of "SegmentAroundVertex" algorithm
551    */
552   interface StdMeshers_SegmentAroundVertex_0D : SMESH::SMESH_0D_Algo
553   {
554   };
555
556   /*!
557    * StdMeshers_Regular_1D: interface of "Wire discretisation" algorithm
558    */
559   interface StdMeshers_Regular_1D : SMESH::SMESH_1D_Algo
560   {
561   };
562
563   /*!
564    * StdMeshers_CompositeSegment_1D: interface of "Composite side discretisation" algorithm
565    */
566   interface StdMeshers_CompositeSegment_1D : SMESH::SMESH_1D_Algo
567   {
568   };
569
570   /*!
571    * StdMeshers_MEFISTO_2D: interface of "Triangle (Mefisto)" algorithm
572    */
573   interface StdMeshers_MEFISTO_2D : SMESH::SMESH_2D_Algo
574   {
575   };
576
577   /*!
578    * StdMeshers_Quadrangle_2D: interface of "Quadrangle (Mapping)" algorithm
579    */
580   interface StdMeshers_Quadrangle_2D : SMESH::SMESH_2D_Algo
581   {
582   };
583
584   /*!
585    * StdMeshers_Hexa_3D: interface of "Hexahedron (i,j,k)" algorithm
586    */
587   interface StdMeshers_Hexa_3D : SMESH::SMESH_3D_Algo
588   {
589   };
590
591   /*!
592    * StdMeshers_Prism_3D: interface of "3D extrusion" algorithm
593    */
594   interface StdMeshers_Prism_3D : SMESH::SMESH_3D_Algo
595   {
596   };
597
598   /*!
599    * StdMeshers_RadialPrism_3D: interface of "Radial Prism" algorithm
600    */
601   interface StdMeshers_RadialPrism_3D : SMESH::SMESH_3D_Algo
602   {
603   };
604
605   /*!
606    * StdMeshers_Projection_3D: interface of "Projection 3D" algorithm
607    */
608   interface StdMeshers_Projection_3D : SMESH::SMESH_3D_Algo
609   {
610   };
611
612   /*!
613    * StdMeshers_Projection_2D: interface of "Projection 2D" algorithm
614    */
615   interface StdMeshers_Projection_2D : SMESH::SMESH_2D_Algo
616   {
617   };
618
619   /*!
620    * StdMeshers_Projection_1D: interface of "Projection 1D" algorithm
621    */
622   interface StdMeshers_Projection_1D : SMESH::SMESH_1D_Algo
623   {
624   };
625
626   /*!
627    * StdMeshers_UseExisting_2D: interface of "UseExisting 2D" algorithm
628    * doing nothing to allow mesh generation by mesh edition functions in TUI mode
629    */
630   interface StdMeshers_UseExisting_2D : SMESH::SMESH_2D_Algo
631   {
632   };
633
634   /*!
635    * StdMeshers_UseExisting_1D: interface of "UseExisting 1D" algorithm
636    * doing nothing to allow mesh generation by mesh edition functions in TUI mode
637    */
638   interface StdMeshers_UseExisting_1D : SMESH::SMESH_1D_Algo
639   {
640   };
641
642 };
643
644 #endif