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_TrianglePreference: interface of "TrianglePreference" hypothesis.
311 * This hypothesis is used by StdMeshers_Quadrangle_2D algorithm.
312 * Presence of this hypothesis forces construction of triangles in the refinement
313 * area if the number of nodes on opposite edges is not the same.
315 interface StdMeshers_TrianglePreference : SMESH::SMESH_Hypothesis
320 * StdMeshers_QuadraticMesh: interface of "QuadraticMesh" hypothesis.
321 * This is an auxiliary 1D hypothesis whose presence forces construction
322 * of quadratic edges.
323 * If the 2D mesher sees that all boundary edges are quadratic ones,
324 * it generates quadratic faces, else it generates linear faces using
325 * medium nodes as if they were vertex ones.
326 * The 3D mesher generates quadratic volumes only if all boundary faces
327 * are quadratic ones, else it fails.
329 interface StdMeshers_QuadraticMesh : SMESH::SMESH_Hypothesis
335 * StdMeshers_NumberOfLayers: interface of "Nb. Layers" hypothesis.
336 * This hypothesis is used by "Radial prism" algorithm.
337 * It specifies number of segments between the internal
338 * and the external surfaces.
340 interface StdMeshers_NumberOfLayers : SMESH::SMESH_Hypothesis
343 * Sets <number of segments> parameter value
345 void SetNumberOfLayers(in long numberOfLayers)
346 raises (SALOME::SALOME_Exception);
349 * Returns <number of layers> parameter value
351 long GetNumberOfLayers();
356 * StdMeshers_LayerDistribution: interface of "Distribution of Layers" hypothesis.
357 * This hypothesis is used by "Radial prism" algorithm.
358 * It specifies 1D hypothesis defining distribution of segments between the internal
359 * and the external surfaces.
361 interface StdMeshers_LayerDistribution : SMESH::SMESH_Hypothesis
364 * Sets 1D hypothesis specifying distribution of layers
366 void SetLayerDistribution(in SMESH::SMESH_Hypothesis distributionHyp)
367 raises (SALOME::SALOME_Exception);
370 * Returns 1D hypothesis specifying distribution of layers
372 SMESH::SMESH_Hypothesis GetLayerDistribution();
377 * interface of "ProjectionSource1D" hypothesis.
378 * This hypothesis specifies a meshed edge to take a mesh pattern from
379 * and optionally association of vertices between the source edge and a
380 * target one (where a hipothesis is assigned to)
382 interface StdMeshers_ProjectionSource1D : SMESH::SMESH_Hypothesis
385 * Sets source <edge> to take a mesh pattern from
387 void SetSourceEdge(in GEOM::GEOM_Object edge)
388 raises (SALOME::SALOME_Exception);
391 * Returns the source edge
393 GEOM::GEOM_Object GetSourceEdge();
396 * Sets source <mesh> to take a mesh pattern from
398 void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
403 SMESH::SMESH_Mesh GetSourceMesh();
406 * Sets vertex association between the source edge and the target one.
407 * This parameter is optional
409 void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex,
410 in GEOM::GEOM_Object targetVertex)
411 raises (SALOME::SALOME_Exception);
414 * Returns the vertex associated with the target vertex.
415 * Result may be nil if association not set
417 GEOM::GEOM_Object GetSourceVertex();
420 * Returns the vertex associated with the source vertex.
421 * Result may be nil if association not set
423 GEOM::GEOM_Object GetTargetVertex();
427 * interface of "ProjectionSource2D" hypothesis.
428 * This hypothesis specifies a meshed face to take a mesh pattern from
429 * and optionally association of vertices between the source face and a
430 * target one (where a hipothesis is assigned to)
432 interface StdMeshers_ProjectionSource2D : SMESH::SMESH_Hypothesis
435 * Sets a source <face> to take a mesh pattern from
437 void SetSourceFace(in GEOM::GEOM_Object face)
438 raises (SALOME::SALOME_Exception);
441 * Returns the source face
443 GEOM::GEOM_Object GetSourceFace();
446 * Sets source <mesh> to take a mesh pattern from
448 void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
453 SMESH::SMESH_Mesh GetSourceMesh();
456 * Sets vertex association between the source face and the target one.
457 * This parameter is optional.
458 * Two vertices must belong to one edge of a face
460 void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex1,
461 in GEOM::GEOM_Object sourceVertex2,
462 in GEOM::GEOM_Object targetVertex1,
463 in GEOM::GEOM_Object targetVertex2)
464 raises (SALOME::SALOME_Exception);
467 * Returns the <i>-th source vertex associated with the <i>-th target vertex.
468 * Result may be nil if association not set.
469 * Valid indices are 1 and 2
471 GEOM::GEOM_Object GetSourceVertex(in long i)
472 raises (SALOME::SALOME_Exception);
475 * Returns the <i>-th target vertex associated with the <i>-th source vertex.
476 * Result may be nil if association not set.
477 * Valid indices are 1 and 2
479 GEOM::GEOM_Object GetTargetVertex(in long i)
480 raises (SALOME::SALOME_Exception);
484 * interface of "ProjectionSource3D" hypothesis.
485 * This hypothesis specifies a meshed shell or solid to take a mesh pattern from
486 * and optionally association of vertices between the source shape and a
487 * target one (where a hipothesis is assigned to)
489 interface StdMeshers_ProjectionSource3D : SMESH::SMESH_Hypothesis
492 * Sets a source <shape> to take a mesh pattern from
494 void SetSource3DShape(in GEOM::GEOM_Object shape)
495 raises (SALOME::SALOME_Exception);
498 * Returns the source shape
500 GEOM::GEOM_Object GetSource3DShape();
503 * Sets source <mesh> to take a mesh pattern from
505 void SetSourceMesh(in SMESH::SMESH_Mesh mesh);
510 SMESH::SMESH_Mesh GetSourceMesh();
513 * Sets vertex association between the source shape and the target one.
514 * This parameter is optional.
515 * Two vertices must belong to one edge of a shape
517 void SetVertexAssociation(in GEOM::GEOM_Object sourceVertex1,
518 in GEOM::GEOM_Object sourceVertex2,
519 in GEOM::GEOM_Object targetVertex1,
520 in GEOM::GEOM_Object targetVertex2)
521 raises (SALOME::SALOME_Exception);
524 * Returns the <i>-th source vertex associated with the <i>-th target vertex.
525 * Result may be nil if association not set.
526 * Valid indices are 1 and 2
528 GEOM::GEOM_Object GetSourceVertex(in long i)
529 raises (SALOME::SALOME_Exception);
532 * Returns the <i>-th target vertex associated with the <i>-th source vertex.
533 * Result may be nil if association not set.
534 * Valid indices are 1 and 2
536 GEOM::GEOM_Object GetTargetVertex(in long i)
537 raises (SALOME::SALOME_Exception);
541 * interface of "SegmentLengthAroundVertex" hypothesis.
542 * This hypothesis specifies length of segments adjacent to the vertex the
543 * hypothesis is assigned to
545 interface StdMeshers_SegmentLengthAroundVertex : SMESH::SMESH_Hypothesis
548 * Sets <length> parameter value
550 void SetLength(in double length)
551 raises (SALOME::SALOME_Exception);
554 * Returns <length> parameter value
560 * StdMeshers_SegmentAroundVertex_0D: interface of "SegmentAroundVertex" algorithm
562 interface StdMeshers_SegmentAroundVertex_0D : SMESH::SMESH_0D_Algo
567 * StdMeshers_Regular_1D: interface of "Wire discretisation" algorithm
569 interface StdMeshers_Regular_1D : SMESH::SMESH_1D_Algo
574 * StdMeshers_CompositeSegment_1D: interface of "Composite side discretisation" algorithm
576 interface StdMeshers_CompositeSegment_1D : SMESH::SMESH_1D_Algo
581 * StdMeshers_MEFISTO_2D: interface of "Triangle (Mefisto)" algorithm
583 interface StdMeshers_MEFISTO_2D : SMESH::SMESH_2D_Algo
588 * StdMeshers_Quadrangle_2D: interface of "Quadrangle (Mapping)" algorithm
590 interface StdMeshers_Quadrangle_2D : SMESH::SMESH_2D_Algo
595 * StdMeshers_Hexa_3D: interface of "Hexahedron (i,j,k)" algorithm
597 interface StdMeshers_Hexa_3D : SMESH::SMESH_3D_Algo
602 * StdMeshers_Prism_3D: interface of "3D extrusion" algorithm
604 interface StdMeshers_Prism_3D : SMESH::SMESH_3D_Algo
609 * StdMeshers_RadialPrism_3D: interface of "Radial Prism" algorithm
611 interface StdMeshers_RadialPrism_3D : SMESH::SMESH_3D_Algo
616 * StdMeshers_Projection_3D: interface of "Projection 3D" algorithm
618 interface StdMeshers_Projection_3D : SMESH::SMESH_3D_Algo
623 * StdMeshers_Projection_2D: interface of "Projection 2D" algorithm
625 interface StdMeshers_Projection_2D : SMESH::SMESH_2D_Algo
630 * StdMeshers_Projection_1D: interface of "Projection 1D" algorithm
632 interface StdMeshers_Projection_1D : SMESH::SMESH_1D_Algo
637 * StdMeshers_UseExisting_2D: interface of "UseExisting 2D" algorithm
638 * doing nothing to allow mesh generation by mesh edition functions in TUI mode
640 interface StdMeshers_UseExisting_2D : SMESH::SMESH_2D_Algo
645 * StdMeshers_UseExisting_1D: interface of "UseExisting 1D" algorithm
646 * doing nothing to allow mesh generation by mesh edition functions in TUI mode
648 interface StdMeshers_UseExisting_1D : SMESH::SMESH_1D_Algo