1 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // 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"
34 * StdMeshers: interfaces to standard hypotheses and algorithms
39 * StdMeshers_LocalLength: interface of "Average length" hypothesis
41 interface StdMeshers_LocalLength : SMESH::SMESH_Hypothesis
44 * Sets <length> parameter value
46 void SetLength(in double length)
47 raises (SALOME::SALOME_Exception);
50 * Sets <precision> parameter value
52 * Precision parameter is used to allow rounding a number of segments,
53 * calculated from the edge length and average length of segment,
54 * to the lower integer, if this value outstands from it in bounds of the precision.
55 * Otherwise, the number of segments is rounded to the higher integer.
56 * Use value 0.5 to provide rounding to the nearest integer,
57 * 1.0 for the lower integer, 0.0 for the higher integer.
58 * Default value is 1e-07. In old studies, restored from file,
59 * this value will be set to zero, what corresponds to the old behaviour.
61 void SetPrecision(in double precision)
62 raises (SALOME::SALOME_Exception);
65 * Returns <length> parameter value
70 * Returns <precision> parameter value
72 double GetPrecision();
76 * StdMeshers_AutomaticLength: interface of "Automatic length" hypothesis
78 interface StdMeshers_AutomaticLength : SMESH::SMESH_Hypothesis
81 * Sets Fineness parameter value
83 void SetFineness(in double theFineness)
84 raises (SALOME::SALOME_Exception);
87 * Returns <Fineness> parameter value
93 * StdMeshers_NumberOfSegments: interface of "Nb. Segments" hypothesis
95 interface StdMeshers_NumberOfSegments : SMESH::SMESH_Hypothesis
98 * Builds and returns point distribution according to passed density function
100 SMESH::double_array BuildDistributionExpr( in string func, in long nbSeg, in long conv )
101 raises (SALOME::SALOME_Exception);
102 SMESH::double_array BuildDistributionTab( in SMESH::double_array func, in long nbSeg, in long conv )
103 raises (SALOME::SALOME_Exception);
106 * Sets <number of segments> parameter value
108 void SetNumberOfSegments(in long segmentsNumber)
109 raises (SALOME::SALOME_Exception);
112 * Returns <number of segments> parameter value
114 long GetNumberOfSegments();
117 * Sets <distribution type> parameter value
119 void SetDistrType(in long typ)
120 raises (SALOME::SALOME_Exception);
123 * Returns <distribution type> parameter value
128 * Sets <scale factor> parameter value
130 void SetScaleFactor(in double scaleFactor)
131 raises (SALOME::SALOME_Exception);
134 * Returns <scale factor> parameter value
136 double GetScaleFactor()
137 raises (SALOME::SALOME_Exception);
140 * Sets <table function> parameter value for distribution DT_TabFunc
142 void SetTableFunction(in SMESH::double_array table)
143 raises (SALOME::SALOME_Exception);
146 * Returns <table function> parameter value for distribution DT_TabFunc
148 SMESH::double_array GetTableFunction()
149 raises (SALOME::SALOME_Exception);
152 * Sets <expression function> parameter value for distribution DT_ExprFunc
154 void SetExpressionFunction(in string expr)
155 raises (SALOME::SALOME_Exception);
158 * Returns <expression function> parameter value for distribution DT_ExprFunc
160 string GetExpressionFunction()
161 raises (SALOME::SALOME_Exception);
164 * Sets <conversion mode> parameter value for functional distributions
166 void SetConversionMode(in long conv )
167 raises (SALOME::SALOME_Exception);
170 * Returns <conversion mode> parameter value for functional distributions
172 long ConversionMode()
173 raises (SALOME::SALOME_Exception);
177 * StdMeshers_Arithmetic1D: interface of "Arithmetic 1D" hypothesis
179 interface StdMeshers_Arithmetic1D : SMESH::SMESH_Hypothesis
182 * Sets <start segment length> or <end segment length> parameter value
184 void SetLength(in double length, in boolean isStartLength)
185 raises (SALOME::SALOME_Exception);
188 * Returns <start segment length> or <end segment length> parameter value
190 double GetLength(in boolean isStartLength);
194 * StdMeshers_MaxElementArea: interface of "Max. Triangle Area" hypothesis
196 interface StdMeshers_MaxElementArea : SMESH::SMESH_Hypothesis
199 * Sets <maximum element area> parameter value
201 void SetMaxElementArea(in double area)
202 raises (SALOME::SALOME_Exception);
205 * Returns <maximum element area> parameter value
207 double GetMaxElementArea();
211 * StdMeshers_LengthFromEdges: interface of "Length From Edges (2D Hyp. for Triangulator)" hypothesis
213 interface StdMeshers_LengthFromEdges : SMESH::SMESH_Hypothesis
216 * Sets <mode> parameter value
218 void SetMode(in long mode)
219 raises (SALOME::SALOME_Exception);
222 * Returns <mode> parameter value
228 * StdMeshers_StartEndLength: interface of "Start and End Length" hypothesis
230 interface StdMeshers_StartEndLength : SMESH::SMESH_Hypothesis
233 * Sets <start segment length> or <end segment length> parameter value
235 void SetLength(in double length, in boolean isStartLength)
236 raises (SALOME::SALOME_Exception);
239 * Returns <start segment length> or <end segment length> parameter value
241 double GetLength(in boolean isStartLength);
246 * StdMeshers_Deflection1D: interface of "Deflection 1D" hypothesis
248 interface StdMeshers_Deflection1D : SMESH::SMESH_Hypothesis
251 * Sets <deflection> parameter value
253 void SetDeflection(in double deflection)
254 raises (SALOME::SALOME_Exception);
257 * Returns <deflection> parameter value
259 double GetDeflection();
264 * StdMeshers_MaxElementVolume: interface of "Max. Hexahedron or Tetrahedron Volume" hypothesis
266 interface StdMeshers_MaxElementVolume : SMESH::SMESH_Hypothesis
269 * Sets <maximum element volume> parameter value
271 void SetMaxElementVolume(in double volume)
272 raises (SALOME::SALOME_Exception);
275 * Returns <maximum element volume> parameter value
277 double GetMaxElementVolume();
281 * StdMeshers_NotConformAllowed: interface of "Not Conform Mesh Allowed" hypothesis.
282 * Presence of this hypothesis permits to algorithm generation of not conform mesh.
284 interface StdMeshers_NotConformAllowed : SMESH::SMESH_Hypothesis
289 * StdMeshers_Propagation: interface of "Propagation" hypothesis.
290 * Presence of this hypothesis on any edge propagates any other 1D
291 * hypothesis from this edge on all edges, opposite to it.
292 * It concerns only edges of quadrangle faces.
294 interface StdMeshers_Propagation : SMESH::SMESH_Hypothesis
299 * StdMeshers_QuadranglePreference: interface of "QuadranglePreference" hypothesis.
300 * This hypothesis is used by StdMeshers_Quadrangle_2D algorithm.
301 * Presence of this hypothesis forces construction of quadrangles if the number
302 * of nodes on opposite edges is not the same in the case where the global number
303 * of nodes on edges is even
305 interface StdMeshers_QuadranglePreference : SMESH::SMESH_Hypothesis
310 * StdMeshers_QuadraticMesh: interface of "QuadraticMesh" hypothesis.
311 * This is an auxiliary 1D hypothesis whose presence forces construction
312 * of quadratic edges.
313 * If the 2D mesher sees that all boundary edges are quadratic ones,
314 * it generates quadratic faces, else it generates linear faces using
315 * medium nodes as if they were vertex ones.
316 * The 3D mesher generates quadratic volumes only if all boundary faces
317 * are quadratic ones, else it fails.
319 interface StdMeshers_QuadraticMesh : SMESH::SMESH_Hypothesis
325 * StdMeshers_NumberOfLayers: interface of "Nb. Layers" hypothesis.
326 * This hypothesis is used by "Radial prism" algorithm.
327 * It specifies number of segments between the internal
328 * and the external surfaces.
330 interface StdMeshers_NumberOfLayers : SMESH::SMESH_Hypothesis
333 * Sets <number of segments> parameter value
335 void SetNumberOfLayers(in long numberOfLayers)
336 raises (SALOME::SALOME_Exception);
339 * Returns <number of layers> parameter value
341 long GetNumberOfLayers();
346 * StdMeshers_LayerDistribution: interface of "Distribution of Layers" hypothesis.
347 * This hypothesis is used by "Radial prism" algorithm.
348 * It specifies 1D hypothesis defining distribution of segments between the internal
349 * and the external surfaces.
351 interface StdMeshers_LayerDistribution : SMESH::SMESH_Hypothesis
354 * Sets 1D hypothesis specifying distribution of layers
356 void SetLayerDistribution(in SMESH::SMESH_Hypothesis distributionHyp)
357 raises (SALOME::SALOME_Exception);
360 * Returns 1D hypothesis specifying distribution of layers
362 SMESH::SMESH_Hypothesis GetLayerDistribution();
367 * interface of "ProjectionSource1D" hypothesis.
368 * This hypothesis specifies a meshed edge to take a mesh pattern from
369 * and optionally association of vertices between the source edge and a
370 * target one (where a hipothesis is assigned to)
372 interface StdMeshers_ProjectionSource1D : SMESH::SMESH_Hypothesis
375 * Sets source <edge> to take a mesh pattern from
377 void SetSourceEdge(in GEOM::GEOM_Object edge)
378 raises (SALOME::SALOME_Exception);
381 * Returns the source edge
383 GEOM::GEOM_Object GetSourceEdge();
386 * Sets source <mesh> to take a mesh pattern from
388 void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
393 SMESH::SMESH_Mesh GetSourceMesh();
396 * Sets vertex association between the source edge and the target one.
397 * This parameter is optional
399 void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex,
400 in GEOM::GEOM_Object targetVertex)
401 raises (SALOME::SALOME_Exception);
404 * Returns the vertex associated with the target vertex.
405 * Result may be nil if association not set
407 GEOM::GEOM_Object GetSourceVertex();
410 * Returns the vertex associated with the source vertex.
411 * Result may be nil if association not set
413 GEOM::GEOM_Object GetTargetVertex();
417 * interface of "ProjectionSource2D" hypothesis.
418 * This hypothesis specifies a meshed face to take a mesh pattern from
419 * and optionally association of vertices between the source face and a
420 * target one (where a hipothesis is assigned to)
422 interface StdMeshers_ProjectionSource2D : SMESH::SMESH_Hypothesis
425 * Sets a source <face> to take a mesh pattern from
427 void SetSourceFace(in GEOM::GEOM_Object face)
428 raises (SALOME::SALOME_Exception);
431 * Returns the source face
433 GEOM::GEOM_Object GetSourceFace();
436 * Sets source <mesh> to take a mesh pattern from
438 void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
443 SMESH::SMESH_Mesh GetSourceMesh();
446 * Sets vertex association between the source face and the target one.
447 * This parameter is optional.
448 * Two vertices must belong to one edge of a face
450 void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex1,
451 in GEOM::GEOM_Object sourceVertex2,
452 in GEOM::GEOM_Object targetVertex1,
453 in GEOM::GEOM_Object targetVertex2)
454 raises (SALOME::SALOME_Exception);
457 * Returns the <i>-th source vertex associated with the <i>-th target vertex.
458 * Result may be nil if association not set.
459 * Valid indices are 1 and 2
461 GEOM::GEOM_Object GetSourceVertex(in long i)
462 raises (SALOME::SALOME_Exception);
465 * Returns the <i>-th target vertex associated with the <i>-th source vertex.
466 * Result may be nil if association not set.
467 * Valid indices are 1 and 2
469 GEOM::GEOM_Object GetTargetVertex(in long i)
470 raises (SALOME::SALOME_Exception);
474 * interface of "ProjectionSource3D" hypothesis.
475 * This hypothesis specifies a meshed shell or solid to take a mesh pattern from
476 * and optionally association of vertices between the source shape and a
477 * target one (where a hipothesis is assigned to)
479 interface StdMeshers_ProjectionSource3D : SMESH::SMESH_Hypothesis
482 * Sets a source <shape> to take a mesh pattern from
484 void SetSource3DShape(in GEOM::GEOM_Object shape)
485 raises (SALOME::SALOME_Exception);
488 * Returns the source shape
490 GEOM::GEOM_Object GetSource3DShape();
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 shape and the target one.
504 * This parameter is optional.
505 * Two vertices must belong to one edge of a shape
507 void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex1,
508 in GEOM::GEOM_Object sourceVertex2,
509 in GEOM::GEOM_Object targetVertex1,
510 in GEOM::GEOM_Object targetVertex2)
511 raises (SALOME::SALOME_Exception);
514 * Returns the <i>-th source vertex associated with the <i>-th target vertex.
515 * Result may be nil if association not set.
516 * Valid indices are 1 and 2
518 GEOM::GEOM_Object GetSourceVertex(in long i)
519 raises (SALOME::SALOME_Exception);
522 * Returns the <i>-th target vertex associated with the <i>-th source vertex.
523 * Result may be nil if association not set.
524 * Valid indices are 1 and 2
526 GEOM::GEOM_Object GetTargetVertex(in long i)
527 raises (SALOME::SALOME_Exception);
531 * interface of "SegmentLengthAroundVertex" hypothesis.
532 * This hypothesis specifies length of segments adjacent to the vertex the
533 * hypothesis is assigned to
535 interface StdMeshers_SegmentLengthAroundVertex : SMESH::SMESH_Hypothesis
538 * Sets <length> parameter value
540 void SetLength(in double length)
541 raises (SALOME::SALOME_Exception);
544 * Returns <length> parameter value
550 * StdMeshers_SegmentAroundVertex_0D: interface of "SegmentAroundVertex" algorithm
552 interface StdMeshers_SegmentAroundVertex_0D : SMESH::SMESH_0D_Algo
557 * StdMeshers_Regular_1D: interface of "Wire discretisation" algorithm
559 interface StdMeshers_Regular_1D : SMESH::SMESH_1D_Algo
564 * StdMeshers_CompositeSegment_1D: interface of "Composite side discretisation" algorithm
566 interface StdMeshers_CompositeSegment_1D : SMESH::SMESH_1D_Algo
571 * StdMeshers_MEFISTO_2D: interface of "Triangle (Mefisto)" algorithm
573 interface StdMeshers_MEFISTO_2D : SMESH::SMESH_2D_Algo
578 * StdMeshers_Quadrangle_2D: interface of "Quadrangle (Mapping)" algorithm
580 interface StdMeshers_Quadrangle_2D : SMESH::SMESH_2D_Algo
585 * StdMeshers_Hexa_3D: interface of "Hexahedron (i,j,k)" algorithm
587 interface StdMeshers_Hexa_3D : SMESH::SMESH_3D_Algo
592 * StdMeshers_Prism_3D: interface of "3D extrusion" algorithm
594 interface StdMeshers_Prism_3D : SMESH::SMESH_3D_Algo
599 * StdMeshers_RadialPrism_3D: interface of "Radial Prism" algorithm
601 interface StdMeshers_RadialPrism_3D : SMESH::SMESH_3D_Algo
606 * StdMeshers_Projection_3D: interface of "Projection 3D" algorithm
608 interface StdMeshers_Projection_3D : SMESH::SMESH_3D_Algo
613 * StdMeshers_Projection_2D: interface of "Projection 2D" algorithm
615 interface StdMeshers_Projection_2D : SMESH::SMESH_2D_Algo
620 * StdMeshers_Projection_1D: interface of "Projection 1D" algorithm
622 interface StdMeshers_Projection_1D : SMESH::SMESH_1D_Algo
627 * StdMeshers_UseExisting_2D: interface of "UseExisting 2D" algorithm
628 * doing nothing to allow mesh generation by mesh edition functions in TUI mode
630 interface StdMeshers_UseExisting_2D : SMESH::SMESH_2D_Algo
635 * StdMeshers_UseExisting_1D: interface of "UseExisting 1D" algorithm
636 * doing nothing to allow mesh generation by mesh edition functions in TUI mode
638 interface StdMeshers_UseExisting_1D : SMESH::SMESH_1D_Algo