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