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