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