Salome HOME
+ interface SMESH_IDSource;
[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);
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 MergeNodes (in array_of_long_array GroupsOfNodes);
645
646     /*!
647      * \brief Find elements built on the same nodes.
648      * \param MeshOrSubMeshOrGroup Mesh or SubMesh, or Group of elements for searching.
649      * \return List of groups of equal elements.
650      */
651     void FindEqualElements (in  SMESH_IDSource      MeshOrSubMeshOrGroup,
652                             out array_of_long_array GroupsOfElementsID);
653
654     /*!
655      * \brief Merge elements in each given group.
656      * \param GroupsOfElementsID Groups of elements for merging.
657      */
658     void MergeElements(in array_of_long_array GroupsOfElementsID);
659
660     /*!
661      * \brief Merge equal elements in the whole mesh.
662      */
663     void MergeEqualElements();
664     
665     /*!
666      * If the given ID is a valid node ID (nodeID > 0), just move this node, else
667      * move the node closest to the point to point's location and return ID of the node
668      */
669     long MoveClosestNodeToPoint(in double x, in double y, in double z, in long nodeID);
670
671     /*!
672      * Return ID of node closest to a given point
673      */
674     long FindNodeClosestTo(in double x, in double y, in double z);
675
676     /*!
677      * Return elements of given type where the given point is IN or ON.
678      *
679      * 'ALL' type means elements of any type excluding nodes and 0D elements
680      */
681     long_array FindElementsByPoint(in double x, in double y, in double z, in ElementType type);
682
683     /*!
684      * Return point state in a closed 2D mesh in terms of TopAbs_State enumeration.
685      * TopAbs_UNKNOWN state means that either mesh is wrong or the analysis fails.
686      */
687     short GetPointState(in double x, in double y, in double z);
688
689     enum Sew_Error {
690       SEW_OK,
691       SEW_BORDER1_NOT_FOUND,
692       SEW_BORDER2_NOT_FOUND,
693       SEW_BOTH_BORDERS_NOT_FOUND,
694       SEW_BAD_SIDE_NODES,
695       SEW_VOLUMES_TO_SPLIT,
696       // for SewSideElements() only:
697       SEW_DIFF_NB_OF_ELEMENTS,
698       SEW_TOPO_DIFF_SETS_OF_ELEMENTS,
699       SEW_BAD_SIDE1_NODES,
700       SEW_BAD_SIDE2_NODES
701       };
702
703     Sew_Error SewFreeBorders (in long FirstNodeID1,
704                               in long SecondNodeID1,
705                               in long LastNodeID1,
706                               in long FirstNodeID2,
707                               in long SecondNodeID2,
708                               in long LastNodeID2,
709                               in boolean CreatePolygons,
710                               in boolean CreatePolyedrs);
711
712     Sew_Error SewConformFreeBorders (in long FirstNodeID1,
713                                      in long SecondNodeID1,
714                                      in long LastNodeID1,
715                                      in long FirstNodeID2,
716                                      in long SecondNodeID2);
717
718     Sew_Error SewBorderToSide (in long FirstNodeIDOnFreeBorder,
719                                in long SecondNodeIDOnFreeBorder,
720                                in long LastNodeIDOnFreeBorder,
721                                in long FirstNodeIDOnSide,
722                                in long LastNodeIDOnSide,
723                                in boolean CreatePolygons,
724                                in boolean CreatePolyedrs);
725
726     Sew_Error SewSideElements (in long_array IDsOfSide1Elements,
727                                in long_array IDsOfSide2Elements,
728                                in long       NodeID1OfSide1ToMerge,
729                                in long       NodeID1OfSide2ToMerge,
730                                in long       NodeID2OfSide1ToMerge,
731                                in long       NodeID2OfSide2ToMerge);
732
733    /*!
734     * Set new nodes for given element.
735     * If number of nodes is not corresponded to type of
736     * element - returns false
737     */
738     boolean ChangeElemNodes(in long ide, in long_array newIDs);
739
740    /*!
741     * Return data of mesh edition preview which is computed provided 
742     * that the editor was obtained trough SMESH_Mesh::GetMeshEditPreviewer()
743     */
744     MeshPreviewStruct GetPreviewData();
745
746    /*!
747     * If during last operation of MeshEditor some nodes were
748     * created this method returns list of it's IDs, if new nodes
749     * not creared - returns empty list
750     */
751     long_array GetLastCreatedNodes();
752
753    /*!
754     * If during last operation of MeshEditor some elements were
755     * created this method returns list of it's IDs, if new elements
756     * not creared - returns empty list
757     */
758     long_array GetLastCreatedElems();
759
760     /*!
761      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
762      * \param theNodes - identifiers of nodes to be doubled
763      * \param theModifiedElems - identifiers of elements to be updated by the new (doubled) 
764      *        nodes. If list of element identifiers is empty then nodes are doubled but 
765      *        they not assigned to elements
766      *        \return TRUE if operation has been completed successfully, FALSE otherwise
767      * \sa DoubleNode(), DoubleNodeGroup(), DoubleNodeGroups()
768     */
769     boolean DoubleNodes( in long_array theNodes, in long_array theModifiedElems ); 
770
771     /*!
772     * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
773     * This method provided for convenience works as DoubleNodes() described above.
774     * \param theNodeId - identifier of node to be doubled.
775     * \param theModifiedElems - identifiers of elements to be updated.
776     * \return TRUE if operation has been completed successfully, FALSE otherwise
777     * \sa DoubleNodes(), DoubleNodeGroup(), DoubleNodeGroups()
778     */
779     boolean DoubleNode( in long theNodeId, in long_array theModifiedElems ); 
780
781     /*!
782     * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
783     * This method provided for convenience works as DoubleNodes() described above.
784     * \param theNodes - group of nodes to be doubled.
785     * \param theModifiedElems - group of elements to be updated.
786     * \return TRUE if operation has been completed successfully, FALSE otherwise
787     * \sa DoubleNode(), DoubleNodes(), DoubleNodeGroups(), DoubleNodeGroupNew()
788     */
789     boolean DoubleNodeGroup( in SMESH_GroupBase theNodes, 
790                              in SMESH_GroupBase theModifiedElems );
791
792     /*!
793      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
794      * Works as DoubleNodeGroup() described above, but returns a new group with 
795      * newly created nodes.
796      * \param theNodes - group of nodes to be doubled.
797      * \param theModifiedElems - group of elements to be updated.
798      * \return a new group with newly created nodes
799      * \sa DoubleNodeGroup()
800      */
801     SMESH_Group DoubleNodeGroupNew( in SMESH_GroupBase theNodes, 
802                                     in SMESH_GroupBase theModifiedElems );
803
804     /*!
805     \brief Creates a hole in a mesh by doubling the nodes of some particular elements
806     This method provided for convenience works as DoubleNodes() described above.
807     \param theNodes - list of groups of nodes to be doubled
808     \param theModifiedElems - list of groups of elements to be updated.
809     \return TRUE if operation has been completed successfully, FALSE otherwise
810     \sa DoubleNode(), DoubleNodeGroup(), DoubleNodes()
811     */
812     boolean DoubleNodeGroups( in ListOfGroups theNodes, 
813                               in ListOfGroups theModifiedElems );
814     
815     /*!
816      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
817      * \param theElems - the list of elements (edges or faces) to be replicated
818      *        The nodes for duplication could be found from these elements
819      * \param theNodesNot - list of nodes to NOT replicate
820      * \param theAffectedElems - the list of elements (cells and edges) to which the 
821      *        replicated nodes should be associated to.
822      * \return TRUE if operation has been completed successfully, FALSE otherwise
823      * \sa DoubleNodeGroup(), DoubleNodeGroups()
824     */
825     boolean DoubleNodeElem( in long_array theElems,
826                             in long_array theNodesNot,
827                             in long_array theAffectedElems ); 
828
829     /*!
830      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
831      * \param theElems - the list of elements (edges or faces) to be replicated
832      *        The nodes for duplication could be found from these elements
833      * \param theNodesNot - list of nodes to NOT replicate
834      * \param theShape - shape to detect affected elements (element which geometric center
835      *        located on or inside shape).
836      *        The replicated nodes should be associated to affected elements.
837      * \return TRUE if operation has been completed successfully, FALSE otherwise
838      * \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
839     */
840     boolean DoubleNodeElemInRegion( in long_array theElems,
841                                     in long_array theNodesNot,
842                                     in GEOM::GEOM_Object theShape );
843
844     /*!
845      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
846      * This method provided for convenience works as DoubleNodes() described above.
847      * \param theElems - group of of elements (edges or faces) to be replicated
848      * \param theNodesNot - group of nodes not to replicated
849      * \param theAffectedElems - group of elements to which the replicated nodes
850      *        should be associated to.
851      * \return TRUE if operation has been completed successfully, FALSE otherwise
852      * \sa DoubleNodes(), DoubleNodeGroups(), DoubleNodeElemGroupNew()
853     */
854     boolean DoubleNodeElemGroup( in SMESH_GroupBase theElems, 
855                                  in SMESH_GroupBase theNodesNot,
856                                  in SMESH_GroupBase theAffectedElems );
857
858     /*!
859      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
860      * Works as DoubleNodeElemGroup() described above, but returns a new group with 
861      * newly created elements.
862      * \param theElems - group of of elements (edges or faces) to be replicated
863      * \param theNodesNot - group of nodes not to replicated
864      * \param theAffectedElems - group of elements to which the replicated nodes
865      *        should be associated to.
866      * \return a new group with newly created elements
867      * \sa DoubleNodeElemGroup()
868     */
869     SMESH_Group DoubleNodeElemGroupNew( in SMESH_GroupBase theElems, 
870                                         in SMESH_GroupBase theNodesNot,
871                                         in SMESH_GroupBase theAffectedElems );
872     
873     /*!
874      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
875      * This method provided for convenience works as DoubleNodes() described above.
876      * \param theElems - group of elements (edges or faces) to be replicated
877      * \param theNodesNot - group of nodes not to replicated
878      * \param theShape - shape to detect affected elements (element which geometric center
879      *        located on or inside shape).
880      *        The replicated nodes should be associated to affected elements.
881      * \return TRUE if operation has been completed successfully, FALSE otherwise
882      * \sa DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
883     */
884     boolean DoubleNodeElemGroupInRegion( in SMESH_GroupBase theElems, 
885                                      in SMESH_GroupBase theNodesNot,
886                                      in GEOM::GEOM_Object theShape );
887
888     /*!
889      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
890      * This method provided for convenience works as DoubleNodes() described above.
891      * \param theElems - list of groups of elements (edges or faces) to be replicated
892      * \param theNodesNot - list of groups of nodes not to replicated
893      * \param theAffectedElems - group of elements to which the replicated nodes
894      *        should be associated to.
895      * \return TRUE if operation has been completed successfully, FALSE otherwise
896      * \sa DoubleNodeGroup(), DoubleNodes()
897     */
898     boolean DoubleNodeElemGroups( in ListOfGroups theElems,
899                                   in ListOfGroups theNodesNot,
900                                   in ListOfGroups theAffectedElems );
901
902     /*!
903      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
904      * This method provided for convenience works as DoubleNodes() described above.
905      * \param theElems - list of groups of elements (edges or faces) to be replicated
906      * \param theNodesNot - list of groups of nodes not to replicated
907      * \param theShape - shape to detect affected elements (element which geometric center
908      *        located on or inside shape).
909      *        The replicated nodes should be associated to affected elements.
910      * \return TRUE if operation has been completed successfully, FALSE otherwise
911      * \sa DoubleNodeGroupInRegion(), DoubleNodesInRegion()
912     */
913     boolean DoubleNodeElemGroupsInRegion( in ListOfGroups theElems,
914                                           in ListOfGroups theNodesNot,
915                                           in GEOM::GEOM_Object theShape );
916
917     /*!
918      * \brief Generated skin mesh (containing 2D cells) from 3D mesh
919      * The created 2D mesh elements based on nodes of free faces of boundary volumes
920      * \return TRUE if operation has been completed successfully, FALSE otherwise
921      */
922     boolean Make2DMeshFrom3D();
923
924   };
925 };
926
927 #endif