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