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