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