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