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_MaxElementVolume: interface of "Max. Hexahedron or Tetrahedron Volume" hypothesis
391 interface StdMeshers_MaxElementVolume : SMESH::SMESH_Hypothesis
394 * Sets <maximum element volume> parameter value
396 void SetMaxElementVolume(in double volume)
397 raises (SALOME::SALOME_Exception);
400 * Returns <maximum element volume> parameter value
402 double GetMaxElementVolume();
406 * StdMeshers_NotConformAllowed: interface of "Not Conform Mesh Allowed" hypothesis.
407 * Presence of this hypothesis permits to algorithm generation of not conform mesh.
409 interface StdMeshers_NotConformAllowed : SMESH::SMESH_Hypothesis
414 * StdMeshers_Propagation: interface of "Propagation" hypothesis.
415 * Presence of this hypothesis on any edge propagates any other 1D
416 * hypothesis from this edge on all edges, opposite to it.
417 * It concerns only edges of quadrangle faces.
419 interface StdMeshers_Propagation : SMESH::SMESH_Hypothesis
424 * StdMeshers_QuadranglePreference: interface of "QuadranglePreference" hypothesis.
425 * This hypothesis is used by StdMeshers_Quadrangle_2D algorithm.
426 * Presence of this hypothesis forces construction of quadrangles if the number
427 * of nodes on opposite edges is not the same in the case where the global number
428 * of nodes on edges is even
430 interface StdMeshers_QuadranglePreference : SMESH::SMESH_Hypothesis
435 * StdMeshers_TrianglePreference: interface of "TrianglePreference" hypothesis.
436 * This hypothesis is used by StdMeshers_Quadrangle_2D algorithm.
437 * Presence of this hypothesis forces construction of triangles in the refinement
438 * area if the number of nodes on opposite edges is not the same.
440 interface StdMeshers_TrianglePreference : SMESH::SMESH_Hypothesis
445 * StdMeshers_QuadraticMesh: interface of "QuadraticMesh" hypothesis.
446 * This is an auxiliary 1D hypothesis whose presence forces construction
447 * of quadratic edges.
448 * If the 2D mesher sees that all boundary edges are quadratic ones,
449 * it generates quadratic faces, else it generates linear faces using
450 * medium nodes as if they were vertex ones.
451 * The 3D mesher generates quadratic volumes only if all boundary faces
452 * are quadratic ones, else it fails.
454 interface StdMeshers_QuadraticMesh : SMESH::SMESH_Hypothesis
460 * StdMeshers_NumberOfLayers: interface of "Nb. Layers" hypothesis.
461 * This hypothesis is used by "Radial prism" algorithm.
462 * It specifies number of segments between the internal
463 * and the external surfaces.
465 interface StdMeshers_NumberOfLayers : SMESH::SMESH_Hypothesis
468 * Sets <number of segments> parameter value
470 void SetNumberOfLayers(in long numberOfLayers)
471 raises (SALOME::SALOME_Exception);
474 * Returns <number of layers> parameter value
476 long GetNumberOfLayers();
481 * StdMeshers_LayerDistribution: interface of "Distribution of Layers" hypothesis.
482 * This hypothesis is used by "Radial prism" algorithm.
483 * It specifies 1D hypothesis defining distribution of segments between the internal
484 * and the external surfaces.
486 interface StdMeshers_LayerDistribution : SMESH::SMESH_Hypothesis
489 * Sets 1D hypothesis specifying distribution of layers
491 void SetLayerDistribution(in SMESH::SMESH_Hypothesis distributionHyp)
492 raises (SALOME::SALOME_Exception);
495 * Returns 1D hypothesis specifying distribution of layers
497 SMESH::SMESH_Hypothesis GetLayerDistribution();
502 * interface of "ProjectionSource1D" hypothesis.
503 * This hypothesis specifies a meshed edge to take a mesh pattern from
504 * and optionally association of vertices between the source edge and a
505 * target one (where a hipothesis is assigned to)
507 interface StdMeshers_ProjectionSource1D : SMESH::SMESH_Hypothesis
510 * Sets source <edge> to take a mesh pattern from
512 void SetSourceEdge(in GEOM::GEOM_Object edge)
513 raises (SALOME::SALOME_Exception);
516 * Returns the source edge
518 GEOM::GEOM_Object GetSourceEdge();
521 * Sets source <mesh> to take a mesh pattern from
523 void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
528 SMESH::SMESH_Mesh GetSourceMesh();
531 * Sets vertex association between the source edge and the target one.
532 * This parameter is optional
534 void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex,
535 in GEOM::GEOM_Object targetVertex)
536 raises (SALOME::SALOME_Exception);
539 * Returns the vertex associated with the target vertex.
540 * Result may be nil if association not set
542 GEOM::GEOM_Object GetSourceVertex();
545 * Returns the vertex associated with the source vertex.
546 * Result may be nil if association not set
548 GEOM::GEOM_Object GetTargetVertex();
552 * interface of "ProjectionSource2D" hypothesis.
553 * This hypothesis specifies a meshed face to take a mesh pattern from
554 * and optionally association of vertices between the source face and a
555 * target one (where a hipothesis is assigned to)
557 interface StdMeshers_ProjectionSource2D : SMESH::SMESH_Hypothesis
560 * Sets a source <face> to take a mesh pattern from
562 void SetSourceFace(in GEOM::GEOM_Object face)
563 raises (SALOME::SALOME_Exception);
566 * Returns the source face
568 GEOM::GEOM_Object GetSourceFace();
571 * Sets source <mesh> to take a mesh pattern from
573 void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
578 SMESH::SMESH_Mesh GetSourceMesh();
581 * Sets vertex association between the source face and the target one.
582 * This parameter is optional.
583 * Two vertices must belong to one edge of a face
585 void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex1,
586 in GEOM::GEOM_Object sourceVertex2,
587 in GEOM::GEOM_Object targetVertex1,
588 in GEOM::GEOM_Object targetVertex2)
589 raises (SALOME::SALOME_Exception);
592 * Returns the <i>-th source vertex associated with the <i>-th target vertex.
593 * Result may be nil if association not set.
594 * Valid indices are 1 and 2
596 GEOM::GEOM_Object GetSourceVertex(in long i)
597 raises (SALOME::SALOME_Exception);
600 * Returns the <i>-th target vertex associated with the <i>-th source vertex.
601 * Result may be nil if association not set.
602 * Valid indices are 1 and 2
604 GEOM::GEOM_Object GetTargetVertex(in long i)
605 raises (SALOME::SALOME_Exception);
609 * interface of "ProjectionSource3D" hypothesis.
610 * This hypothesis specifies a meshed shell or solid to take a mesh pattern from
611 * and optionally association of vertices between the source shape and a
612 * target one (where a hipothesis is assigned to)
614 interface StdMeshers_ProjectionSource3D : SMESH::SMESH_Hypothesis
617 * Sets a source <shape> to take a mesh pattern from
619 void SetSource3DShape(in GEOM::GEOM_Object shape)
620 raises (SALOME::SALOME_Exception);
623 * Returns the source shape
625 GEOM::GEOM_Object GetSource3DShape();
628 * Sets source <mesh> to take a mesh pattern from
630 void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
635 SMESH::SMESH_Mesh GetSourceMesh();
638 * Sets vertex association between the source shape and the target one.
639 * This parameter is optional.
640 * Two vertices must belong to one edge of a shape
642 void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex1,
643 in GEOM::GEOM_Object sourceVertex2,
644 in GEOM::GEOM_Object targetVertex1,
645 in GEOM::GEOM_Object targetVertex2)
646 raises (SALOME::SALOME_Exception);
649 * Returns the <i>-th source vertex associated with the <i>-th target vertex.
650 * Result may be nil if association not set.
651 * Valid indices are 1 and 2
653 GEOM::GEOM_Object GetSourceVertex(in long i)
654 raises (SALOME::SALOME_Exception);
657 * Returns the <i>-th target vertex associated with the <i>-th source vertex.
658 * Result may be nil if association not set.
659 * Valid indices are 1 and 2
661 GEOM::GEOM_Object GetTargetVertex(in long i)
662 raises (SALOME::SALOME_Exception);
666 * interface of "SegmentLengthAroundVertex" hypothesis.
667 * This hypothesis specifies length of segments adjacent to the vertex the
668 * hypothesis is assigned to
670 interface StdMeshers_SegmentLengthAroundVertex : SMESH::SMESH_Hypothesis
673 * Sets <length> parameter value
675 void SetLength(in double length)
676 raises (SALOME::SALOME_Exception);
679 * Returns <length> parameter value
685 * StdMeshers_SegmentAroundVertex_0D: interface of "SegmentAroundVertex" algorithm
687 interface StdMeshers_SegmentAroundVertex_0D : SMESH::SMESH_0D_Algo
692 * StdMeshers_Regular_1D: interface of "Wire discretisation" algorithm
694 interface StdMeshers_Regular_1D : SMESH::SMESH_1D_Algo
699 * StdMeshers_CompositeSegment_1D: interface of "Composite side discretisation" algorithm
701 interface StdMeshers_CompositeSegment_1D : SMESH::SMESH_1D_Algo
706 * StdMeshers_MEFISTO_2D: interface of "Triangle (Mefisto)" algorithm
708 interface StdMeshers_MEFISTO_2D : SMESH::SMESH_2D_Algo
713 * StdMeshers_Quadrangle_2D: interface of "Quadrangle (Mapping)" algorithm
715 interface StdMeshers_Quadrangle_2D : SMESH::SMESH_2D_Algo
720 * StdMeshers_Hexa_3D: interface of "Hexahedron (i,j,k)" algorithm
722 interface StdMeshers_Hexa_3D : SMESH::SMESH_3D_Algo
727 * StdMeshers_Prism_3D: interface of "3D extrusion" algorithm
729 interface StdMeshers_Prism_3D : SMESH::SMESH_3D_Algo
734 * StdMeshers_RadialPrism_3D: interface of "Radial Prism" algorithm
736 interface StdMeshers_RadialPrism_3D : SMESH::SMESH_3D_Algo
741 * StdMeshers_Projection_3D: interface of "Projection 3D" algorithm
743 interface StdMeshers_Projection_3D : SMESH::SMESH_3D_Algo
748 * StdMeshers_Projection_2D: interface of "Projection 2D" algorithm
750 interface StdMeshers_Projection_2D : SMESH::SMESH_2D_Algo
755 * StdMeshers_Projection_1D: interface of "Projection 1D" algorithm
757 interface StdMeshers_Projection_1D : SMESH::SMESH_1D_Algo
762 * StdMeshers_UseExisting_2D: interface of "UseExisting 2D" algorithm
763 * doing nothing to allow mesh generation by mesh edition functions in TUI mode
765 interface StdMeshers_UseExisting_2D : SMESH::SMESH_2D_Algo
770 * StdMeshers_UseExisting_1D: interface of "UseExisting 1D" algorithm
771 * doing nothing to allow mesh generation by mesh edition functions in TUI mode
773 interface StdMeshers_UseExisting_1D : SMESH::SMESH_1D_Algo