Salome HOME
IMP 23078: [CEA 1498] Sewing of meshes without having to set the nodes ids
[modules/smesh.git] / idl / SMESH_MeshEditor.idl
1 // Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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, or (at your option) any later version.
10 //
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.
15 //
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
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //  File   : SMESH_MeshEditor.idl
23
24 #ifndef _SMESH_MESHEDITOR_IDL_
25 #define _SMESH_MESHEDITOR_IDL_
26
27 #include "SMESH_Mesh.idl"
28 #include "SMESH_Gen.idl"
29
30 module SMESH
31 {
32   interface NumericalFunctor;
33
34   enum Bnd_Dimension { BND_2DFROM3D, BND_1DFROM3D, BND_1DFROM2D };
35
36
37   struct FreeBorder
38   {
39     SMESH::long_array nodeIDs; // all nodes defining a free border
40     // 1st and last node is same in a closed border
41   };
42   struct FreeBorderPart
43   {
44     short border; // border index within a sequence<FreeBorder>
45     long  node1;  // node index within the border-th FreeBorder
46     long  node2;
47     long  nodeLast;
48   };
49   typedef sequence<FreeBorder>       ListOfFreeBorders;
50   typedef sequence<FreeBorderPart>   FreeBordersGroup;
51   typedef sequence<FreeBordersGroup> ListOfFreeBorderGroups;
52
53   struct CoincidentFreeBorders
54   {
55     ListOfFreeBorders      borders;          // nodes of all free borders
56     ListOfFreeBorderGroups coincidentGroups; // groups of coincident parts of borders
57   };
58
59
60   /*!
61    * This interface makes modifications on the Mesh - removing elements and nodes etc.
62    */
63   interface SMESH_MeshEditor
64   {
65    /*!
66     * Returns a mesh subject to edition
67     */
68     SMESH_Mesh GetMesh();
69
70    /*!
71     * Return data of mesh edition preview which is computed provided
72     * that the editor was obtained through SMESH_Mesh::GetMeshEditPreviewer()
73     */
74     MeshPreviewStruct GetPreviewData() raises (SALOME::SALOME_Exception);
75
76    /*!
77     * If during last operation of MeshEditor some nodes were
78     * created, this method returns list of their IDs, if new nodes
79     * not created - returns empty list
80     */
81     long_array GetLastCreatedNodes() raises (SALOME::SALOME_Exception);
82
83    /*!
84     * If during last operation of MeshEditor some elements were
85     * created, this method returns list of their IDs, if new elements
86     * not created - returns empty list
87     */
88     long_array GetLastCreatedElems() raises (SALOME::SALOME_Exception);
89
90     /*!
91      * \brief Clears sequences of last created elements and nodes 
92      */
93     void ClearLastCreated() raises (SALOME::SALOME_Exception);
94
95     /*!
96      * \brief Returns description of an error/warning occured during the last operation
97      */
98     ComputeError GetLastError() raises (SALOME::SALOME_Exception);
99
100     /*!
101      * \brief Wrap a sequence of ids in a SMESH_IDSource
102      * \param IDsOfElements list of mesh elements identifiers
103      * \return new ID source object
104      */
105     SMESH_IDSource MakeIDSource(in long_array IDsOfElements, in ElementType type);
106
107     /*!
108      * \brief Remove mesh elements specified by their identifiers.
109      * \param IDsOfElements list of mesh elements identifiers
110      * \return \c true if elements are correctly removed or \c false otherwise
111      */
112     boolean RemoveElements(in long_array IDsOfElements) raises (SALOME::SALOME_Exception);
113
114     /*!
115      * \brief Remove mesh nodes specified by their identifiers.
116      * \param IDsOfNodes list of mesh nodes identifiers
117      * \return \c true if nodes are correctly removed or \c false otherwise
118      */
119     boolean RemoveNodes(in long_array IDsOfNodes) raises (SALOME::SALOME_Exception);
120
121     /*!
122      * \brief Remove all orphan nodes.
123      * \return number of removed nodes
124      */
125     long RemoveOrphanNodes() raises (SALOME::SALOME_Exception);
126
127     /*!
128      * \brief Add a new node.
129      * \param x X coordinate of new node
130      * \param y Y coordinate of new node
131      * \param z Z coordinate of new node
132      * \return integer identifier of new node
133      */
134     long AddNode(in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
135
136     /*!
137      *  Create a 0D element on the given node.
138      *  \param IdOfNode Node IDs for creation of element.
139      */
140     long Add0DElement(in long IDOfNode) raises (SALOME::SALOME_Exception);
141
142     /*!
143      *  Create a ball element on the given node.
144      *  \param IdOfNode Node IDs for creation of element.
145      */
146     long AddBall(in long IDOfNode, in double diameter) raises (SALOME::SALOME_Exception);
147
148     /*!
149      *  Create an edge, either linear and quadratic (this is determed
150      *  by number of given nodes, two or three).
151      *  \param IdsOfNodes List of node IDs for creation of element.
152      *  Needed order of nodes in this list corresponds to description
153      *  of MED. This description is located by the following link:
154      *   http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.
155      */
156     long AddEdge(in long_array IDsOfNodes) raises (SALOME::SALOME_Exception);
157
158     /*!
159      *  Create face, either linear and quadratic (this is determed
160      *  by number of given nodes).
161      *  \param IdsOfNodes List of node IDs for creation of element.
162      *  Needed order of nodes in this list corresponds to description
163      *  of MED. This description is located by the following link:
164      *   http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.
165      */
166     long AddFace(in long_array IDsOfNodes) raises (SALOME::SALOME_Exception);
167
168     long AddPolygonalFace(in long_array IdsOfNodes) raises (SALOME::SALOME_Exception);
169
170     /*!
171      * Create a quadratic polygonal face
172      *  \param IdsOfNodes - nodes of the polygon; corner nodes follow first
173      *  \return long - ID of a new polygon
174      */
175     long AddQuadPolygonalFace(in long_array IdsOfNodes) raises (SALOME::SALOME_Exception);
176
177     /*!
178      *  Create volume, either linear and quadratic (this is determed
179      *  by number of given nodes).
180      *  \param IdsOfNodes List of node IDs for creation of element.
181      *  Needed order of nodes in this list corresponds to description
182      *  of MED. This description is located by the following link:
183      *   http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.
184      */
185     long AddVolume(in long_array IDsOfNodes) raises (SALOME::SALOME_Exception);
186
187     /*!
188      *  Create volume of many faces, giving nodes for each face.
189      *  \param IdsOfNodes List of node IDs for volume creation face by face.
190      *  \param Quantities List of integer values, Quantities[i]
191      *         gives quantity of nodes in face number i.
192      */
193     long AddPolyhedralVolume (in long_array IdsOfNodes,
194                               in long_array Quantities) raises (SALOME::SALOME_Exception);
195     /*!
196      *  Create volume of many faces, giving IDs of existing faces.
197      *  \param IdsOfFaces List of face IDs for volume creation.
198      *  \note The created volume will refer only to nodes
199      *        of the given faces, not to the faces itself.
200      */
201     long AddPolyhedralVolumeByFaces (in long_array IdsOfFaces) raises (SALOME::SALOME_Exception);
202
203     /*!
204      * Create 0D elements on all nodes of the given object except those 
205      * nodes on which a 0D element already exists.
206      *  \param theObject object on whose nodes 0D elements will be created.
207      *  \param theGroupName optional name of a group to add 0D elements created
208      *         and/or found on nodes of \a theObject.
209      *  \return an object (a new group or a temporary SMESH_IDSource) holding
210      *          ids of new and/or found 0D elements.
211      */
212     SMESH_IDSource Create0DElementsOnAllNodes(in SMESH_IDSource theObject,
213                                               in string         theGroupName)
214       raises (SALOME::SALOME_Exception);
215
216     /*!
217      * \brief Bind a node to a vertex
218       * \param NodeID - node ID
219       * \param VertexID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0]
220      */
221     void SetNodeOnVertex(in long NodeID, in long VertexID)
222       raises (SALOME::SALOME_Exception);
223     /*!
224      * \brief Store node position on an edge
225       * \param NodeID - node ID
226       * \param EdgeID - edge ID available through GEOM_Object.GetSubShapeIndices()[0]
227       * \param paramOnEdge - parameter on edge where the node is located
228      */
229     void SetNodeOnEdge(in long NodeID, in long EdgeID, in double paramOnEdge)
230       raises (SALOME::SALOME_Exception);
231     /*!
232      * \brief Store node position on a face
233       * \param NodeID - node ID
234       * \param FaceID - face ID available through GEOM_Object.GetSubShapeIndices()[0]
235       * \param u - U parameter on face where the node is located
236       * \param v - V parameter on face where the node is located
237      */
238     void SetNodeOnFace(in long NodeID, in long FaceID, in double u, in double v)
239       raises (SALOME::SALOME_Exception);
240     /*!
241      * \brief Bind a node to a solid
242       * \param NodeID - node ID
243       * \param SolidID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0]
244      */
245     void SetNodeInVolume(in long NodeID, in long SolidID)
246       raises (SALOME::SALOME_Exception);
247     /*!
248      * \brief Bind an element to a shape
249       * \param ElementID - element ID
250       * \param ShapeID - shape ID available through GEOM_Object.GetSubShapeIndices()[0]
251      */
252     void SetMeshElementOnShape(in long ElementID, in long ShapeID)
253       raises (SALOME::SALOME_Exception);
254
255
256     boolean MoveNode(in long NodeID, in double x, in double y, in double z)
257       raises (SALOME::SALOME_Exception);
258
259     boolean InverseDiag(in long NodeID1, in long NodeID2) 
260       raises (SALOME::SALOME_Exception);
261
262     boolean DeleteDiag(in long NodeID1, in long NodeID2) 
263       raises (SALOME::SALOME_Exception);
264
265     boolean Reorient(in long_array IDsOfElements) 
266       raises (SALOME::SALOME_Exception);
267
268     boolean ReorientObject(in SMESH_IDSource theObject) 
269       raises (SALOME::SALOME_Exception);
270     /*!
271      * \brief Reorient faces contained in \a the2Dgroup.
272      * \param the2Dgroup - the mesh or its part to reorient
273      * \param theDirection - desired direction of normal of \a theFace
274      * \param theFace - ID of face whose orientation is checked.
275      *        It can be < 1 then \a thePoint is used to find a face.
276      * \param thePoint - is used to find a face if \a theFace < 1.
277      * \return number of reoriented faces.
278      */
279     long Reorient2D(in SMESH_IDSource the2Dgroup,
280                     in DirStruct      theDirection,
281                     in long           theFace,
282                     in PointStruct    thePoint) raises (SALOME::SALOME_Exception);
283     /*!
284      * \brief Reorient faces basing on orientation of adjacent volumes.
285      * \param faces - a list of objects containing face to reorient
286      * \param volumes - an object containing volumes.
287      * \param outsideNormal - to orient faces to have their normal 
288      *        pointing either \a outside or \a inside the adjacent volumes.
289      * \return number of reoriented faces.
290      */
291     long Reorient2DBy3D(in ListOfIDSources faces,
292                         in SMESH_IDSource  volumes,
293                         in boolean         outsideNormal) raises (SALOME::SALOME_Exception);
294
295     /*!
296      * \brief Fuse neighbour triangles into quadrangles.
297      * \param IDsOfElements Ids of triangles to be fused.
298      * \param theCriterion Is used to choose a neighbour to fuse with.
299      * \param theMaxAngle  Is a max angle between element normals at which fusion
300      *                     is still performed; theMaxAngle is mesured in radians.
301      * \return \c true in case of success, FALSE otherwise.
302      */
303     boolean TriToQuad (in long_array       IDsOfElements,
304                        in NumericalFunctor Criterion,
305                        in double           MaxAngle) raises (SALOME::SALOME_Exception);
306     /*!
307      * \brief Fuse neighbour triangles into quadrangles.
308      *
309      * Behaves like the above method, taking a list of elements from \a theObject
310      */
311     boolean TriToQuadObject (in SMESH_IDSource   theObject,
312                              in NumericalFunctor Criterion,
313                              in double           MaxAngle) raises (SALOME::SALOME_Exception);
314
315     /*!
316      * \brief Split quadrangles into triangles.
317      * \param IDsOfElements Ids of quadrangles to split.
318      * \param theCriterion Is used to choose a diagonal for splitting.
319      * \return TRUE in case of success, FALSE otherwise.
320      */
321     boolean QuadToTri (in long_array       IDsOfElements,
322                        in NumericalFunctor Criterion) raises (SALOME::SALOME_Exception);
323     /*!
324      * \brief Split quadrangles into triangles.
325      *
326      * Behaves like the above method, taking a list of elements from \a theObject
327      */
328     boolean QuadToTriObject (in SMESH_IDSource   theObject,
329                              in NumericalFunctor Criterion) raises (SALOME::SALOME_Exception);
330     /*!
331      * \brief Split each of quadrangles into 4 triangles.
332      * \param theQuads Container of quadrangles to split.
333      */
334     void QuadTo4Tri (in SMESH_IDSource theQuads) raises (SALOME::SALOME_Exception);
335
336     /*!
337      * \brief Split quadrangles into triangles.
338      * \param theElems  The faces to be splitted.
339      * \param the13Diag Is used to choose a diagonal for splitting.
340      * \return TRUE in case of success, FALSE otherwise.
341      */
342     boolean SplitQuad (in long_array IDsOfElements,
343                        in boolean    Diag13) raises (SALOME::SALOME_Exception);
344     /*!
345      * \brief Split quadrangles into triangles.
346      *
347      * Behaves like the above method, taking list of elements from \a theObject
348      */
349     boolean SplitQuadObject (in SMESH_IDSource theObject,
350                              in boolean        Diag13) raises (SALOME::SALOME_Exception);
351
352     /*!
353      *  Find better splitting of the given quadrangle.
354      *  \param IDOfQuad  ID of the quadrangle to be splitted.
355      *  \param Criterion A criterion to choose a diagonal for splitting.
356      *  \return 1 if 1-3 diagonal is better, 2 if 2-4
357      *          diagonal is better, 0 if error occurs.
358      */
359     long BestSplit (in long             IDOfQuad,
360                     in NumericalFunctor Criterion) raises (SALOME::SALOME_Exception);
361
362     /*!
363      * \brief Split volumic elements into tetrahedrons
364      *  \param elems - elements to split
365      *  \param methodFlags - flags passing splitting method:
366      *         1 - split the hexahedron into 5 tetrahedrons
367      *         2 - split the hexahedron into 6 tetrahedrons
368      *         3 - split the hexahedron into 24 tetrahedrons
369      */
370     void SplitVolumesIntoTetra(in SMESH_IDSource elems, in short methodFlags)
371       raises (SALOME::SALOME_Exception);
372
373     /*!
374      * \brief Split hexahedra into triangular prisms
375      *  \param elems - elements to split
376      *  \param startHexPoint - a point used to find a hexahedron for which \a facetToSplitNormal
377      *         gives a normal vector defining facets to split into triangles.
378      *  \param facetToSplitNormal - normal used to find a facet of hexahedron
379      *         to split into triangles.
380      *  \param methodFlags - flags passing splitting method:
381      *         1 - split the hexahedron into 2 prisms
382      *         2 - split the hexahedron into 4 prisms
383      *  \param allDomains - if \c False, only hexahedra adjacent to one closest
384      *         to \a facetToSplitNormal location are split, else \a facetToSplitNormal
385      *         is used to find the facet to split in all domains present in \a elems.
386      */
387     void SplitHexahedraIntoPrisms(in SMESH_IDSource     elems,
388                                   in SMESH::PointStruct startHexPoint,
389                                   in SMESH::DirStruct   facetToSplitNormal,
390                                   in short              methodFlags,
391                                   in boolean            allDomains)
392       raises (SALOME::SALOME_Exception);
393
394     /*!
395      * \brief Split bi-quadratic elements into linear ones without creation of additional nodes.
396      *   - bi-quadratic triangle will be split into 3 linear quadrangles;
397      *   - bi-quadratic quadrangle will be split into 4 linear quadrangles;
398      *   - tri-quadratic hexahedron will be split into 8 linear hexahedra;
399      *   Quadratic elements of lower dimension  adjacent to the split bi-quadratic element
400      *   will be split in order to keep the mesh conformal.
401      *  \param elems - elements to split
402      */
403     void SplitBiQuadraticIntoLinear(in ListOfIDSources elems)
404       raises (SALOME::SALOME_Exception);
405
406
407     enum Smooth_Method { LAPLACIAN_SMOOTH, CENTROIDAL_SMOOTH };
408
409     boolean Smooth(in long_array    IDsOfElements,
410                    in long_array    IDsOfFixedNodes,
411                    in long          MaxNbOfIterations,
412                    in double        MaxAspectRatio,
413                    in Smooth_Method Method) raises (SALOME::SALOME_Exception);
414
415     boolean SmoothObject(in SMESH_IDSource  theObject,
416                          in long_array      IDsOfFixedNodes,
417                          in long            MaxNbOfIterations,
418                          in double          MaxAspectRatio,
419                          in Smooth_Method   Method) raises (SALOME::SALOME_Exception);
420
421     boolean SmoothParametric(in long_array    IDsOfElements,
422                              in long_array    IDsOfFixedNodes,
423                              in long          MaxNbOfIterations,
424                              in double        MaxAspectRatio,
425                              in Smooth_Method Method) raises (SALOME::SALOME_Exception);
426
427     boolean SmoothParametricObject(in SMESH_IDSource  theObject,
428                                    in long_array      IDsOfFixedNodes,
429                                    in long            MaxNbOfIterations,
430                                    in double          MaxAspectRatio,
431                                    in Smooth_Method   Method) raises (SALOME::SALOME_Exception);
432
433     void ConvertToQuadratic(in boolean theForce3d) 
434       raises (SALOME::SALOME_Exception);
435     void ConvertToQuadraticObject(in boolean        theForce3d, 
436                                   in SMESH_IDSource theObject) 
437       raises (SALOME::SALOME_Exception);
438     
439     boolean ConvertFromQuadratic() 
440       raises (SALOME::SALOME_Exception);
441     void    ConvertFromQuadraticObject(in SMESH_IDSource theObject)
442       raises (SALOME::SALOME_Exception);
443
444     void ConvertToBiQuadratic(in boolean        theForce3d,
445                               in SMESH_IDSource theObject)
446       raises (SALOME::SALOME_Exception);
447
448     void RenumberNodes() raises (SALOME::SALOME_Exception);
449
450     void RenumberElements() raises (SALOME::SALOME_Exception);
451
452     /*!
453      * \brief Generate dim+1 elements by rotation of the object around axis
454      *  \param Nodes - nodes to revolve: a list including groups, sub-meshes or a mesh
455      *  \param Edges - edges to revolve: a list including groups, sub-meshes or a mesh
456      *  \param Faces - faces to revolve: a list including groups, sub-meshes or a mesh
457      *  \param Axis - rotation axis
458      *  \param AngleInRadians - rotation angle
459      *  \param NbOfSteps - number of elements to generate from one element
460      *  \param ToMakeGroups - if true, new elements will be included into new groups
461      *         corresponding to groups the input elements included in.
462      *  \return ListOfGroups - new groups craeted if \a ToMakeGroups is true
463      */
464     ListOfGroups RotationSweepObjects(in ListOfIDSources Nodes,
465                                       in ListOfIDSources Edges,
466                                       in ListOfIDSources Faces,
467                                       in AxisStruct      Axis,
468                                       in double          AngleInRadians,
469                                       in long            NbOfSteps,
470                                       in double          Tolerance,
471                                       in boolean         ToMakeGroups)
472       raises (SALOME::SALOME_Exception);
473
474     /*!
475      * \brief Generate dim+1 elements by extrusion of elements along vector
476      *  \param nodes - nodes to extrude: a list including groups, sub-meshes or a mesh
477      *  \param edges - edges to extrude: a list including groups, sub-meshes or a mesh
478      *  \param faces - faces to extrude: a list including groups, sub-meshes or a mesh
479      *  \param stepVector - vector giving direction and distance of an extrusion step
480      *  \param nbOfSteps - number of elements to generate from one element
481      *  \param toMakeGroups - if true, new elements will be included into new groups
482      *         corresponding to groups the input elements included in.
483      *  \return ListOfGroups - new groups craeted if \a toMakeGroups is true
484      */
485     ListOfGroups ExtrusionSweepObjects(in ListOfIDSources nodes,
486                                        in ListOfIDSources edges,
487                                        in ListOfIDSources faces,
488                                        in DirStruct       stepVector,
489                                        in long            nbOfSteps,
490                                        in boolean         toMakeGroups)
491       raises (SALOME::SALOME_Exception);
492
493     /*! Generates new elements by extrusion along the normal to a discretized surface or wire
494      */
495     ListOfGroups ExtrusionByNormal(in ListOfIDSources theObjects,
496                                    in double          stepSize,
497                                    in long            nbOfSteps,
498                                    in boolean         byAverageNormal,
499                                    in boolean         useInputElemsOnly,
500                                    in boolean         makeGroups,
501                                    in short           dim)
502       raises (SALOME::SALOME_Exception);
503
504     /*!
505      * Generate new elements by extrusion of theElements
506      * by StepVector by NbOfSteps
507      *  \param ExtrFlags set flags for performing extrusion
508      *  \param SewTolerance - uses for comparing locations of nodes if flag
509      *         EXTRUSION_FLAG_SEW is set
510      *  \param ToMakeGroups - if true, new elements will be included into new groups
511      *         corresponding to groups the input elements included in.
512      *  \return ListOfGroups - new groups craeted if \a ToMakeGroups is true
513      */
514     ListOfGroups AdvancedExtrusion(in long_array IDsOfElements,
515                                    in DirStruct  StepVector,
516                                    in long       NbOfSteps,
517                                    in long       ExtrFlags,
518                                    in double     SewTolerance,
519                                    in boolean    ToMakeGroups)
520       raises (SALOME::SALOME_Exception);
521
522     enum Extrusion_Error {
523       EXTR_OK,
524       EXTR_NO_ELEMENTS,
525       EXTR_PATH_NOT_EDGE,
526       EXTR_BAD_PATH_SHAPE,
527       EXTR_BAD_STARTING_NODE,
528       EXTR_BAD_ANGLES_NUMBER,
529       EXTR_CANT_GET_TANGENT
530     };
531
532     ListOfGroups ExtrusionAlongPathObjects(in ListOfIDSources Nodes,
533                                            in ListOfIDSources Edges,
534                                            in ListOfIDSources Faces,
535                                            in SMESH_IDSource    Path,
536                                            in GEOM::GEOM_Object PathShape,
537                                            in long              NodeStart,
538                                            in boolean           HasAngles,
539                                            in double_array      Angles,
540                                            in boolean           LinearVariation,
541                                            in boolean           HasRefPoint,
542                                            in PointStruct       RefPoint,
543                                            in boolean           MakeGroups,
544                                            out Extrusion_Error  Error)
545       raises (SALOME::SALOME_Exception);
546
547    /*!
548     * Compute rotation angles for ExtrusionAlongPath as linear variation
549     * of given angles along path steps
550     * param PathMesh mesh containing a 1D sub-mesh on the edge, along
551     *                which proceeds the extrusion
552     * param PathShape is shape(edge); as the mesh can be complex, the edge
553     *                 is used to define the sub-mesh for the path
554     */
555     double_array LinearAnglesVariation(in SMESH_Mesh        PathMesh,
556                                        in GEOM::GEOM_Object PathShape,
557                                        in double_array      Angles);
558
559     enum MirrorType { POINT, AXIS, PLANE };
560
561     void Mirror (in long_array IDsOfElements,
562                  in AxisStruct Mirror,
563                  in MirrorType Type,
564                  in boolean    Copy) 
565       raises (SALOME::SALOME_Exception);
566     ListOfGroups MirrorMakeGroups (in long_array IDsOfElements,
567                                    in AxisStruct Mirror,
568                                    in MirrorType Type) 
569       raises (SALOME::SALOME_Exception);
570     SMESH_Mesh MirrorMakeMesh (in long_array IDsOfElements,
571                                in AxisStruct Mirror,
572                                in MirrorType Type,
573                                in boolean    CopyGroups,
574                                in string     MeshName) 
575       raises (SALOME::SALOME_Exception);
576
577     void MirrorObject (in SMESH_IDSource theObject,
578                        in AxisStruct     Mirror,
579                        in MirrorType     Type,
580                        in boolean        Copy) 
581       raises (SALOME::SALOME_Exception);
582     ListOfGroups MirrorObjectMakeGroups (in SMESH_IDSource theObject,
583                                          in AxisStruct     Mirror,
584                                          in MirrorType     Type) 
585       raises (SALOME::SALOME_Exception);
586     SMESH_Mesh MirrorObjectMakeMesh (in SMESH_IDSource theObject,
587                                      in AxisStruct     Mirror,
588                                      in MirrorType     Type,
589                                      in boolean        CopyGroups,
590                                      in string         MeshName) 
591       raises (SALOME::SALOME_Exception);
592
593     void Translate (in long_array IDsOfElements,
594                     in DirStruct  Vector,
595                     in boolean    Copy) 
596       raises (SALOME::SALOME_Exception);
597     ListOfGroups TranslateMakeGroups (in long_array IDsOfElements,
598                                       in DirStruct  Vector) 
599       raises (SALOME::SALOME_Exception);
600     SMESH_Mesh TranslateMakeMesh (in long_array IDsOfElements,
601                                   in DirStruct  Vector,
602                                   in boolean    CopyGroups,
603                                   in string     MeshName) 
604       raises (SALOME::SALOME_Exception);
605
606     void TranslateObject (in SMESH_IDSource theObject,
607                           in DirStruct      Vector,
608                           in boolean        Copy) 
609       raises (SALOME::SALOME_Exception);
610     ListOfGroups TranslateObjectMakeGroups (in SMESH_IDSource theObject,
611                                             in DirStruct      Vector) 
612       raises (SALOME::SALOME_Exception);
613     SMESH_Mesh TranslateObjectMakeMesh (in SMESH_IDSource theObject,
614                                         in DirStruct      Vector,
615                                         in boolean        CopyGroups,
616                                         in string         MeshName) 
617       raises (SALOME::SALOME_Exception);
618
619     void Scale (in SMESH_IDSource theObject,
620                 in PointStruct    thePoint,
621                 in double_array   theScaleFact,
622                 in boolean        Copy) 
623       raises (SALOME::SALOME_Exception);
624     ListOfGroups ScaleMakeGroups (in SMESH_IDSource theObject,
625                                   in PointStruct    thePoint,
626                                   in double_array   theScaleFact) 
627       raises (SALOME::SALOME_Exception);
628     SMESH_Mesh ScaleMakeMesh (in SMESH_IDSource theObject,
629                               in PointStruct    thePoint,
630                               in double_array   theScaleFact,
631                               in boolean        CopyGroups,
632                               in string         MeshName) 
633       raises (SALOME::SALOME_Exception);
634
635     void Rotate (in long_array IDsOfElements,
636                  in AxisStruct Axis,
637                  in double     AngleInRadians,
638                  in boolean    Copy) 
639       raises (SALOME::SALOME_Exception);
640     ListOfGroups RotateMakeGroups (in long_array IDsOfElements,
641                                    in AxisStruct Axis,
642                                    in double     AngleInRadians) 
643       raises (SALOME::SALOME_Exception);
644     SMESH_Mesh RotateMakeMesh (in long_array IDsOfElements,
645                                in AxisStruct Axis,
646                                in double     AngleInRadians,
647                                in boolean    CopyGroups,
648                                in string     MeshName)
649       raises (SALOME::SALOME_Exception);
650
651     void RotateObject (in SMESH_IDSource theObject,
652                        in AxisStruct     Axis,
653                        in double         AngleInRadians,
654                        in boolean        Copy)
655       raises (SALOME::SALOME_Exception);
656     ListOfGroups RotateObjectMakeGroups (in SMESH_IDSource theObject,
657                                          in AxisStruct     Axis,
658                                          in double         AngleInRadians)
659       raises (SALOME::SALOME_Exception);
660     SMESH_Mesh RotateObjectMakeMesh (in SMESH_IDSource theObject,
661                                      in AxisStruct     Axis,
662                                      in double         AngleInRadians,
663                                      in boolean        CopyGroups,
664                                      in string         MeshName)
665       raises (SALOME::SALOME_Exception);
666
667     void FindCoincidentNodes (in  double              Tolerance,
668                               out array_of_long_array GroupsOfNodes,
669                               in  boolean             SeparateCornersAndMedium)
670       raises (SALOME::SALOME_Exception);
671
672     void FindCoincidentNodesOnPart (in  SMESH_IDSource      SubMeshOrGroup,
673                                     in  double              Tolerance,
674                                     out array_of_long_array GroupsOfNodes,
675                                     in  boolean             SeparateCornersAndMedium)
676       raises (SALOME::SALOME_Exception);
677
678     void FindCoincidentNodesOnPartBut (in  SMESH_IDSource      SubMeshOrGroup,
679                                        in  double              Tolerance,
680                                        out array_of_long_array GroupsOfNodes,
681                                        in  ListOfIDSources     ExceptSubMeshOrGroups,
682                                        in  boolean             SeparateCornersAndMedium)
683       raises (SALOME::SALOME_Exception);
684
685     void MergeNodes (in array_of_long_array    GroupsOfNodes,
686                      in SMESH::ListOfIDSources NodesToKeep)
687       raises (SALOME::SALOME_Exception);
688
689     /*!
690      * \brief Find elements built on the same nodes.
691      * \param MeshOrSubMeshOrGroup Mesh or SubMesh, or Group of elements for searching.
692      * \return List of groups of equal elements.
693      */
694     void FindEqualElements (in  SMESH_IDSource      MeshOrSubMeshOrGroup,
695                             out array_of_long_array GroupsOfElementsID) 
696       raises (SALOME::SALOME_Exception);
697
698     /*!
699      * \brief Merge elements in each given group.
700      * \param GroupsOfElementsID Groups of elements for merging.
701      */
702     void MergeElements(in array_of_long_array GroupsOfElementsID) 
703       raises (SALOME::SALOME_Exception);
704
705     /*!
706      * \brief Merge equal elements in the whole mesh.
707      */
708     void MergeEqualElements() 
709       raises (SALOME::SALOME_Exception);
710
711     /*!
712      * If the given ID is a valid node ID (nodeID > 0), just move this node, else
713      * move the node closest to the point to point's location and return ID of the node
714      */
715     long MoveClosestNodeToPoint(in double x, in double y, in double z, in long nodeID) 
716       raises (SALOME::SALOME_Exception);
717
718     /*!
719      * Return ID of node closest to a given point
720      */
721     long FindNodeClosestTo(in double x, in double y, in double z) 
722       raises (SALOME::SALOME_Exception);
723
724     /*!
725      * Return elements of given type where the given point is IN or ON.
726      *
727      * 'ALL' type means elements of any type excluding nodes and 0D elements
728      */
729     long_array FindElementsByPoint(in double x, in double y, in double z, in ElementType type) 
730       raises (SALOME::SALOME_Exception);
731
732     /*!
733      * Searching among the given elements, return elements of given type 
734      * where the given point is IN or ON.
735      *
736      * 'ALL' type means elements of any type excluding nodes and 0D elements
737      */
738     long_array FindAmongElementsByPoint(in SMESH_IDSource elements,
739                                         in double x, in double y, in double z, 
740                                         in ElementType type) 
741       raises (SALOME::SALOME_Exception);
742
743     /*!
744      * Return point state in a closed 2D mesh in terms of TopAbs_State enumeration.
745      * TopAbs_UNKNOWN state means that either mesh is wrong or the analysis fails.
746      */
747     short GetPointState(in double x, in double y, in double z) 
748       raises (SALOME::SALOME_Exception);
749
750     /*!
751      * Returns groups of FreeBorder's coincident within the given tolerance.
752      * If the tolerance <= 0.0 then one tenth of an average size of elements adjacent
753      * to free borders being compared is used.
754      */
755     CoincidentFreeBorders FindCoincidentFreeBorders(in double tolerance);
756
757     /*!
758      * Sew FreeBorder's of each group
759      */
760     short SewCoincidentFreeBorders (in CoincidentFreeBorders freeBorders,
761                                     in boolean               createPolygons,
762                                     in boolean               createPolyedrs)
763       raises (SALOME::SALOME_Exception);
764
765     enum Sew_Error {
766       SEW_OK,
767       SEW_BORDER1_NOT_FOUND,
768       SEW_BORDER2_NOT_FOUND,
769       SEW_BOTH_BORDERS_NOT_FOUND,
770       SEW_BAD_SIDE_NODES,
771       SEW_VOLUMES_TO_SPLIT,
772       // for SewSideElements() only:
773       SEW_DIFF_NB_OF_ELEMENTS,
774       SEW_TOPO_DIFF_SETS_OF_ELEMENTS,
775       SEW_BAD_SIDE1_NODES,
776       SEW_BAD_SIDE2_NODES
777       };
778
779     Sew_Error SewFreeBorders (in long FirstNodeID1,
780                               in long SecondNodeID1,
781                               in long LastNodeID1,
782                               in long FirstNodeID2,
783                               in long SecondNodeID2,
784                               in long LastNodeID2,
785                               in boolean CreatePolygons,
786                               in boolean CreatePolyedrs) 
787       raises (SALOME::SALOME_Exception);
788
789     Sew_Error SewConformFreeBorders (in long FirstNodeID1,
790                                      in long SecondNodeID1,
791                                      in long LastNodeID1,
792                                      in long FirstNodeID2,
793                                      in long SecondNodeID2) 
794       raises (SALOME::SALOME_Exception);
795
796     Sew_Error SewBorderToSide (in long FirstNodeIDOnFreeBorder,
797                                in long SecondNodeIDOnFreeBorder,
798                                in long LastNodeIDOnFreeBorder,
799                                in long FirstNodeIDOnSide,
800                                in long LastNodeIDOnSide,
801                                in boolean CreatePolygons,
802                                in boolean CreatePolyedrs) 
803       raises (SALOME::SALOME_Exception);
804
805     Sew_Error SewSideElements (in long_array IDsOfSide1Elements,
806                                in long_array IDsOfSide2Elements,
807                                in long       NodeID1OfSide1ToMerge,
808                                in long       NodeID1OfSide2ToMerge,
809                                in long       NodeID2OfSide1ToMerge,
810                                in long       NodeID2OfSide2ToMerge) 
811       raises (SALOME::SALOME_Exception);
812
813    /*!
814     * Set new nodes for given element.
815     * If number of nodes is not corresponded to type of
816     * element - returns false
817     */
818     boolean ChangeElemNodes(in long ide, in long_array newIDs) 
819       raises (SALOME::SALOME_Exception);
820
821     /*!
822      * \brief Duplicates given elements, i.e. creates new elements based on the 
823      *        same nodes as the given ones.
824      * \param theElements - container of elements to duplicate.
825      * \param theGroupName - a name of group to contain the generated elements.
826      *                    If a group with such a name already exists, the new elements
827      *                    are added to the existng group, else a new group is created.
828      *                    If \a theGroupName is empty, new elements are not added 
829      *                    in any group.
830      * \return a group where the new elements are added. NULL if theGroupName == "".
831      * \sa DoubleNode()
832      */
833     SMESH_Group DoubleElements( in SMESH_IDSource theElements, 
834                                 in string         theGroupName )
835       raises (SALOME::SALOME_Exception);
836
837     /*!
838      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
839      * \param theNodes - identifiers of nodes to be doubled
840      * \param theModifiedElems - identifiers of elements to be updated by the new (doubled)
841      *        nodes. If list of element identifiers is empty then nodes are doubled but
842      *        they not assigned to elements
843      * \return TRUE if operation has been completed successfully, FALSE otherwise
844      * \sa DoubleNode(), DoubleNodeGroup(), DoubleNodeGroups()
845      */
846     boolean DoubleNodes( in long_array theNodes, in long_array theModifiedElems ) 
847       raises (SALOME::SALOME_Exception);
848
849     /*!
850      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
851      * This method provided for convenience works as DoubleNodes() described above.
852      * \param theNodeId - identifier of node to be doubled.
853      * \param theModifiedElems - identifiers of elements to be updated.
854      * \return TRUE if operation has been completed successfully, FALSE otherwise
855      * \sa DoubleNodes(), DoubleNodeGroup(), DoubleNodeGroups()
856      */
857     boolean DoubleNode( in long theNodeId, in long_array theModifiedElems ) 
858       raises (SALOME::SALOME_Exception);
859
860     /*!
861      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
862      * This method provided for convenience works as DoubleNodes() described above.
863      * \param theNodes - group of nodes to be doubled.
864      * \param theModifiedElems - group of elements to be updated.
865      * \return TRUE if operation has been completed successfully, FALSE otherwise
866      * \sa DoubleNode(), DoubleNodes(), DoubleNodeGroups(), DoubleNodeGroupNew()
867      */
868     boolean DoubleNodeGroup( in SMESH_GroupBase theNodes,
869                              in SMESH_GroupBase theModifiedElems ) 
870       raises (SALOME::SALOME_Exception);
871     /*!
872      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
873      * Works as DoubleNodeGroup() described above, but returns a new group with
874      * newly created nodes.
875      * \param theNodes - group of nodes to be doubled.
876      * \param theModifiedElems - group of elements to be updated.
877      * \return a new group with newly created nodes
878      * \sa DoubleNodeGroup()
879      */
880     SMESH_Group DoubleNodeGroupNew( in SMESH_GroupBase theNodes,
881                                     in SMESH_GroupBase theModifiedElems ) 
882       raises (SALOME::SALOME_Exception);
883
884     /*!
885      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
886      * This method provided for convenience works as DoubleNodes() described above.
887      * \param theNodes - list of groups of nodes to be doubled
888      * \param theModifiedElems - list of groups of elements to be updated.
889      * \return TRUE if operation has been completed successfully, FALSE otherwise
890      * \sa DoubleNode(), DoubleNodeGroup(), DoubleNodes()
891      */
892     boolean DoubleNodeGroups( in ListOfGroups theNodes,
893                               in ListOfGroups theModifiedElems ) 
894       raises (SALOME::SALOME_Exception);
895     /*!
896      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
897      * Works as DoubleNodeGroups() described above, but returns a new group with
898      * newly created nodes.
899      * \param theNodes - list of groups of nodes to be doubled
900      * \param theModifiedElems - list of groups of elements to be updated.
901      * \return a new group with newly created nodes
902      * \sa DoubleNodeGroups()
903      */
904     SMESH_Group DoubleNodeGroupsNew( in ListOfGroups theNodes,
905                                      in ListOfGroups theModifiedElems ) 
906       raises (SALOME::SALOME_Exception);
907
908     /*!
909      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
910      * \param theElems - the list of elements (edges or faces) to be replicated
911      *        The nodes for duplication could be found from these elements
912      * \param theNodesNot - list of nodes to NOT replicate
913      * \param theAffectedElems - the list of elements (cells and edges) to which the
914      *        replicated nodes should be associated to.
915      * \return TRUE if operation has been completed successfully, FALSE otherwise
916      * \sa DoubleNodeGroup(), DoubleNodeGroups()
917      */
918     boolean DoubleNodeElem( in long_array theElems,
919                             in long_array theNodesNot,
920                             in long_array theAffectedElems ) 
921       raises (SALOME::SALOME_Exception);
922
923     /*!
924      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
925      * \param theElems - the list of elements (edges or faces) to be replicated
926      *        The nodes for duplication could be found from these elements
927      * \param theNodesNot - list of nodes to NOT replicate
928      * \param theShape - shape to detect affected elements (element which geometric center
929      *        located on or inside shape).
930      *        The replicated nodes should be associated to affected elements.
931      * \return TRUE if operation has been completed successfully, FALSE otherwise
932      * \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
933      */
934     boolean DoubleNodeElemInRegion( in long_array theElems,
935                                     in long_array theNodesNot,
936                                     in GEOM::GEOM_Object theShape ) 
937       raises (SALOME::SALOME_Exception);
938
939     /*!
940      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
941      * This method provided for convenience works as DoubleNodes() described above.
942      * \param theElems - group of of elements (edges or faces) to be replicated
943      * \param theNodesNot - group of nodes not to replicated
944      * \param theAffectedElems - group of elements to which the replicated nodes
945      *        should be associated to.
946      * \return TRUE if operation has been completed successfully, FALSE otherwise
947      * \sa DoubleNodes(), DoubleNodeGroups(), DoubleNodeElemGroupNew()
948      */
949     boolean DoubleNodeElemGroup( in SMESH_GroupBase theElems,
950                                  in SMESH_GroupBase theNodesNot,
951                                  in SMESH_GroupBase theAffectedElems ) 
952       raises (SALOME::SALOME_Exception);
953     /*!
954      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
955      * Works as DoubleNodeElemGroup() described above, but returns a new group with
956      * newly created elements.
957      * \param theElems - group of of elements (edges or faces) to be replicated
958      * \param theNodesNot - group of nodes not to replicated
959      * \param theAffectedElems - group of elements to which the replicated nodes
960      *        should be associated to.
961      * \return a new group with newly created elements
962      * \sa DoubleNodeElemGroup()
963      */
964     SMESH_Group DoubleNodeElemGroupNew( in SMESH_GroupBase theElems,
965                                         in SMESH_GroupBase theNodesNot,
966                                         in SMESH_GroupBase theAffectedElems ) 
967       raises (SALOME::SALOME_Exception);
968     /*!
969      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
970      * Works as DoubleNodeElemGroup() described above, but returns two new groups:
971      * a group of newly created elements and a group of newly created nodes
972      * \param theElems - group of of elements (edges or faces) to be replicated
973      * \param theNodesNot - group of nodes not to replicated
974      * \param theAffectedElems - group of elements to which the replicated nodes
975      *        should be associated to.
976      * \param theElemGroupNeeded - to create group of new elements or not
977      * \param theNodeGroupNeeded - to create group of new nodes or not
978      * \return two new groups of newly created elements (1st) and nodes (2nd)
979      * \sa DoubleNodeElemGroup()
980      */
981     ListOfGroups DoubleNodeElemGroup2New( in SMESH_GroupBase theElems,
982                                           in SMESH_GroupBase theNodesNot,
983                                           in SMESH_GroupBase theAffectedElems,
984                                           in boolean         theElemGroupNeeded,
985                                           in boolean         theNodeGroupNeeded) 
986       raises (SALOME::SALOME_Exception);
987
988     /*!
989      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
990      * This method provided for convenience works as DoubleNodes() described above.
991      * \param theElems - group of elements (edges or faces) to be replicated
992      * \param theNodesNot - group of nodes not to replicated
993      * \param theShape - shape to detect affected elements (element which geometric center
994      *        located on or inside shape).
995      *        The replicated nodes should be associated to affected elements.
996      * \return TRUE if operation has been completed successfully, FALSE otherwise
997      * \sa DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
998      */
999     boolean DoubleNodeElemGroupInRegion( in SMESH_GroupBase theElems,
1000                                          in SMESH_GroupBase theNodesNot,
1001                                          in GEOM::GEOM_Object theShape ) 
1002       raises (SALOME::SALOME_Exception);
1003
1004     /*!
1005      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
1006      * This method provided for convenience works as DoubleNodes() described above.
1007      * \param theElems - list of groups of elements (edges or faces) to be replicated
1008      * \param theNodesNot - list of groups of nodes not to replicated
1009      * \param theAffectedElems - group of elements to which the replicated nodes
1010      *        should be associated to.
1011      * \return TRUE if operation has been completed successfully, FALSE otherwise
1012      * \sa DoubleNodeGroup(), DoubleNodes(), DoubleNodeElemGroupsNew()
1013      */
1014     boolean DoubleNodeElemGroups( in ListOfGroups theElems,
1015                                   in ListOfGroups theNodesNot,
1016                                   in ListOfGroups theAffectedElems ) 
1017       raises (SALOME::SALOME_Exception);
1018     /*!
1019      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
1020      * Works as DoubleNodeElemGroups() described above, but returns a new group with
1021      * newly created elements.
1022      * \param theElems - list of groups of elements (edges or faces) to be replicated
1023      * \param theNodesNot - list of groups of nodes not to replicated
1024      * \param theAffectedElems - group of elements to which the replicated nodes
1025      *        should be associated to.
1026      * \return a new group with newly created elements
1027      * \sa DoubleNodeElemGroups()
1028      */
1029     SMESH_Group DoubleNodeElemGroupsNew( in ListOfGroups theElems,
1030                                          in ListOfGroups theNodesNot,
1031                                          in ListOfGroups theAffectedElems ) 
1032       raises (SALOME::SALOME_Exception);
1033     /*!
1034      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
1035      * Works as DoubleNodeElemGroups() described above, but returns two new groups:
1036      * a group of newly created elements and a group of newly created nodes.
1037      * \param theElems - list of groups of elements (edges or faces) to be replicated
1038      * \param theNodesNot - list of groups of nodes not to replicated
1039      * \param theAffectedElems - group of elements to which the replicated nodes
1040      *        should be associated to.
1041      * \param theElemGroupNeeded - to create group of new elements or not
1042      * \param theNodeGroupNeeded - to create group of new nodes or not
1043      * \return two new groups of newly created elements (1st) and nodes (2nd)
1044      * \sa DoubleNodeElemGroups()
1045      */
1046     ListOfGroups DoubleNodeElemGroups2New( in ListOfGroups theElems,
1047                                            in ListOfGroups theNodesNot,
1048                                            in ListOfGroups theAffectedElems,
1049                                            in boolean         theElemGroupNeeded,
1050                                            in boolean         theNodeGroupNeeded ) 
1051       raises (SALOME::SALOME_Exception);
1052
1053     /*!
1054      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
1055      * This method provided for convenience works as DoubleNodes() described above.
1056      * \param theElems - list of groups of elements (edges or faces) to be replicated
1057      * \param theNodesNot - list of groups of nodes not to replicated
1058      * \param theShape - shape to detect affected elements (element which geometric center
1059      *        located on or inside shape).
1060      *        The replicated nodes should be associated to affected elements.
1061      * \return TRUE if operation has been completed successfully, FALSE otherwise
1062      * \sa DoubleNodeGroupInRegion(), DoubleNodesInRegion()
1063      */
1064     boolean DoubleNodeElemGroupsInRegion( in ListOfGroups theElems,
1065                                           in ListOfGroups theNodesNot,
1066                                           in GEOM::GEOM_Object theShape )
1067       raises (SALOME::SALOME_Exception);
1068
1069     /*!
1070      * \brief Identify the elements that will be affected by node duplication (actual duplication is not performed).
1071      * This method is the first step of DoubleNodeElemGroupsInRegion.
1072      * \param theElems - list of groups of elements (edges or faces) to be replicated
1073      * \param theNodesNot - list of groups of nodes not to replicated
1074      * \param theShape - shape to detect affected elements (element which geometric center
1075      *        located on or inside shape).
1076      *        The replicated nodes should be associated to affected elements.
1077      * \return groups of affected elements
1078      * \sa DoubleNodeElemGroupsInRegion()
1079      */
1080     ListOfGroups AffectedElemGroupsInRegion( in ListOfGroups theElems,
1081                                              in ListOfGroups theNodesNot,
1082                                              in GEOM::GEOM_Object theShape ) 
1083       raises (SALOME::SALOME_Exception);
1084
1085     /*!
1086      * \brief Generates skin mesh (containing 2D cells) from 3D mesh
1087      * The created 2D mesh elements based on nodes of free faces of boundary volumes
1088      * \return TRUE if operation has been completed successfully, FALSE otherwise
1089      */
1090     boolean Make2DMeshFrom3D() raises (SALOME::SALOME_Exception);
1091
1092     /*!
1093      * \brief Creates missing boundary elements
1094      *  \param elements - elements whose boundary is to be checked
1095      *  \param dimension - defines type of boundary elements to create
1096      *    BND_1DFROM3D creates mesh edges on all borders of free facets of 3D elements.
1097      *  \param groupName - a name of group to store created boundary elements in,
1098      *                     "" means not to create the group
1099      *  \param meshName - a name of new mesh to store created boundary elements in,
1100      *                     "" means not to create the new mesh
1101      *  \param toCopyElements - if true, the checked elements will be copied into the new mesh
1102      *                          else only boundary elements will be copied into the new mesh
1103      *  \param toCopyExistingBondary - if true, not only new but also pre-existing
1104      *                                boundary elements will be copied into the new mesh
1105      *  \param group - returns the create group, if any
1106      *  \retval SMESH::SMESH_Mesh - the mesh where elements were added to
1107      */
1108     SMESH_Mesh MakeBoundaryMesh(in SMESH_IDSource elements,
1109                                 in Bnd_Dimension  dimension,
1110                                 in string         groupName,
1111                                 in string         meshName,
1112                                 in boolean        toCopyElements,
1113                                 in boolean        toCopyExistingBondary,
1114                                 out SMESH_Group   group) raises (SALOME::SALOME_Exception);
1115     /*!
1116      * \brief Creates missing boundary elements around either the whole mesh or 
1117      *    groups of 2D elements
1118      *  \param dimension - defines type of boundary elements to create
1119      *  \param groupName - a name of group to store all boundary elements in,
1120      *    "" means not to create the group
1121      *  \param meshName - a name of a new mesh, which is a copy of the initial 
1122      *    mesh + created boundary elements; "" means not to create the new mesh
1123      *  \param toCopyAll - if true, the whole initial mesh will be copied into
1124      *    the new mesh else only boundary elements will be copied into the new mesh
1125      *  \param groups - optional groups of 2D elements to make boundary around
1126      *  \param mesh - returns the mesh where elements were added to
1127      *  \param group - returns the created group, if any
1128      *  \retval long - number of added boundary elements
1129      */
1130     long MakeBoundaryElements(in Bnd_Dimension   dimension,
1131                               in string          groupName,
1132                               in string          meshName,
1133                               in boolean         toCopyAll,
1134                               in ListOfIDSources groups,
1135                               out SMESH_Mesh     mesh,
1136                               out SMESH_Group    group) raises (SALOME::SALOME_Exception);
1137
1138     /*!
1139      * \brief Double nodes on shared faces between groups of volumes and create flat elements on demand.
1140      * Flat elements are mainly used by some types of mechanic calculations.
1141      *
1142      * The list of groups must describe a partition of the mesh volumes.
1143      * The nodes of the internal faces at the boundaries of the groups are doubled.
1144      * In option, the internal faces are replaced by flat elements.
1145      * Triangles are transformed in prisms, and quadrangles in hexahedrons.
1146      * \param theDomains - list of groups of volumes
1147      * \param createJointElems - if TRUE, create the elements
1148      * \param onAllBoundaries - if TRUE, the nodes and elements are also created on
1149      *        the boundary between \a theDomains and the rest mesh
1150      * \return TRUE if operation has been completed successfully, FALSE otherwise
1151      */
1152     boolean DoubleNodesOnGroupBoundaries( in ListOfGroups theDomains,
1153                                           in boolean      createJointElems,
1154                                           in boolean      onAllBoundaries) 
1155       raises (SALOME::SALOME_Exception);
1156
1157     /*!
1158      * \brief Double nodes on some external faces and create flat elements.
1159      * Flat elements are mainly used by some types of mechanic calculations.
1160      *
1161      * Each group of the list must be constituted of faces.
1162      * Triangles are transformed in prisms, and quadrangles in hexahedrons.
1163      * \param theGroupsOfFaces - list of groups of faces
1164      * \return TRUE if operation has been completed successfully, FALSE otherwise
1165      */
1166     boolean CreateFlatElementsOnFacesGroups( in ListOfGroups theGroupsOfFaces ) 
1167       raises (SALOME::SALOME_Exception); 
1168
1169     /*!
1170      *  \brief identify all the elements around a geom shape, get the faces delimiting the hole
1171      *  Build groups of volume to remove, groups of faces to replace on the skin of the object,
1172      *  groups of faces to remove insidethe object, (idem edges).
1173      *  Build ordered list of nodes at the border of each group of faces to replace (to be used to build a geom subshape)
1174      */
1175     void CreateHoleSkin(in double radius,
1176                         in GEOM::GEOM_Object theShape,
1177                         in string groupName,
1178                         in double_array theNodesCoords,
1179                         out array_of_long_array GroupsOfNodes) 
1180       raises (SALOME::SALOME_Exception);
1181   };
1182 };
1183
1184 #endif