Salome HOME
120e41e49fa05a9cccdbd790fde417c56a12072f
[modules/smesh.git] / idl / SMESH_MeshEditor.idl
1 // Copyright (C) 2007-2016  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 double_array    scaleFactors,
491                                        in boolean         linearVariation,
492                                        in double_array    basePoint,
493                                        in boolean         toMakeGroups)
494       raises (SALOME::SALOME_Exception);
495
496     /*! Generates new elements by extrusion along the normal to a discretized surface or wire
497      */
498     ListOfGroups ExtrusionByNormal(in ListOfIDSources theObjects,
499                                    in double          stepSize,
500                                    in long            nbOfSteps,
501                                    in boolean         byAverageNormal,
502                                    in boolean         useInputElemsOnly,
503                                    in boolean         makeGroups,
504                                    in short           dim)
505       raises (SALOME::SALOME_Exception);
506
507     /*!
508      * Generate new elements by extrusion of theElements
509      * by StepVector by NbOfSteps
510      *  \param ExtrFlags set flags for performing extrusion
511      *  \param SewTolerance - uses for comparing locations of nodes if flag
512      *         EXTRUSION_FLAG_SEW is set
513      *  \param ToMakeGroups - if true, new elements will be included into new groups
514      *         corresponding to groups the input elements included in.
515      *  \return ListOfGroups - new groups craeted if \a ToMakeGroups is true
516      */
517     ListOfGroups AdvancedExtrusion(in long_array IDsOfElements,
518                                    in DirStruct  StepVector,
519                                    in long       NbOfSteps,
520                                    in long       ExtrFlags,
521                                    in double     SewTolerance,
522                                    in boolean    ToMakeGroups)
523       raises (SALOME::SALOME_Exception);
524
525     enum Extrusion_Error {
526       EXTR_OK,
527       EXTR_NO_ELEMENTS,
528       EXTR_PATH_NOT_EDGE,
529       EXTR_BAD_PATH_SHAPE,
530       EXTR_BAD_STARTING_NODE,
531       EXTR_BAD_ANGLES_NUMBER,
532       EXTR_CANT_GET_TANGENT
533     };
534
535     ListOfGroups ExtrusionAlongPathObjects(in ListOfIDSources Nodes,
536                                            in ListOfIDSources Edges,
537                                            in ListOfIDSources Faces,
538                                            in SMESH_IDSource    Path,
539                                            in GEOM::GEOM_Object PathShape,
540                                            in long              NodeStart,
541                                            in boolean           HasAngles,
542                                            in double_array      Angles,
543                                            in boolean           LinearVariation,
544                                            in boolean           HasRefPoint,
545                                            in PointStruct       RefPoint,
546                                            in boolean           MakeGroups,
547                                            out Extrusion_Error  Error)
548       raises (SALOME::SALOME_Exception);
549
550    /*!
551     * Compute rotation angles for ExtrusionAlongPath as linear variation
552     * of given angles along path steps
553     * param PathMesh mesh containing a 1D sub-mesh on the edge, along
554     *                which proceeds the extrusion
555     * param PathShape is shape(edge); as the mesh can be complex, the edge
556     *                 is used to define the sub-mesh for the path
557     */
558     double_array LinearAnglesVariation(in SMESH_Mesh        PathMesh,
559                                        in GEOM::GEOM_Object PathShape,
560                                        in double_array      Angles);
561
562     enum MirrorType { POINT, AXIS, PLANE };
563
564     void Mirror (in long_array IDsOfElements,
565                  in AxisStruct Mirror,
566                  in MirrorType Type,
567                  in boolean    Copy) 
568       raises (SALOME::SALOME_Exception);
569     ListOfGroups MirrorMakeGroups (in long_array IDsOfElements,
570                                    in AxisStruct Mirror,
571                                    in MirrorType Type) 
572       raises (SALOME::SALOME_Exception);
573     SMESH_Mesh MirrorMakeMesh (in long_array IDsOfElements,
574                                in AxisStruct Mirror,
575                                in MirrorType Type,
576                                in boolean    CopyGroups,
577                                in string     MeshName) 
578       raises (SALOME::SALOME_Exception);
579
580     void MirrorObject (in SMESH_IDSource theObject,
581                        in AxisStruct     Mirror,
582                        in MirrorType     Type,
583                        in boolean        Copy) 
584       raises (SALOME::SALOME_Exception);
585     ListOfGroups MirrorObjectMakeGroups (in SMESH_IDSource theObject,
586                                          in AxisStruct     Mirror,
587                                          in MirrorType     Type) 
588       raises (SALOME::SALOME_Exception);
589     SMESH_Mesh MirrorObjectMakeMesh (in SMESH_IDSource theObject,
590                                      in AxisStruct     Mirror,
591                                      in MirrorType     Type,
592                                      in boolean        CopyGroups,
593                                      in string         MeshName) 
594       raises (SALOME::SALOME_Exception);
595
596     void Translate (in long_array IDsOfElements,
597                     in DirStruct  Vector,
598                     in boolean    Copy) 
599       raises (SALOME::SALOME_Exception);
600     ListOfGroups TranslateMakeGroups (in long_array IDsOfElements,
601                                       in DirStruct  Vector) 
602       raises (SALOME::SALOME_Exception);
603     SMESH_Mesh TranslateMakeMesh (in long_array IDsOfElements,
604                                   in DirStruct  Vector,
605                                   in boolean    CopyGroups,
606                                   in string     MeshName) 
607       raises (SALOME::SALOME_Exception);
608
609     void TranslateObject (in SMESH_IDSource theObject,
610                           in DirStruct      Vector,
611                           in boolean        Copy) 
612       raises (SALOME::SALOME_Exception);
613     ListOfGroups TranslateObjectMakeGroups (in SMESH_IDSource theObject,
614                                             in DirStruct      Vector) 
615       raises (SALOME::SALOME_Exception);
616     SMESH_Mesh TranslateObjectMakeMesh (in SMESH_IDSource theObject,
617                                         in DirStruct      Vector,
618                                         in boolean        CopyGroups,
619                                         in string         MeshName) 
620       raises (SALOME::SALOME_Exception);
621
622     void Scale (in SMESH_IDSource theObject,
623                 in PointStruct    thePoint,
624                 in double_array   theScaleFact,
625                 in boolean        Copy) 
626       raises (SALOME::SALOME_Exception);
627     ListOfGroups ScaleMakeGroups (in SMESH_IDSource theObject,
628                                   in PointStruct    thePoint,
629                                   in double_array   theScaleFact) 
630       raises (SALOME::SALOME_Exception);
631     SMESH_Mesh ScaleMakeMesh (in SMESH_IDSource theObject,
632                               in PointStruct    thePoint,
633                               in double_array   theScaleFact,
634                               in boolean        CopyGroups,
635                               in string         MeshName) 
636       raises (SALOME::SALOME_Exception);
637
638     void Rotate (in long_array IDsOfElements,
639                  in AxisStruct Axis,
640                  in double     AngleInRadians,
641                  in boolean    Copy) 
642       raises (SALOME::SALOME_Exception);
643     ListOfGroups RotateMakeGroups (in long_array IDsOfElements,
644                                    in AxisStruct Axis,
645                                    in double     AngleInRadians) 
646       raises (SALOME::SALOME_Exception);
647     SMESH_Mesh RotateMakeMesh (in long_array IDsOfElements,
648                                in AxisStruct Axis,
649                                in double     AngleInRadians,
650                                in boolean    CopyGroups,
651                                in string     MeshName)
652       raises (SALOME::SALOME_Exception);
653
654     void RotateObject (in SMESH_IDSource theObject,
655                        in AxisStruct     Axis,
656                        in double         AngleInRadians,
657                        in boolean        Copy)
658       raises (SALOME::SALOME_Exception);
659     ListOfGroups RotateObjectMakeGroups (in SMESH_IDSource theObject,
660                                          in AxisStruct     Axis,
661                                          in double         AngleInRadians)
662       raises (SALOME::SALOME_Exception);
663     SMESH_Mesh RotateObjectMakeMesh (in SMESH_IDSource theObject,
664                                      in AxisStruct     Axis,
665                                      in double         AngleInRadians,
666                                      in boolean        CopyGroups,
667                                      in string         MeshName)
668       raises (SALOME::SALOME_Exception);
669
670     void FindCoincidentNodes (in  double              Tolerance,
671                               out array_of_long_array GroupsOfNodes,
672                               in  boolean             SeparateCornersAndMedium)
673       raises (SALOME::SALOME_Exception);
674
675     void FindCoincidentNodesOnPart (in  SMESH_IDSource      SubMeshOrGroup,
676                                     in  double              Tolerance,
677                                     out array_of_long_array GroupsOfNodes,
678                                     in  boolean             SeparateCornersAndMedium)
679       raises (SALOME::SALOME_Exception);
680
681     void FindCoincidentNodesOnPartBut (in  SMESH_IDSource      SubMeshOrGroup,
682                                        in  double              Tolerance,
683                                        out array_of_long_array GroupsOfNodes,
684                                        in  ListOfIDSources     ExceptSubMeshOrGroups,
685                                        in  boolean             SeparateCornersAndMedium)
686       raises (SALOME::SALOME_Exception);
687
688     void MergeNodes (in array_of_long_array    GroupsOfNodes,
689                      in SMESH::ListOfIDSources NodesToKeep)
690       raises (SALOME::SALOME_Exception);
691
692     /*!
693      * \brief Find elements built on the same nodes.
694      * \param MeshOrSubMeshOrGroup Mesh or SubMesh, or Group of elements for searching.
695      * \return List of groups of equal elements.
696      */
697     void FindEqualElements (in  SMESH_IDSource      MeshOrSubMeshOrGroup,
698                             out array_of_long_array GroupsOfElementsID) 
699       raises (SALOME::SALOME_Exception);
700
701     /*!
702      * \brief Merge elements in each given group.
703      * \param GroupsOfElementsID Groups of elements for merging.
704      */
705     void MergeElements(in array_of_long_array GroupsOfElementsID) 
706       raises (SALOME::SALOME_Exception);
707
708     /*!
709      * \brief Merge equal elements in the whole mesh.
710      */
711     void MergeEqualElements() 
712       raises (SALOME::SALOME_Exception);
713
714     /*!
715      * If the given ID is a valid node ID (nodeID > 0), just move this node, else
716      * move the node closest to the point to point's location and return ID of the node
717      */
718     long MoveClosestNodeToPoint(in double x, in double y, in double z, in long nodeID) 
719       raises (SALOME::SALOME_Exception);
720
721     /*!
722      * Return ID of node closest to a given point
723      */
724     long FindNodeClosestTo(in double x, in double y, in double z) 
725       raises (SALOME::SALOME_Exception);
726
727     /*!
728      * Return elements of given type where the given point is IN or ON.
729      *
730      * 'ALL' type means elements of any type excluding nodes and 0D elements
731      */
732     long_array FindElementsByPoint(in double x, in double y, in double z, in ElementType type) 
733       raises (SALOME::SALOME_Exception);
734
735     /*!
736      * Searching among the given elements, return elements of given type 
737      * where the given point is IN or ON.
738      *
739      * 'ALL' type means elements of any type excluding nodes and 0D elements
740      */
741     long_array FindAmongElementsByPoint(in SMESH_IDSource elements,
742                                         in double x, in double y, in double z, 
743                                         in ElementType type) 
744       raises (SALOME::SALOME_Exception);
745
746     /*!
747      * Return point state in a closed 2D mesh in terms of TopAbs_State enumeration.
748      * TopAbs_UNKNOWN state means that either mesh is wrong or the analysis fails.
749      */
750     short GetPointState(in double x, in double y, in double z) 
751       raises (SALOME::SALOME_Exception);
752
753     /*!
754      * Returns groups of FreeBorder's coincident within the given tolerance.
755      * If the tolerance <= 0.0 then one tenth of an average size of elements adjacent
756      * to free borders being compared is used.
757      */
758     CoincidentFreeBorders FindCoincidentFreeBorders(in double tolerance);
759
760     /*!
761      * Sew FreeBorder's of each group
762      */
763     short SewCoincidentFreeBorders (in CoincidentFreeBorders freeBorders,
764                                     in boolean               createPolygons,
765                                     in boolean               createPolyedrs)
766       raises (SALOME::SALOME_Exception);
767
768     enum Sew_Error {
769       SEW_OK,
770       SEW_BORDER1_NOT_FOUND,
771       SEW_BORDER2_NOT_FOUND,
772       SEW_BOTH_BORDERS_NOT_FOUND,
773       SEW_BAD_SIDE_NODES,
774       SEW_VOLUMES_TO_SPLIT,
775       // for SewSideElements() only:
776       SEW_DIFF_NB_OF_ELEMENTS,
777       SEW_TOPO_DIFF_SETS_OF_ELEMENTS,
778       SEW_BAD_SIDE1_NODES,
779       SEW_BAD_SIDE2_NODES,
780       SEW_INTERNAL_ERROR
781     };
782
783     Sew_Error SewFreeBorders (in long FirstNodeID1,
784                               in long SecondNodeID1,
785                               in long LastNodeID1,
786                               in long FirstNodeID2,
787                               in long SecondNodeID2,
788                               in long LastNodeID2,
789                               in boolean CreatePolygons,
790                               in boolean CreatePolyedrs) 
791       raises (SALOME::SALOME_Exception);
792
793     Sew_Error SewConformFreeBorders (in long FirstNodeID1,
794                                      in long SecondNodeID1,
795                                      in long LastNodeID1,
796                                      in long FirstNodeID2,
797                                      in long SecondNodeID2) 
798       raises (SALOME::SALOME_Exception);
799
800     Sew_Error SewBorderToSide (in long FirstNodeIDOnFreeBorder,
801                                in long SecondNodeIDOnFreeBorder,
802                                in long LastNodeIDOnFreeBorder,
803                                in long FirstNodeIDOnSide,
804                                in long LastNodeIDOnSide,
805                                in boolean CreatePolygons,
806                                in boolean CreatePolyedrs) 
807       raises (SALOME::SALOME_Exception);
808
809     Sew_Error SewSideElements (in long_array IDsOfSide1Elements,
810                                in long_array IDsOfSide2Elements,
811                                in long       NodeID1OfSide1ToMerge,
812                                in long       NodeID1OfSide2ToMerge,
813                                in long       NodeID2OfSide1ToMerge,
814                                in long       NodeID2OfSide2ToMerge) 
815       raises (SALOME::SALOME_Exception);
816
817    /*!
818     * Set new nodes for given element.
819     * If number of nodes is not corresponded to type of
820     * element - returns false
821     */
822     boolean ChangeElemNodes(in long ide, in long_array newIDs) 
823       raises (SALOME::SALOME_Exception);
824
825     /*!
826      * \brief Duplicates given elements, i.e. creates new elements based on the 
827      *        same nodes as the given ones.
828      * \param theElements - container of elements to duplicate.
829      * \param theGroupName - a name of group to contain the generated elements.
830      *                    If a group with such a name already exists, the new elements
831      *                    are added to the existng group, else a new group is created.
832      *                    If \a theGroupName is empty, new elements are not added 
833      *                    in any group.
834      * \return a group where the new elements are added. NULL if theGroupName == "".
835      * \sa DoubleNode()
836      */
837     SMESH_Group DoubleElements( in SMESH_IDSource theElements, 
838                                 in string         theGroupName )
839       raises (SALOME::SALOME_Exception);
840
841     /*!
842      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
843      * \param theNodes - identifiers of nodes to be doubled
844      * \param theModifiedElems - identifiers of elements to be updated by the new (doubled)
845      *        nodes. If list of element identifiers is empty then nodes are doubled but
846      *        they not assigned to elements
847      * \return TRUE if operation has been completed successfully, FALSE otherwise
848      * \sa DoubleNode(), DoubleNodeGroup(), DoubleNodeGroups()
849      */
850     boolean DoubleNodes( in long_array theNodes, in long_array theModifiedElems ) 
851       raises (SALOME::SALOME_Exception);
852
853     /*!
854      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
855      * This method provided for convenience works as DoubleNodes() described above.
856      * \param theNodeId - identifier of node to be doubled.
857      * \param theModifiedElems - identifiers of elements to be updated.
858      * \return TRUE if operation has been completed successfully, FALSE otherwise
859      * \sa DoubleNodes(), DoubleNodeGroup(), DoubleNodeGroups()
860      */
861     boolean DoubleNode( in long theNodeId, in long_array theModifiedElems ) 
862       raises (SALOME::SALOME_Exception);
863
864     /*!
865      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
866      * This method provided for convenience works as DoubleNodes() described above.
867      * \param theNodes - group of nodes to be doubled.
868      * \param theModifiedElems - group of elements to be updated.
869      * \return TRUE if operation has been completed successfully, FALSE otherwise
870      * \sa DoubleNode(), DoubleNodes(), DoubleNodeGroups(), DoubleNodeGroupNew()
871      */
872     boolean DoubleNodeGroup( in SMESH_GroupBase theNodes,
873                              in SMESH_GroupBase theModifiedElems ) 
874       raises (SALOME::SALOME_Exception);
875     /*!
876      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
877      * Works as DoubleNodeGroup() described above, but returns a new group with
878      * newly created nodes.
879      * \param theNodes - group of nodes to be doubled.
880      * \param theModifiedElems - group of elements to be updated.
881      * \return a new group with newly created nodes
882      * \sa DoubleNodeGroup()
883      */
884     SMESH_Group DoubleNodeGroupNew( in SMESH_GroupBase theNodes,
885                                     in SMESH_GroupBase theModifiedElems ) 
886       raises (SALOME::SALOME_Exception);
887
888     /*!
889      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
890      * This method provided for convenience works as DoubleNodes() described above.
891      * \param theNodes - list of groups of nodes to be doubled
892      * \param theModifiedElems - list of groups of elements to be updated.
893      * \return TRUE if operation has been completed successfully, FALSE otherwise
894      * \sa DoubleNode(), DoubleNodeGroup(), DoubleNodes()
895      */
896     boolean DoubleNodeGroups( in ListOfGroups theNodes,
897                               in ListOfGroups theModifiedElems ) 
898       raises (SALOME::SALOME_Exception);
899     /*!
900      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
901      * Works as DoubleNodeGroups() described above, but returns a new group with
902      * newly created nodes.
903      * \param theNodes - list of groups of nodes to be doubled
904      * \param theModifiedElems - list of groups of elements to be updated.
905      * \return a new group with newly created nodes
906      * \sa DoubleNodeGroups()
907      */
908     SMESH_Group DoubleNodeGroupsNew( in ListOfGroups theNodes,
909                                      in ListOfGroups theModifiedElems ) 
910       raises (SALOME::SALOME_Exception);
911
912     /*!
913      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
914      * \param theElems - the list of elements (edges or faces) to be replicated
915      *        The nodes for duplication could be found from these elements
916      * \param theNodesNot - list of nodes to NOT replicate
917      * \param theAffectedElems - the list of elements (cells and edges) to which the
918      *        replicated nodes should be associated to.
919      * \return TRUE if operation has been completed successfully, FALSE otherwise
920      * \sa DoubleNodeGroup(), DoubleNodeGroups()
921      */
922     boolean DoubleNodeElem( in long_array theElems,
923                             in long_array theNodesNot,
924                             in long_array theAffectedElems ) 
925       raises (SALOME::SALOME_Exception);
926
927     /*!
928      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
929      * \param theElems - the list of elements (edges or faces) to be replicated
930      *        The nodes for duplication could be found from these elements
931      * \param theNodesNot - list of nodes to NOT replicate
932      * \param theShape - shape to detect affected elements (element which geometric center
933      *        located on or inside shape).
934      *        The replicated nodes should be associated to affected elements.
935      * \return TRUE if operation has been completed successfully, FALSE otherwise
936      * \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
937      */
938     boolean DoubleNodeElemInRegion( in long_array theElems,
939                                     in long_array theNodesNot,
940                                     in GEOM::GEOM_Object theShape ) 
941       raises (SALOME::SALOME_Exception);
942
943     /*!
944      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
945      * This method provided for convenience works as DoubleNodes() described above.
946      * \param theElems - group of of elements (edges or faces) to be replicated
947      * \param theNodesNot - group of nodes not to replicated
948      * \param theAffectedElems - group of elements to which the replicated nodes
949      *        should be associated to.
950      * \return TRUE if operation has been completed successfully, FALSE otherwise
951      * \sa DoubleNodes(), DoubleNodeGroups(), DoubleNodeElemGroupNew()
952      */
953     boolean DoubleNodeElemGroup( in SMESH_GroupBase theElems,
954                                  in SMESH_GroupBase theNodesNot,
955                                  in SMESH_GroupBase theAffectedElems ) 
956       raises (SALOME::SALOME_Exception);
957     /*!
958      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
959      * Works as DoubleNodeElemGroup() described above, but returns a new group with
960      * newly created elements.
961      * \param theElems - group of of elements (edges or faces) to be replicated
962      * \param theNodesNot - group of nodes not to replicated
963      * \param theAffectedElems - group of elements to which the replicated nodes
964      *        should be associated to.
965      * \return a new group with newly created elements
966      * \sa DoubleNodeElemGroup()
967      */
968     SMESH_Group DoubleNodeElemGroupNew( in SMESH_GroupBase theElems,
969                                         in SMESH_GroupBase theNodesNot,
970                                         in SMESH_GroupBase theAffectedElems ) 
971       raises (SALOME::SALOME_Exception);
972     /*!
973      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
974      * Works as DoubleNodeElemGroup() described above, but returns two new groups:
975      * a group of newly created elements and a group of newly created nodes
976      * \param theElems - group of of elements (edges or faces) to be replicated
977      * \param theNodesNot - group of nodes not to replicated
978      * \param theAffectedElems - group of elements to which the replicated nodes
979      *        should be associated to.
980      * \param theElemGroupNeeded - to create group of new elements or not
981      * \param theNodeGroupNeeded - to create group of new nodes or not
982      * \return two new groups of newly created elements (1st) and nodes (2nd)
983      * \sa DoubleNodeElemGroup()
984      */
985     ListOfGroups DoubleNodeElemGroup2New( in SMESH_GroupBase theElems,
986                                           in SMESH_GroupBase theNodesNot,
987                                           in SMESH_GroupBase theAffectedElems,
988                                           in boolean         theElemGroupNeeded,
989                                           in boolean         theNodeGroupNeeded) 
990       raises (SALOME::SALOME_Exception);
991
992     /*!
993      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
994      * This method provided for convenience works as DoubleNodes() described above.
995      * \param theElems - group of elements (edges or faces) to be replicated
996      * \param theNodesNot - group of nodes not to replicated
997      * \param theShape - shape to detect affected elements (element which geometric center
998      *        located on or inside shape).
999      *        The replicated nodes should be associated to affected elements.
1000      * \return TRUE if operation has been completed successfully, FALSE otherwise
1001      * \sa DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
1002      */
1003     boolean DoubleNodeElemGroupInRegion( in SMESH_GroupBase theElems,
1004                                          in SMESH_GroupBase theNodesNot,
1005                                          in GEOM::GEOM_Object theShape ) 
1006       raises (SALOME::SALOME_Exception);
1007
1008     /*!
1009      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
1010      * This method provided for convenience works as DoubleNodes() described above.
1011      * \param theElems - list of groups of elements (edges or faces) to be replicated
1012      * \param theNodesNot - list of groups of nodes not to replicated
1013      * \param theAffectedElems - group of elements to which the replicated nodes
1014      *        should be associated to.
1015      * \return TRUE if operation has been completed successfully, FALSE otherwise
1016      * \sa DoubleNodeGroup(), DoubleNodes(), DoubleNodeElemGroupsNew()
1017      */
1018     boolean DoubleNodeElemGroups( in ListOfGroups theElems,
1019                                   in ListOfGroups theNodesNot,
1020                                   in ListOfGroups theAffectedElems ) 
1021       raises (SALOME::SALOME_Exception);
1022     /*!
1023      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
1024      * Works as DoubleNodeElemGroups() described above, but returns a new group with
1025      * newly created elements.
1026      * \param theElems - list of groups of elements (edges or faces) to be replicated
1027      * \param theNodesNot - list of groups of nodes not to replicated
1028      * \param theAffectedElems - group of elements to which the replicated nodes
1029      *        should be associated to.
1030      * \return a new group with newly created elements
1031      * \sa DoubleNodeElemGroups()
1032      */
1033     SMESH_Group DoubleNodeElemGroupsNew( in ListOfGroups theElems,
1034                                          in ListOfGroups theNodesNot,
1035                                          in ListOfGroups theAffectedElems ) 
1036       raises (SALOME::SALOME_Exception);
1037     /*!
1038      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
1039      * Works as DoubleNodeElemGroups() described above, but returns two new groups:
1040      * a group of newly created elements and a group of newly created nodes.
1041      * \param theElems - list of groups of elements (edges or faces) to be replicated
1042      * \param theNodesNot - list of groups of nodes not to replicated
1043      * \param theAffectedElems - group of elements to which the replicated nodes
1044      *        should be associated to.
1045      * \param theElemGroupNeeded - to create group of new elements or not
1046      * \param theNodeGroupNeeded - to create group of new nodes or not
1047      * \return two new groups of newly created elements (1st) and nodes (2nd)
1048      * \sa DoubleNodeElemGroups()
1049      */
1050     ListOfGroups DoubleNodeElemGroups2New( in ListOfGroups theElems,
1051                                            in ListOfGroups theNodesNot,
1052                                            in ListOfGroups theAffectedElems,
1053                                            in boolean         theElemGroupNeeded,
1054                                            in boolean         theNodeGroupNeeded ) 
1055       raises (SALOME::SALOME_Exception);
1056
1057     /*!
1058      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
1059      * This method provided for convenience works as DoubleNodes() described above.
1060      * \param theElems - list of groups of elements (edges or faces) to be replicated
1061      * \param theNodesNot - list of groups of nodes not to replicated
1062      * \param theShape - shape to detect affected elements (element which geometric center
1063      *        located on or inside shape).
1064      *        The replicated nodes should be associated to affected elements.
1065      * \return TRUE if operation has been completed successfully, FALSE otherwise
1066      * \sa DoubleNodeGroupInRegion(), DoubleNodesInRegion()
1067      */
1068     boolean DoubleNodeElemGroupsInRegion( in ListOfGroups theElems,
1069                                           in ListOfGroups theNodesNot,
1070                                           in GEOM::GEOM_Object theShape )
1071       raises (SALOME::SALOME_Exception);
1072
1073     /*!
1074      * \brief Identify the elements that will be affected by node duplication (actual duplication is not performed).
1075      * This method is the first step of DoubleNodeElemGroupsInRegion.
1076      * \param theElems - list of groups of elements (edges or faces) to be replicated
1077      * \param theNodesNot - list of groups of nodes not to replicated
1078      * \param theShape - shape to detect affected elements (element which geometric center
1079      *        located on or inside shape).
1080      *        The replicated nodes should be associated to affected elements.
1081      * \return groups of affected elements
1082      * \sa DoubleNodeElemGroupsInRegion()
1083      */
1084     ListOfGroups AffectedElemGroupsInRegion( in ListOfGroups theElems,
1085                                              in ListOfGroups theNodesNot,
1086                                              in GEOM::GEOM_Object theShape ) 
1087       raises (SALOME::SALOME_Exception);
1088
1089     /*!
1090      * \brief Generates skin mesh (containing 2D cells) from 3D mesh
1091      * The created 2D mesh elements based on nodes of free faces of boundary volumes
1092      * \return TRUE if operation has been completed successfully, FALSE otherwise
1093      */
1094     boolean Make2DMeshFrom3D() raises (SALOME::SALOME_Exception);
1095
1096     /*!
1097      * \brief Creates missing boundary elements
1098      *  \param elements - elements whose boundary is to be checked
1099      *  \param dimension - defines type of boundary elements to create
1100      *    BND_1DFROM3D creates mesh edges on all borders of free facets of 3D elements.
1101      *  \param groupName - a name of group to store created boundary elements in,
1102      *                     "" means not to create the group
1103      *  \param meshName - a name of new mesh to store created boundary elements in,
1104      *                     "" means not to create the new mesh
1105      *  \param toCopyElements - if true, the checked elements will be copied into the new mesh
1106      *                          else only boundary elements will be copied into the new mesh
1107      *  \param toCopyExistingBondary - if true, not only new but also pre-existing
1108      *                                boundary elements will be copied into the new mesh
1109      *  \param group - returns the create group, if any
1110      *  \retval SMESH::SMESH_Mesh - the mesh where elements were added to
1111      */
1112     SMESH_Mesh MakeBoundaryMesh(in SMESH_IDSource elements,
1113                                 in Bnd_Dimension  dimension,
1114                                 in string         groupName,
1115                                 in string         meshName,
1116                                 in boolean        toCopyElements,
1117                                 in boolean        toCopyExistingBondary,
1118                                 out SMESH_Group   group) raises (SALOME::SALOME_Exception);
1119     /*!
1120      * \brief Creates missing boundary elements around either the whole mesh or 
1121      *    groups of 2D elements
1122      *  \param dimension - defines type of boundary elements to create
1123      *  \param groupName - a name of group to store all boundary elements in,
1124      *    "" means not to create the group
1125      *  \param meshName - a name of a new mesh, which is a copy of the initial 
1126      *    mesh + created boundary elements; "" means not to create the new mesh
1127      *  \param toCopyAll - if true, the whole initial mesh will be copied into
1128      *    the new mesh else only boundary elements will be copied into the new mesh
1129      *  \param groups - optional groups of 2D elements to make boundary around
1130      *  \param mesh - returns the mesh where elements were added to
1131      *  \param group - returns the created group, if any
1132      *  \retval long - number of added boundary elements
1133      */
1134     long MakeBoundaryElements(in Bnd_Dimension   dimension,
1135                               in string          groupName,
1136                               in string          meshName,
1137                               in boolean         toCopyAll,
1138                               in ListOfIDSources groups,
1139                               out SMESH_Mesh     mesh,
1140                               out SMESH_Group    group) raises (SALOME::SALOME_Exception);
1141
1142     /*!
1143      * \brief Double nodes on shared faces between groups of volumes and create flat elements on demand.
1144      * Flat elements are mainly used by some types of mechanic calculations.
1145      *
1146      * The list of groups must describe a partition of the mesh volumes.
1147      * The nodes of the internal faces at the boundaries of the groups are doubled.
1148      * In option, the internal faces are replaced by flat elements.
1149      * Triangles are transformed in prisms, and quadrangles in hexahedrons.
1150      * \param theDomains - list of groups of volumes
1151      * \param createJointElems - if TRUE, create the elements
1152      * \param onAllBoundaries - if TRUE, the nodes and elements are also created on
1153      *        the boundary between \a theDomains and the rest mesh
1154      * \return TRUE if operation has been completed successfully, FALSE otherwise
1155      */
1156     boolean DoubleNodesOnGroupBoundaries( in ListOfGroups theDomains,
1157                                           in boolean      createJointElems,
1158                                           in boolean      onAllBoundaries) 
1159       raises (SALOME::SALOME_Exception);
1160
1161     /*!
1162      * \brief Double nodes on some external faces and create flat elements.
1163      * Flat elements are mainly used by some types of mechanic calculations.
1164      *
1165      * Each group of the list must be constituted of faces.
1166      * Triangles are transformed in prisms, and quadrangles in hexahedrons.
1167      * \param theGroupsOfFaces - list of groups of faces
1168      * \return TRUE if operation has been completed successfully, FALSE otherwise
1169      */
1170     boolean CreateFlatElementsOnFacesGroups( in ListOfGroups theGroupsOfFaces ) 
1171       raises (SALOME::SALOME_Exception); 
1172
1173     /*!
1174      *  \brief identify all the elements around a geom shape, get the faces delimiting the hole
1175      *  Build groups of volume to remove, groups of faces to replace on the skin of the object,
1176      *  groups of faces to remove insidethe object, (idem edges).
1177      *  Build ordered list of nodes at the border of each group of faces to replace (to be used to build a geom subshape)
1178      */
1179     void CreateHoleSkin(in double radius,
1180                         in GEOM::GEOM_Object theShape,
1181                         in string groupName,
1182                         in double_array theNodesCoords,
1183                         out array_of_long_array GroupsOfNodes) 
1184       raises (SALOME::SALOME_Exception);
1185   };
1186 };
1187
1188 #endif