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