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
241 void SetLength(in double length, in boolean isStartLength)
242 raises (SALOME::SALOME_Exception);
245 * Returns <start segment length> or <end segment length> parameter value
247 double GetLength(in boolean isStartLength);
250 * Set list of edges to reverse
252 void SetReversedEdges( in SMESH::long_array list );
255 * Returns list of edges to reverse
257 SMESH::long_array GetReversedEdges();
260 * Set entry of the main object
262 void SetObjectEntry( in string entry );
265 * Get the entry of the main object
267 string GetObjectEntry();
271 * StdMeshers_MaxElementArea: interface of "Max. Triangle Area" hypothesis
273 interface StdMeshers_MaxElementArea : SMESH::SMESH_Hypothesis
276 * Sets <maximum element area> parameter value
278 void SetMaxElementArea(in double area)
279 raises (SALOME::SALOME_Exception);
282 * Returns <maximum element area> parameter value
284 double GetMaxElementArea();
288 * StdMeshers_LengthFromEdges: interface of "Length From Edges (2D Hyp. for Triangulator)" hypothesis
290 interface StdMeshers_LengthFromEdges : SMESH::SMESH_Hypothesis
293 * Sets <mode> parameter value
295 void SetMode(in long mode)
296 raises (SALOME::SALOME_Exception);
299 * Returns <mode> parameter value
305 * StdMeshers_StartEndLength: interface of "Start and End Length" hypothesis
307 interface StdMeshers_StartEndLength : SMESH::SMESH_Hypothesis
310 * Sets <start segment length> or <end segment length> parameter value
312 void SetLength(in double length, in boolean isStartLength)
313 raises (SALOME::SALOME_Exception);
316 * Returns <start segment length> or <end segment length> parameter value
318 double GetLength(in boolean isStartLength);
321 * Set list of edges to reverse
323 void SetReversedEdges( in SMESH::long_array list );
326 * Returns list of edges to reverse
328 SMESH::long_array GetReversedEdges();
331 * Set entry of the main object
333 void SetObjectEntry( in string entry );
336 * Get the entry of the main object
338 string GetObjectEntry();
343 * StdMeshers_Deflection1D: interface of "Deflection 1D" hypothesis
345 interface StdMeshers_Deflection1D : SMESH::SMESH_Hypothesis
348 * Sets <deflection> parameter value
350 void SetDeflection(in double deflection)
351 raises (SALOME::SALOME_Exception);
354 * Returns <deflection> parameter value
356 double GetDeflection();
361 * StdMeshers_MaxElementVolume: interface of "Max. Hexahedron or Tetrahedron Volume" hypothesis
363 interface StdMeshers_MaxElementVolume : SMESH::SMESH_Hypothesis
366 * Sets <maximum element volume> parameter value
368 void SetMaxElementVolume(in double volume)
369 raises (SALOME::SALOME_Exception);
372 * Returns <maximum element volume> parameter value
374 double GetMaxElementVolume();
378 * StdMeshers_NotConformAllowed: interface of "Not Conform Mesh Allowed" hypothesis.
379 * Presence of this hypothesis permits to algorithm generation of not conform mesh.
381 interface StdMeshers_NotConformAllowed : SMESH::SMESH_Hypothesis
386 * StdMeshers_Propagation: interface of "Propagation" hypothesis.
387 * Presence of this hypothesis on any edge propagates any other 1D
388 * hypothesis from this edge on all edges, opposite to it.
389 * It concerns only edges of quadrangle faces.
391 interface StdMeshers_Propagation : SMESH::SMESH_Hypothesis
396 * StdMeshers_QuadranglePreference: interface of "QuadranglePreference" hypothesis.
397 * This hypothesis is used by StdMeshers_Quadrangle_2D algorithm.
398 * Presence of this hypothesis forces construction of quadrangles if the number
399 * of nodes on opposite edges is not the same in the case where the global number
400 * of nodes on edges is even
402 interface StdMeshers_QuadranglePreference : SMESH::SMESH_Hypothesis
407 * StdMeshers_TrianglePreference: interface of "TrianglePreference" hypothesis.
408 * This hypothesis is used by StdMeshers_Quadrangle_2D algorithm.
409 * Presence of this hypothesis forces construction of triangles in the refinement
410 * area if the number of nodes on opposite edges is not the same.
412 interface StdMeshers_TrianglePreference : SMESH::SMESH_Hypothesis
417 * StdMeshers_QuadraticMesh: interface of "QuadraticMesh" hypothesis.
418 * This is an auxiliary 1D hypothesis whose presence forces construction
419 * of quadratic edges.
420 * If the 2D mesher sees that all boundary edges are quadratic ones,
421 * it generates quadratic faces, else it generates linear faces using
422 * medium nodes as if they were vertex ones.
423 * The 3D mesher generates quadratic volumes only if all boundary faces
424 * are quadratic ones, else it fails.
426 interface StdMeshers_QuadraticMesh : SMESH::SMESH_Hypothesis
432 * StdMeshers_NumberOfLayers: interface of "Nb. Layers" hypothesis.
433 * This hypothesis is used by "Radial prism" algorithm.
434 * It specifies number of segments between the internal
435 * and the external surfaces.
437 interface StdMeshers_NumberOfLayers : SMESH::SMESH_Hypothesis
440 * Sets <number of segments> parameter value
442 void SetNumberOfLayers(in long numberOfLayers)
443 raises (SALOME::SALOME_Exception);
446 * Returns <number of layers> parameter value
448 long GetNumberOfLayers();
453 * StdMeshers_LayerDistribution: interface of "Distribution of Layers" hypothesis.
454 * This hypothesis is used by "Radial prism" algorithm.
455 * It specifies 1D hypothesis defining distribution of segments between the internal
456 * and the external surfaces.
458 interface StdMeshers_LayerDistribution : SMESH::SMESH_Hypothesis
461 * Sets 1D hypothesis specifying distribution of layers
463 void SetLayerDistribution(in SMESH::SMESH_Hypothesis distributionHyp)
464 raises (SALOME::SALOME_Exception);
467 * Returns 1D hypothesis specifying distribution of layers
469 SMESH::SMESH_Hypothesis GetLayerDistribution();
474 * interface of "ProjectionSource1D" hypothesis.
475 * This hypothesis specifies a meshed edge to take a mesh pattern from
476 * and optionally association of vertices between the source edge and a
477 * target one (where a hipothesis is assigned to)
479 interface StdMeshers_ProjectionSource1D : SMESH::SMESH_Hypothesis
482 * Sets source <edge> to take a mesh pattern from
484 void SetSourceEdge(in GEOM::GEOM_Object edge)
485 raises (SALOME::SALOME_Exception);
488 * Returns the source edge
490 GEOM::GEOM_Object GetSourceEdge();
493 * Sets source <mesh> to take a mesh pattern from
495 void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
500 SMESH::SMESH_Mesh GetSourceMesh();
503 * Sets vertex association between the source edge and the target one.
504 * This parameter is optional
506 void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex,
507 in GEOM::GEOM_Object targetVertex)
508 raises (SALOME::SALOME_Exception);
511 * Returns the vertex associated with the target vertex.
512 * Result may be nil if association not set
514 GEOM::GEOM_Object GetSourceVertex();
517 * Returns the vertex associated with the source vertex.
518 * Result may be nil if association not set
520 GEOM::GEOM_Object GetTargetVertex();
524 * interface of "ProjectionSource2D" hypothesis.
525 * This hypothesis specifies a meshed face to take a mesh pattern from
526 * and optionally association of vertices between the source face and a
527 * target one (where a hipothesis is assigned to)
529 interface StdMeshers_ProjectionSource2D : SMESH::SMESH_Hypothesis
532 * Sets a source <face> to take a mesh pattern from
534 void SetSourceFace(in GEOM::GEOM_Object face)
535 raises (SALOME::SALOME_Exception);
538 * Returns the source face
540 GEOM::GEOM_Object GetSourceFace();
543 * Sets source <mesh> to take a mesh pattern from
545 void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
550 SMESH::SMESH_Mesh GetSourceMesh();
553 * Sets vertex association between the source face and the target one.
554 * This parameter is optional.
555 * Two vertices must belong to one edge of a face
557 void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex1,
558 in GEOM::GEOM_Object sourceVertex2,
559 in GEOM::GEOM_Object targetVertex1,
560 in GEOM::GEOM_Object targetVertex2)
561 raises (SALOME::SALOME_Exception);
564 * Returns the <i>-th source vertex associated with the <i>-th target vertex.
565 * Result may be nil if association not set.
566 * Valid indices are 1 and 2
568 GEOM::GEOM_Object GetSourceVertex(in long i)
569 raises (SALOME::SALOME_Exception);
572 * Returns the <i>-th target vertex associated with the <i>-th source vertex.
573 * Result may be nil if association not set.
574 * Valid indices are 1 and 2
576 GEOM::GEOM_Object GetTargetVertex(in long i)
577 raises (SALOME::SALOME_Exception);
581 * interface of "ProjectionSource3D" hypothesis.
582 * This hypothesis specifies a meshed shell or solid to take a mesh pattern from
583 * and optionally association of vertices between the source shape and a
584 * target one (where a hipothesis is assigned to)
586 interface StdMeshers_ProjectionSource3D : SMESH::SMESH_Hypothesis
589 * Sets a source <shape> to take a mesh pattern from
591 void SetSource3DShape(in GEOM::GEOM_Object shape)
592 raises (SALOME::SALOME_Exception);
595 * Returns the source shape
597 GEOM::GEOM_Object GetSource3DShape();
600 * Sets source <mesh> to take a mesh pattern from
602 void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
607 SMESH::SMESH_Mesh GetSourceMesh();
610 * Sets vertex association between the source shape and the target one.
611 * This parameter is optional.
612 * Two vertices must belong to one edge of a shape
614 void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex1,
615 in GEOM::GEOM_Object sourceVertex2,
616 in GEOM::GEOM_Object targetVertex1,
617 in GEOM::GEOM_Object targetVertex2)
618 raises (SALOME::SALOME_Exception);
621 * Returns the <i>-th source vertex associated with the <i>-th target vertex.
622 * Result may be nil if association not set.
623 * Valid indices are 1 and 2
625 GEOM::GEOM_Object GetSourceVertex(in long i)
626 raises (SALOME::SALOME_Exception);
629 * Returns the <i>-th target vertex associated with the <i>-th source vertex.
630 * Result may be nil if association not set.
631 * Valid indices are 1 and 2
633 GEOM::GEOM_Object GetTargetVertex(in long i)
634 raises (SALOME::SALOME_Exception);
638 * interface of "SegmentLengthAroundVertex" hypothesis.
639 * This hypothesis specifies length of segments adjacent to the vertex the
640 * hypothesis is assigned to
642 interface StdMeshers_SegmentLengthAroundVertex : SMESH::SMESH_Hypothesis
645 * Sets <length> parameter value
647 void SetLength(in double length)
648 raises (SALOME::SALOME_Exception);
651 * Returns <length> parameter value
657 * StdMeshers_SegmentAroundVertex_0D: interface of "SegmentAroundVertex" algorithm
659 interface StdMeshers_SegmentAroundVertex_0D : SMESH::SMESH_0D_Algo
664 * StdMeshers_Regular_1D: interface of "Wire discretisation" algorithm
666 interface StdMeshers_Regular_1D : SMESH::SMESH_1D_Algo
671 * StdMeshers_CompositeSegment_1D: interface of "Composite side discretisation" algorithm
673 interface StdMeshers_CompositeSegment_1D : SMESH::SMESH_1D_Algo
678 * StdMeshers_MEFISTO_2D: interface of "Triangle (Mefisto)" algorithm
680 interface StdMeshers_MEFISTO_2D : SMESH::SMESH_2D_Algo
685 * StdMeshers_Quadrangle_2D: interface of "Quadrangle (Mapping)" algorithm
687 interface StdMeshers_Quadrangle_2D : SMESH::SMESH_2D_Algo
692 * StdMeshers_Hexa_3D: interface of "Hexahedron (i,j,k)" algorithm
694 interface StdMeshers_Hexa_3D : SMESH::SMESH_3D_Algo
699 * StdMeshers_Prism_3D: interface of "3D extrusion" algorithm
701 interface StdMeshers_Prism_3D : SMESH::SMESH_3D_Algo
706 * StdMeshers_RadialPrism_3D: interface of "Radial Prism" algorithm
708 interface StdMeshers_RadialPrism_3D : SMESH::SMESH_3D_Algo
713 * StdMeshers_Projection_3D: interface of "Projection 3D" algorithm
715 interface StdMeshers_Projection_3D : SMESH::SMESH_3D_Algo
720 * StdMeshers_Projection_2D: interface of "Projection 2D" algorithm
722 interface StdMeshers_Projection_2D : SMESH::SMESH_2D_Algo
727 * StdMeshers_Projection_1D: interface of "Projection 1D" algorithm
729 interface StdMeshers_Projection_1D : SMESH::SMESH_1D_Algo
734 * StdMeshers_UseExisting_2D: interface of "UseExisting 2D" algorithm
735 * doing nothing to allow mesh generation by mesh edition functions in TUI mode
737 interface StdMeshers_UseExisting_2D : SMESH::SMESH_2D_Algo
742 * StdMeshers_UseExisting_1D: interface of "UseExisting 1D" algorithm
743 * doing nothing to allow mesh generation by mesh edition functions in TUI mode
745 interface StdMeshers_UseExisting_1D : SMESH::SMESH_1D_Algo