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