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