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