Salome HOME
0019928: EDF 771 SMESH : Extrusion (Revolution) with normal to a face
[modules/smesh.git] / idl / SMESH_BasicHypothesis.idl
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 //  This library is free software; you can redistribute it and/or
7 //  modify it under the terms of the GNU Lesser General Public
8 //  License as published by the Free Software Foundation; either
9 //  version 2.1 of the License.
10 //
11 //  This library is distributed in the hope that it will be useful,
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 //  Lesser General Public License for more details.
15 //
16 //  You should have received a copy of the GNU Lesser General Public
17 //  License along with this library; if not, write to the Free Software
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
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_MaxLength: interface of "Max length" hypothesis
77    */
78   interface StdMeshers_MaxLength : SMESH::SMESH_Hypothesis
79   {
80     /*!
81      * Sets <length> parameter value
82      */
83     void SetLength(in double length)
84       raises (SALOME::SALOME_Exception);
85     /*!
86      * Returns <length> parameter value
87      */
88     double GetLength();
89     /*!
90      * Returns true if preestemated length is defined
91      */
92     boolean HavePreestimatedLength();
93     /*!
94      * Returns preestemated length
95      */
96     double GetPreestimatedLength();
97     /*!
98      * Sets preestemated length
99      */
100     void SetPreestimatedLength(in double length);
101     /*!
102      * Sets boolean parameter enabling/desabling usage of length computed
103      * basing on size of bounding box of shape to mesh
104      */
105     void SetUsePreestimatedLength(in boolean toUse);
106     /*!
107      * Returns value of boolean parameter enabling/desabling usage of length computed
108      * basing on size of bounding box of shape to mesh
109      */
110     boolean GetUsePreestimatedLength();
111   };
112
113   /*!
114    * StdMeshers_AutomaticLength: interface of "Automatic length" hypothesis
115    */
116   interface StdMeshers_AutomaticLength : SMESH::SMESH_Hypothesis
117   {
118     /*!
119      * Sets Fineness parameter value
120      */
121     void SetFineness(in double theFineness)
122       raises (SALOME::SALOME_Exception);
123
124     /*!
125      * Returns <Fineness> parameter value
126      */
127     double GetFineness();
128   };
129
130   /*!
131    * StdMeshers_NumberOfSegments: interface of "Nb. Segments" hypothesis
132    */
133   interface StdMeshers_NumberOfSegments : SMESH::SMESH_Hypothesis
134   {
135     /*!
136      * Builds and returns point distribution according to passed density function
137      */
138     SMESH::double_array BuildDistributionExpr( in string func, in long nbSeg, in long conv )
139       raises (SALOME::SALOME_Exception);
140     SMESH::double_array BuildDistributionTab( in SMESH::double_array func, in long nbSeg, in long conv )
141       raises (SALOME::SALOME_Exception);
142   
143     /*!
144      * Sets <number of segments> parameter value
145      */
146     void SetNumberOfSegments(in long segmentsNumber)
147       raises (SALOME::SALOME_Exception);
148
149     /*!
150      * Returns <number of segments> parameter value
151      */
152     long GetNumberOfSegments();
153
154     /*!
155      * Sets <distribution type> parameter value
156      */
157     void SetDistrType(in long typ)
158       raises (SALOME::SALOME_Exception);
159
160     /*!
161      * Returns <distribution type> parameter value
162      */
163     long GetDistrType();
164
165     /*!
166      * Sets <scale factor> parameter value
167      */
168     void SetScaleFactor(in double scaleFactor)
169       raises (SALOME::SALOME_Exception);
170
171     /*!
172      * Returns <scale factor> parameter value
173      */
174     double GetScaleFactor()
175       raises (SALOME::SALOME_Exception);
176
177     /*!
178      * Sets <table function> parameter value for distribution DT_TabFunc
179      */
180     void SetTableFunction(in SMESH::double_array table)
181       raises (SALOME::SALOME_Exception);
182
183     /*!
184      * Returns <table function> parameter value for distribution DT_TabFunc
185      */
186     SMESH::double_array GetTableFunction()
187       raises (SALOME::SALOME_Exception);
188
189     /*!
190      * Sets <expression function> parameter value for distribution DT_ExprFunc
191      */
192     void SetExpressionFunction(in string expr)
193       raises (SALOME::SALOME_Exception);
194
195     /*!
196      * Returns <expression function> parameter value for distribution DT_ExprFunc
197      */
198     string GetExpressionFunction()
199       raises (SALOME::SALOME_Exception);
200
201     /*!
202      * Sets <conversion mode> parameter value for functional distributions
203      */
204     void SetConversionMode(in long conv )
205       raises (SALOME::SALOME_Exception);
206
207     /*!
208      * Returns <conversion mode> parameter value for functional distributions
209      */
210     long ConversionMode()
211       raises (SALOME::SALOME_Exception);
212   };
213
214   /*!
215    * StdMeshers_Arithmetic1D: interface of "Arithmetic 1D" hypothesis
216    */
217   interface StdMeshers_Arithmetic1D : SMESH::SMESH_Hypothesis
218   {
219     /*!
220      * Sets <start segment length> or <end segment length> parameter value
221      */
222     void SetLength(in double length, in boolean isStartLength) 
223       raises (SALOME::SALOME_Exception);
224
225     /*!
226      * Returns <start segment length> or <end segment length> parameter value
227      */
228     double GetLength(in boolean isStartLength);
229   };
230
231   /*!
232    * StdMeshers_MaxElementArea: interface of "Max. Triangle Area" hypothesis
233    */
234   interface StdMeshers_MaxElementArea : SMESH::SMESH_Hypothesis
235   {
236     /*!
237      * Sets <maximum element area> parameter value
238      */
239     void SetMaxElementArea(in double area) 
240       raises (SALOME::SALOME_Exception);
241
242     /*!
243      * Returns <maximum element area> parameter value
244      */
245     double GetMaxElementArea();
246   };
247
248   /*!
249    * StdMeshers_LengthFromEdges: interface of "Length From Edges (2D Hyp. for Triangulator)" hypothesis
250    */
251   interface StdMeshers_LengthFromEdges : SMESH::SMESH_Hypothesis
252   {
253     /*!
254      * Sets <mode> parameter value
255      */
256     void SetMode(in long mode) 
257       raises (SALOME::SALOME_Exception);
258
259     /*!
260      * Returns <mode> parameter value
261      */
262     long GetMode();
263   };
264
265   /*!
266    * StdMeshers_StartEndLength: interface of "Start and End Length" hypothesis
267    */
268   interface StdMeshers_StartEndLength : SMESH::SMESH_Hypothesis
269   {
270     /*!
271      * Sets <start segment length> or <end segment length> parameter value
272      */
273     void SetLength(in double length, in boolean isStartLength) 
274       raises (SALOME::SALOME_Exception);
275
276     /*!
277      * Returns <start segment length> or <end segment length> parameter value
278      */
279     double GetLength(in boolean isStartLength);
280   };
281
282
283   /*!
284    * StdMeshers_Deflection1D: interface of "Deflection 1D" hypothesis
285    */
286   interface StdMeshers_Deflection1D : SMESH::SMESH_Hypothesis
287   {
288     /*!
289      * Sets <deflection> parameter value
290      */
291     void SetDeflection(in double deflection)
292       raises (SALOME::SALOME_Exception);
293
294     /*!
295      * Returns <deflection> parameter value
296      */
297     double GetDeflection();
298   };
299
300
301   /*!
302    * StdMeshers_MaxElementVolume: interface of "Max. Hexahedron or Tetrahedron Volume" hypothesis
303    */
304   interface StdMeshers_MaxElementVolume : SMESH::SMESH_Hypothesis
305   {
306     /*!
307      * Sets <maximum element volume> parameter value
308      */
309     void SetMaxElementVolume(in double volume) 
310       raises (SALOME::SALOME_Exception);
311
312     /*!
313      * Returns <maximum element volume> parameter value
314      */
315     double GetMaxElementVolume();
316   };
317
318   /*!
319    * StdMeshers_NotConformAllowed: interface of "Not Conform Mesh Allowed" hypothesis.
320    * Presence of this hypothesis permits to algorithm generation of not conform mesh.
321    */
322   interface StdMeshers_NotConformAllowed : SMESH::SMESH_Hypothesis
323   {
324   };
325
326   /*!
327    * StdMeshers_Propagation: interface of "Propagation" hypothesis.
328    * Presence of this hypothesis on any edge propagates any other 1D
329    * hypothesis from this edge on all edges, opposite to it.
330    * It concerns only edges of quadrangle faces.
331    */
332   interface StdMeshers_Propagation : SMESH::SMESH_Hypothesis
333   {
334   };
335
336   /*!
337    * StdMeshers_QuadranglePreference: interface of "QuadranglePreference" hypothesis.
338    * This hypothesis is used by StdMeshers_Quadrangle_2D algorithm.
339    * Presence of this hypothesis forces construction of quadrangles if the number
340    * of nodes on opposite edges is not the same in the case where the global number
341    * of nodes on edges is even
342    */
343   interface StdMeshers_QuadranglePreference : SMESH::SMESH_Hypothesis
344   {
345   };
346
347   /*!
348    * StdMeshers_TrianglePreference: interface of "TrianglePreference" hypothesis.
349    * This hypothesis is used by StdMeshers_Quadrangle_2D algorithm.
350    * Presence of this hypothesis forces construction of triangles in the refinement 
351    * area if the number of nodes on opposite edges is not the same.
352    */
353   interface StdMeshers_TrianglePreference : SMESH::SMESH_Hypothesis
354   {
355   };
356
357   /*!
358    * StdMeshers_QuadraticMesh: interface of "QuadraticMesh" hypothesis.
359    * This is an auxiliary 1D hypothesis whose presence forces construction 
360    * of quadratic edges.
361    * If the 2D mesher sees that all boundary edges are quadratic ones,
362    * it generates quadratic faces, else it generates linear faces using
363    * medium nodes as if they were vertex ones.
364    * The 3D mesher generates quadratic volumes only if all boundary faces
365    * are quadratic ones, else it fails.
366    */
367   interface StdMeshers_QuadraticMesh : SMESH::SMESH_Hypothesis
368   {
369   };
370
371
372   /*!
373    * StdMeshers_NumberOfLayers: interface of "Nb. Layers" hypothesis.
374    * This hypothesis is used by "Radial prism" algorithm.
375    * It specifies number of segments between the internal 
376    * and the external surfaces.
377    */
378   interface StdMeshers_NumberOfLayers : SMESH::SMESH_Hypothesis
379   {
380     /*!
381      * Sets <number of segments> parameter value
382      */
383     void SetNumberOfLayers(in long numberOfLayers) 
384       raises (SALOME::SALOME_Exception);
385
386     /*!
387      * Returns <number of layers> parameter value
388      */
389     long GetNumberOfLayers();
390
391   };
392
393   /*!
394    * StdMeshers_LayerDistribution: interface of "Distribution of Layers" hypothesis.
395    * This hypothesis is used by "Radial prism" algorithm.
396    * It specifies 1D hypothesis defining distribution of segments between the internal 
397    * and the external surfaces.
398    */
399   interface StdMeshers_LayerDistribution : SMESH::SMESH_Hypothesis
400   {
401     /*!
402      * Sets  1D hypothesis specifying distribution of layers
403      */
404     void SetLayerDistribution(in SMESH::SMESH_Hypothesis distributionHyp) 
405       raises (SALOME::SALOME_Exception);
406
407     /*!
408      * Returns 1D hypothesis specifying distribution of layers
409      */
410     SMESH::SMESH_Hypothesis GetLayerDistribution();
411
412   };
413
414   /*!
415    * interface of "ProjectionSource1D" hypothesis.
416    * This hypothesis specifies a meshed edge to take a mesh pattern from
417    * and optionally association of vertices between the source edge and a
418    * target one (where a hipothesis is assigned to)
419    */
420   interface StdMeshers_ProjectionSource1D : SMESH::SMESH_Hypothesis
421   {
422     /*!
423      * Sets source <edge> to take a mesh pattern from
424      */
425     void SetSourceEdge(in GEOM::GEOM_Object edge)
426       raises (SALOME::SALOME_Exception);
427
428     /*!
429      * Returns the source edge
430      */
431     GEOM::GEOM_Object GetSourceEdge();
432
433     /*!
434      * Sets source <mesh> to take a mesh pattern from
435      */
436     void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
437
438     /*!
439      * Return source mesh
440      */
441     SMESH::SMESH_Mesh GetSourceMesh();
442
443     /*!
444      * Sets vertex association between the source edge and the target one.
445      * This parameter is optional
446      */
447     void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex,
448                               in GEOM::GEOM_Object targetVertex)
449       raises (SALOME::SALOME_Exception);
450
451     /*!
452      * Returns the vertex associated with the target vertex.
453      * Result may be nil if association not set
454      */
455     GEOM::GEOM_Object  GetSourceVertex();
456
457     /*!
458      * Returns the vertex associated with the source vertex.
459      * Result may be nil if association not set
460      */
461     GEOM::GEOM_Object  GetTargetVertex();
462   };
463
464   /*!
465    * interface of "ProjectionSource2D" hypothesis.
466    * This hypothesis specifies a meshed face to take a mesh pattern from
467    * and optionally association of vertices between the source face and a
468    * target one (where a hipothesis is assigned to)
469    */
470   interface StdMeshers_ProjectionSource2D : SMESH::SMESH_Hypothesis
471   {
472     /*!
473      * Sets a source <face> to take a mesh pattern from
474      */
475     void SetSourceFace(in GEOM::GEOM_Object face)
476       raises (SALOME::SALOME_Exception);
477
478     /*!
479      * Returns the source face
480      */
481     GEOM::GEOM_Object GetSourceFace();
482
483     /*!
484      * Sets source <mesh> to take a mesh pattern from
485      */
486     void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
487
488     /*!
489      * Return source mesh
490      */
491     SMESH::SMESH_Mesh GetSourceMesh();
492
493     /*!
494      * Sets vertex association between the source face and the target one.
495      * This parameter is optional.
496      * Two vertices must belong to one edge of a face
497      */
498     void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex1,
499                               in GEOM::GEOM_Object sourceVertex2,
500                               in GEOM::GEOM_Object targetVertex1,
501                               in GEOM::GEOM_Object targetVertex2)
502       raises (SALOME::SALOME_Exception);
503
504     /*!
505      * Returns the <i>-th source vertex associated with the <i>-th target vertex.
506      * Result may be nil if association not set.
507      * Valid indices are 1 and 2
508      */
509     GEOM::GEOM_Object  GetSourceVertex(in long i)
510       raises (SALOME::SALOME_Exception);
511
512     /*!
513      * Returns the <i>-th target vertex associated with the <i>-th source vertex.
514      * Result may be nil if association not set.
515      * Valid indices are 1 and 2
516      */
517     GEOM::GEOM_Object  GetTargetVertex(in long i)
518       raises (SALOME::SALOME_Exception);
519   };
520
521   /*!
522    * interface of "ProjectionSource3D" hypothesis.
523    * This hypothesis specifies a meshed shell or solid to take a mesh pattern from
524    * and optionally association of vertices between the source shape and a
525    * target one (where a hipothesis is assigned to)
526    */
527   interface StdMeshers_ProjectionSource3D : SMESH::SMESH_Hypothesis
528   {
529     /*!
530      * Sets a source <shape> to take a mesh pattern from
531      */
532     void SetSource3DShape(in GEOM::GEOM_Object shape)
533       raises (SALOME::SALOME_Exception);
534
535     /*!
536      * Returns the source shape
537      */
538     GEOM::GEOM_Object GetSource3DShape();
539
540     /*!
541      * Sets source <mesh> to take a mesh pattern from
542      */
543     void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
544
545     /*!
546      * Return source mesh
547      */
548     SMESH::SMESH_Mesh GetSourceMesh();
549
550     /*!
551      * Sets vertex association between the source shape and the target one.
552      * This parameter is optional.
553      * Two vertices must belong to one edge of a shape
554      */
555     void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex1,
556                               in GEOM::GEOM_Object sourceVertex2,
557                               in GEOM::GEOM_Object targetVertex1,
558                               in GEOM::GEOM_Object targetVertex2)
559       raises (SALOME::SALOME_Exception);
560
561     /*!
562      * Returns the <i>-th source vertex associated with the <i>-th target vertex.
563      * Result may be nil if association not set.
564      * Valid indices are 1 and 2
565      */
566     GEOM::GEOM_Object  GetSourceVertex(in long i)
567       raises (SALOME::SALOME_Exception);
568
569     /*!
570      * Returns the <i>-th target vertex associated with the <i>-th source vertex.
571      * Result may be nil if association not set.
572      * Valid indices are 1 and 2
573      */
574     GEOM::GEOM_Object  GetTargetVertex(in long i)
575       raises (SALOME::SALOME_Exception);
576   };
577
578   /*!
579    * interface of "SegmentLengthAroundVertex" hypothesis.
580    * This hypothesis specifies length of segments adjacent to the vertex the
581    * hypothesis is assigned to
582    */
583   interface StdMeshers_SegmentLengthAroundVertex : SMESH::SMESH_Hypothesis
584   {
585     /*!
586      * Sets <length> parameter value
587      */
588     void SetLength(in double length)
589       raises (SALOME::SALOME_Exception);
590
591     /*!
592      * Returns <length> parameter value
593      */
594     double GetLength();
595   };
596
597   /*!
598    * StdMeshers_SegmentAroundVertex_0D: interface of "SegmentAroundVertex" algorithm
599    */
600   interface StdMeshers_SegmentAroundVertex_0D : SMESH::SMESH_0D_Algo
601   {
602   };
603
604   /*!
605    * StdMeshers_Regular_1D: interface of "Wire discretisation" algorithm
606    */
607   interface StdMeshers_Regular_1D : SMESH::SMESH_1D_Algo
608   {
609   };
610
611   /*!
612    * StdMeshers_CompositeSegment_1D: interface of "Composite side discretisation" algorithm
613    */
614   interface StdMeshers_CompositeSegment_1D : SMESH::SMESH_1D_Algo
615   {
616   };
617
618   /*!
619    * StdMeshers_MEFISTO_2D: interface of "Triangle (Mefisto)" algorithm
620    */
621   interface StdMeshers_MEFISTO_2D : SMESH::SMESH_2D_Algo
622   {
623   };
624
625   /*!
626    * StdMeshers_Quadrangle_2D: interface of "Quadrangle (Mapping)" algorithm
627    */
628   interface StdMeshers_Quadrangle_2D : SMESH::SMESH_2D_Algo
629   {
630   };
631
632   /*!
633    * StdMeshers_Hexa_3D: interface of "Hexahedron (i,j,k)" algorithm
634    */
635   interface StdMeshers_Hexa_3D : SMESH::SMESH_3D_Algo
636   {
637   };
638
639   /*!
640    * StdMeshers_Prism_3D: interface of "3D extrusion" algorithm
641    */
642   interface StdMeshers_Prism_3D : SMESH::SMESH_3D_Algo
643   {
644   };
645
646   /*!
647    * StdMeshers_RadialPrism_3D: interface of "Radial Prism" algorithm
648    */
649   interface StdMeshers_RadialPrism_3D : SMESH::SMESH_3D_Algo
650   {
651   };
652
653   /*!
654    * StdMeshers_Projection_3D: interface of "Projection 3D" algorithm
655    */
656   interface StdMeshers_Projection_3D : SMESH::SMESH_3D_Algo
657   {
658   };
659
660   /*!
661    * StdMeshers_Projection_2D: interface of "Projection 2D" algorithm
662    */
663   interface StdMeshers_Projection_2D : SMESH::SMESH_2D_Algo
664   {
665   };
666
667   /*!
668    * StdMeshers_Projection_1D: interface of "Projection 1D" algorithm
669    */
670   interface StdMeshers_Projection_1D : SMESH::SMESH_1D_Algo
671   {
672   };
673
674   /*!
675    * StdMeshers_UseExisting_2D: interface of "UseExisting 2D" algorithm
676    * doing nothing to allow mesh generation by mesh edition functions in TUI mode
677    */
678   interface StdMeshers_UseExisting_2D : SMESH::SMESH_2D_Algo
679   {
680   };
681
682   /*!
683    * StdMeshers_UseExisting_1D: interface of "UseExisting 1D" algorithm
684    * doing nothing to allow mesh generation by mesh edition functions in TUI mode
685    */
686   interface StdMeshers_UseExisting_1D : SMESH::SMESH_1D_Algo
687   {
688   };
689
690 };
691
692 #endif