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