1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : SMESH_BasicHypothesis.idl
23 // Author : Paul RASCLE, EDF
25 #ifndef _SMESH_BASICHYPOTHESIS_IDL_
26 #define _SMESH_BASICHYPOTHESIS_IDL_
28 #include "SALOME_Exception.idl"
29 #include "SMESH_Hypothesis.idl"
30 #include "SMESH_Mesh.idl"
33 * StdMeshers: interfaces to standard hypotheses and algorithms
38 * StdMeshers_LocalLength: interface of "Average length" hypothesis
40 interface StdMeshers_LocalLength : SMESH::SMESH_Hypothesis
43 * Sets <length> parameter value
45 void SetLength(in double length)
46 raises (SALOME::SALOME_Exception);
49 * Sets <precision> parameter value
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.
60 void SetPrecision(in double precision)
61 raises (SALOME::SALOME_Exception);
64 * Returns <length> parameter value
69 * Returns <precision> parameter value
71 double GetPrecision();
75 * StdMeshers_MaxLength: interface of "Max length" hypothesis
77 interface StdMeshers_MaxLength : SMESH::SMESH_Hypothesis
80 * Sets <length> parameter value
82 void SetLength(in double length)
83 raises (SALOME::SALOME_Exception);
85 * Returns <length> parameter value
89 * Returns true if preestemated length is defined
91 boolean HavePreestimatedLength();
93 * Returns preestemated length
95 double GetPreestimatedLength();
97 * Sets preestemated length
99 void SetPreestimatedLength(in double length);
101 * Sets boolean parameter enabling/desabling usage of length computed
102 * basing on size of bounding box of shape to mesh
104 void SetUsePreestimatedLength(in boolean toUse);
106 * Returns value of boolean parameter enabling/desabling usage of length computed
107 * basing on size of bounding box of shape to mesh
109 boolean GetUsePreestimatedLength();
113 * StdMeshers_AutomaticLength: interface of "Automatic length" hypothesis
115 interface StdMeshers_AutomaticLength : SMESH::SMESH_Hypothesis
118 * Sets Fineness parameter value
120 void SetFineness(in double theFineness)
121 raises (SALOME::SALOME_Exception);
124 * Returns <Fineness> parameter value
126 double GetFineness();
130 * StdMeshers_NumberOfSegments: interface of "Nb. Segments" hypothesis
132 interface StdMeshers_NumberOfSegments : SMESH::SMESH_Hypothesis
135 * Builds and returns point distribution according to passed density function
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);
143 * Sets <number of segments> parameter value
145 void SetNumberOfSegments(in long segmentsNumber)
146 raises (SALOME::SALOME_Exception);
149 * Returns <number of segments> parameter value
151 long GetNumberOfSegments();
154 * Sets <distribution type> parameter value
156 void SetDistrType(in long typ)
157 raises (SALOME::SALOME_Exception);
160 * Returns <distribution type> parameter value
165 * Sets <scale factor> parameter value
167 void SetScaleFactor(in double scaleFactor)
168 raises (SALOME::SALOME_Exception);
171 * Returns <scale factor> parameter value
173 double GetScaleFactor()
174 raises (SALOME::SALOME_Exception);
177 * Sets <table function> parameter value for distribution DT_TabFunc
179 void SetTableFunction(in SMESH::double_array table)
180 raises (SALOME::SALOME_Exception);
183 * Returns <table function> parameter value for distribution DT_TabFunc
185 SMESH::double_array GetTableFunction()
186 raises (SALOME::SALOME_Exception);
189 * Sets <expression function> parameter value for distribution DT_ExprFunc
191 void SetExpressionFunction(in string expr)
192 raises (SALOME::SALOME_Exception);
195 * Returns <expression function> parameter value for distribution DT_ExprFunc
197 string GetExpressionFunction()
198 raises (SALOME::SALOME_Exception);
201 * Sets <conversion mode> parameter value for functional distributions
203 void SetConversionMode(in long conv )
204 raises (SALOME::SALOME_Exception);
207 * Returns <conversion mode> parameter value for functional distributions
209 long ConversionMode()
210 raises (SALOME::SALOME_Exception);
213 * Set list of edges to reverse
215 void SetReversedEdges( in SMESH::long_array list );
218 * Returns list of edges to reverse
220 SMESH::long_array GetReversedEdges();
223 * Set entry of the main object
225 void SetObjectEntry( in string entry );
228 * Get the entry of the main object
230 string GetObjectEntry();
234 * StdMeshers_Arithmetic1D: interface of "Arithmetic 1D" hypothesis
236 interface StdMeshers_Arithmetic1D : SMESH::SMESH_Hypothesis
239 * Sets <start segment length> or <end segment length> parameter value
240 * * OBSOLETE *. Avoid such a way of interface design
241 * * It is recommended to dedicate a method to each parameter.
243 void SetLength(in double length, in boolean isStartLength)
244 raises (SALOME::SALOME_Exception);
247 * Sets <start segment length> parameter value
249 void SetStartLength(in double length)
250 raises (SALOME::SALOME_Exception);
253 * Sets <end segment length> parameter value
255 void SetEndLength(in double length)
256 raises (SALOME::SALOME_Exception);
259 * Returns <start segment length> or <end segment length> parameter value
261 double GetLength(in boolean isStartLength);
264 * Set list of edges to reverse
266 void SetReversedEdges( in SMESH::long_array list );
269 * Returns list of edges to reverse
271 SMESH::long_array GetReversedEdges();
274 * Set entry of the main object
276 void SetObjectEntry( in string entry );
279 * Get the entry of the main object
281 string GetObjectEntry();
285 * StdMeshers_MaxElementArea: interface of "Max. Triangle Area" hypothesis
287 interface StdMeshers_MaxElementArea : SMESH::SMESH_Hypothesis
290 * Sets <maximum element area> parameter value
292 void SetMaxElementArea(in double area)
293 raises (SALOME::SALOME_Exception);
296 * Returns <maximum element area> parameter value
298 double GetMaxElementArea();
302 * StdMeshers_LengthFromEdges: interface of "Length From Edges (2D Hyp. for Triangulator)" hypothesis
304 interface StdMeshers_LengthFromEdges : SMESH::SMESH_Hypothesis
307 * Sets <mode> parameter value
309 void SetMode(in long mode)
310 raises (SALOME::SALOME_Exception);
313 * Returns <mode> parameter value
319 * StdMeshers_StartEndLength: interface of "Start and End Length" hypothesis
321 interface StdMeshers_StartEndLength : SMESH::SMESH_Hypothesis
324 * Sets <start segment length> or <end segment length> parameter value
325 * * OBSOLETE *. Avoid such a way of interface design.
326 * * It is recommended to dedicate a method to each parameter.
328 void SetLength(in double length, in boolean isStartLength)
329 raises (SALOME::SALOME_Exception);
332 * Sets <start segment length> parameter value
334 void SetStartLength(in double length)
335 raises (SALOME::SALOME_Exception);
338 * Sets <end segment length> parameter value
340 void SetEndLength(in double length)
341 raises (SALOME::SALOME_Exception);
344 * Returns <start segment length> or <end segment length> parameter value
346 double GetLength(in boolean isStartLength);
349 * Set list of edges to reverse
351 void SetReversedEdges( in SMESH::long_array list );
354 * Returns list of edges to reverse
356 SMESH::long_array GetReversedEdges();
359 * Set entry of the main object
361 void SetObjectEntry( in string entry );
364 * Get the entry of the main object
366 string GetObjectEntry();
371 * StdMeshers_Deflection1D: interface of "Deflection 1D" hypothesis
373 interface StdMeshers_Deflection1D : SMESH::SMESH_Hypothesis
376 * Sets <deflection> parameter value
378 void SetDeflection(in double deflection)
379 raises (SALOME::SALOME_Exception);
382 * Returns <deflection> parameter value
384 double GetDeflection();
389 * StdMeshers_FixedPoints1D: interface of "Fixed points 1D" hypothesis
391 interface StdMeshers_FixedPoints1D : SMESH::SMESH_Hypothesis
394 * Sets some points on edge using parameter on curve from 0 to 1
395 * (additionally it is neecessary to check orientation of edges and
396 * create list of reversed edges if it is needed) and sets numbers
397 * of segments between given points (default values are equals 1)
399 void SetPoints(in SMESH::double_array listParams)
400 raises (SALOME::SALOME_Exception);
401 void SetNbSegments(in SMESH::long_array listNbSeg)
402 raises (SALOME::SALOME_Exception);
405 * Returns list of point's parameters
407 SMESH::double_array GetPoints();
410 * Returns list of numbers of segments
412 SMESH::long_array GetNbSegments();
415 * Set list of edges to reverse
417 void SetReversedEdges( in SMESH::long_array list );
420 * Returns list of edges to reverse
422 SMESH::long_array GetReversedEdges();
425 * Set entry of the main object
427 void SetObjectEntry( in string entry );
430 * Get the entry of the main object
432 string GetObjectEntry();
437 * StdMeshers_MaxElementVolume: interface of "Max. Hexahedron or Tetrahedron Volume" hypothesis
439 interface StdMeshers_MaxElementVolume : SMESH::SMESH_Hypothesis
442 * Sets <maximum element volume> parameter value
444 void SetMaxElementVolume(in double volume)
445 raises (SALOME::SALOME_Exception);
448 * Returns <maximum element volume> parameter value
450 double GetMaxElementVolume();
454 * StdMeshers_NotConformAllowed: interface of "Not Conform Mesh Allowed" hypothesis.
455 * Presence of this hypothesis permits to algorithm generation of not conform mesh.
457 interface StdMeshers_NotConformAllowed : SMESH::SMESH_Hypothesis
462 * StdMeshers_Propagation: interface of "Propagation" hypothesis.
463 * Presence of this hypothesis on any edge propagates any other 1D
464 * hypothesis from this edge on all edges, opposite to it.
465 * It concerns only edges of quadrangle faces.
467 interface StdMeshers_Propagation : SMESH::SMESH_Hypothesis
472 * StdMeshers_QuadranglePreference: interface of "QuadranglePreference" hypothesis.
473 * This hypothesis is used by StdMeshers_Quadrangle_2D algorithm.
474 * Presence of this hypothesis forces construction of quadrangles if the number
475 * of nodes on opposite edges is not the same in the case where the global number
476 * of nodes on edges is even
478 interface StdMeshers_QuadranglePreference : SMESH::SMESH_Hypothesis
483 * StdMeshers_TrianglePreference: interface of "TrianglePreference" hypothesis.
484 * This hypothesis is used by StdMeshers_Quadrangle_2D algorithm.
485 * Presence of this hypothesis forces construction of triangles in the refinement
486 * area if the number of nodes on opposite edges is not the same.
488 interface StdMeshers_TrianglePreference : SMESH::SMESH_Hypothesis
493 * StdMeshers_QuadraticMesh: interface of "QuadraticMesh" hypothesis.
494 * This is an auxiliary 1D hypothesis whose presence forces construction
495 * of quadratic edges.
496 * If the 2D mesher sees that all boundary edges are quadratic ones,
497 * it generates quadratic faces, else it generates linear faces using
498 * medium nodes as if they were vertex ones.
499 * The 3D mesher generates quadratic volumes only if all boundary faces
500 * are quadratic ones, else it fails.
502 interface StdMeshers_QuadraticMesh : SMESH::SMESH_Hypothesis
508 * StdMeshers_NumberOfLayers: interface of "Nb. Layers" hypothesis.
509 * This hypothesis is used by "Radial prism" algorithm.
510 * It specifies number of segments between the internal
511 * and the external surfaces.
513 interface StdMeshers_NumberOfLayers : SMESH::SMESH_Hypothesis
516 * Sets <number of segments> parameter value
518 void SetNumberOfLayers(in long numberOfLayers)
519 raises (SALOME::SALOME_Exception);
522 * Returns <number of layers> parameter value
524 long GetNumberOfLayers();
529 * StdMeshers_LayerDistribution: interface of "Distribution of Layers" hypothesis.
530 * This hypothesis is used by "Radial prism" algorithm.
531 * It specifies 1D hypothesis defining distribution of segments between the internal
532 * and the external surfaces.
534 interface StdMeshers_LayerDistribution : SMESH::SMESH_Hypothesis
537 * Sets 1D hypothesis specifying distribution of layers
539 void SetLayerDistribution(in SMESH::SMESH_Hypothesis distributionHyp)
540 raises (SALOME::SALOME_Exception);
543 * Returns 1D hypothesis specifying distribution of layers
545 SMESH::SMESH_Hypothesis GetLayerDistribution();
550 * StdMeshers_NumberOfLayers2D: interface of "Nb. Layers" hypothesis.
551 * This hypothesis is used by "Radial quadrangle" algorithm.
552 * It specifies number of segments between the internal
553 * and the external surfaces.
555 interface StdMeshers_NumberOfLayers2D : StdMeshers_NumberOfLayers
560 * StdMeshers_LayerDistribution2D: interface of "Distribution of Layers" hypothesis.
561 * This hypothesis is used by "Radial quadrangle" algorithm.
562 * It specifies 1D hypothesis defining distribution of segments between the internal
563 * and the external surfaces.
565 interface StdMeshers_LayerDistribution2D : StdMeshers_LayerDistribution
570 * interface of "ProjectionSource1D" hypothesis.
571 * This hypothesis specifies a meshed edge to take a mesh pattern from
572 * and optionally association of vertices between the source edge and a
573 * target one (where a hipothesis is assigned to)
575 interface StdMeshers_ProjectionSource1D : SMESH::SMESH_Hypothesis
578 * Sets source <edge> to take a mesh pattern from
580 void SetSourceEdge(in GEOM::GEOM_Object edge)
581 raises (SALOME::SALOME_Exception);
584 * Returns the source edge
586 GEOM::GEOM_Object GetSourceEdge();
589 * Sets source <mesh> to take a mesh pattern from
591 void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
596 SMESH::SMESH_Mesh GetSourceMesh();
599 * Sets vertex association between the source edge and the target one.
600 * This parameter is optional
602 void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex,
603 in GEOM::GEOM_Object targetVertex)
604 raises (SALOME::SALOME_Exception);
607 * Returns the vertex associated with the target vertex.
608 * Result may be nil if association not set
610 GEOM::GEOM_Object GetSourceVertex();
613 * Returns the vertex associated with the source vertex.
614 * Result may be nil if association not set
616 GEOM::GEOM_Object GetTargetVertex();
620 * interface of "ProjectionSource2D" hypothesis.
621 * This hypothesis specifies a meshed face to take a mesh pattern from
622 * and optionally association of vertices between the source face and a
623 * target one (where a hipothesis is assigned to)
625 interface StdMeshers_ProjectionSource2D : SMESH::SMESH_Hypothesis
628 * Sets a source <face> to take a mesh pattern from
630 void SetSourceFace(in GEOM::GEOM_Object face)
631 raises (SALOME::SALOME_Exception);
634 * Returns the source face
636 GEOM::GEOM_Object GetSourceFace();
639 * Sets source <mesh> to take a mesh pattern from
641 void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
646 SMESH::SMESH_Mesh GetSourceMesh();
649 * Sets vertex association between the source face and the target one.
650 * This parameter is optional.
651 * Two vertices must belong to one edge of a face
653 void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex1,
654 in GEOM::GEOM_Object sourceVertex2,
655 in GEOM::GEOM_Object targetVertex1,
656 in GEOM::GEOM_Object targetVertex2)
657 raises (SALOME::SALOME_Exception);
660 * Returns the <i>-th source vertex associated with the <i>-th target vertex.
661 * Result may be nil if association not set.
662 * Valid indices are 1 and 2
664 GEOM::GEOM_Object GetSourceVertex(in long i)
665 raises (SALOME::SALOME_Exception);
668 * Returns the <i>-th target vertex associated with the <i>-th source vertex.
669 * Result may be nil if association not set.
670 * Valid indices are 1 and 2
672 GEOM::GEOM_Object GetTargetVertex(in long i)
673 raises (SALOME::SALOME_Exception);
677 * interface of "ProjectionSource3D" hypothesis.
678 * This hypothesis specifies a meshed shell or solid to take a mesh pattern from
679 * and optionally association of vertices between the source shape and a
680 * target one (where a hipothesis is assigned to)
682 interface StdMeshers_ProjectionSource3D : SMESH::SMESH_Hypothesis
685 * Sets a source <shape> to take a mesh pattern from
687 void SetSource3DShape(in GEOM::GEOM_Object shape)
688 raises (SALOME::SALOME_Exception);
691 * Returns the source shape
693 GEOM::GEOM_Object GetSource3DShape();
696 * Sets source <mesh> to take a mesh pattern from
698 void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
703 SMESH::SMESH_Mesh GetSourceMesh();
706 * Sets vertex association between the source shape and the target one.
707 * This parameter is optional.
708 * Two vertices must belong to one edge of a shape
710 void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex1,
711 in GEOM::GEOM_Object sourceVertex2,
712 in GEOM::GEOM_Object targetVertex1,
713 in GEOM::GEOM_Object targetVertex2)
714 raises (SALOME::SALOME_Exception);
717 * Returns the <i>-th source vertex associated with the <i>-th target vertex.
718 * Result may be nil if association not set.
719 * Valid indices are 1 and 2
721 GEOM::GEOM_Object GetSourceVertex(in long i)
722 raises (SALOME::SALOME_Exception);
725 * Returns the <i>-th target vertex associated with the <i>-th source vertex.
726 * Result may be nil if association not set.
727 * Valid indices are 1 and 2
729 GEOM::GEOM_Object GetTargetVertex(in long i)
730 raises (SALOME::SALOME_Exception);
734 * interface of "SegmentLengthAroundVertex" hypothesis.
735 * This hypothesis specifies length of segments adjacent to the vertex the
736 * hypothesis is assigned to
738 interface StdMeshers_SegmentLengthAroundVertex : SMESH::SMESH_Hypothesis
741 * Sets <length> parameter value
743 void SetLength(in double length)
744 raises (SALOME::SALOME_Exception);
747 * Returns <length> parameter value
753 * StdMeshers_QuadrangleParams: interface of "Quadrangle Params" hypothesis
755 interface StdMeshers_QuadrangleParams : SMESH::SMESH_Hypothesis
758 * Set base vertex for triangles
760 void SetTriaVertex( in long vertID );
763 * Returns base vertex for triangles
765 long GetTriaVertex();
768 * Set entry of the main object
770 void SetObjectEntry( in string entry );
773 * Get the entry of the main object
775 string GetObjectEntry();
779 * StdMeshers_SegmentAroundVertex_0D: interface of "SegmentAroundVertex" algorithm
781 interface StdMeshers_SegmentAroundVertex_0D : SMESH::SMESH_0D_Algo
786 * StdMeshers_Regular_1D: interface of "Wire discretisation" algorithm
788 interface StdMeshers_Regular_1D : SMESH::SMESH_1D_Algo
793 * StdMeshers_CompositeSegment_1D: interface of "Composite side discretisation" algorithm
795 interface StdMeshers_CompositeSegment_1D : SMESH::SMESH_1D_Algo
800 * StdMeshers_MEFISTO_2D: interface of "Triangle (Mefisto)" algorithm
802 interface StdMeshers_MEFISTO_2D : SMESH::SMESH_2D_Algo
807 * StdMeshers_Quadrangle_2D: interface of "Quadrangle (Mapping)" algorithm
809 interface StdMeshers_Quadrangle_2D : SMESH::SMESH_2D_Algo
814 * StdMeshers_Hexa_3D: interface of "Hexahedron (i,j,k)" algorithm
816 interface StdMeshers_Hexa_3D : SMESH::SMESH_3D_Algo
821 * StdMeshers_Prism_3D: interface of "3D extrusion" algorithm
823 interface StdMeshers_Prism_3D : SMESH::SMESH_3D_Algo
828 * StdMeshers_RadialPrism_3D: interface of "Radial Prism" algorithm
830 interface StdMeshers_RadialPrism_3D : SMESH::SMESH_3D_Algo
835 * StdMeshers_Projection_3D: interface of "Projection 3D" algorithm
837 interface StdMeshers_Projection_3D : SMESH::SMESH_3D_Algo
842 * StdMeshers_Projection_2D: interface of "Projection 2D" algorithm
844 interface StdMeshers_Projection_2D : SMESH::SMESH_2D_Algo
849 * StdMeshers_Projection_1D: interface of "Projection 1D" algorithm
851 interface StdMeshers_Projection_1D : SMESH::SMESH_1D_Algo
856 * StdMeshers_UseExisting_2D: interface of "UseExisting 2D" algorithm
857 * doing nothing to allow mesh generation by mesh edition functions in TUI mode
859 interface StdMeshers_UseExisting_2D : SMESH::SMESH_2D_Algo
864 * StdMeshers_UseExisting_1D: interface of "UseExisting 1D" algorithm
865 * doing nothing to allow mesh generation by mesh edition functions in TUI mode
867 interface StdMeshers_UseExisting_1D : SMESH::SMESH_1D_Algo
872 * StdMeshers_RadialQuadrangle_1D2D: interface of "Radial quadrangle" algorithm
874 interface StdMeshers_RadialQuadrangle_1D2D : SMESH::SMESH_2D_Algo