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