Salome HOME
Movement of examples to CVS EXAMPLES SAMPLES_SRC.
[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   interface SMESH_IDSource
151   {
152     /*!
153      * Returns a sequence of all element IDs
154      */
155     long_array GetIDs();
156   };
157
158   interface SMESH_GroupBase;
159   interface SMESH_Group;
160   interface SMESH_GroupOnGeom;
161   interface SMESH_subMesh;
162   interface SMESH_MeshEditor;
163   interface SMESH_Mesh : SALOME::GenericObj, SMESH_IDSource
164   {
165     ///*!
166     // * Associate a Shape to a Mesh created with NewEmpty
167     // */
168     //boolean SetMesh(in GEOM::GEOM_Object anObject)
169     //  raises (SALOME::SALOME_Exception);
170
171     /*!
172      * Get the subMesh object associated to a subShape. The subMesh object
173      * gives access to nodes and elements IDs.
174      * SubMesh will be used instead of SubShape in a next idl version to
175      * adress a specific subMesh...
176      */
177     SMESH_subMesh GetSubMesh(in GEOM::GEOM_Object aSubObject, in string name)
178       raises (SALOME::SALOME_Exception);
179
180     ///*!
181     // * Create a subMesh without reference to a subShape
182     // */
183     //SMESH_subMesh NewEmpty()
184     //  raises (SALOME::SALOME_Exception);
185
186     /*!
187      * Get geom shape to mesh. A result may be nil
188      */
189     GEOM::GEOM_Object GetShapeToMesh()
190       raises (SALOME::SALOME_Exception);
191
192     /*!
193      * Remove a submesh
194      */
195     void RemoveSubMesh(in SMESH_subMesh aSubMesh)
196       raises (SALOME::SALOME_Exception);
197
198     /*!
199      * Create a group
200      */
201     SMESH_Group CreateGroup( in ElementType elem_type,
202                              in string name )
203       raises (SALOME::SALOME_Exception);
204
205     /*!
206      * Create a group from geometry group
207      */
208     SMESH_GroupOnGeom CreateGroupFromGEOM( in ElementType elem_type,
209                                           in string name,
210                                           in GEOM::GEOM_Object theGeomObject )
211       raises (SALOME::SALOME_Exception);
212
213     /*!
214      * Remove a group
215      */
216     void RemoveGroup(in SMESH_GroupBase aGroup)
217       raises (SALOME::SALOME_Exception);
218
219     /*!
220      *  Remove group with its contents
221      */
222     void RemoveGroupWithContents( in SMESH_GroupBase aGroup )
223       raises (SALOME::SALOME_Exception);
224
225     /*!
226      * Union of two groups
227      *    New group is created. All mesh elements that are
228      *    present in initial groups are added to the new one
229      */
230     SMESH_Group UnionGroups (in SMESH_GroupBase aGroup1,
231                              in SMESH_GroupBase aGroup2,
232                              in string          name )
233       raises (SALOME::SALOME_Exception);
234
235     /*!
236      *  Intersection of two groups
237      *  New group is created. All mesh elements that are
238      *  present in both initial groups are added to the new one.
239      */
240     SMESH_Group IntersectGroups (in SMESH_GroupBase aGroup1,
241                                  in SMESH_GroupBase aGroup2,
242                                  in string          name )
243       raises (SALOME::SALOME_Exception);
244
245     /*!
246      *  Cut of two groups
247      *  New group is created. All mesh elements that are present in
248      *  main group but do not present in tool group are added to the new one
249      */
250     SMESH_Group CutGroups (in SMESH_GroupBase aMainGroup,
251                            in SMESH_GroupBase aToolGroup,
252                            in string          name )
253       raises (SALOME::SALOME_Exception);
254
255     /*!
256      * Add hypothesis to the mesh, under a particular subShape
257      * (or the main shape itself)
258      * The Add method is only used to prepare the build of the mesh and store
259      * the algorithms and associated parameters.
260      * Actual job of mesh the shape is done by MESH_Gen.
261      * @params
262      * - aSubShape : subShape obtained by a shape explode in GEOM
263      *   (or main shape)
264      * - anHyp : hypothesis object
265      * @return
266      * - OK if the hypothesis is compatible with the subShape
267      *   (and all previous hypothesis on the subShape)
268      * - NOK if the hypothesis is not compatible with the subShape
269      *   (or one previous hypothesis on the subShape)
270      * raises exception if hypothesis has not been created
271      */
272     Hypothesis_Status AddHypothesis(in GEOM::GEOM_Object aSubObject,
273                                     in SMESH_Hypothesis anHyp)
274       raises (SALOME::SALOME_Exception);
275 //     boolean AddHypothesis(in SMESH_subMesh aSubMesh, in SMESH_Hypothesis anHyp)
276 //       raises (SALOME::SALOME_Exception);
277
278     /*!
279      * Remove an hypothesis previouly added with AddHypothesis.
280      */
281     Hypothesis_Status RemoveHypothesis(in GEOM::GEOM_Object aSubObject,
282                                        in SMESH_Hypothesis anHyp)
283       raises (SALOME::SALOME_Exception);
284 //     boolean RemoveHypothesis(in SMESH_subMesh aSubMesh,
285 //                           in SMESH_Hypothesis anHyp)
286 //       raises (SALOME::SALOME_Exception);
287
288     /*!
289      * Get the list of hypothesis added on a subShape
290      */
291     ListOfHypothesis GetHypothesisList(in GEOM::GEOM_Object aSubObject)
292       raises (SALOME::SALOME_Exception);
293 //     ListOfHypothesis GetHypothesisList(in SMESH_subMesh aSubMesh)
294 //       raises (SALOME::SALOME_Exception);
295
296     /*!
297      * Get the log of nodes and elements added or removed since previous
298      * clear of the log.
299      * @params
300      * - clearAfterGet : log is emptied after Get (safe if concurrents access)
301      */
302     //    string_array GetLog(in boolean clearAfterGet)
303     //      raises (SALOME::SALOME_Exception);
304     log_array GetLog(in boolean clearAfterGet)
305       raises (SALOME::SALOME_Exception);
306
307     /*!
308      * Clear the log of nodes and elements added or removed since previous
309      * clear. Must be used immediately after GetLog if clearAfterGet is false.
310      */
311     void ClearLog()
312       raises (SALOME::SALOME_Exception);
313
314     /*!
315      * Get the internal Id
316      */
317     long GetId();
318
319     /*!
320      * Get the study Id
321      */
322     long GetStudyId();
323
324     /*!
325      * Obtain instance of SMESH_MeshEditor
326      */
327     SMESH_MeshEditor GetMeshEditor()
328       raises (SALOME::SALOME_Exception);
329
330     /*!
331      * Export Mesh to different MED Formats
332      * @params
333      * - auto_groups : boolean parameter for creating/not creating
334      *   the groups Group_On_All_Nodes, Group_On_All_Faces, ... ;
335      *   the typical use is auto_groups=false.
336      * - theVersion : define the version of format of MED file, that will be created
337      */
338     void ExportToMED( in string file, in boolean auto_groups, in MED_VERSION theVersion )
339       raises (SALOME::SALOME_Exception);
340
341     /*!
342      * Export Mesh to MED_V2_1 MED format
343      * Works, just the same as ExportToMED, with MED_VERSION parameter equal to MED_V2_1.
344      * The method is kept in order to support old functionality
345      */
346     void ExportMED( in string file, in boolean auto_groups )
347       raises (SALOME::SALOME_Exception);
348
349     /*!
350      * Export Mesh to DAT, UNV and STL Formats
351      */
352     void ExportDAT( in string file )
353       raises (SALOME::SALOME_Exception);
354     void ExportUNV( in string file )
355       raises (SALOME::SALOME_Exception);
356     void ExportSTL( in string file, in boolean isascii )
357       raises (SALOME::SALOME_Exception);
358
359     /*!
360      * Get MED Mesh
361      */
362     SALOME_MED::MESH GetMEDMesh()
363       raises (SALOME::SALOME_Exception);
364
365     /*!
366      * Get informations about mesh contents
367      */
368     long NbNodes()
369       raises (SALOME::SALOME_Exception);
370
371     long NbElements()
372       raises (SALOME::SALOME_Exception);
373
374     long NbEdges()
375       raises (SALOME::SALOME_Exception);
376
377     long NbFaces()
378       raises (SALOME::SALOME_Exception);
379
380     long NbTriangles()
381       raises (SALOME::SALOME_Exception);
382
383     long NbQuadrangles()
384       raises (SALOME::SALOME_Exception);
385
386     long NbPolygons()
387       raises (SALOME::SALOME_Exception);
388
389     long NbVolumes()
390       raises (SALOME::SALOME_Exception);
391
392     long NbTetras()
393       raises (SALOME::SALOME_Exception);
394
395     long NbHexas()
396       raises (SALOME::SALOME_Exception);
397
398     long NbPyramids()
399       raises (SALOME::SALOME_Exception);
400
401     long NbPrisms()
402       raises (SALOME::SALOME_Exception);
403
404     long NbPolyhedrons()
405       raises (SALOME::SALOME_Exception);
406
407     long NbSubMesh()
408       raises (SALOME::SALOME_Exception);
409
410     long_array GetElementsId()
411       raises (SALOME::SALOME_Exception);
412
413     long_array GetElementsByType( in ElementType theType )
414       raises (SALOME::SALOME_Exception);
415
416     long_array GetNodesId()
417       raises (SALOME::SALOME_Exception);
418     
419     /*!
420      * Returns type of mesh element
421      */    
422     ElementType GetElementType( in long id, in boolean iselem )
423       raises (SALOME::SALOME_Exception);
424
425     /*!
426      * Get mesh description
427      */
428     string Dump();
429   };
430
431   interface SMESH_subMesh : SALOME::GenericObj, SMESH_IDSource
432   {
433     /*!
434      *
435      */
436     long GetNumberOfElements()
437       raises (SALOME::SALOME_Exception);
438
439     /*!
440      *
441      */
442     long GetNumberOfNodes( in boolean all )
443       raises (SALOME::SALOME_Exception);
444
445     /*!
446      *
447      */
448     long_array GetElementsId()
449       raises (SALOME::SALOME_Exception);
450
451     /*!
452      *
453      */
454     long_array GetElementsByType( in ElementType theType )
455       raises (SALOME::SALOME_Exception);
456     
457     /*!
458      * Return type of submesh element
459      */
460     ElementType GetElementType( in long id, in boolean iselem )
461       raises (SALOME::SALOME_Exception);
462
463     /*!
464      *
465      */
466     long_array GetNodesId()
467       raises (SALOME::SALOME_Exception);
468
469     /*!
470      * Get geom shape the submesh is dedicated to
471      */
472     GEOM::GEOM_Object GetSubShape()
473       raises (SALOME::SALOME_Exception);
474
475     /*!
476      * Get SMESH_Mesh which stores nodes coordinates & elements definition
477      */
478     SMESH_Mesh GetFather()
479       raises (SALOME::SALOME_Exception);
480
481     /*!
482      * Get the internal Id
483      */
484     long GetId();
485
486     /*!
487      * Get MED subMesh
488      */
489     SALOME_MED::FAMILY GetFamily()
490       raises (SALOME::SALOME_Exception);
491   };
492
493   /*!
494    * This interface makes modifications on the Mesh - removing elements and nodes etc.
495    */
496   interface NumericalFunctor;
497   interface SMESH_MeshEditor
498   {
499     boolean RemoveElements(in long_array IDsOfElements);
500
501     boolean RemoveNodes(in long_array IDsOfNodes);
502
503     boolean AddNode(in double x, in double y, in double z);
504
505     boolean AddEdge(in long_array IDsOfNodes);
506
507     boolean AddFace(in long_array IDsOfNodes);
508
509     boolean AddVolume(in long_array IDsOfNodes);
510
511     /*!
512      *  Create volume of many faces, giving nodes for each face.
513      *  \param IdsOfNodes List of node IDs for volume creation face by face.
514      *  \param Quantities List of integer values, Quantities[i]
515      *         gives quantity of nodes in face number i.
516      */
517     boolean AddPolyhedralVolume (in long_array IdsOfNodes,
518                                  in long_array Quantities);
519
520     /*!
521      *  Create volume of many faces, giving IDs of existing faces.
522      *  \param IdsOfFaces List of face IDs for volume creation.
523      *  \note The created volume will refer only to nodes
524      *        of the given faces, not to the faces itself.
525      */
526     boolean AddPolyhedralVolumeByFaces (in long_array IdsOfFaces);
527
528     boolean MoveNode(in long NodeID, in double x, in double y, in double z);
529
530     boolean InverseDiag(in long NodeID1, in long NodeID2);
531
532     boolean DeleteDiag(in long NodeID1, in long NodeID2);
533
534     boolean Reorient(in long_array IDsOfElements);
535
536     boolean ReorientObject(in SMESH_IDSource theObject);
537
538     /*!
539      * \brief Fuse neighbour triangles into quadrangles.
540      * \param theElems     The triangles to be fused.
541      * \param theCriterion Is used to choose a neighbour to fuse with.
542      * \param theMaxAngle  Is a max angle between element normals at which fusion
543      *                     is still performed; theMaxAngle is mesured in radians.
544      * \return TRUE in case of success, FALSE otherwise.
545      */
546     boolean TriToQuad (in long_array       IDsOfElements,
547                        in NumericalFunctor Criterion,
548                        in double           MaxAngle);
549
550     /*!
551      * \brief Fuse neighbour triangles into quadrangles.
552      *
553      * Behaves like the above method, taking list of elements from \a theObject
554      */
555     boolean TriToQuadObject (in SMESH_IDSource   theObject,
556                              in NumericalFunctor Criterion,
557                              in double           MaxAngle);
558
559     /*!
560      * \brief Split quadrangles into triangles.
561      * \param theElems     The faces to be splitted.
562      * \param theCriterion Is used to choose a diagonal for splitting.
563      * \return TRUE in case of success, FALSE otherwise.
564      */
565     boolean QuadToTri (in long_array       IDsOfElements,
566                        in NumericalFunctor Criterion);
567
568     /*!
569      * \brief Split quadrangles into triangles.
570      *
571      * Behaves like the above method, taking list of elements from \a theObject
572      */
573     boolean QuadToTriObject (in SMESH_IDSource   theObject,
574                              in NumericalFunctor Criterion);
575
576     /*!
577      * \brief Split quadrangles into triangles.
578      * \param theElems  The faces to be splitted.
579      * \param the13Diag Is used to choose a diagonal for splitting.
580      * \return TRUE in case of success, FALSE otherwise.
581      */
582     boolean SplitQuad (in long_array IDsOfElements,
583                        in boolean    Diag13);
584
585     /*!
586      * \brief Split quadrangles into triangles.
587      *
588      * Behaves like the above method, taking list of elements from \a theObject
589      */
590     boolean SplitQuadObject (in SMESH_IDSource theObject,
591                              in boolean        Diag13);
592
593     /*!
594      *  Find better splitting of the given quadrangle.
595      *  \param IDOfQuad  ID of the quadrangle to be splitted.
596      *  \param Criterion A criterion to choose a diagonal for splitting.
597      *  \return 1 if 1-3 diagonal is better, 2 if 2-4
598      *          diagonal is better, 0 if error occurs.
599      */
600     long BestSplit (in long             IDOfQuad,
601                     in NumericalFunctor Criterion);
602
603     enum Smooth_Method { LAPLACIAN_SMOOTH, CENTROIDAL_SMOOTH };
604
605     boolean Smooth(in long_array    IDsOfElements,
606                    in long_array    IDsOfFixedNodes,
607                    in long          MaxNbOfIterations,
608                    in double        MaxAspectRatio,
609                    in Smooth_Method Method);
610
611     boolean SmoothObject(in SMESH_IDSource  theObject,
612                          in long_array      IDsOfFixedNodes,
613                          in long            MaxNbOfIterations,
614                          in double          MaxAspectRatio,
615                          in Smooth_Method   Method);
616
617     boolean SmoothParametric(in long_array    IDsOfElements,
618                              in long_array    IDsOfFixedNodes,
619                              in long          MaxNbOfIterations,
620                              in double        MaxAspectRatio,
621                              in Smooth_Method Method);
622
623     boolean SmoothParametricObject(in SMESH_IDSource  theObject,
624                                    in long_array      IDsOfFixedNodes,
625                                    in long            MaxNbOfIterations,
626                                    in double          MaxAspectRatio,
627                                    in Smooth_Method   Method);
628
629     void RenumberNodes();
630
631     void RenumberElements();
632
633     void RotationSweep(in long_array       IDsOfElements,
634                        in AxisStruct       Axix,
635                        in double           AngleInRadians,
636                        in long             NbOfSteps,
637                        in double           Tolerance);
638
639     void RotationSweepObject(in SMESH_IDSource  theObject,
640                              in AxisStruct      Axix,
641                              in double          AngleInRadians,
642                              in long            NbOfSteps,
643                              in double          Tolerance);
644
645     void ExtrusionSweep(in long_array      IDsOfElements,
646                         in DirStruct       StepVector,
647                         in long            NbOfSteps);
648
649     void ExtrusionSweepObject(in SMESH_IDSource  theObject,
650                               in DirStruct       StepVector,
651                               in long            NbOfSteps);
652
653     void ExtrusionSweepObject1D(in SMESH_IDSource theObject,
654                                 in DirStruct      StepVector,
655                                 in long           NbOfSteps);
656
657     void ExtrusionSweepObject2D(in SMESH_IDSource theObject,
658                                 in DirStruct      StepVector,
659                                 in long           NbOfSteps);
660
661     enum Extrusion_Error {
662       EXTR_OK,
663       EXTR_NO_ELEMENTS,
664       EXTR_PATH_NOT_EDGE,
665       EXTR_BAD_PATH_SHAPE,
666       EXTR_BAD_STARTING_NODE,
667       EXTR_BAD_ANGLES_NUMBER,
668       EXTR_CANT_GET_TANGENT
669       };
670
671     Extrusion_Error ExtrusionAlongPath(in long_array        IDsOfElements,
672                                        in SMESH_Mesh        PathMesh,
673                                        in GEOM::GEOM_Object PathShape,
674                                        in long              NodeStart,
675                                        in boolean           HasAngles,
676                                        in double_array      Angles,
677                                        in boolean           HasRefPoint,
678                                        in PointStruct       RefPoint);
679
680     Extrusion_Error ExtrusionAlongPathObject(in SMESH_IDSource    theObject,
681                                              in SMESH_Mesh        PathMesh,
682                                              in GEOM::GEOM_Object PathShape,
683                                              in long              NodeStart,
684                                              in boolean           HasAngles,
685                                              in double_array      Angles,
686                                              in boolean           HasRefPoint,
687                                              in PointStruct       RefPoint);
688
689     enum MirrorType { POINT, AXIS, PLANE };
690
691     void Mirror (in long_array       IDsOfElements,
692                  in AxisStruct       Mirror,
693                  in MirrorType       theMirrorType,
694                  in boolean          Copy);
695
696     void MirrorObject (in SMESH_IDSource  theObject,
697                        in AxisStruct      Mirror,
698                        in MirrorType      theMirrorType,
699                        in boolean         Copy);
700
701     void Translate (in long_array      IDsOfElements,
702                     in DirStruct       Vector,
703                     in boolean         Copy);
704
705     void TranslateObject (in SMESH_IDSource  theObject,
706                           in DirStruct       Vector,
707                           in boolean         Copy);
708
709     void Rotate (in long_array       IDsOfElements,
710                  in AxisStruct       Axis,
711                  in double           AngleInRadians,
712                  in boolean          Copy);
713
714     void RotateObject (in SMESH_IDSource  theObject,
715                        in AxisStruct      Axis,
716                        in double          AngleInRadians,
717                        in boolean         Copy);
718
719     void FindCoincidentNodes (in  double              Tolerance,
720                               out array_of_long_array GroupsOfNodes);
721
722     void MergeNodes (in array_of_long_array GroupsOfNodes);
723
724     void MergeEqualElements();
725
726     enum Sew_Error {
727       SEW_OK,
728       SEW_BORDER1_NOT_FOUND,
729       SEW_BORDER2_NOT_FOUND,
730       SEW_BOTH_BORDERS_NOT_FOUND,
731       SEW_BAD_SIDE_NODES,
732       SEW_VOLUMES_TO_SPLIT,
733       // for SewSideElements() only:
734       SEW_DIFF_NB_OF_ELEMENTS,
735       SEW_TOPO_DIFF_SETS_OF_ELEMENTS,
736       SEW_BAD_SIDE1_NODES,
737       SEW_BAD_SIDE2_NODES
738       };
739
740     Sew_Error SewFreeBorders (in long FirstNodeID1,
741                               in long SecondNodeID1,
742                               in long LastNodeID1,
743                               in long FirstNodeID2,
744                               in long SecondNodeID2,
745                               in long LastNodeID2,
746                               in boolean CreatePolygons,
747                               in boolean CreatePolyedrs);
748
749     Sew_Error SewConformFreeBorders (in long FirstNodeID1,
750                                      in long SecondNodeID1,
751                                      in long LastNodeID1,
752                                      in long FirstNodeID2,
753                                      in long SecondNodeID2);
754
755     Sew_Error SewBorderToSide (in long FirstNodeIDOnFreeBorder,
756                                in long SecondNodeIDOnFreeBorder,
757                                in long LastNodeIDOnFreeBorder,
758                                in long FirstNodeIDOnSide,
759                                in long LastNodeIDOnSide,
760                                in boolean CreatePolygons,
761                                in boolean CreatePolyedrs);
762
763     Sew_Error SewSideElements (in long_array IDsOfSide1Elements,
764                                in long_array IDsOfSide2Elements,
765                                in long       NodeID1OfSide1ToMerge,
766                                in long       NodeID1OfSide2ToMerge,
767                                in long       NodeID2OfSide1ToMerge,
768                                in long       NodeID2OfSide2ToMerge);
769
770   };
771 };
772
773 #endif