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