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