Salome HOME
Implementation of new version ExtrusionAlongPath (20003 from Mantis).
[modules/smesh.git] / idl / SMESH_MeshEditor.idl
1 //  Copyright (C) 2007-2008  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.
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
25 #ifndef _SMESH_MESHEDITOR_IDL_
26 #define _SMESH_MESHEDITOR_IDL_
27
28 #include "SMESH_Mesh.idl"
29
30 module SMESH
31 {
32   /*!
33    * This interface makes modifications on the Mesh - removing elements and nodes etc.
34    */
35   interface NumericalFunctor;
36   interface SMESH_MeshEditor
37   {
38     boolean RemoveElements(in long_array IDsOfElements);
39
40     boolean RemoveNodes(in long_array IDsOfNodes);
41
42     long AddNode(in double x, in double y, in double z);
43
44     /*!
45      *  Create edge, either linear and quadratic (this is determed
46      *  by number of given nodes).
47      *  \param IdsOfNodes List of node IDs for creation of element.
48      *  Needed order of nodes in this list corresponds to description
49      *  of MED. This description is located by the following link:
50      *   http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.
51      */
52     long AddEdge(in long_array IDsOfNodes);
53
54     /*!
55      *  Create face, either linear and quadratic (this is determed
56      *  by number of given nodes).
57      *  \param IdsOfNodes List of node IDs for creation of element.
58      *  Needed order of nodes in this list corresponds to description
59      *  of MED. This description is located by the following link:
60      *   http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.
61      */
62     long AddFace(in long_array IDsOfNodes);
63
64     long AddPolygonalFace(in long_array IdsOfNodes);
65
66     /*!
67      *  Create volume, either linear and quadratic (this is determed
68      *  by number of given nodes).
69      *  \param IdsOfNodes List of node IDs for creation of element.
70      *  Needed order of nodes in this list corresponds to description
71      *  of MED. This description is located by the following link:
72      *   http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.
73      */
74     long AddVolume(in long_array IDsOfNodes);
75
76     /*!
77      *  Create volume of many faces, giving nodes for each face.
78      *  \param IdsOfNodes List of node IDs for volume creation face by face.
79      *  \param Quantities List of integer values, Quantities[i]
80      *         gives quantity of nodes in face number i.
81      */
82     long AddPolyhedralVolume (in long_array IdsOfNodes,
83                               in long_array Quantities);
84
85     /*!
86      *  Create volume of many faces, giving IDs of existing faces.
87      *  \param IdsOfFaces List of face IDs for volume creation.
88      *  \note The created volume will refer only to nodes
89      *        of the given faces, not to the faces itself.
90      */
91     long AddPolyhedralVolumeByFaces (in long_array IdsOfFaces);
92
93     /*!
94      * \brief Bind a node to a vertex
95       * \param NodeID - node ID
96       * \param VertexID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0]
97      */
98     void SetNodeOnVertex(in long NodeID, in long VertexID)
99       raises (SALOME::SALOME_Exception);
100     /*!
101      * \brief Store node position on an edge
102       * \param NodeID - node ID
103       * \param EdgeID - edge ID available through GEOM_Object.GetSubShapeIndices()[0]
104       * \param paramOnEdge - parameter on edge where the node is located
105      */
106     void SetNodeOnEdge(in long NodeID, in long EdgeID, in double paramOnEdge)
107       raises (SALOME::SALOME_Exception);
108     /*!
109      * \brief Store node position on a face
110       * \param NodeID - node ID
111       * \param FaceID - face ID available through GEOM_Object.GetSubShapeIndices()[0]
112       * \param u - U parameter on face where the node is located
113       * \param v - V parameter on face where the node is located
114      */
115     void SetNodeOnFace(in long NodeID, in long FaceID, in double u, in double v)
116       raises (SALOME::SALOME_Exception);
117     /*!
118      * \brief Bind a node to a solid
119       * \param NodeID - node ID
120       * \param SolidID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0]
121      */
122     void SetNodeInVolume(in long NodeID, in long SolidID)
123       raises (SALOME::SALOME_Exception);
124     /*!
125      * \brief Bind an element to a shape
126       * \param ElementID - element ID
127       * \param ShapeID - shape ID available through GEOM_Object.GetSubShapeIndices()[0]
128      */
129     void SetMeshElementOnShape(in long ElementID, in long ShapeID)
130       raises (SALOME::SALOME_Exception);
131
132
133     boolean MoveNode(in long NodeID, in double x, in double y, in double z);
134
135     boolean InverseDiag(in long NodeID1, in long NodeID2);
136
137     boolean DeleteDiag(in long NodeID1, in long NodeID2);
138
139     boolean Reorient(in long_array IDsOfElements);
140
141     boolean ReorientObject(in SMESH_IDSource theObject);
142
143     /*!
144      * \brief Fuse neighbour triangles into quadrangles.
145      * \param theElems     The triangles to be fused.
146      * \param theCriterion Is used to choose a neighbour to fuse with.
147      * \param theMaxAngle  Is a max angle between element normals at which fusion
148      *                     is still performed; theMaxAngle is mesured in radians.
149      * \return TRUE in case of success, FALSE otherwise.
150      */
151     boolean TriToQuad (in long_array       IDsOfElements,
152                        in NumericalFunctor Criterion,
153                        in double           MaxAngle);
154
155     /*!
156      * \brief Fuse neighbour triangles into quadrangles.
157      *
158      * Behaves like the above method, taking list of elements from \a theObject
159      */
160     boolean TriToQuadObject (in SMESH_IDSource   theObject,
161                              in NumericalFunctor Criterion,
162                              in double           MaxAngle);
163
164     /*!
165      * \brief Split quadrangles into triangles.
166      * \param theElems     The faces to be splitted.
167      * \param theCriterion Is used to choose a diagonal for splitting.
168      * \return TRUE in case of success, FALSE otherwise.
169      */
170     boolean QuadToTri (in long_array       IDsOfElements,
171                        in NumericalFunctor Criterion);
172
173     /*!
174      * \brief Split quadrangles into triangles.
175      *
176      * Behaves like the above method, taking list of elements from \a theObject
177      */
178     boolean QuadToTriObject (in SMESH_IDSource   theObject,
179                              in NumericalFunctor Criterion);
180
181     /*!
182      * \brief Split quadrangles into triangles.
183      * \param theElems  The faces to be splitted.
184      * \param the13Diag Is used to choose a diagonal for splitting.
185      * \return TRUE in case of success, FALSE otherwise.
186      */
187     boolean SplitQuad (in long_array IDsOfElements,
188                        in boolean    Diag13);
189
190     /*!
191      * \brief Split quadrangles into triangles.
192      *
193      * Behaves like the above method, taking list of elements from \a theObject
194      */
195     boolean SplitQuadObject (in SMESH_IDSource theObject,
196                              in boolean        Diag13);
197
198     /*!
199      *  Find better splitting of the given quadrangle.
200      *  \param IDOfQuad  ID of the quadrangle to be splitted.
201      *  \param Criterion A criterion to choose a diagonal for splitting.
202      *  \return 1 if 1-3 diagonal is better, 2 if 2-4
203      *          diagonal is better, 0 if error occurs.
204      */
205     long BestSplit (in long             IDOfQuad,
206                     in NumericalFunctor Criterion);
207
208     enum Smooth_Method { LAPLACIAN_SMOOTH, CENTROIDAL_SMOOTH };
209
210     boolean Smooth(in long_array    IDsOfElements,
211                    in long_array    IDsOfFixedNodes,
212                    in long          MaxNbOfIterations,
213                    in double        MaxAspectRatio,
214                    in Smooth_Method Method);
215
216     boolean SmoothObject(in SMESH_IDSource  theObject,
217                          in long_array      IDsOfFixedNodes,
218                          in long            MaxNbOfIterations,
219                          in double          MaxAspectRatio,
220                          in Smooth_Method   Method);
221
222     boolean SmoothParametric(in long_array    IDsOfElements,
223                              in long_array    IDsOfFixedNodes,
224                              in long          MaxNbOfIterations,
225                              in double        MaxAspectRatio,
226                              in Smooth_Method Method);
227
228     boolean SmoothParametricObject(in SMESH_IDSource  theObject,
229                                    in long_array      IDsOfFixedNodes,
230                                    in long            MaxNbOfIterations,
231                                    in double          MaxAspectRatio,
232                                    in Smooth_Method   Method);
233
234     void ConvertToQuadratic(in boolean theForce3d);
235
236     boolean ConvertFromQuadratic();
237
238     void RenumberNodes();
239
240     void RenumberElements();
241
242     /*!
243      * \brief Genarate dim+1 elements by rotation of given elements around axis
244      * \param IDsOfElements - elements to ratate
245      * \param Axix - rotation axis
246      * \param AngleInRadians - rotation angle
247      * \param NbOfSteps - number of elements to generate from one element
248      */
249     void RotationSweep(in long_array       IDsOfElements,
250                        in AxisStruct       Axix,
251                        in double           AngleInRadians,
252                        in long             NbOfSteps,
253                        in double           Tolerance);
254     /*!
255      * \brief Same as previous but additionally create groups of elements
256      *  generated from elements belonging to preexisting groups
257      */
258     ListOfGroups RotationSweepMakeGroups(in long_array       IDsOfElements,
259                                          in AxisStruct       Axix,
260                                          in double           AngleInRadians,
261                                          in long             NbOfSteps,
262                                          in double           Tolerance);
263     /*!
264      * \brief Genarate dim+1 elements by rotation of the object around axis
265      * \param theObject - object containing elements to ratate
266      * \param Axix - rotation axis
267      * \param AngleInRadians - rotation angle
268      * \param NbOfSteps - number of elements to generate from one element
269      */
270     void RotationSweepObject(in SMESH_IDSource  theObject,
271                              in AxisStruct      Axix,
272                              in double          AngleInRadians,
273                              in long            NbOfSteps,
274                              in double          Tolerance);
275     /*!
276      * \brief Same as previous but additionally create groups of elements
277      *  generated from elements belonging to preexisting groups
278      */
279     ListOfGroups RotationSweepObjectMakeGroups(in SMESH_IDSource  theObject,
280                                                in AxisStruct      Axix,
281                                                in double          AngleInRadians,
282                                                in long            NbOfSteps,
283                                                in double          Tolerance);
284     /*!
285      * \brief Genarate dim+1 elements by rotation of the object around axis
286      * \param theObject - object containing elements to ratate
287      * \param Axix - rotation axis
288      * \param AngleInRadians - rotation angle
289      * \param NbOfSteps - number of elements to generate from one element
290      */
291     void RotationSweepObject1D(in SMESH_IDSource  theObject,
292                                in AxisStruct      Axix,
293                                in double          AngleInRadians,
294                                in long            NbOfSteps,
295                                in double          Tolerance);
296     /*!
297      * \brief Same as previous but additionally create groups of elements
298      *  generated from elements belonging to preexisting groups
299      */
300     ListOfGroups RotationSweepObject1DMakeGroups(in SMESH_IDSource  theObject,
301                                                  in AxisStruct      Axix,
302                                                  in double          AngleInRadians,
303                                                  in long            NbOfSteps,
304                                                  in double          Tolerance);
305     /*!
306      * \brief Genarate dim+1 elements by rotation of the object around axis
307      * \param theObject - object containing elements to ratate
308      * \param Axix - rotation axis
309      * \param AngleInRadians - rotation angle
310      * \param NbOfSteps - number of elements to generate from one element
311      */
312     void RotationSweepObject2D(in SMESH_IDSource  theObject,
313                                in AxisStruct      Axix,
314                                in double          AngleInRadians,
315                                in long            NbOfSteps,
316                                in double          Tolerance);
317     /*!
318      * \brief Same as previous but additionally create groups of elements
319      *  generated from elements belonging to preexisting groups
320      */
321     ListOfGroups RotationSweepObject2DMakeGroups(in SMESH_IDSource  theObject,
322                                                  in AxisStruct      Axix,
323                                                  in double          AngleInRadians,
324                                                  in long            NbOfSteps,
325                                                  in double          Tolerance);
326     /*!
327      * \brief Genarate dim+1 elements by extrusion of elements along vector
328      * \param IDsOfElements - elements to sweep
329      * \param StepVector - vector giving direction and distance of an extrusion step
330      * \param NbOfSteps - number of elements to generate from one element
331      */
332     void ExtrusionSweep(in long_array      IDsOfElements,
333                         in DirStruct       StepVector,
334                         in long            NbOfSteps);
335     /*!
336      * \brief Same as previous but additionally create groups of elements
337      *  generated from elements belonging to preexisting groups
338      */
339     ListOfGroups ExtrusionSweepMakeGroups(in long_array      IDsOfElements,
340                                           in DirStruct       StepVector,
341                                           in long            NbOfSteps);
342    /*!
343     * Generate new elements by extrusion of theElements 
344     * by StepVector by NbOfSteps
345     * param ExtrFlags set flags for performing extrusion
346     * param SewTolerance - uses for comparing locations of nodes if flag
347     *   EXTRUSION_FLAG_SEW is set
348     */
349     void AdvancedExtrusion(in long_array      IDsOfElements,
350                            in DirStruct       StepVector,
351                            in long            NbOfSteps,
352                            in long            ExtrFlags,
353                            in double          SewTolerance);
354     /*!
355      * \brief Same as previous but additionally create groups of elements
356      *  generated from elements belonging to preexisting groups
357      */
358     ListOfGroups AdvancedExtrusionMakeGroups(in long_array      IDsOfElements,
359                                              in DirStruct       StepVector,
360                                              in long            NbOfSteps,
361                                              in long            ExtrFlags,
362                                              in double          SewTolerance);
363
364     void ExtrusionSweepObject(in SMESH_IDSource  theObject,
365                               in DirStruct       StepVector,
366                               in long            NbOfSteps);
367     ListOfGroups ExtrusionSweepObjectMakeGroups(in SMESH_IDSource  theObject,
368                                                 in DirStruct       StepVector,
369                                                 in long            NbOfSteps);
370
371     void ExtrusionSweepObject1D(in SMESH_IDSource theObject,
372                                 in DirStruct      StepVector,
373                                 in long           NbOfSteps);
374     ListOfGroups ExtrusionSweepObject1DMakeGroups(in SMESH_IDSource theObject,
375                                                   in DirStruct      StepVector,
376                                                   in long           NbOfSteps);
377
378     void ExtrusionSweepObject2D(in SMESH_IDSource theObject,
379                                 in DirStruct      StepVector,
380                                 in long           NbOfSteps);
381     ListOfGroups ExtrusionSweepObject2DMakeGroups(in SMESH_IDSource theObject,
382                                                   in DirStruct      StepVector,
383                                                   in long           NbOfSteps);
384
385     enum Extrusion_Error {
386       EXTR_OK,
387       EXTR_NO_ELEMENTS,
388       EXTR_PATH_NOT_EDGE,
389       EXTR_BAD_PATH_SHAPE,
390       EXTR_BAD_STARTING_NODE,
391       EXTR_BAD_ANGLES_NUMBER,
392       EXTR_CANT_GET_TANGENT
393       };
394
395     ListOfGroups ExtrusionAlongPathX(in long_array        IDsOfElements,
396                                      in SMESH_IDSource    Path,
397                                      in long              NodeStart,
398                                      in boolean           HasAngles,
399                                      in double_array      Angles,
400                                      in boolean           LinearVariation,
401                                      in boolean           HasRefPoint,
402                                      in PointStruct       RefPoint,
403                                      in boolean           MakeGroups,
404                                      in ElementType       ElemType,
405                                      out Extrusion_Error  Error);
406
407     ListOfGroups ExtrusionAlongPathObjX(in SMESH_IDSource    theObject,
408                                         in SMESH_IDSource    Path,
409                                         in long              NodeStart,
410                                         in boolean           HasAngles,
411                                         in double_array      Angles,
412                                         in boolean           LinearVariation,
413                                         in boolean           HasRefPoint,
414                                         in PointStruct       RefPoint,
415                                         in boolean           MakeGroups,
416                                         in ElementType       ElemType,
417                                         out Extrusion_Error  Error);
418
419     Extrusion_Error ExtrusionAlongPath(in long_array        IDsOfElements,
420                                        in SMESH_Mesh        PathMesh,
421                                        in GEOM::GEOM_Object PathShape,
422                                        in long              NodeStart,
423                                        in boolean           HasAngles,
424                                        in double_array      Angles,
425                                        in boolean           HasRefPoint,
426                                        in PointStruct       RefPoint);
427     ListOfGroups ExtrusionAlongPathMakeGroups(in long_array        IDsOfElements,
428                                               in SMESH_Mesh        PathMesh,
429                                               in GEOM::GEOM_Object PathShape,
430                                               in long              NodeStart,
431                                               in boolean           HasAngles,
432                                               in double_array      Angles,
433                                               in boolean           HasRefPoint,
434                                               in PointStruct       RefPoint,
435                                               out Extrusion_Error  Error);
436
437     Extrusion_Error ExtrusionAlongPathObject(in SMESH_IDSource    theObject,
438                                              in SMESH_Mesh        PathMesh,
439                                              in GEOM::GEOM_Object PathShape,
440                                              in long              NodeStart,
441                                              in boolean           HasAngles,
442                                              in double_array      Angles,
443                                              in boolean           HasRefPoint,
444                                              in PointStruct       RefPoint);
445     ListOfGroups ExtrusionAlongPathObjectMakeGroups(in SMESH_IDSource    theObject,
446                                                     in SMESH_Mesh        PathMesh,
447                                                     in GEOM::GEOM_Object PathShape,
448                                                     in long              NodeStart,
449                                                     in boolean           HasAngles,
450                                                     in double_array      Angles,
451                                                     in boolean           HasRefPoint,
452                                                     in PointStruct       RefPoint,
453                                                     out Extrusion_Error  Error);
454
455     Extrusion_Error ExtrusionAlongPathObject1D(in SMESH_IDSource    theObject,
456                                                in SMESH_Mesh        PathMesh,
457                                                in GEOM::GEOM_Object PathShape,
458                                                in long              NodeStart,
459                                                in boolean           HasAngles,
460                                                in double_array      Angles,
461                                                in boolean           HasRefPoint,
462                                                in PointStruct       RefPoint);
463     ListOfGroups ExtrusionAlongPathObject1DMakeGroups(in SMESH_IDSource    theObject,
464                                                       in SMESH_Mesh        PathMesh,
465                                                       in GEOM::GEOM_Object PathShape,
466                                                       in long              NodeStart,
467                                                       in boolean           HasAngles,
468                                                       in double_array      Angles,
469                                                       in boolean           HasRefPoint,
470                                                       in PointStruct       RefPoint,
471                                                       out Extrusion_Error  Error);
472
473     Extrusion_Error ExtrusionAlongPathObject2D(in SMESH_IDSource    theObject,
474                                                in SMESH_Mesh        PathMesh,
475                                                in GEOM::GEOM_Object PathShape,
476                                                in long              NodeStart,
477                                                in boolean           HasAngles,
478                                                in double_array      Angles,
479                                                in boolean           HasRefPoint,
480                                                in PointStruct       RefPoint);
481     ListOfGroups ExtrusionAlongPathObject2DMakeGroups(in SMESH_IDSource    theObject,
482                                                       in SMESH_Mesh        PathMesh,
483                                                       in GEOM::GEOM_Object PathShape,
484                                                       in long              NodeStart,
485                                                       in boolean           HasAngles,
486                                                       in double_array      Angles,
487                                                       in boolean           HasRefPoint,
488                                                       in PointStruct       RefPoint,
489                                                       out Extrusion_Error  Error);
490
491    /*!
492     * Compute rotation angles for ExtrusionAlongPath as linear variation
493     * of given angles along path steps
494     * param PathMesh mesh containing a 1D sub-mesh on the edge, along 
495     *                which proceeds the extrusion
496     * param PathShape is shape(edge); as the mesh can be complex, the edge 
497     *                 is used to define the sub-mesh for the path
498     */
499     double_array LinearAnglesVariation(in SMESH_Mesh        PathMesh,
500                                        in GEOM::GEOM_Object PathShape,
501                                        in double_array      Angles);
502
503     enum MirrorType { POINT, AXIS, PLANE };
504
505     void Mirror (in long_array IDsOfElements,
506                  in AxisStruct Mirror,
507                  in MirrorType Type,
508                  in boolean    Copy);
509     ListOfGroups MirrorMakeGroups (in long_array IDsOfElements,
510                                    in AxisStruct Mirror,
511                                    in MirrorType Type);
512     SMESH_Mesh MirrorMakeMesh (in long_array IDsOfElements,
513                                in AxisStruct Mirror,
514                                in MirrorType Type,
515                                in boolean    CopyGroups,
516                                in string     MeshName);
517
518     void MirrorObject (in SMESH_IDSource theObject,
519                        in AxisStruct     Mirror,
520                        in MirrorType     Type,
521                        in boolean        Copy);
522     ListOfGroups MirrorObjectMakeGroups (in SMESH_IDSource theObject,
523                                          in AxisStruct     Mirror,
524                                          in MirrorType     Type);
525     SMESH_Mesh MirrorObjectMakeMesh (in SMESH_IDSource theObject,
526                                      in AxisStruct     Mirror,
527                                      in MirrorType     Type,
528                                      in boolean        CopyGroups,
529                                      in string         MeshName);
530
531     void Translate (in long_array IDsOfElements,
532                     in DirStruct  Vector,
533                     in boolean    Copy);
534     ListOfGroups TranslateMakeGroups (in long_array IDsOfElements,
535                                       in DirStruct  Vector);
536     SMESH_Mesh TranslateMakeMesh (in long_array IDsOfElements,
537                                   in DirStruct  Vector,
538                                   in boolean    CopyGroups,
539                                   in string     MeshName);
540
541     void TranslateObject (in SMESH_IDSource theObject,
542                           in DirStruct      Vector,
543                           in boolean        Copy);
544     ListOfGroups TranslateObjectMakeGroups (in SMESH_IDSource theObject,
545                                             in DirStruct      Vector);
546     SMESH_Mesh TranslateObjectMakeMesh (in SMESH_IDSource theObject,
547                                         in DirStruct      Vector,
548                                         in boolean        CopyGroups,
549                                         in string         MeshName);
550
551     void Rotate (in long_array IDsOfElements,
552                  in AxisStruct Axis,
553                  in double     AngleInRadians,
554                  in boolean    Copy);
555     ListOfGroups RotateMakeGroups (in long_array IDsOfElements,
556                                    in AxisStruct Axis,
557                                    in double     AngleInRadians);
558     SMESH_Mesh RotateMakeMesh (in long_array IDsOfElements,
559                                in AxisStruct Axis,
560                                in double     AngleInRadians,
561                                in boolean    CopyGroups,
562                                in string     MeshName);
563
564     void RotateObject (in SMESH_IDSource theObject,
565                        in AxisStruct     Axis,
566                        in double         AngleInRadians,
567                        in boolean        Copy);
568     ListOfGroups RotateObjectMakeGroups (in SMESH_IDSource theObject,
569                                          in AxisStruct     Axis,
570                                          in double         AngleInRadians);
571     SMESH_Mesh RotateObjectMakeMesh (in SMESH_IDSource theObject,
572                                      in AxisStruct     Axis,
573                                      in double         AngleInRadians,
574                                      in boolean        CopyGroups,
575                                      in string         MeshName);
576
577     void FindCoincidentNodes (in  double              Tolerance,
578                               out array_of_long_array GroupsOfNodes);
579
580     void FindCoincidentNodesOnPart (in  SMESH_IDSource      SubMeshOrGroup,
581                                     in  double              Tolerance,
582                                     out array_of_long_array GroupsOfNodes);
583
584     void MergeNodes (in array_of_long_array GroupsOfNodes);
585
586     /*!
587      * \brief Find elements built on the same nodes.
588      * \param MeshOrSubMeshOrGroup Mesh or SubMesh, or Group of elements for searching.
589      * \return List of groups of equal elements.
590      */
591     void FindEqualElements (in  SMESH_IDSource      MeshOrSubMeshOrGroup,
592                             out array_of_long_array GroupsOfElementsID);
593
594     /*!
595      * \brief Merge elements in each given group.
596      * \param GroupsOfElementsID Groups of elements for merging.
597      */
598     void MergeElements(in array_of_long_array GroupsOfElementsID);
599
600     /*!
601      * \brief Merge equal elements in the whole mesh.
602      */
603     void MergeEqualElements();
604     
605     /*!
606      * If the given ID is a valid node ID (nodeID > 0), just move this node, else
607      * move the node closest to the point to point's location and return ID of the node
608      */
609     long MoveClosestNodeToPoint(in double x, in double y, in double z, in long nodeID);
610
611     enum Sew_Error {
612       SEW_OK,
613       SEW_BORDER1_NOT_FOUND,
614       SEW_BORDER2_NOT_FOUND,
615       SEW_BOTH_BORDERS_NOT_FOUND,
616       SEW_BAD_SIDE_NODES,
617       SEW_VOLUMES_TO_SPLIT,
618       // for SewSideElements() only:
619       SEW_DIFF_NB_OF_ELEMENTS,
620       SEW_TOPO_DIFF_SETS_OF_ELEMENTS,
621       SEW_BAD_SIDE1_NODES,
622       SEW_BAD_SIDE2_NODES
623       };
624
625     Sew_Error SewFreeBorders (in long FirstNodeID1,
626                               in long SecondNodeID1,
627                               in long LastNodeID1,
628                               in long FirstNodeID2,
629                               in long SecondNodeID2,
630                               in long LastNodeID2,
631                               in boolean CreatePolygons,
632                               in boolean CreatePolyedrs);
633
634     Sew_Error SewConformFreeBorders (in long FirstNodeID1,
635                                      in long SecondNodeID1,
636                                      in long LastNodeID1,
637                                      in long FirstNodeID2,
638                                      in long SecondNodeID2);
639
640     Sew_Error SewBorderToSide (in long FirstNodeIDOnFreeBorder,
641                                in long SecondNodeIDOnFreeBorder,
642                                in long LastNodeIDOnFreeBorder,
643                                in long FirstNodeIDOnSide,
644                                in long LastNodeIDOnSide,
645                                in boolean CreatePolygons,
646                                in boolean CreatePolyedrs);
647
648     Sew_Error SewSideElements (in long_array IDsOfSide1Elements,
649                                in long_array IDsOfSide2Elements,
650                                in long       NodeID1OfSide1ToMerge,
651                                in long       NodeID1OfSide2ToMerge,
652                                in long       NodeID2OfSide1ToMerge,
653                                in long       NodeID2OfSide2ToMerge);
654
655    /*!
656     * Set new nodes for given element.
657     * If number of nodes is not corresponded to type of
658     * element - returns false
659     */
660     boolean ChangeElemNodes(in long ide, in long_array newIDs);
661
662    /*!
663     * Return data of mesh edition preview which is computed provided 
664     * that the editor was obtained trough SMESH_Mesh::GetMeshEditPreviewer()
665     */
666     MeshPreviewStruct GetPreviewData();
667
668    /*!
669     * If during last operation of MeshEditor some nodes were
670     * created this method returns list of it's IDs, if new nodes
671     * not creared - returns empty list
672     */
673     long_array GetLastCreatedNodes();
674
675    /*!
676     * If during last operation of MeshEditor some elements were
677     * created this method returns list of it's IDs, if new elements
678     * not creared - returns empty list
679     */
680     long_array GetLastCreatedElems();
681     
682     /*!
683      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
684      * \param theNodes - identifiers of nodes to be doubled
685      * \param theModifiedElems - identifiers of elements to be updated by the new (doubled) 
686      *        nodes. If list of element identifiers is empty then nodes are doubled but 
687      *        they not assigned to elements
688      *        \return TRUE if operation has been completed successfully, FALSE otherwise
689      * \sa DoubleNode(), DoubleNodeGroup(), DoubleNodeGroups()
690     */
691     boolean DoubleNodes( in long_array theNodes, in long_array theModifiedElems ); 
692
693     /*!
694     * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
695     * This method provided for convenience works as DoubleNodes() described above.
696     * \param theNodeId - identifier of node to be doubled.
697     * \param theModifiedElems - identifiers of elements to be updated.
698     * \return TRUE if operation has been completed successfully, FALSE otherwise
699     * \sa DoubleNodes(), DoubleNodeGroup(), DoubleNodeGroups()
700     */
701     boolean DoubleNode( in long theNodeId, in long_array theModifiedElems ); 
702
703     /*!
704     * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
705     * This method provided for convenience works as DoubleNodes() described above.
706     * \param theNodes - group of nodes to be doubled.
707     * \param theModifiedElems - group of elements to be updated.
708     * \return TRUE if operation has been completed successfully, FALSE otherwise
709     * \sa DoubleNode(), DoubleNodes(), DoubleNodeGroups()
710     */
711     boolean DoubleNodeGroup( in SMESH_GroupBase theNodes, 
712                              in SMESH_GroupBase theModifiedElems );
713
714     /*!
715     \brief Creates a hole in a mesh by doubling the nodes of some particular elements
716     This method provided for convenience works as DoubleNodes() described above.
717     \param theNodes - list of groups of nodes to be doubled
718     \param theModifiedElems - list of groups of elements to be updated.
719     \return TRUE if operation has been completed successfully, FALSE otherwise
720     \sa DoubleNode(), DoubleNodeGroup(), DoubleNodes()
721     */
722     boolean DoubleNodeGroups( in ListOfGroups theNodes, 
723                               in ListOfGroups theModifiedElems );
724
725   };
726 };
727
728 #endif