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