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