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