Salome HOME
PAL10406. Enable myNodes when a pattern is loaded. UpdatePreview() when elements...
[modules/smesh.git] / idl / SMESH_Mesh.idl
1 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3 //
4 //  This library is free software; you can redistribute it and/or
5 //  modify it under the terms of the GNU Lesser General Public
6 //  License as published by the Free Software Foundation; either
7 //  version 2.1 of the License.
8 //
9 //  This library is distributed in the hope that it will be useful,
10 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
11 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 //  Lesser General Public License for more details.
13 //
14 //  You should have received a copy of the GNU Lesser General Public
15 //  License along with this library; if not, write to the Free Software
16 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 //
18 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
19 //
20 //
21 //
22 //  File   : SMESH_Mesh.idl
23 //  Author : Paul RASCLE, EDF
24 //  $Header$
25
26 #ifndef _SMESH_MESH_IDL_
27 #define _SMESH_MESH_IDL_
28
29 #include "SALOME_Exception.idl"
30 #include "SALOME_GenericObj.idl"
31
32 module GEOM
33 {
34   interface GEOM_Object;
35 };
36
37
38 module SALOME_MED
39 {
40   interface MESH;
41   interface FAMILY;
42 };
43
44
45 module SMESH
46 {
47   interface SMESH_Hypothesis;
48   typedef sequence<SMESH_Hypothesis> ListOfHypothesis;
49
50   typedef sequence<double> double_array ;
51   typedef sequence<long> long_array ;
52   typedef sequence<string> string_array ;
53   typedef sequence<long_array> array_of_long_array ;
54
55   enum log_command
56     {
57       ADD_NODE,
58       ADD_EDGE,
59       ADD_TRIANGLE,
60       ADD_QUADRANGLE,
61       ADD_POLYGON,
62       ADD_TETRAHEDRON,
63       ADD_PYRAMID,
64       ADD_PRISM,
65       ADD_HEXAHEDRON,
66       ADD_POLYHEDRON,
67       REMOVE_NODE,
68       REMOVE_ELEMENT,
69       MOVE_NODE,
70       CHANGE_ELEMENT_NODES,
71       CHANGE_POLYHEDRON_NODES,
72       RENUMBER
73     };
74
75   struct log_block
76   {
77     long commandType;
78     long number;
79     double_array coords;
80     long_array indexes;
81   };
82
83   struct PointStruct { double x;
84                        double y;
85                        double z; } ;
86   struct DirStruct   { PointStruct PS ; } ;          // analog to Occ Direction
87
88   struct AxisStruct  { double x;
89                        double y;
90                        double z;
91                        double vx;
92                        double vy;
93                        double vz; } ;
94
95
96   /*!
97    * Enumeration for element type, like in SMDS
98    */
99   enum ElementType
100   {
101     ALL,
102     NODE,
103     EDGE,
104     FACE,
105     VOLUME
106   };
107
108   /*!
109    * Enumeration for hypothesis status (used by AddHypothesis() and RemoveHypothesis() methods)
110    */
111   enum Hypothesis_Status // in the order of severity
112   {
113     HYP_OK,
114     HYP_MISSING,      // algo misses a hypothesis
115     HYP_CONCURENT,    // several applicable hypotheses
116     HYP_BAD_PARAMETER,// hypothesis has a bad parameter value
117     HYP_UNKNOWN_FATAL,//  --- all statuses below should be considered as fatal
118                       //      for Add/RemoveHypothesis operations
119     HYP_INCOMPATIBLE, // hypothesis does not fit algo
120     HYP_NOTCONFORM,   // not conform mesh is produced appling a hypothesis
121     HYP_ALREADY_EXIST,// such hypothesis already exist
122     HYP_BAD_DIM       // bad dimension
123   };
124
125   /*!
126    * Enumeration for DriverMED read status (used by ImportMEDFile() method)
127    */
128   enum DriverMED_ReadStatus // in the order of severity
129   {
130     DRS_OK,
131     DRS_EMPTY,          // a MED file contains no mesh with the given name
132     DRS_WARN_RENUMBER,  // a MED file has overlapped ranges of element numbers,
133                         // so the numbers from the file are ignored
134     DRS_WARN_SKIP_ELEM, // some elements were skipped due to incorrect file data
135     DRS_FAIL            // general failure (exception etc.)
136   };
137
138   /*!
139    * Enumeration for DriverMED (used by Perform() method)
140    */
141   enum MED_VERSION // in the order of severity
142   {
143     MED_V2_1,
144     MED_V2_2
145   };
146
147   typedef sequence<log_block> log_array;
148
149
150   /*!
151    * Auxilary flags for advanced extrusion.
152    * BOUNDARY: create or not boundary for result of extrusion
153    * SEW:      try to use existing nodes or create new nodes in any case
154    */
155   const long EXTRUSION_FLAG_BOUNDARY = 1;
156   const long EXTRUSION_FLAG_SEW = 2;
157   
158   interface SMESH_IDSource
159   {
160     /*!
161      * Returns a sequence of all element IDs
162      */
163     long_array GetIDs();
164   };
165
166   interface SMESH_GroupBase;
167   interface SMESH_Group;
168   interface SMESH_GroupOnGeom;
169   interface SMESH_subMesh;
170   interface SMESH_MeshEditor;
171   interface SMESH_Mesh : SALOME::GenericObj, SMESH_IDSource
172   {
173     ///*!
174     // * Associate a Shape to a Mesh created with NewEmpty
175     // */
176     //boolean SetMesh(in GEOM::GEOM_Object anObject)
177     //  raises (SALOME::SALOME_Exception);
178
179     /*!
180      * Get the subMesh object associated to a subShape. The subMesh object
181      * gives access to nodes and elements IDs.
182      * SubMesh will be used instead of SubShape in a next idl version to
183      * adress a specific subMesh...
184      */
185     SMESH_subMesh GetSubMesh(in GEOM::GEOM_Object aSubObject, in string name)
186       raises (SALOME::SALOME_Exception);
187
188     ///*!
189     // * Create a subMesh without reference to a subShape
190     // */
191     //SMESH_subMesh NewEmpty()
192     //  raises (SALOME::SALOME_Exception);
193
194     /*!
195      * Get geom shape to mesh. A result may be nil
196      */
197     GEOM::GEOM_Object GetShapeToMesh()
198       raises (SALOME::SALOME_Exception);
199
200     /*!
201      * Remove a submesh
202      */
203     void RemoveSubMesh(in SMESH_subMesh aSubMesh)
204       raises (SALOME::SALOME_Exception);
205
206     /*!
207      * Create a group
208      */
209     SMESH_Group CreateGroup( in ElementType elem_type,
210                              in string name )
211       raises (SALOME::SALOME_Exception);
212
213     /*!
214      * Create a group from geometry group
215      */
216     SMESH_GroupOnGeom CreateGroupFromGEOM( in ElementType elem_type,
217                                           in string name,
218                                           in GEOM::GEOM_Object theGeomObject )
219       raises (SALOME::SALOME_Exception);
220
221     /*!
222      * Remove a group
223      */
224     void RemoveGroup(in SMESH_GroupBase aGroup)
225       raises (SALOME::SALOME_Exception);
226
227     /*!
228      *  Remove group with its contents
229      */
230     void RemoveGroupWithContents( in SMESH_GroupBase aGroup )
231       raises (SALOME::SALOME_Exception);
232
233     /*!
234      * Union of two groups
235      *    New group is created. All mesh elements that are
236      *    present in initial groups are added to the new one
237      */
238     SMESH_Group UnionGroups (in SMESH_GroupBase aGroup1,
239                              in SMESH_GroupBase aGroup2,
240                              in string          name )
241       raises (SALOME::SALOME_Exception);
242
243     /*!
244      *  Intersection of two groups
245      *  New group is created. All mesh elements that are
246      *  present in both initial groups are added to the new one.
247      */
248     SMESH_Group IntersectGroups (in SMESH_GroupBase aGroup1,
249                                  in SMESH_GroupBase aGroup2,
250                                  in string          name )
251       raises (SALOME::SALOME_Exception);
252
253     /*!
254      *  Cut of two groups
255      *  New group is created. All mesh elements that are present in
256      *  main group but do not present in tool group are added to the new one
257      */
258     SMESH_Group CutGroups (in SMESH_GroupBase aMainGroup,
259                            in SMESH_GroupBase aToolGroup,
260                            in string          name )
261       raises (SALOME::SALOME_Exception);
262
263     /*!
264      * Add hypothesis to the mesh, under a particular subShape
265      * (or the main shape itself)
266      * The Add method is only used to prepare the build of the mesh and store
267      * the algorithms and associated parameters.
268      * Actual job of mesh the shape is done by MESH_Gen.
269      * @params
270      * - aSubShape : subShape obtained by a shape explode in GEOM
271      *   (or main shape)
272      * - anHyp : hypothesis object
273      * @return
274      * - OK if the hypothesis is compatible with the subShape
275      *   (and all previous hypothesis on the subShape)
276      * - NOK if the hypothesis is not compatible with the subShape
277      *   (or one previous hypothesis on the subShape)
278      * raises exception if hypothesis has not been created
279      */
280     Hypothesis_Status AddHypothesis(in GEOM::GEOM_Object aSubObject,
281                                     in SMESH_Hypothesis anHyp)
282       raises (SALOME::SALOME_Exception);
283 //     boolean AddHypothesis(in SMESH_subMesh aSubMesh, in SMESH_Hypothesis anHyp)
284 //       raises (SALOME::SALOME_Exception);
285
286     /*!
287      * Remove an hypothesis previouly added with AddHypothesis.
288      */
289     Hypothesis_Status RemoveHypothesis(in GEOM::GEOM_Object aSubObject,
290                                        in SMESH_Hypothesis anHyp)
291       raises (SALOME::SALOME_Exception);
292 //     boolean RemoveHypothesis(in SMESH_subMesh aSubMesh,
293 //                           in SMESH_Hypothesis anHyp)
294 //       raises (SALOME::SALOME_Exception);
295
296     /*!
297      * Get the list of hypothesis added on a subShape
298      */
299     ListOfHypothesis GetHypothesisList(in GEOM::GEOM_Object aSubObject)
300       raises (SALOME::SALOME_Exception);
301 //     ListOfHypothesis GetHypothesisList(in SMESH_subMesh aSubMesh)
302 //       raises (SALOME::SALOME_Exception);
303
304     /*!
305      * Get the log of nodes and elements added or removed since previous
306      * clear of the log.
307      * @params
308      * - clearAfterGet : log is emptied after Get (safe if concurrents access)
309      */
310     //    string_array GetLog(in boolean clearAfterGet)
311     //      raises (SALOME::SALOME_Exception);
312     log_array GetLog(in boolean clearAfterGet)
313       raises (SALOME::SALOME_Exception);
314
315     /*!
316      * Clear the log of nodes and elements added or removed since previous
317      * clear. Must be used immediately after GetLog if clearAfterGet is false.
318      */
319     void ClearLog()
320       raises (SALOME::SALOME_Exception);
321
322     /*!
323      * Get the internal Id
324      */
325     long GetId();
326
327     /*!
328      * Get the study Id
329      */
330     long GetStudyId();
331
332     /*!
333      * Obtain instance of SMESH_MeshEditor
334      */
335     SMESH_MeshEditor GetMeshEditor()
336       raises (SALOME::SALOME_Exception);
337
338     /*!
339      * Export Mesh to different MED Formats
340      * @params
341      * - auto_groups : boolean parameter for creating/not creating
342      *   the groups Group_On_All_Nodes, Group_On_All_Faces, ... ;
343      *   the typical use is auto_groups=false.
344      * - theVersion : define the version of format of MED file, that will be created
345      */
346     void ExportToMED( in string file, in boolean auto_groups, in MED_VERSION theVersion )
347       raises (SALOME::SALOME_Exception);
348
349     /*!
350      * Export Mesh to MED_V2_1 MED format
351      * Works, just the same as ExportToMED, with MED_VERSION parameter equal to MED_V2_1.
352      * The method is kept in order to support old functionality
353      */
354     void ExportMED( in string file, in boolean auto_groups )
355       raises (SALOME::SALOME_Exception);
356
357     /*!
358      * Export Mesh to DAT, UNV and STL Formats
359      */
360     void ExportDAT( in string file )
361       raises (SALOME::SALOME_Exception);
362     void ExportUNV( in string file )
363       raises (SALOME::SALOME_Exception);
364     void ExportSTL( in string file, in boolean isascii )
365       raises (SALOME::SALOME_Exception);
366
367     /*!
368      * Get MED Mesh
369      */
370     SALOME_MED::MESH GetMEDMesh()
371       raises (SALOME::SALOME_Exception);
372
373     /*!
374      * Get informations about mesh contents
375      */
376     long NbNodes()
377       raises (SALOME::SALOME_Exception);
378
379     long NbElements()
380       raises (SALOME::SALOME_Exception);
381
382     long NbEdges()
383       raises (SALOME::SALOME_Exception);
384
385     long NbFaces()
386       raises (SALOME::SALOME_Exception);
387
388     long NbTriangles()
389       raises (SALOME::SALOME_Exception);
390
391     long NbQuadrangles()
392       raises (SALOME::SALOME_Exception);
393
394     long NbPolygons()
395       raises (SALOME::SALOME_Exception);
396
397     long NbVolumes()
398       raises (SALOME::SALOME_Exception);
399
400     long NbTetras()
401       raises (SALOME::SALOME_Exception);
402
403     long NbHexas()
404       raises (SALOME::SALOME_Exception);
405
406     long NbPyramids()
407       raises (SALOME::SALOME_Exception);
408
409     long NbPrisms()
410       raises (SALOME::SALOME_Exception);
411
412     long NbPolyhedrons()
413       raises (SALOME::SALOME_Exception);
414
415     long NbSubMesh()
416       raises (SALOME::SALOME_Exception);
417
418     long_array GetElementsId()
419       raises (SALOME::SALOME_Exception);
420
421     long_array GetElementsByType( in ElementType theType )
422       raises (SALOME::SALOME_Exception);
423
424     long_array GetNodesId()
425       raises (SALOME::SALOME_Exception);
426     
427     /*!
428      * Returns type of mesh element
429      */    
430     ElementType GetElementType( in long id, in boolean iselem )
431       raises (SALOME::SALOME_Exception);
432
433     /*!
434      * Get mesh description
435      */
436     string Dump();
437   };
438
439   interface SMESH_subMesh : SALOME::GenericObj, SMESH_IDSource
440   {
441     /*!
442      *
443      */
444     long GetNumberOfElements()
445       raises (SALOME::SALOME_Exception);
446
447     /*!
448      *
449      */
450     long GetNumberOfNodes( in boolean all )
451       raises (SALOME::SALOME_Exception);
452
453     /*!
454      *
455      */
456     long_array GetElementsId()
457       raises (SALOME::SALOME_Exception);
458
459     /*!
460      *
461      */
462     long_array GetElementsByType( in ElementType theType )
463       raises (SALOME::SALOME_Exception);
464     
465     /*!
466      * Return type of submesh element
467      */
468     ElementType GetElementType( in long id, in boolean iselem )
469       raises (SALOME::SALOME_Exception);
470
471     /*!
472      *
473      */
474     long_array GetNodesId()
475       raises (SALOME::SALOME_Exception);
476
477     /*!
478      * Get geom shape the submesh is dedicated to
479      */
480     GEOM::GEOM_Object GetSubShape()
481       raises (SALOME::SALOME_Exception);
482
483     /*!
484      * Get SMESH_Mesh which stores nodes coordinates & elements definition
485      */
486     SMESH_Mesh GetFather()
487       raises (SALOME::SALOME_Exception);
488
489     /*!
490      * Get the internal Id
491      */
492     long GetId();
493
494     /*!
495      * Get MED subMesh
496      */
497     SALOME_MED::FAMILY GetFamily()
498       raises (SALOME::SALOME_Exception);
499   };
500
501   /*!
502    * This interface makes modifications on the Mesh - removing elements and nodes etc.
503    */
504   interface NumericalFunctor;
505   interface SMESH_MeshEditor
506   {
507     boolean RemoveElements(in long_array IDsOfElements);
508
509     boolean RemoveNodes(in long_array IDsOfNodes);
510
511     boolean AddNode(in double x, in double y, in double z);
512
513     boolean AddEdge(in long_array IDsOfNodes);
514
515     boolean AddFace(in long_array IDsOfNodes);
516
517     boolean AddVolume(in long_array IDsOfNodes);
518
519     /*!
520      *  Create volume of many faces, giving nodes for each face.
521      *  \param IdsOfNodes List of node IDs for volume creation face by face.
522      *  \param Quantities List of integer values, Quantities[i]
523      *         gives quantity of nodes in face number i.
524      */
525     boolean AddPolyhedralVolume (in long_array IdsOfNodes,
526                                  in long_array Quantities);
527
528     /*!
529      *  Create volume of many faces, giving IDs of existing faces.
530      *  \param IdsOfFaces List of face IDs for volume creation.
531      *  \note The created volume will refer only to nodes
532      *        of the given faces, not to the faces itself.
533      */
534     boolean AddPolyhedralVolumeByFaces (in long_array IdsOfFaces);
535
536     boolean MoveNode(in long NodeID, in double x, in double y, in double z);
537
538     boolean InverseDiag(in long NodeID1, in long NodeID2);
539
540     boolean DeleteDiag(in long NodeID1, in long NodeID2);
541
542     boolean Reorient(in long_array IDsOfElements);
543
544     boolean ReorientObject(in SMESH_IDSource theObject);
545
546     /*!
547      * \brief Fuse neighbour triangles into quadrangles.
548      * \param theElems     The triangles to be fused.
549      * \param theCriterion Is used to choose a neighbour to fuse with.
550      * \param theMaxAngle  Is a max angle between element normals at which fusion
551      *                     is still performed; theMaxAngle is mesured in radians.
552      * \return TRUE in case of success, FALSE otherwise.
553      */
554     boolean TriToQuad (in long_array       IDsOfElements,
555                        in NumericalFunctor Criterion,
556                        in double           MaxAngle);
557
558     /*!
559      * \brief Fuse neighbour triangles into quadrangles.
560      *
561      * Behaves like the above method, taking list of elements from \a theObject
562      */
563     boolean TriToQuadObject (in SMESH_IDSource   theObject,
564                              in NumericalFunctor Criterion,
565                              in double           MaxAngle);
566
567     /*!
568      * \brief Split quadrangles into triangles.
569      * \param theElems     The faces to be splitted.
570      * \param theCriterion Is used to choose a diagonal for splitting.
571      * \return TRUE in case of success, FALSE otherwise.
572      */
573     boolean QuadToTri (in long_array       IDsOfElements,
574                        in NumericalFunctor Criterion);
575
576     /*!
577      * \brief Split quadrangles into triangles.
578      *
579      * Behaves like the above method, taking list of elements from \a theObject
580      */
581     boolean QuadToTriObject (in SMESH_IDSource   theObject,
582                              in NumericalFunctor Criterion);
583
584     /*!
585      * \brief Split quadrangles into triangles.
586      * \param theElems  The faces to be splitted.
587      * \param the13Diag Is used to choose a diagonal for splitting.
588      * \return TRUE in case of success, FALSE otherwise.
589      */
590     boolean SplitQuad (in long_array IDsOfElements,
591                        in boolean    Diag13);
592
593     /*!
594      * \brief Split quadrangles into triangles.
595      *
596      * Behaves like the above method, taking list of elements from \a theObject
597      */
598     boolean SplitQuadObject (in SMESH_IDSource theObject,
599                              in boolean        Diag13);
600
601     /*!
602      *  Find better splitting of the given quadrangle.
603      *  \param IDOfQuad  ID of the quadrangle to be splitted.
604      *  \param Criterion A criterion to choose a diagonal for splitting.
605      *  \return 1 if 1-3 diagonal is better, 2 if 2-4
606      *          diagonal is better, 0 if error occurs.
607      */
608     long BestSplit (in long             IDOfQuad,
609                     in NumericalFunctor Criterion);
610
611     enum Smooth_Method { LAPLACIAN_SMOOTH, CENTROIDAL_SMOOTH };
612
613     boolean Smooth(in long_array    IDsOfElements,
614                    in long_array    IDsOfFixedNodes,
615                    in long          MaxNbOfIterations,
616                    in double        MaxAspectRatio,
617                    in Smooth_Method Method);
618
619     boolean SmoothObject(in SMESH_IDSource  theObject,
620                          in long_array      IDsOfFixedNodes,
621                          in long            MaxNbOfIterations,
622                          in double          MaxAspectRatio,
623                          in Smooth_Method   Method);
624
625     boolean SmoothParametric(in long_array    IDsOfElements,
626                              in long_array    IDsOfFixedNodes,
627                              in long          MaxNbOfIterations,
628                              in double        MaxAspectRatio,
629                              in Smooth_Method Method);
630
631     boolean SmoothParametricObject(in SMESH_IDSource  theObject,
632                                    in long_array      IDsOfFixedNodes,
633                                    in long            MaxNbOfIterations,
634                                    in double          MaxAspectRatio,
635                                    in Smooth_Method   Method);
636
637     void RenumberNodes();
638
639     void RenumberElements();
640
641     void RotationSweep(in long_array       IDsOfElements,
642                        in AxisStruct       Axix,
643                        in double           AngleInRadians,
644                        in long             NbOfSteps,
645                        in double           Tolerance);
646
647     void RotationSweepObject(in SMESH_IDSource  theObject,
648                              in AxisStruct      Axix,
649                              in double          AngleInRadians,
650                              in long            NbOfSteps,
651                              in double          Tolerance);
652
653     void ExtrusionSweep(in long_array      IDsOfElements,
654                         in DirStruct       StepVector,
655                         in long            NbOfSteps);
656
657    /*!
658     * Generate new elements by extrusion of theElements 
659     * by StepVector by NbOfSteps
660     * param ExtrFlags set flags for performing extrusion
661     * param SewTolerance - uses for comparing locations of nodes if flag
662     *   EXTRUSION_FLAG_SEW is set
663     */
664     void AdvancedExtrusion(in long_array      IDsOfElements,
665                            in DirStruct       StepVector,
666                            in long            NbOfSteps,
667                            in long            ExtrFlags,
668                            in double          SewTolerance);
669
670     void ExtrusionSweepObject(in SMESH_IDSource  theObject,
671                               in DirStruct       StepVector,
672                               in long            NbOfSteps);
673
674     void ExtrusionSweepObject1D(in SMESH_IDSource theObject,
675                                 in DirStruct      StepVector,
676                                 in long           NbOfSteps);
677
678     void ExtrusionSweepObject2D(in SMESH_IDSource theObject,
679                                 in DirStruct      StepVector,
680                                 in long           NbOfSteps);
681
682     enum Extrusion_Error {
683       EXTR_OK,
684       EXTR_NO_ELEMENTS,
685       EXTR_PATH_NOT_EDGE,
686       EXTR_BAD_PATH_SHAPE,
687       EXTR_BAD_STARTING_NODE,
688       EXTR_BAD_ANGLES_NUMBER,
689       EXTR_CANT_GET_TANGENT
690       };
691
692     Extrusion_Error ExtrusionAlongPath(in long_array        IDsOfElements,
693                                        in SMESH_Mesh        PathMesh,
694                                        in GEOM::GEOM_Object PathShape,
695                                        in long              NodeStart,
696                                        in boolean           HasAngles,
697                                        in double_array      Angles,
698                                        in boolean           HasRefPoint,
699                                        in PointStruct       RefPoint);
700
701     Extrusion_Error ExtrusionAlongPathObject(in SMESH_IDSource    theObject,
702                                              in SMESH_Mesh        PathMesh,
703                                              in GEOM::GEOM_Object PathShape,
704                                              in long              NodeStart,
705                                              in boolean           HasAngles,
706                                              in double_array      Angles,
707                                              in boolean           HasRefPoint,
708                                              in PointStruct       RefPoint);
709
710     enum MirrorType { POINT, AXIS, PLANE };
711
712     void Mirror (in long_array       IDsOfElements,
713                  in AxisStruct       Mirror,
714                  in MirrorType       theMirrorType,
715                  in boolean          Copy);
716
717     void MirrorObject (in SMESH_IDSource  theObject,
718                        in AxisStruct      Mirror,
719                        in MirrorType      theMirrorType,
720                        in boolean         Copy);
721
722     void Translate (in long_array      IDsOfElements,
723                     in DirStruct       Vector,
724                     in boolean         Copy);
725
726     void TranslateObject (in SMESH_IDSource  theObject,
727                           in DirStruct       Vector,
728                           in boolean         Copy);
729
730     void Rotate (in long_array       IDsOfElements,
731                  in AxisStruct       Axis,
732                  in double           AngleInRadians,
733                  in boolean          Copy);
734
735     void RotateObject (in SMESH_IDSource  theObject,
736                        in AxisStruct      Axis,
737                        in double          AngleInRadians,
738                        in boolean         Copy);
739
740     void FindCoincidentNodes (in  double              Tolerance,
741                               out array_of_long_array GroupsOfNodes);
742
743     void MergeNodes (in array_of_long_array GroupsOfNodes);
744
745     void MergeEqualElements();
746
747     enum Sew_Error {
748       SEW_OK,
749       SEW_BORDER1_NOT_FOUND,
750       SEW_BORDER2_NOT_FOUND,
751       SEW_BOTH_BORDERS_NOT_FOUND,
752       SEW_BAD_SIDE_NODES,
753       SEW_VOLUMES_TO_SPLIT,
754       // for SewSideElements() only:
755       SEW_DIFF_NB_OF_ELEMENTS,
756       SEW_TOPO_DIFF_SETS_OF_ELEMENTS,
757       SEW_BAD_SIDE1_NODES,
758       SEW_BAD_SIDE2_NODES
759       };
760
761     Sew_Error SewFreeBorders (in long FirstNodeID1,
762                               in long SecondNodeID1,
763                               in long LastNodeID1,
764                               in long FirstNodeID2,
765                               in long SecondNodeID2,
766                               in long LastNodeID2,
767                               in boolean CreatePolygons,
768                               in boolean CreatePolyedrs);
769
770     Sew_Error SewConformFreeBorders (in long FirstNodeID1,
771                                      in long SecondNodeID1,
772                                      in long LastNodeID1,
773                                      in long FirstNodeID2,
774                                      in long SecondNodeID2);
775
776     Sew_Error SewBorderToSide (in long FirstNodeIDOnFreeBorder,
777                                in long SecondNodeIDOnFreeBorder,
778                                in long LastNodeIDOnFreeBorder,
779                                in long FirstNodeIDOnSide,
780                                in long LastNodeIDOnSide,
781                                in boolean CreatePolygons,
782                                in boolean CreatePolyedrs);
783
784     Sew_Error SewSideElements (in long_array IDsOfSide1Elements,
785                                in long_array IDsOfSide2Elements,
786                                in long       NodeID1OfSide1ToMerge,
787                                in long       NodeID1OfSide2ToMerge,
788                                in long       NodeID2OfSide1ToMerge,
789                                in long       NodeID2OfSide2ToMerge);
790
791   };
792 };
793
794 #endif