Salome HOME
[bos #41122][EDF] Quadrangle radial for face which curved edges didn't discretize...
[modules/smesh.git] / idl / SMESH_BasicHypothesis.idl
1 // Copyright (C) 2007-2024  CEA, EDF, 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, or (at your option) any later version.
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
23 //  File   : SMESH_BasicHypothesis.idl
24 //  Author : Paul RASCLE, EDF
25 //
26 #ifndef _SMESH_BASICHYPOTHESIS_IDL_
27 #define _SMESH_BASICHYPOTHESIS_IDL_
28
29 #include "GEOM_Gen.idl"
30
31 #include "SALOME_Exception.idl"
32 #include "SMESH_Hypothesis.idl"
33 #include "SMESH_Mesh.idl"
34 /*!
35  * StdMeshers: interfaces to standard hypotheses and algorithms
36  */
37 module StdMeshers
38 {
39   /*!
40    * StdMeshers_LocalLength: interface of "Average length" hypothesis
41    */
42   interface StdMeshers_LocalLength : SMESH::SMESH_Hypothesis
43   {
44     /*!
45      * Sets <length> parameter value
46      */
47     void SetLength(in double length)
48       raises (SALOME::SALOME_Exception);
49
50     /*!
51      * Sets <precision> parameter value
52      *
53      * Precision parameter is used to allow rounding a number of segments,
54      * calculated from the edge length and average length of segment,
55      * to the lower integer, if this value outstands from it in bounds of the precision.
56      * Otherwise, the number of segments is rounded to the higher integer.
57      * Use value 0.5 to provide rounding to the nearest integer,
58      * 1.0 for the lower integer, 0.0 for the higher integer.
59      * Default value is 1e-07. In old studies, restored from file,
60      * this value will be set to zero, what corresponds to the old behaviour.
61      */
62     void SetPrecision(in double precision)
63       raises (SALOME::SALOME_Exception);
64
65     /*!
66      * Returns <length> parameter value
67      */
68     double GetLength();
69
70     /*!
71      * Returns <precision> parameter value
72      */
73     double GetPrecision();
74   };
75
76   /*!
77    * StdMeshers_MaxLength: interface of "Max length" hypothesis
78    */
79   interface StdMeshers_MaxLength : SMESH::SMESH_Hypothesis
80   {
81     /*!
82      * Sets <length> parameter value
83      */
84     void SetLength(in double length)
85       raises (SALOME::SALOME_Exception);
86     /*!
87      * Returns <length> parameter value
88      */
89     double GetLength();
90     /*!
91      * Returns true if preestemated length is defined
92      */
93     boolean HavePreestimatedLength();
94     /*!
95      * Returns preestemated length
96      */
97     double GetPreestimatedLength();
98     /*!
99      * Sets preestemated length
100      */
101     void SetPreestimatedLength(in double length);
102     /*!
103      * Sets boolean parameter enabling/desabling usage of length computed
104      * basing on size of bounding box of shape to mesh
105      */
106     void SetUsePreestimatedLength(in boolean toUse);
107     /*!
108      * Returns value of boolean parameter enabling/desabling usage of length computed
109      * basing on size of bounding box of shape to mesh
110      */
111     boolean GetUsePreestimatedLength();
112   };
113
114   /*!
115    * StdMeshers_AutomaticLength: interface of "Automatic length" hypothesis
116    */
117   interface StdMeshers_AutomaticLength : SMESH::SMESH_Hypothesis
118   {
119     /*!
120      * Sets Fineness parameter value
121      */
122     void SetFineness(in double theFineness)
123       raises (SALOME::SALOME_Exception);
124
125     /*!
126      * Returns <Fineness> parameter value
127      */
128     double GetFineness();
129   };
130
131   /*!
132    * Common interface of 1D hypotheses that can be reversed
133    */
134   interface Reversible1D
135   {
136     /*!
137      * Set list of edges to reverse
138      */
139     void SetReversedEdges( in SMESH::long_array list );
140     
141     /*!
142      * Returns list of edges to reverse
143      */
144     SMESH::long_array GetReversedEdges();
145     
146     /*!
147      * Set entry of the main object
148      */
149     void SetObjectEntry( in string entry );
150     
151     /*!
152      * Get the entry of the main object
153      */
154     string GetObjectEntry();
155   };
156
157   /*!
158    * StdMeshers_NumberOfSegments: interface of "Nb. Segments" hypothesis
159    */
160   interface StdMeshers_NumberOfSegments : SMESH::SMESH_Hypothesis, Reversible1D
161   {
162     /*!
163      * Builds and returns point distribution according to passed density function
164      */
165     SMESH::double_array BuildDistributionExpr( in string func, in long nbSeg, in long  conv )
166       raises (SALOME::SALOME_Exception);
167     SMESH::double_array BuildDistributionTab( in SMESH::double_array func, in long  nbSeg, in long  conv )
168       raises (SALOME::SALOME_Exception);
169   
170     /*!
171      * Sets <number of segments> parameter value
172      */
173     void SetNumberOfSegments(in SMESH::smIdType  segmentsNumber)
174       raises (SALOME::SALOME_Exception);
175
176     /*!
177      * Returns <number of segments> parameter value
178      */
179     long  GetNumberOfSegments();
180
181     /*!
182      * Sets <distribution type> parameter value
183      */
184     void SetDistrType(in long  typ)
185       raises (SALOME::SALOME_Exception);
186
187     /*!
188      * Returns <distribution type> parameter value
189      */
190     long  GetDistrType();
191
192     /*!
193      * Sets <scale factor> parameter value
194      */
195     void SetScaleFactor(in double scaleFactor)
196       raises (SALOME::SALOME_Exception);
197
198     /*!
199      * Returns <scale factor> parameter value
200      */
201     double GetScaleFactor()
202       raises (SALOME::SALOME_Exception);
203
204     /*!
205      * Sets <beta> coefficient for Beta Law distribution
206      */
207     void SetBeta(in double beta)
208       raises (SALOME::SALOME_Exception);
209
210     /*!
211      * Returns <beta> coefficient for Beta Law distribution
212      */
213     double GetBeta()
214       raises (SALOME::SALOME_Exception);
215
216     /*!
217      * Sets <table function> parameter value for distribution DT_TabFunc
218      */
219     void SetTableFunction(in SMESH::double_array table)
220       raises (SALOME::SALOME_Exception);
221
222     /*!
223      * Returns <table function> parameter value for distribution DT_TabFunc
224      */
225     SMESH::double_array GetTableFunction()
226       raises (SALOME::SALOME_Exception);
227
228     /*!
229      * Sets <expression function> parameter value for distribution DT_ExprFunc
230      */
231     void SetExpressionFunction(in string expr)
232       raises (SALOME::SALOME_Exception);
233
234     /*!
235      * Returns <expression function> parameter value for distribution DT_ExprFunc
236      */
237     string GetExpressionFunction()
238       raises (SALOME::SALOME_Exception);
239
240     /*!
241      * Sets <conversion mode> parameter value for functional distributions
242      */
243     void SetConversionMode(in long  conv )
244       raises (SALOME::SALOME_Exception);
245
246     /*!
247      * Returns <conversion mode> parameter value for functional distributions
248      */
249     long  ConversionMode()
250       raises (SALOME::SALOME_Exception);
251   };
252
253   /*!
254    * StdMeshers_Arithmetic1D: interface of "Arithmetic 1D" hypothesis
255    */
256   interface StdMeshers_Arithmetic1D : SMESH::SMESH_Hypothesis, Reversible1D
257   {
258     /*!
259      * Sets <start segment length> or <end segment length> parameter value
260      * * OBSOLETE *. Avoid such a way of interface design
261      * * It is recommended to dedicate a method to each parameter.
262      */
263     void SetLength(in double length, in boolean isStartLength) 
264       raises (SALOME::SALOME_Exception);
265
266     /*!
267      * Sets <start segment length> parameter value
268      */
269     void SetStartLength(in double length) 
270       raises (SALOME::SALOME_Exception);
271
272     /*!
273      * Sets <end segment length> parameter value
274      */
275     void SetEndLength(in double length)
276       raises (SALOME::SALOME_Exception);
277
278     /*!
279      * Returns <start segment length> or <end segment length> parameter value
280      */
281     double GetLength(in boolean isStartLength);
282
283   };
284
285   /*!
286    * StdMeshers_Arithmetic1D: interface of "Geometric 1D" hypothesis
287    */
288   interface StdMeshers_Geometric1D : SMESH::SMESH_Hypothesis, Reversible1D
289   {
290     /*!
291      * Sets length of the first segment
292      */
293     void SetStartLength(in double length) 
294       raises (SALOME::SALOME_Exception);
295
296     /*!
297      * Sets value of Common Ratio
298      */
299     void SetCommonRatio(in double factor)
300       raises (SALOME::SALOME_Exception);
301
302     /*!
303      * Returns length of the first segment
304      */
305     double GetStartLength();
306
307     /*!
308      * Returns value of Common Ratio
309      */
310     double GetCommonRatio();
311
312   };
313
314   /*!
315    * StdMeshers_MaxElementArea: interface of "Max. Triangle Area" hypothesis
316    */
317   interface StdMeshers_MaxElementArea : SMESH::SMESH_Hypothesis
318   {
319     /*!
320      * Sets <maximum element area> parameter value
321      */
322     void SetMaxElementArea(in double area) 
323       raises (SALOME::SALOME_Exception);
324
325     /*!
326      * Returns <maximum element area> parameter value
327      */
328     double GetMaxElementArea();
329   };
330
331   /*!
332    * StdMeshers_LengthFromEdges: interface of "Length From Edges (2D Hyp. for Triangulator)" hypothesis
333    */
334   interface StdMeshers_LengthFromEdges : SMESH::SMESH_Hypothesis
335   {
336     /*!
337      * Sets <mode> parameter value
338      */
339     void SetMode(in long  mode) 
340       raises (SALOME::SALOME_Exception);
341
342     /*!
343      * Returns <mode> parameter value
344      */
345     long  GetMode();
346   };
347
348   /*!
349    * StdMeshers_StartEndLength: interface of "Start and End Length" hypothesis
350    */
351   interface StdMeshers_StartEndLength : SMESH::SMESH_Hypothesis, Reversible1D
352   {
353     /*!
354      * Sets <start segment length> or <end segment length> parameter value
355      * * OBSOLETE *. Avoid such a way of interface design.
356      * * It is recommended to dedicate a method to each parameter.
357      */
358     void SetLength(in double length, in boolean isStartLength) 
359       raises (SALOME::SALOME_Exception);
360
361     /*!
362      * Sets <start segment length> parameter value
363      */
364     void SetStartLength(in double length) 
365       raises (SALOME::SALOME_Exception);
366
367     /*!
368      * Sets <end segment length> parameter value
369      */
370     void SetEndLength(in double length)
371       raises (SALOME::SALOME_Exception);
372
373     /*!
374      * Returns <start segment length> or <end segment length> parameter value
375      */
376     double GetLength(in boolean isStartLength);
377
378   };
379
380
381   /*!
382    * StdMeshers_Deflection1D: interface of "Deflection 1D" hypothesis
383    */
384   interface StdMeshers_Deflection1D : SMESH::SMESH_Hypothesis
385   {
386     /*!
387      * Sets <deflection> parameter value
388      */
389     void SetDeflection(in double deflection)
390       raises (SALOME::SALOME_Exception);
391
392     /*!
393      * Returns <deflection> parameter value
394      */
395     double GetDeflection();
396   };
397
398   /*!
399    * StdMeshers_FixedPoints1D: interface of "Fixed points 1D" hypothesis
400    */
401   interface StdMeshers_FixedPoints1D : SMESH::SMESH_Hypothesis, Reversible1D
402   {
403     /*!
404      * Sets some points on edge using parameter on curve from 0 to 1
405      * (additionally it is neecessary to check orientation of edges and
406      * create list of reversed edges if it is needed) and sets numbers
407      * of segments between given points (default values are equals 1)
408      */
409     void SetPoints(in SMESH::double_array listParams) 
410       raises (SALOME::SALOME_Exception);
411     void SetNbSegments(in SMESH::smIdType_array listNbSeg)
412       raises (SALOME::SALOME_Exception);
413
414     /*!
415      * Returns list of point's parameters
416      */
417     SMESH::double_array GetPoints();
418     
419     /*!
420      * Returns list of numbers of segments
421      */
422     SMESH::smIdType_array GetNbSegments();
423
424   };
425
426   /*!
427    * StdMeshers_Adaptive1D: interface of "Adaptive" hypothesis
428    */
429   interface StdMeshers_Adaptive1D : SMESH::SMESH_Hypothesis
430   {
431     /*!
432      * Sets minimal allowed segment length
433      */
434     void SetMinSize(in double minSegLen) raises (SALOME::SALOME_Exception);
435     double GetMinSize();
436
437     /*!
438      * Sets maximal allowed segment length
439      */
440     void SetMaxSize(in double maxSegLen) raises (SALOME::SALOME_Exception);
441     double GetMaxSize();
442
443     /*!
444      * Sets <deflection> parameter value, 
445      * i.e. a maximal allowed distance between a segment and an edge.
446      */
447     void SetDeflection(in double deflection) raises (SALOME::SALOME_Exception);
448     double GetDeflection();
449   };
450
451   /*!
452    * StdMeshers_MaxElementVolume: interface of "Max. Hexahedron or Tetrahedron Volume" hypothesis
453    */
454   interface StdMeshers_MaxElementVolume : SMESH::SMESH_Hypothesis
455   {
456     /*!
457      * Sets <maximum element volume> parameter value
458      */
459     void SetMaxElementVolume(in double volume) 
460       raises (SALOME::SALOME_Exception);
461
462     /*!
463      * Returns <maximum element volume> parameter value
464      */
465     double GetMaxElementVolume();
466   };
467
468   /*!
469    * StdMeshers_NotConformAllowed: interface of "Not Conform Mesh Allowed" hypothesis.
470    * Presence of this hypothesis permits to algorithm generation of not conform mesh.
471    */
472   interface StdMeshers_NotConformAllowed : SMESH::SMESH_Hypothesis
473   {
474   };
475
476   /*!
477    * StdMeshers_Propagation: interface of "Propagation of 1D Hyp. on
478    * Opposite Edges" hypothesis.
479    * Presence of this hypothesis on any edge propagates any other 1D
480    * hypothesis from this edge on all edges, opposite to it.
481    * It concerns only edges of quadrangle faces.
482    */
483   interface StdMeshers_Propagation : SMESH::SMESH_Hypothesis
484   {
485   };
486
487   /*!
488    * StdMeshers_Propagation: interface of "Propagation of Node
489    * Distribution on Opposite Edges" hypothesis.
490    * Presence of this hypothesis on any edge propagates distribution of nodes
491    * from this edge on all edges, opposite to it.
492    * It concerns only edges of quadrangle faces.
493    */
494   interface StdMeshers_PropagOfDistribution : SMESH::SMESH_Hypothesis
495   {
496   };
497
498   /*!
499    * StdMeshers_QuadranglePreference: interface of "QuadranglePreference" hypothesis.
500    * This hypothesis is used by StdMeshers_Quadrangle_2D algorithm.
501    * Presence of this hypothesis forces construction of quadrangles if the number
502    * of nodes on opposite edges is not the same in the case where the global number
503    * of nodes on edges is even
504    */
505   interface StdMeshers_QuadranglePreference : SMESH::SMESH_Hypothesis
506   {
507   };
508
509   /*!
510    * StdMeshers_QuadraticMesh: interface of "QuadraticMesh" hypothesis.
511    * This is an auxiliary 1D hypothesis whose presence forces construction 
512    * of quadratic edges.
513    * If the 2D mesher sees that all boundary edges are quadratic ones,
514    * it generates quadratic faces, else it generates linear faces using
515    * medium nodes as if they were vertex ones.
516    * The 3D mesher generates quadratic volumes only if all boundary faces
517    * are quadratic ones, else it fails.
518    */
519   interface StdMeshers_QuadraticMesh : SMESH::SMESH_Hypothesis
520   {
521   };
522
523
524   /*!
525    * StdMeshers_NumberOfLayers: interface of "Nb. Layers" hypothesis.
526    * This hypothesis is used by "Radial prism" algorithm.
527    * It specifies number of segments between the internal 
528    * and the external surfaces.
529    */
530   interface StdMeshers_NumberOfLayers : SMESH::SMESH_Hypothesis
531   {
532     /*!
533      * Sets <number of segments> parameter value
534      */
535     void SetNumberOfLayers(in long  numberOfLayers) 
536       raises (SALOME::SALOME_Exception);
537
538     /*!
539      * Returns <number of layers> parameter value
540      */
541     long  GetNumberOfLayers();
542
543   };
544
545   /*!
546    * StdMeshers_LayerDistribution: interface of "Distribution of Layers" hypothesis.
547    * This hypothesis is used by "Radial prism" algorithm.
548    * It specifies 1D hypothesis defining distribution of segments between the internal 
549    * and the external surfaces.
550    */
551   interface StdMeshers_LayerDistribution : SMESH::SMESH_Hypothesis
552   {
553     /*!
554      * Sets  1D hypothesis specifying distribution of layers
555      */
556     void SetLayerDistribution(in SMESH::SMESH_Hypothesis distributionHyp) 
557       raises (SALOME::SALOME_Exception);
558
559     /*!
560      * Returns 1D hypothesis specifying distribution of layers
561      */
562     SMESH::SMESH_Hypothesis GetLayerDistribution();
563
564   };
565
566   /*!
567    * StdMeshers_NumberOfLayers2D: interface of "Nb. Layers" hypothesis.
568    * This hypothesis is used by "Radial quadrangle" algorithm.
569    * It specifies number of segments between the internal 
570    * and the external surfaces.
571    */
572   interface StdMeshers_NumberOfLayers2D : StdMeshers_NumberOfLayers
573   {
574   };
575
576   /*!
577    * StdMeshers_LayerDistribution2D: interface of "Distribution of Layers" hypothesis.
578    * This hypothesis is used by "Radial quadrangle" algorithm.
579    * It specifies 1D hypothesis defining distribution of segments between the internal 
580    * and the external surfaces.
581    */
582   interface StdMeshers_LayerDistribution2D : StdMeshers_LayerDistribution
583   {
584   };
585
586   /*!
587    * interface of "ProjectionSource1D" hypothesis.
588    * This hypothesis specifies a meshed edge to take a mesh pattern from
589    * and optionally association of vertices between the source edge and a
590    * target one (where a hipothesis is assigned to)
591    */
592   interface StdMeshers_ProjectionSource1D : SMESH::SMESH_Hypothesis
593   {
594     /*!
595      * Sets source <edge> to take a mesh pattern from
596      */
597     void SetSourceEdge(in GEOM::GEOM_Object edge)
598       raises (SALOME::SALOME_Exception);
599
600     /*!
601      * Returns the source edge
602      */
603     GEOM::GEOM_Object GetSourceEdge();
604
605     /*!
606      * Sets source <mesh> to take a mesh pattern from
607      */
608     void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
609
610     /*!
611      * Return source mesh
612      */
613     SMESH::SMESH_Mesh GetSourceMesh();
614
615     /*!
616      * Sets vertex association between the source edge and the target one.
617      * This parameter is optional
618      */
619     void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex,
620                               in GEOM::GEOM_Object targetVertex)
621       raises (SALOME::SALOME_Exception);
622
623     /*!
624      * Returns the vertex associated with the target vertex.
625      * Result may be nil if association not set
626      */
627     GEOM::GEOM_Object  GetSourceVertex();
628
629     /*!
630      * Returns the vertex associated with the source vertex.
631      * Result may be nil if association not set
632      */
633     GEOM::GEOM_Object  GetTargetVertex();
634   };
635
636   /*!
637    * interface of "ProjectionSource2D" hypothesis.
638    * This hypothesis specifies a meshed face to take a mesh pattern from
639    * and optionally association of vertices between the source face and a
640    * target one (where a hipothesis is assigned to)
641    */
642   interface StdMeshers_ProjectionSource2D : SMESH::SMESH_Hypothesis
643   {
644     /*!
645      * Sets a source <face> to take a mesh pattern from
646      */
647     void SetSourceFace(in GEOM::GEOM_Object face)
648       raises (SALOME::SALOME_Exception);
649
650     /*!
651      * Returns the source face
652      */
653     GEOM::GEOM_Object GetSourceFace();
654
655     /*!
656      * Sets source <mesh> to take a mesh pattern from
657      */
658     void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
659
660     /*!
661      * Return source mesh
662      */
663     SMESH::SMESH_Mesh GetSourceMesh();
664
665     /*!
666      * Sets vertex association between the source face and the target one.
667      * This parameter is optional.
668      * Two vertices must belong to one edge of a face
669      */
670     void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex1,
671                               in GEOM::GEOM_Object sourceVertex2,
672                               in GEOM::GEOM_Object targetVertex1,
673                               in GEOM::GEOM_Object targetVertex2)
674       raises (SALOME::SALOME_Exception);
675
676     /*!
677      * Returns the <i>-th source vertex associated with the <i>-th target vertex.
678      * Result may be nil if association not set.
679      * Valid indices are 1 and 2
680      */
681     GEOM::GEOM_Object  GetSourceVertex(in long  i)
682       raises (SALOME::SALOME_Exception);
683
684     /*!
685      * Returns the <i>-th target vertex associated with the <i>-th source vertex.
686      * Result may be nil if association not set.
687      * Valid indices are 1 and 2
688      */
689     GEOM::GEOM_Object  GetTargetVertex(in long  i)
690       raises (SALOME::SALOME_Exception);
691   };
692
693   /*!
694    * interface of "ProjectionSource3D" hypothesis.
695    * This hypothesis specifies a meshed shell or solid to take a mesh pattern from
696    * and optionally association of vertices between the source shape and a
697    * target one (where a hipothesis is assigned to)
698    */
699   interface StdMeshers_ProjectionSource3D : SMESH::SMESH_Hypothesis
700   {
701     /*!
702      * Sets a source <shape> to take a mesh pattern from
703      */
704     void SetSource3DShape(in GEOM::GEOM_Object shape)
705       raises (SALOME::SALOME_Exception);
706
707     /*!
708      * Returns the source shape
709      */
710     GEOM::GEOM_Object GetSource3DShape();
711
712     /*!
713      * Sets source <mesh> to take a mesh pattern from
714      */
715     void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
716
717     /*!
718      * Return source mesh
719      */
720     SMESH::SMESH_Mesh GetSourceMesh();
721
722     /*!
723      * Sets vertex association between the source shape and the target one.
724      * This parameter is optional.
725      * Two vertices must belong to one edge of a shape
726      */
727     void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex1,
728                               in GEOM::GEOM_Object sourceVertex2,
729                               in GEOM::GEOM_Object targetVertex1,
730                               in GEOM::GEOM_Object targetVertex2)
731       raises (SALOME::SALOME_Exception);
732
733     /*!
734      * Returns the <i>-th source vertex associated with the <i>-th target vertex.
735      * Result may be nil if association not set.
736      * Valid indices are 1 and 2
737      */
738     GEOM::GEOM_Object  GetSourceVertex(in long  i)
739       raises (SALOME::SALOME_Exception);
740
741     /*!
742      * Returns the <i>-th target vertex associated with the <i>-th source vertex.
743      * Result may be nil if association not set.
744      * Valid indices are 1 and 2
745      */
746     GEOM::GEOM_Object  GetTargetVertex(in long  i)
747       raises (SALOME::SALOME_Exception);
748   };
749
750   /*!
751    * interface of "SegmentLengthAroundVertex" hypothesis.
752    * This hypothesis specifies length of segments adjacent to the vertex the
753    * hypothesis is assigned to
754    */
755   interface StdMeshers_SegmentLengthAroundVertex : SMESH::SMESH_Hypothesis
756   {
757     /*!
758      * Sets <length> parameter value
759      */
760     void SetLength(in double length)
761       raises (SALOME::SALOME_Exception);
762
763     /*!
764      * Returns <length> parameter value
765      */
766     double GetLength();
767   };
768
769   /*!
770    * StdMeshers_QuadrangleParams: interface of "Quadrangle Params" hypothesis
771    */
772   enum QuadType
773   {
774     QUAD_STANDARD,
775     QUAD_TRIANGLE_PREF,
776     QUAD_QUADRANGLE_PREF,
777     QUAD_QUADRANGLE_PREF_REVERSED,
778     QUAD_REDUCED,
779     QUAD_NB_TYPES /* this is not a type of quadrangulation */
780   };
781
782   interface StdMeshers_QuadrangleParams : SMESH::SMESH_Hypothesis
783   {
784     /*!
785      * Set base vertex for triangles
786      */
787     void SetTriaVertex( in long  vertID );
788     
789     /*!
790      * Returns base vertex for triangles
791      */
792     long  GetTriaVertex();
793     
794     /*!
795      * Set entry of the main object
796      */
797     void SetObjectEntry( in string entry );
798     
799     /*!
800      * Get the entry of the main object
801      */
802     string GetObjectEntry();
803     
804     /*!
805      * Set the type of quadrangulation
806      */
807     void SetQuadType( in QuadType type );
808
809     /*!
810      * Get the type of quadrangulation
811      */
812     QuadType GetQuadType();
813
814     /*!
815      * Set positions of enforced nodes
816      */
817     void SetEnforcedNodes(in GEOM::ListOfGO vertices, in SMESH::nodes_array points)
818       raises (SALOME::SALOME_Exception);
819
820     /*!
821      * Returns positions of enforced nodes
822      */
823     void GetEnforcedNodes(out GEOM::ListOfGO vertices, out SMESH::nodes_array points);
824
825     /*!
826      * Returns entries of shapes defining enforced nodes
827      */
828     SMESH::string_array GetEnfVertices();
829
830     /*!
831      * Set corner vertices
832      */
833     void SetCorners( in SMESH::long_array vertexIDs );
834
835     /*!
836      * Return IDs of corner vertices
837      */
838     SMESH::long_array GetCorners();
839   };
840
841   /*!
842    * interface of "Source edges" hypothesis.
843    * This hypothesis specifies groups of edges of other mesh to be imported
844    * in this mesh
845    */
846   interface StdMeshers_ImportSource1D : SMESH::SMESH_Hypothesis
847   {
848     /*!
849      * Set edges to import from other mesh
850      */
851     void SetSourceEdges(in SMESH::ListOfGroups groups);
852     SMESH::string_array GetSourceEdges();
853
854     /*!
855      * Set to import the whole other mesh or not, and if yes, to
856      * copy groups of not. By default the mesh is not copied.
857      */
858     void SetCopySourceMesh(in boolean toCopyMesh, in boolean toCopyGroups);
859     void GetCopySourceMesh(out boolean toCopyMesh,out boolean toCopyGroups);
860   };
861
862   /*!
863    * interface of "Source faces" hypothesis.
864    * This hypothesis specifies groups of faces of other mesh to be imported
865    * in this mesh
866    */
867   interface StdMeshers_ImportSource2D : SMESH::SMESH_Hypothesis
868   {
869     /*!
870      * Set faces to import from other mesh
871      */
872     void SetSourceFaces(in SMESH::ListOfGroups groups);
873     SMESH::string_array GetSourceFaces();
874
875     /*!
876      * Set to import the whole other mesh or not, and if yes, to
877      * copy groups of not. By default the mesh is not copied.
878      */
879     void SetCopySourceMesh(in boolean toCopyMesh,in boolean toCopyGroups);
880     void GetCopySourceMesh(out boolean toCopyMesh,out boolean toCopyGroups);
881   };
882
883   /*!
884    * Method of computing translation of a node at Viscous Layers construction
885    */
886   enum VLExtrusionMethod { 
887     // node is translated along normal to a surface with possible further smoothing
888     SURF_OFFSET_SMOOTH,
889     // node is translated along the average normal of surrounding faces till
890     // intersection with a neighbor face translated along its own normal 
891     // by the layers thickness
892     FACE_OFFSET,
893     // node is translated along the average normal of surrounding faces
894     // by the layers thickness
895     NODE_OFFSET
896   };
897
898   /*!
899    * interface of "Viscous Layers" hypothesis.
900    * This hypothesis specifies parameters of layers of prisms to build
901    * near mesh boundary. This hypothesis can be used by several 3D algorithms:
902    * NETGEN 3D, Hexahedron(i,j,k), MG_Tetra
903    */
904   interface StdMeshers_ViscousLayers : SMESH::SMESH_Hypothesis
905   {
906     /*!
907      * Set faces to exclude from treatment
908      */
909     void SetIgnoreFaces(in SMESH::long_array faceIDs) raises (SALOME::SALOME_Exception);
910     SMESH::long_array GetIgnoreFaces();
911
912     /*!
913      * Set faces either to exclude from treatment or to make the Viscous Layers on.
914      */
915     void SetFaces(in SMESH::long_array faceIDs,
916                   in boolean           toIgnore) raises (SALOME::SALOME_Exception);
917     SMESH::long_array GetFaces();
918     boolean           GetIsToIgnoreFaces();
919
920     /*!
921      * Set total thickness of layers of prisms
922      */
923     void SetTotalThickness(in double thickness) raises (SALOME::SALOME_Exception);
924     double GetTotalThickness();
925
926     /*!
927      * Set number of layers of prisms
928      */
929     void SetNumberLayers(in short nb) raises (SALOME::SALOME_Exception);
930     short GetNumberLayers();
931
932     /*!
933      * Set factor (>=1.0) of growth of layer thickness towards inside of mesh
934      */
935     void SetStretchFactor(in double factor) raises (SALOME::SALOME_Exception);
936     double GetStretchFactor();
937
938     void SetMethod( in VLExtrusionMethod how );
939     VLExtrusionMethod GetMethod();
940
941     void SetGroupName(in string name);
942     string GetGroupName();
943   };
944
945   /*!
946    * interface of "Viscous Layers 2D" hypothesis.
947    * This hypothesis specifies parameters of layers of quadrilaterals to build
948    * near mesh boundary. This hypothesis can be used by several 2D algorithms:
949    * Quadrangle (mapping), NETGEN, BLSURF
950    */
951   interface StdMeshers_ViscousLayers2D : SMESH::SMESH_Hypothesis
952   {
953     /*!
954      * Set edges to exclude from treatment
955      */
956     void SetIgnoreEdges(in SMESH::long_array edgeIDs) raises (SALOME::SALOME_Exception);
957     SMESH::long_array GetIgnoreEdges();
958
959     /*!
960      * Set edges either to exclude from treatment or to make the Viscous Layers on.
961      */
962     void SetEdges(in SMESH::long_array edgeIDs, 
963                   in boolean           toIgnore) raises (SALOME::SALOME_Exception);
964     SMESH::long_array GetEdges();
965     boolean           GetIsToIgnoreEdges();
966
967     /*!
968      * Set total thickness of layers of prisms
969      */
970     void SetTotalThickness(in double thickness) raises (SALOME::SALOME_Exception);
971     double GetTotalThickness();
972
973     /*!
974      * Set number of layers of prisms
975      */
976     void SetNumberLayers(in short nb) raises (SALOME::SALOME_Exception);
977     short GetNumberLayers();
978
979     /*!
980      * Set factor (>=1.0) of growth of layer thickness towards inside of mesh
981      */
982     void SetStretchFactor(in double factor) raises (SALOME::SALOME_Exception);
983     double GetStretchFactor();
984
985     void SetGroupName(in string name);
986     string GetGroupName();
987   };
988
989   /*!
990    * interface of "Body fitting Parameters" hypothesis.
991    * This hypothesis specifies 
992    * - Size threshold
993    * - Definition of the Cartesian grid
994    * - Direction of grid axes
995    */
996   interface StdMeshers_CartesianParameters3D : SMESH::SMESH_Hypothesis
997   {
998     /*!
999      * Set size threshold. A polyhedral cell got by cutting an initial
1000      * hexahedron by geometry boundary is considered small and is removed if
1001      * it's size is \a threshold times less than the size of the initial hexahedron. 
1002      * threshold must be > 1.0
1003      */
1004     void SetSizeThreshold(in double threshold) raises (SALOME::SALOME_Exception);
1005     double GetSizeThreshold();
1006
1007     /*!
1008      * \brief Return true if the grid is defined by spacing functions and 
1009      *        not by node coordinates in given direction (X==0,...)
1010      */
1011     boolean IsGridBySpacing(in short axis);
1012
1013     /*!
1014      * Set coordinates of nodes along an axis (countered from zero)
1015      */
1016     void SetGrid(in SMESH::double_array  coords,
1017                  in short                axis) raises (SALOME::SALOME_Exception);
1018     SMESH::double_array GetGrid(in short axis) raises (SALOME::SALOME_Exception);
1019
1020     /*!
1021      * \brief Set grid spacing along an axis
1022      *  \param spaceFunctions - functions defining spacing values at given point on axis
1023      *  \param internalPoints - points dividing a grid into parts along an axis
1024      *  \param axis - index of an axis counterd from zero, i.e. 0==X, 1==Y, 2==Z
1025      *
1026      * Parameter t of spaceFunction f(t) is a position [0,1] within bounding box of
1027      * the shape to mesh or within an interval defined by internal points
1028      */
1029     void SetGridSpacing(in SMESH::string_array spaceFunctions,
1030                         in SMESH::double_array internalPoints,
1031                         in short               axis) raises (SALOME::SALOME_Exception);
1032
1033     void GetGridSpacing(out SMESH::string_array spaceFunctions,
1034                         out SMESH::double_array internalPoints,
1035                         in short                axis) raises (SALOME::SALOME_Exception);
1036     /*!
1037      * Set custom direction of axes
1038      */
1039     void SetAxesDirs(in SMESH::DirStruct x,
1040                      in SMESH::DirStruct y,
1041                      in SMESH::DirStruct z ) raises (SALOME::SALOME_Exception);
1042     void GetAxesDirs(out SMESH::DirStruct x,
1043                      out SMESH::DirStruct y,
1044                      out SMESH::DirStruct z );
1045     /*!
1046      * Set/unset a fixed point, at which a node will be created provided that grid
1047      * is defined by spacing in all directions
1048      */
1049     void SetFixedPoint(in SMESH::PointStruct p, in boolean toUnset);
1050     boolean GetFixedPoint(out SMESH::PointStruct p);
1051
1052     /*!
1053      * Enable implementation of geometrical edges into the mesh. If this feature
1054      * is disabled, sharp edges of the shape are lost ("smoothed") in the mesh if
1055      * they don't coincide with the grid lines
1056      */
1057     void SetToAddEdges(in boolean toAdd);
1058     boolean GetToAddEdges();
1059
1060     /*!
1061      * Enable treatment of geom faces, either shared by solids or internal.
1062      */
1063     void SetToConsiderInternalFaces(in boolean toTreat);
1064     boolean GetToConsiderInternalFaces();
1065
1066     /*!
1067      * Enable applying size threshold to grid cells cut by internal geom faces.
1068      */
1069     void SetToUseThresholdForInternalFaces(in boolean toUse);
1070     boolean GetToUseThresholdForInternalFaces();
1071
1072     /*!
1073      * Enable creation of mesh faces.
1074      */
1075     void SetToCreateFaces(in boolean toCreate);
1076     boolean GetToCreateFaces();
1077     
1078     /*!
1079      * Enable creation of mesh faces.
1080      */
1081     void SetToUseQuanta(in boolean toUseQuanta);
1082     boolean GetToUseQuanta();
1083
1084     void SetQuanta(in double quanta) raises (SALOME::SALOME_Exception);
1085     double GetQuanta();
1086
1087     /*!
1088      * Return axes at which a number of generated hexahedra is maximal
1089      */
1090     void ComputeOptimalAxesDirs(in GEOM::GEOM_Object shape,
1091                                 in boolean           isOrthogonal,
1092                                 out SMESH::DirStruct x,
1093                                 out SMESH::DirStruct y,
1094                                 out SMESH::DirStruct z )
1095       raises (SALOME::SALOME_Exception);
1096
1097     /*!
1098      * \brief Compute node coordinates by spacing functions
1099      *  \param x0 - lower coordinate
1100      *  \param x1 - upper coordinate
1101      *  \param spaceFuns - space functions
1102      *  \param points - internal points
1103      *  \param axisName - e.g. "X"
1104      *  \return the computed coordinates
1105      */
1106     SMESH::double_array ComputeCoordinates(in double              x0,
1107                                            in double              x1,
1108                                            in SMESH::string_array spaceFuns,
1109                                            in SMESH::double_array points,
1110                                            in string              axisName ) 
1111       raises (SALOME::SALOME_Exception);
1112   };
1113
1114
1115   /*!
1116    * interface of "Renumber" hypothesis used by Hexahedron(ijk) algorithm
1117    * to renumber mesh of a block to be structured-like
1118    */
1119   struct BlockCS // Local coordinate system of a block
1120   {
1121     GEOM::GEOM_Object solid;
1122     GEOM::GEOM_Object vertex000;
1123     GEOM::GEOM_Object vertex001;
1124   };
1125   typedef sequence<BlockCS> blockcs_array;
1126
1127   interface StdMeshers_BlockRenumber : SMESH::SMESH_Hypothesis
1128   {
1129     void SetBlocksOrientation( in blockcs_array blockCS );
1130     blockcs_array GetBlocksOrientation();
1131   };
1132
1133   /*!
1134    * StdMeshers_SegmentAroundVertex_0D: interface of "SegmentAroundVertex" algorithm
1135    */
1136   interface StdMeshers_SegmentAroundVertex_0D : SMESH::SMESH_0D_Algo
1137   {
1138   };
1139
1140   /*!
1141    * StdMeshers_Regular_1D: interface of "Wire discretisation" algorithm
1142    */
1143   interface StdMeshers_Regular_1D : SMESH::SMESH_1D_Algo
1144   {
1145   };
1146
1147   /*!
1148    * StdMeshers_CompositeSegment_1D: interface of "Composite side discretisation" algorithm
1149    */
1150   interface StdMeshers_CompositeSegment_1D : SMESH::SMESH_1D_Algo
1151   {
1152   };
1153
1154   /*!
1155    * StdMeshers_Quadrangle_2D: interface of "Quadrangle (Mapping)" algorithm
1156    */
1157   interface StdMeshers_Quadrangle_2D : SMESH::SMESH_2D_Algo
1158   {
1159   };
1160
1161   /*!
1162    * StdMeshers_QuadFromMedialAxis_1D2D: interface of "Quadrangle (Medial Axis Projection)" algorithm
1163    */
1164   interface StdMeshers_QuadFromMedialAxis_1D2D : SMESH::SMESH_2D_Algo
1165   {
1166   };
1167
1168   /*!
1169    * StdMeshers_PolygonPerFace_2D: interface of "Polygon Per Face" 2D algorithm
1170    */
1171   interface StdMeshers_PolygonPerFace_2D : SMESH::SMESH_2D_Algo
1172   {
1173   };
1174
1175   /*!
1176    * StdMeshers_PolyhedronPerSolid_3D: interface of "Polyhedron Per Solid" 3D algorithm
1177    */
1178   interface StdMeshers_PolyhedronPerSolid_3D : SMESH::SMESH_3D_Algo
1179   {
1180   };
1181
1182   /*!
1183    * StdMeshers_Hexa_3D: interface of "Hexahedron (i,j,k)" algorithm
1184    */
1185   interface StdMeshers_Hexa_3D : SMESH::SMESH_3D_Algo
1186   {
1187   };
1188
1189   /*!
1190    * StdMeshers_Prism_3D: interface of "3D extrusion" algorithm
1191    */
1192   interface StdMeshers_Prism_3D : SMESH::SMESH_3D_Algo
1193   {
1194   };
1195
1196   /*!
1197    * StdMeshers_RadialPrism_3D: interface of "Radial Prism" algorithm
1198    */
1199   interface StdMeshers_RadialPrism_3D : SMESH::SMESH_3D_Algo
1200   {
1201   };
1202
1203   /*!
1204    * StdMeshers_Projection_3D: interface of "Projection 3D" algorithm
1205    */
1206   interface StdMeshers_Projection_3D : SMESH::SMESH_3D_Algo
1207   {
1208   };
1209
1210   /*!
1211    * StdMeshers_Projection_2D: interface of "Projection 2D" algorithm
1212    */
1213   interface StdMeshers_Projection_2D : SMESH::SMESH_2D_Algo
1214   {
1215   };
1216
1217   /*!
1218    * StdMeshers_Projection_1D2D: interface of "Projection 1D-2D" algorithm
1219    */
1220   interface StdMeshers_Projection_1D2D : SMESH::SMESH_2D_Algo
1221   {
1222   };
1223
1224   /*!
1225    * StdMeshers_Projection_1D: interface of "Projection 1D" algorithm
1226    */
1227   interface StdMeshers_Projection_1D : SMESH::SMESH_1D_Algo
1228   {
1229   };
1230
1231   /*!
1232    * StdMeshers_UseExisting_2D: interface of "UseExisting 2D" algorithm
1233    * doing nothing to allow mesh generation by mesh edition functions in TUI mode
1234    */
1235   interface StdMeshers_UseExisting_2D : SMESH::SMESH_2D_Algo
1236   {
1237   };
1238
1239   /*!
1240    * StdMeshers_UseExisting_1D: interface of "UseExisting 1D" algorithm
1241    * doing nothing to allow mesh generation by mesh edition functions in TUI mode
1242    */
1243   interface StdMeshers_UseExisting_1D : SMESH::SMESH_1D_Algo
1244   {
1245   };
1246
1247   /*!
1248    * StdMeshers_RadialQuadrangle_1D2D: interface of "Radial quadrangle" algorithm
1249    */
1250   interface StdMeshers_RadialQuadrangle_1D2D : SMESH::SMESH_2D_Algo
1251   {
1252   };
1253
1254   /*!
1255    * StdMeshers_Import_1D2D: interface of "Use existing 2D elements" algorithm
1256    */
1257   interface StdMeshers_Import_1D2D : SMESH::SMESH_2D_Algo
1258   {
1259   };
1260   /*!
1261    * StdMeshers_Import_1D: interface of "Use existing 1D elements" algorithm
1262    */
1263   interface StdMeshers_Import_1D : SMESH::SMESH_1D_Algo
1264   {
1265   };
1266   /*!
1267    * StdMeshers_Cartesian_3D: interface of "Body fitting" algorithm
1268    */
1269   interface StdMeshers_Cartesian_3D : SMESH::SMESH_3D_Algo
1270   {
1271   };
1272   /*!
1273    * StdMeshers_Cartesian_3D: interface of "ViscousLayerBuilder" algorithm
1274    */
1275   interface StdMeshers_ViscousLayerBuilder : SMESH::SMESH_2D_Algo
1276   {
1277     /*!
1278      * Set faces to exclude from the definition of face to shrink
1279      */
1280     void SetIgnoreFaces(in SMESH::long_array faceIDs) raises (SALOME::SALOME_Exception);
1281     // SMESH::long_array GetIgnoreFaces();
1282
1283     /*!
1284      * Set faces either to exclude from treatment or to make the offset geometry on.
1285      */
1286     void SetFaces(in SMESH::long_array faceIDs,
1287                   in boolean           toIgnore) raises (SALOME::SALOME_Exception);
1288     // SMESH::long_array GetFaces();
1289     // boolean           GetIsToIgnoreFaces();
1290
1291     void SetTotalThickness(in double thickness) raises (SALOME::SALOME_Exception);
1292     void SetNumberLayers(in short numberOfLayers ) raises (SALOME::SALOME_Exception);
1293     void SetStretchFactor(in double strechFactor ) raises (SALOME::SALOME_Exception);
1294     void SetMethod( in VLExtrusionMethod how ) raises (SALOME::SALOME_Exception);
1295     void SetGroupName(in string name) raises (SALOME::SALOME_Exception);
1296
1297     GEOM::GEOM_Object GetShrinkGeometry( in SMESH::SMESH_Mesh finalMesh, in GEOM::GEOM_Object theObject ) raises (SALOME::SALOME_Exception);
1298
1299     /*!
1300      * Build the prismatic layer from the shrink mesh
1301      */
1302     boolean AddLayers( in SMESH::SMESH_Mesh sourceMesh, in SMESH::SMESH_Mesh finalMesh, in GEOM::GEOM_Object theObject ) raises (SALOME::SALOME_Exception);
1303
1304   };
1305
1306 };
1307
1308 #endif