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