Salome HOME
Implementation on the issue 16186: EDF PAL 459: Mapping: when refining, to separate...
[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_TrianglePreference: interface of "TrianglePreference" hypothesis.
311    * This hypothesis is used by StdMeshers_Quadrangle_2D algorithm.
312    * Presence of this hypothesis forces construction of triangles in the refinement 
313    * area if the number of nodes on opposite edges is not the same.
314    */
315   interface StdMeshers_TrianglePreference : SMESH::SMESH_Hypothesis
316   {
317   };
318
319   /*!
320    * StdMeshers_QuadraticMesh: interface of "QuadraticMesh" hypothesis.
321    * This is an auxiliary 1D hypothesis whose presence forces construction 
322    * of quadratic edges.
323    * If the 2D mesher sees that all boundary edges are quadratic ones,
324    * it generates quadratic faces, else it generates linear faces using
325    * medium nodes as if they were vertex ones.
326    * The 3D mesher generates quadratic volumes only if all boundary faces
327    * are quadratic ones, else it fails.
328    */
329   interface StdMeshers_QuadraticMesh : SMESH::SMESH_Hypothesis
330   {
331   };
332
333
334   /*!
335    * StdMeshers_NumberOfLayers: interface of "Nb. Layers" hypothesis.
336    * This hypothesis is used by "Radial prism" algorithm.
337    * It specifies number of segments between the internal 
338    * and the external surfaces.
339    */
340   interface StdMeshers_NumberOfLayers : SMESH::SMESH_Hypothesis
341   {
342     /*!
343      * Sets <number of segments> parameter value
344      */
345     void SetNumberOfLayers(in long numberOfLayers) 
346       raises (SALOME::SALOME_Exception);
347
348     /*!
349      * Returns <number of layers> parameter value
350      */
351     long GetNumberOfLayers();
352
353   };
354
355   /*!
356    * StdMeshers_LayerDistribution: interface of "Distribution of Layers" hypothesis.
357    * This hypothesis is used by "Radial prism" algorithm.
358    * It specifies 1D hypothesis defining distribution of segments between the internal 
359    * and the external surfaces.
360    */
361   interface StdMeshers_LayerDistribution : SMESH::SMESH_Hypothesis
362   {
363     /*!
364      * Sets  1D hypothesis specifying distribution of layers
365      */
366     void SetLayerDistribution(in SMESH::SMESH_Hypothesis distributionHyp) 
367       raises (SALOME::SALOME_Exception);
368
369     /*!
370      * Returns 1D hypothesis specifying distribution of layers
371      */
372     SMESH::SMESH_Hypothesis GetLayerDistribution();
373
374   };
375
376   /*!
377    * interface of "ProjectionSource1D" hypothesis.
378    * This hypothesis specifies a meshed edge to take a mesh pattern from
379    * and optionally association of vertices between the source edge and a
380    * target one (where a hipothesis is assigned to)
381    */
382   interface StdMeshers_ProjectionSource1D : SMESH::SMESH_Hypothesis
383   {
384     /*!
385      * Sets source <edge> to take a mesh pattern from
386      */
387     void SetSourceEdge(in GEOM::GEOM_Object edge)
388       raises (SALOME::SALOME_Exception);
389
390     /*!
391      * Returns the source edge
392      */
393     GEOM::GEOM_Object GetSourceEdge();
394
395     /*!
396      * Sets source <mesh> to take a mesh pattern from
397      */
398     void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
399
400     /*!
401      * Return source mesh
402      */
403     SMESH::SMESH_Mesh GetSourceMesh();
404
405     /*!
406      * Sets vertex association between the source edge and the target one.
407      * This parameter is optional
408      */
409     void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex,
410                               in GEOM::GEOM_Object targetVertex)
411       raises (SALOME::SALOME_Exception);
412
413     /*!
414      * Returns the vertex associated with the target vertex.
415      * Result may be nil if association not set
416      */
417     GEOM::GEOM_Object  GetSourceVertex();
418
419     /*!
420      * Returns the vertex associated with the source vertex.
421      * Result may be nil if association not set
422      */
423     GEOM::GEOM_Object  GetTargetVertex();
424   };
425
426   /*!
427    * interface of "ProjectionSource2D" hypothesis.
428    * This hypothesis specifies a meshed face to take a mesh pattern from
429    * and optionally association of vertices between the source face and a
430    * target one (where a hipothesis is assigned to)
431    */
432   interface StdMeshers_ProjectionSource2D : SMESH::SMESH_Hypothesis
433   {
434     /*!
435      * Sets a source <face> to take a mesh pattern from
436      */
437     void SetSourceFace(in GEOM::GEOM_Object face)
438       raises (SALOME::SALOME_Exception);
439
440     /*!
441      * Returns the source face
442      */
443     GEOM::GEOM_Object GetSourceFace();
444
445     /*!
446      * Sets source <mesh> to take a mesh pattern from
447      */
448     void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
449
450     /*!
451      * Return source mesh
452      */
453     SMESH::SMESH_Mesh GetSourceMesh();
454
455     /*!
456      * Sets vertex association between the source face and the target one.
457      * This parameter is optional.
458      * Two vertices must belong to one edge of a face
459      */
460     void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex1,
461                               in GEOM::GEOM_Object sourceVertex2,
462                               in GEOM::GEOM_Object targetVertex1,
463                               in GEOM::GEOM_Object targetVertex2)
464       raises (SALOME::SALOME_Exception);
465
466     /*!
467      * Returns the <i>-th source vertex associated with the <i>-th target vertex.
468      * Result may be nil if association not set.
469      * Valid indices are 1 and 2
470      */
471     GEOM::GEOM_Object  GetSourceVertex(in long i)
472       raises (SALOME::SALOME_Exception);
473
474     /*!
475      * Returns the <i>-th target vertex associated with the <i>-th source vertex.
476      * Result may be nil if association not set.
477      * Valid indices are 1 and 2
478      */
479     GEOM::GEOM_Object  GetTargetVertex(in long i)
480       raises (SALOME::SALOME_Exception);
481   };
482
483   /*!
484    * interface of "ProjectionSource3D" hypothesis.
485    * This hypothesis specifies a meshed shell or solid to take a mesh pattern from
486    * and optionally association of vertices between the source shape and a
487    * target one (where a hipothesis is assigned to)
488    */
489   interface StdMeshers_ProjectionSource3D : SMESH::SMESH_Hypothesis
490   {
491     /*!
492      * Sets a source <shape> to take a mesh pattern from
493      */
494     void SetSource3DShape(in GEOM::GEOM_Object shape)
495       raises (SALOME::SALOME_Exception);
496
497     /*!
498      * Returns the source shape
499      */
500     GEOM::GEOM_Object GetSource3DShape();
501
502     /*!
503      * Sets source <mesh> to take a mesh pattern from
504      */
505     void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
506
507     /*!
508      * Return source mesh
509      */
510     SMESH::SMESH_Mesh GetSourceMesh();
511
512     /*!
513      * Sets vertex association between the source shape and the target one.
514      * This parameter is optional.
515      * Two vertices must belong to one edge of a shape
516      */
517     void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex1,
518                               in GEOM::GEOM_Object sourceVertex2,
519                               in GEOM::GEOM_Object targetVertex1,
520                               in GEOM::GEOM_Object targetVertex2)
521       raises (SALOME::SALOME_Exception);
522
523     /*!
524      * Returns the <i>-th source vertex associated with the <i>-th target vertex.
525      * Result may be nil if association not set.
526      * Valid indices are 1 and 2
527      */
528     GEOM::GEOM_Object  GetSourceVertex(in long i)
529       raises (SALOME::SALOME_Exception);
530
531     /*!
532      * Returns the <i>-th target vertex associated with the <i>-th source vertex.
533      * Result may be nil if association not set.
534      * Valid indices are 1 and 2
535      */
536     GEOM::GEOM_Object  GetTargetVertex(in long i)
537       raises (SALOME::SALOME_Exception);
538   };
539
540   /*!
541    * interface of "SegmentLengthAroundVertex" hypothesis.
542    * This hypothesis specifies length of segments adjacent to the vertex the
543    * hypothesis is assigned to
544    */
545   interface StdMeshers_SegmentLengthAroundVertex : SMESH::SMESH_Hypothesis
546   {
547     /*!
548      * Sets <length> parameter value
549      */
550     void SetLength(in double length)
551       raises (SALOME::SALOME_Exception);
552
553     /*!
554      * Returns <length> parameter value
555      */
556     double GetLength();
557   };
558
559   /*!
560    * StdMeshers_SegmentAroundVertex_0D: interface of "SegmentAroundVertex" algorithm
561    */
562   interface StdMeshers_SegmentAroundVertex_0D : SMESH::SMESH_0D_Algo
563   {
564   };
565
566   /*!
567    * StdMeshers_Regular_1D: interface of "Wire discretisation" algorithm
568    */
569   interface StdMeshers_Regular_1D : SMESH::SMESH_1D_Algo
570   {
571   };
572
573   /*!
574    * StdMeshers_CompositeSegment_1D: interface of "Composite side discretisation" algorithm
575    */
576   interface StdMeshers_CompositeSegment_1D : SMESH::SMESH_1D_Algo
577   {
578   };
579
580   /*!
581    * StdMeshers_MEFISTO_2D: interface of "Triangle (Mefisto)" algorithm
582    */
583   interface StdMeshers_MEFISTO_2D : SMESH::SMESH_2D_Algo
584   {
585   };
586
587   /*!
588    * StdMeshers_Quadrangle_2D: interface of "Quadrangle (Mapping)" algorithm
589    */
590   interface StdMeshers_Quadrangle_2D : SMESH::SMESH_2D_Algo
591   {
592   };
593
594   /*!
595    * StdMeshers_Hexa_3D: interface of "Hexahedron (i,j,k)" algorithm
596    */
597   interface StdMeshers_Hexa_3D : SMESH::SMESH_3D_Algo
598   {
599   };
600
601   /*!
602    * StdMeshers_Prism_3D: interface of "3D extrusion" algorithm
603    */
604   interface StdMeshers_Prism_3D : SMESH::SMESH_3D_Algo
605   {
606   };
607
608   /*!
609    * StdMeshers_RadialPrism_3D: interface of "Radial Prism" algorithm
610    */
611   interface StdMeshers_RadialPrism_3D : SMESH::SMESH_3D_Algo
612   {
613   };
614
615   /*!
616    * StdMeshers_Projection_3D: interface of "Projection 3D" algorithm
617    */
618   interface StdMeshers_Projection_3D : SMESH::SMESH_3D_Algo
619   {
620   };
621
622   /*!
623    * StdMeshers_Projection_2D: interface of "Projection 2D" algorithm
624    */
625   interface StdMeshers_Projection_2D : SMESH::SMESH_2D_Algo
626   {
627   };
628
629   /*!
630    * StdMeshers_Projection_1D: interface of "Projection 1D" algorithm
631    */
632   interface StdMeshers_Projection_1D : SMESH::SMESH_1D_Algo
633   {
634   };
635
636   /*!
637    * StdMeshers_UseExisting_2D: interface of "UseExisting 2D" algorithm
638    * doing nothing to allow mesh generation by mesh edition functions in TUI mode
639    */
640   interface StdMeshers_UseExisting_2D : SMESH::SMESH_2D_Algo
641   {
642   };
643
644   /*!
645    * StdMeshers_UseExisting_1D: interface of "UseExisting 1D" algorithm
646    * doing nothing to allow mesh generation by mesh edition functions in TUI mode
647    */
648   interface StdMeshers_UseExisting_1D : SMESH::SMESH_1D_Algo
649   {
650   };
651
652 };
653
654 #endif