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