Salome HOME
Implementation of the "0021374: EDF 1898 SMESH: Extrusion of a node to have an edge...
[modules/smesh.git] / idl / SMESH_Mesh.idl
1 // Copyright (C) 2007-2011  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_Mesh.idl
24 //  Author : Paul RASCLE, EDF
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   interface SMESH_GroupBase;
39   typedef sequence<SMESH_GroupBase> ListOfGroups;
40   interface SMESH_IDSource;
41   typedef sequence<SMESH_IDSource> ListOfIDSources;
42
43   typedef sequence<double    > double_array ;
44   typedef sequence<long      > long_array ;
45   typedef sequence<string    > string_array ;
46   typedef sequence<long_array> array_of_long_array ;
47
48   enum log_command
49     {
50       ADD_NODE,
51       ADD_EDGE,
52       ADD_TRIANGLE,
53       ADD_QUADRANGLE,
54       ADD_POLYGON,
55       ADD_TETRAHEDRON,
56       ADD_PYRAMID,
57       ADD_PRISM,
58       ADD_HEXAHEDRON,
59       ADD_POLYHEDRON,
60       REMOVE_NODE,
61       REMOVE_ELEMENT,
62       MOVE_NODE,
63       CHANGE_ELEMENT_NODES,
64       CHANGE_POLYHEDRON_NODES,
65       RENUMBER,
66       CLEAR_MESH,
67       ADD_QUADEDGE,
68       ADD_QUADTRIANGLE,
69       ADD_QUADQUADRANGLE,
70       ADD_QUADTETRAHEDRON,
71       ADD_QUADPYRAMID,
72       ADD_QUADPENTAHEDRON,
73       ADD_QUADHEXAHEDRON,
74       ADD_ELEM0D,
75       ADD_BIQUAD_QUADRANGLE,
76       ADD_TRIQUAD_HEXA,
77       ADD_HEXAGONAL_PRISM
78     };
79
80   struct log_block
81   {
82     long commandType;
83     long number;
84     double_array coords;
85     long_array indexes;
86   };
87
88   struct PointStruct { double x;
89                        double y;
90                        double z; } ;
91
92   typedef sequence<PointStruct> nodes_array;
93
94   struct DirStruct   { PointStruct PS ; } ;          // analog to Occ Direction
95
96   struct AxisStruct  { double x;
97                        double y;
98                        double z;
99                        double vx;
100                        double vy;
101                        double vz; } ;
102
103   /*!
104    * Node location on a shape
105    */
106   struct NodePosition {
107     long             shapeID;
108     GEOM::shape_type shapeType;
109     double_array     params; // [U] on EDGE, [U,V] on FACE, [] on the rest shapes
110   };
111
112   /*!
113    * Enumeration for element type, like in SMDS
114    */
115   enum ElementType
116   {
117     ALL,
118     NODE,
119     EDGE,
120     FACE,
121     VOLUME,
122     ELEM0D
123   };
124   typedef sequence<ElementType> array_of_ElementType ;
125
126   /*!
127    * Enumeration for element geometry type, like in SMDS
128    */
129   enum GeometryType
130   {
131     Geom_POINT,
132     Geom_EDGE,
133     Geom_TRIANGLE,
134     Geom_QUADRANGLE,
135     Geom_POLYGON,
136     Geom_TETRA,
137     Geom_PYRAMID,
138     Geom_HEXA,
139     Geom_PENTA,
140     Geom_HEXAGONAL_PRISM,
141     Geom_POLYHEDRA
142   };
143   
144   /*!
145    * ElementOrder points out entities of what order are requested
146    */
147   enum ElementOrder {
148     ORDER_ANY,          /*! entities of any order */
149     ORDER_LINEAR,       /*! entities of 1st order */
150     ORDER_QUADRATIC     /*! entities of 2nd order */
151   };
152
153
154   /*!
155    * Enumeration of entity type used in mesh info array,
156    * it should be synchronised with enum SMDSAbs_EntityType
157    */
158   enum EntityType
159   {
160     Entity_Node,
161     Entity_0D,
162     Entity_Edge,
163     Entity_Quad_Edge,
164     Entity_Triangle,
165     Entity_Quad_Triangle,
166     Entity_Quadrangle,
167     Entity_Quad_Quadrangle,
168     Entity_BiQuad_Quadrangle,
169     Entity_Polygon,
170     Entity_Quad_Polygon,
171     Entity_Tetra,
172     Entity_Quad_Tetra,
173     Entity_Pyramid,
174     Entity_Quad_Pyramid,
175     Entity_Hexa,
176     Entity_Quad_Hexa,
177     Entity_TriQuad_Hexa,
178     Entity_Penta,
179     Entity_Quad_Penta,
180     Entity_Hexagonal_Prism,
181     Entity_Polyhedra,
182     Entity_Quad_Polyhedra,
183     Entity_Last
184   };
185
186
187   /*!
188    * Enumeration for hypothesis status (used by AddHypothesis() and RemoveHypothesis() methods)
189    */
190   enum Hypothesis_Status // in the order of severity
191   {
192     HYP_OK,
193     HYP_MISSING,      // algo misses a hypothesis
194     HYP_CONCURENT,    // several applicable hypotheses
195     HYP_BAD_PARAMETER,// hypothesis has a bad parameter value
196     HYP_HIDDEN_ALGO,  // an algo is hidden by an upper dim algo generating all-dim elements
197     HYP_HIDING_ALGO,  // an algo hides lower dim algos by generating all-dim elements
198     HYP_UNKNOWN_FATAL,//  --- all statuses below should be considered as fatal
199                       //      for Add/RemoveHypothesis operations
200     HYP_INCOMPATIBLE, // hypothesis does not fit algo
201     HYP_NOTCONFORM,   // not conform mesh is produced appling a hypothesis
202     HYP_ALREADY_EXIST,// such hypothesis already exist
203     HYP_BAD_DIM,      // bad dimension
204     HYP_BAD_SUBSHAPE, // shape is neither the main one, nor its sub-shape, nor a group
205     HYP_BAD_GEOMETRY, // geometry mismatches algorithm's expectation
206     HYP_NEED_SHAPE    // algorithm can work on shape only
207   };
208
209   /*!
210    * Enumeration for DriverMED read status (used by ImportMEDFile() method)
211    */
212   enum DriverMED_ReadStatus // in the order of severity
213   {
214     DRS_OK,
215     DRS_EMPTY,          // a MED file contains no mesh with the given name
216     DRS_WARN_RENUMBER,  // a MED file has overlapped ranges of element numbers,
217                         // so the numbers from the file are ignored
218     DRS_WARN_SKIP_ELEM, // some elements were skipped due to incorrect file data
219     DRS_FAIL            // general failure (exception etc.)
220   };
221
222   /*!
223    * Enumeration for DriverMED (used by Perform() method)
224    */
225   enum MED_VERSION // in the order of severity
226   {
227     MED_V2_1,
228     MED_V2_2
229   };
230
231   typedef sequence<log_block> log_array;
232
233
234   /*!
235    * Auxilary flags for advanced extrusion.
236    * BOUNDARY: create or not boundary for result of extrusion
237    * SEW:      try to use existing nodes or create new nodes in any case
238    */
239   const long EXTRUSION_FLAG_BOUNDARY = 1;
240   const long EXTRUSION_FLAG_SEW = 2;
241   
242   /*!
243    * Structure used in mesh edit preview data (MeshPreviewStruct)
244    */
245   struct ElementSubType { ElementType SMDS_ElementType;
246                           boolean     isPoly;
247                           long        nbNodesInElement; };
248
249   typedef sequence<ElementSubType> types_array;
250
251   /*!
252    * Structure containing mesh edit preview data
253    */
254   struct MeshPreviewStruct { nodes_array nodesXYZ;
255                              long_array  elementConnectivities;
256                              types_array elementTypes; };
257
258   interface SMESH_Mesh;
259
260   interface SMESH_IDSource
261   {
262     /*!
263      * Returns a sequence of all element IDs
264      */
265     long_array GetIDs();
266
267     /*!
268      * Returns statistic of mesh elements
269      * @return array of number enityties by index of EntityType
270      */
271     long_array GetMeshInfo();
272
273     /*!
274      * Returns types of elements it contains.
275      * It's empty if the SMESH_IDSource contains no IDs
276      */
277     array_of_ElementType GetTypes();
278
279     /*!
280      * Returns the mesh
281      */
282     SMESH_Mesh GetMesh();
283   };
284
285   interface SMESH_Group;
286   interface SMESH_GroupOnGeom;
287   interface Filter;
288   interface SMESH_GroupOnFilter;
289   interface SMESH_subMesh;
290   interface SMESH_MeshEditor;
291
292   typedef sequence<SMESH_subMesh>     submesh_array;
293   typedef sequence<submesh_array>     submesh_array_array;
294
295   interface SMESH_Mesh : SALOME::GenericObj, SMESH_IDSource
296   {
297     /*!
298      * Return true if there is a geometry to be meshed
299      */
300     boolean HasShapeToMesh()
301       raises (SALOME::SALOME_Exception);
302
303     /*!
304      * Get geom shape to mesh. A result sould not be nil. Use HasShapeToMesh()
305      * to know if a returned shape 
306      */
307     GEOM::GEOM_Object GetShapeToMesh()
308       raises (SALOME::SALOME_Exception);
309
310     /*!
311      * Remove all nodes and elements
312      */
313     void Clear()
314       raises (SALOME::SALOME_Exception);
315
316     /*!
317      *  Get the list of sub-meshes existing in the mesh
318      */
319     submesh_array GetSubMeshes()
320       raises (SALOME::SALOME_Exception);
321
322     /*!
323      * Remove all nodes and elements of submesh
324      */
325     void ClearSubMesh(in long ShapeID)
326       raises (SALOME::SALOME_Exception);
327
328     /*!
329      * Get the subMesh object associated to a Sub-shape. The subMesh object
330      * gives access to nodes and elements IDs.
331      * SubMesh will be used instead of Sub-shape in a next idl version to
332      * adress a specific subMesh...
333      */
334     SMESH_subMesh GetSubMesh(in GEOM::GEOM_Object aSubObject, in string name)
335       raises (SALOME::SALOME_Exception);
336
337     /*!
338      * Remove a submesh
339      */
340     void RemoveSubMesh(in SMESH_subMesh aSubMesh)
341       raises (SALOME::SALOME_Exception);
342
343
344     /*!
345      * Create a group
346      */
347     SMESH_Group CreateGroup( in ElementType elem_type,
348                              in string      name )
349       raises (SALOME::SALOME_Exception);
350
351     /*!
352      * Create a group from geometry
353      */
354     SMESH_GroupOnGeom CreateGroupFromGEOM( in ElementType       elemType,
355                                            in string            name,
356                                            in GEOM::GEOM_Object geomObject )
357       raises (SALOME::SALOME_Exception);
358
359     /*!
360      * Create a group from filter
361      */
362     SMESH_GroupOnFilter CreateGroupFromFilter( in ElementType   elemType,
363                                                in string        name,
364                                                in SMESH::Filter filter )
365       raises (SALOME::SALOME_Exception);
366
367     /*!
368      * Remove a group
369      */
370     void RemoveGroup(in SMESH_GroupBase aGroup)
371       raises (SALOME::SALOME_Exception);
372
373     /*!
374      *  Remove group with its contents
375      */
376     void RemoveGroupWithContents( in SMESH_GroupBase aGroup )
377       raises (SALOME::SALOME_Exception);
378
379     /*!
380      *  Get the list of groups existing in the mesh
381      */
382     ListOfGroups GetGroups()
383       raises (SALOME::SALOME_Exception);
384
385     /*!
386      *  Get number of groups existing in the mesh
387      */
388     long NbGroups()
389       raises (SALOME::SALOME_Exception);
390
391     /*!
392      * Union of two groups
393      *    New group is created. All mesh elements that are
394      *    present in initial groups are added to the new one
395      */
396     SMESH_Group UnionGroups (in SMESH_GroupBase aGroup1,
397                              in SMESH_GroupBase aGroup2,
398                              in string          name )
399       raises (SALOME::SALOME_Exception);
400       
401     /*!
402      * Union of list of groups
403      * New group is created. All mesh elements that are
404      * present in initial groups are added to the new one
405      */
406     SMESH_Group UnionListOfGroups (in ListOfGroups aListOfGroups,
407                                    in string       name )
408       raises (SALOME::SALOME_Exception);
409
410     /*!
411      *  Intersection of two groups
412      *  New group is created. All mesh elements that are
413      *  present in both initial groups are added to the new one.
414      */
415     SMESH_Group IntersectGroups (in SMESH_GroupBase aGroup1,
416                                  in SMESH_GroupBase aGroup2,
417                                  in string          name )
418       raises (SALOME::SALOME_Exception);
419       
420     /*!
421      *  Intersection of list of groups
422      *  New group is created. All mesh elements that are
423      *  present in all initial groups simultaneously are added to the new one.
424      */
425     SMESH_Group IntersectListOfGroups (in ListOfGroups aListOfGroups,
426                                        in string       name)
427       raises (SALOME::SALOME_Exception);
428
429     /*!
430      *  Cut of two groups
431      *  New group is created. All mesh elements that are present in
432      *  main group but do not present in tool group are added to the new one
433      */
434     SMESH_Group CutGroups (in SMESH_GroupBase aMainGroup,
435                            in SMESH_GroupBase aToolGroup,
436                            in string          name )
437       raises (SALOME::SALOME_Exception);
438       
439     /*!
440      *  Cut of lists of groups
441      *  New group is created. All mesh elements that are present in
442      *  main groups but do not present in tool groups are added to the new one
443      */
444     SMESH_Group CutListOfGroups (in ListOfGroups aMainGroups,
445                                  in ListOfGroups aToolGroups,
446                                  in string       name)
447       raises (SALOME::SALOME_Exception);
448       
449     /*!
450      *  Create groups of entities from existing groups of superior dimensions 
451      *  New group is created. System 
452      *  1) extracts all nodes from each group,
453      *  2) combines all elements of specified dimension laying on these nodes.
454      */
455     SMESH_Group CreateDimGroup( in ListOfGroups aListOfGroups,
456                                 in ElementType  anElemType,
457                                 in string       name )
458       raises (SALOME::SALOME_Exception);
459
460     /*!
461      * Convert group on geometry or on filter into standalone group
462      */
463     SMESH_Group ConvertToStandalone( in SMESH_GroupBase theGroupOn )
464       raises (SALOME::SALOME_Exception);
465
466     /*!
467      * Add hypothesis to the mesh, under a particular Sub-shape
468      * (or the main shape itself)
469      * The Add method is only used to prepare the build of the mesh and store
470      * the algorithms and associated parameters.
471      * Actual job of mesh the shape is done by MESH_Gen.
472      * @params
473      * - aSubShape : sub-shape obtained by a shape explode in GEOM
474      *   (or main shape)
475      * - anHyp : hypothesis object
476      * @return
477      * - OK if the hypothesis is compatible with the sub-shape
478      *   (and all previous hypothesis on the sub-shape)
479      * - NOK if the hypothesis is not compatible with the sub-shape
480      *   (or one previous hypothesis on the sub-shape)
481      * raises exception if hypothesis has not been created
482      */
483     Hypothesis_Status AddHypothesis(in GEOM::GEOM_Object aSubObject,
484                                     in SMESH_Hypothesis anHyp)
485       raises (SALOME::SALOME_Exception);
486 //     boolean AddHypothesis(in SMESH_subMesh aSubMesh, in SMESH_Hypothesis anHyp)
487 //       raises (SALOME::SALOME_Exception);
488
489     /*!
490      * Remove an hypothesis previouly added with AddHypothesis.
491      */
492     Hypothesis_Status RemoveHypothesis(in GEOM::GEOM_Object aSubObject,
493                                        in SMESH_Hypothesis anHyp)
494       raises (SALOME::SALOME_Exception);
495 //     boolean RemoveHypothesis(in SMESH_subMesh aSubMesh,
496 //                           in SMESH_Hypothesis anHyp)
497 //       raises (SALOME::SALOME_Exception);
498
499     /*!
500      * Get the list of hypothesis added on a sub-shape
501      */
502     ListOfHypothesis GetHypothesisList(in GEOM::GEOM_Object aSubObject)
503       raises (SALOME::SALOME_Exception);
504 //     ListOfHypothesis GetHypothesisList(in SMESH_subMesh aSubMesh)
505 //       raises (SALOME::SALOME_Exception);
506
507     /*!
508      * Get the log of nodes and elements added or removed since previous
509      * clear of the log.
510      * @params
511      * - clearAfterGet : log is emptied after Get (safe if concurrents access)
512      */
513     //    string_array GetLog(in boolean clearAfterGet)
514     //      raises (SALOME::SALOME_Exception);
515     log_array GetLog(in boolean clearAfterGet)
516       raises (SALOME::SALOME_Exception);
517
518     /*!
519      * Clear the log of nodes and elements added or removed since previous
520      * clear. Must be used immediately after GetLog if clearAfterGet is false.
521      */
522     void ClearLog()
523       raises (SALOME::SALOME_Exception);
524
525     /*!
526      * Toggle auto color mode on the object.
527      * @params
528      * - theAutoColor : flag which toggles auto color mode.
529      */
530     void SetAutoColor(in boolean theAutoColor)
531       raises (SALOME::SALOME_Exception);
532
533     /*!
534      * Get flag of object's auto color mode.
535      */
536     boolean GetAutoColor()
537       raises (SALOME::SALOME_Exception);
538
539     /*!
540      * Get the internal Id
541      */
542     long GetId();
543
544     /*!
545      * Get the study Id
546      */
547     long GetStudyId();
548
549     /*!
550      * Obtain instance of SMESH_MeshEditor
551      */
552     SMESH_MeshEditor GetMeshEditor()
553       raises (SALOME::SALOME_Exception);
554
555     /*!
556      * Return SMESH_MeshEditor that would not modify the mesh but
557      * fill MeshPreviewStruct
558      */
559     SMESH_MeshEditor GetMeshEditPreviewer()
560       raises (SALOME::SALOME_Exception);
561
562     /*!
563      * Return true if the mesh has been edited since a total re-compute
564      * and those modifications may prevent successful partial re-compute
565      */
566     boolean HasModificationsToDiscard()
567       raises (SALOME::SALOME_Exception);
568
569     /*! Check group names for duplications.
570      *  Consider maximum group name length stored in MED file.
571      */
572     boolean HasDuplicatedGroupNamesMED();
573
574     /*!
575      * Export Mesh to different MED Formats
576      * @params
577      * - file : name of the MED file
578      * - auto_groups : boolean parameter for creating/not creating
579      *   the groups Group_On_All_Nodes, Group_On_All_Faces, ... ;
580      *   the typical use is auto_groups=false.
581      * - version : define the version of format of MED file, that will be created
582      * - overwrite : boolean parameter for overwriting/not overwriting the file, if it exists
583      */
584     void ExportToMEDX( in string      file, 
585                        in boolean     auto_groups, 
586                        in MED_VERSION version, 
587                        in boolean     overwrite ) raises (SALOME::SALOME_Exception);
588
589     /*!
590      * Export a part of Mesh into a MED file
591      * @params
592      * - meshPart : a part of mesh to store
593      * - file : name of the MED file
594      * - version : define the version of format of MED file, that will be created
595      * - overwrite : boolean parameter for overwriting/not overwriting the file, if it exists
596      */
597     void ExportPartToMED( in SMESH_IDSource meshPart, 
598                           in string         file, 
599                           in boolean        auto_groups,
600                           in MED_VERSION    version,
601                           in boolean        overwrite ) raises (SALOME::SALOME_Exception);
602
603     /*!
604      * Export Mesh to different MED Formats
605      * Works, just the same as ExportToMEDX, with overwrite parameter equal to true.
606      * The method is kept in order to support old functionality
607      */
608     void ExportToMED( in string file, in boolean auto_groups, in MED_VERSION theVersion )
609       raises (SALOME::SALOME_Exception);
610
611     /*!
612      * Export Mesh to MED_V2_1 MED format
613      * Works, just the same as ExportToMEDX with MED_VERSION parameter equal to MED_V2_1
614      * and overwrite parameter equal to true
615      * The method is kept in order to support old functionality
616      */
617     void ExportMED( in string file, in boolean auto_groups )
618       raises (SALOME::SALOME_Exception);
619
620     /*!
621      * Export Mesh to SAUV formatted file
622      * Write a temporary med file and use med2sauv
623      */
624     void ExportSAUV( in string file, in boolean auto_groups )
625       raises (SALOME::SALOME_Exception);
626
627     /*!
628      * Return string representation of a MED file version comprising nbDigits
629      */
630     string GetVersionString(in MED_VERSION version, in short nbDigits);
631
632     /*!
633      * Export Mesh to DAT, UNV and STL Formats
634      * (UNV supported version is I-DEAS 10)
635      */
636     void ExportDAT( in string file ) raises (SALOME::SALOME_Exception);
637     void ExportUNV( in string file ) raises (SALOME::SALOME_Exception);
638     void ExportSTL( in string  file,
639                     in boolean isascii ) raises (SALOME::SALOME_Exception);
640     void ExportCGNS( in SMESH_IDSource meshPart, 
641                      in string         file,
642                      in boolean        overwrite ) raises (SALOME::SALOME_Exception);
643     void ExportPartToDAT( in SMESH_IDSource meshPart, 
644                           in string         file ) raises (SALOME::SALOME_Exception);
645     void ExportPartToUNV( in SMESH_IDSource meshPart, 
646                           in string         file ) raises (SALOME::SALOME_Exception);
647     void ExportPartToSTL( in SMESH_IDSource meshPart,
648                           in string         file,
649                           in boolean        isascii ) raises (SALOME::SALOME_Exception);
650
651     /*!
652      * Get MED Mesh
653      */
654     SALOME_MED::MESH GetMEDMesh()
655       raises (SALOME::SALOME_Exception);
656
657     /*!
658      * Get informations about mesh contents
659      */
660     long NbNodes()
661       raises (SALOME::SALOME_Exception);
662
663     long NbElements()
664       raises (SALOME::SALOME_Exception);
665
666     long Nb0DElements()
667       raises (SALOME::SALOME_Exception);
668
669     long NbEdges()
670       raises (SALOME::SALOME_Exception);
671
672     long NbEdgesOfOrder(in ElementOrder order)
673       raises (SALOME::SALOME_Exception);
674
675     long NbFaces()
676       raises (SALOME::SALOME_Exception);
677
678     long NbFacesOfOrder(in ElementOrder order)
679       raises (SALOME::SALOME_Exception);
680
681     long NbTriangles()
682       raises (SALOME::SALOME_Exception);
683
684     long NbTrianglesOfOrder(in ElementOrder order)
685       raises (SALOME::SALOME_Exception);
686
687     long NbQuadrangles()
688       raises (SALOME::SALOME_Exception);
689
690     long NbQuadranglesOfOrder(in ElementOrder order)
691       raises (SALOME::SALOME_Exception);
692
693     long NbBiQuadQuadrangles()
694       raises (SALOME::SALOME_Exception);
695
696     long NbPolygons()
697       raises (SALOME::SALOME_Exception);
698
699     long NbVolumes()
700       raises (SALOME::SALOME_Exception);
701
702     long NbVolumesOfOrder(in ElementOrder order)
703       raises (SALOME::SALOME_Exception);
704
705     long NbTetras()
706       raises (SALOME::SALOME_Exception);
707
708     long NbTetrasOfOrder(in ElementOrder order)
709       raises (SALOME::SALOME_Exception);
710
711     long NbHexas()
712       raises (SALOME::SALOME_Exception);
713
714     long NbHexasOfOrder(in ElementOrder order)
715       raises (SALOME::SALOME_Exception);
716
717     long NbTriQuadraticHexas()
718       raises (SALOME::SALOME_Exception);
719
720     long NbPyramids()
721       raises (SALOME::SALOME_Exception);
722
723     long NbPyramidsOfOrder(in ElementOrder order)
724       raises (SALOME::SALOME_Exception);
725
726     long NbPrisms()
727       raises (SALOME::SALOME_Exception);
728
729     long NbPrismsOfOrder(in ElementOrder order)
730       raises (SALOME::SALOME_Exception);
731
732     long NbHexagonalPrisms()
733       raises (SALOME::SALOME_Exception);
734
735     long NbPolyhedrons()
736       raises (SALOME::SALOME_Exception);
737
738     long NbSubMesh()
739       raises (SALOME::SALOME_Exception);
740
741     long_array GetElementsId()
742       raises (SALOME::SALOME_Exception);
743
744     long_array GetElementsByType( in ElementType theType )
745       raises (SALOME::SALOME_Exception);
746
747     long_array GetNodesId()
748       raises (SALOME::SALOME_Exception);
749     
750     /*!
751      * Returns type of mesh element
752      */    
753     ElementType GetElementType( in long id, in boolean iselem )
754       raises (SALOME::SALOME_Exception);
755
756     EntityType GetElementGeomType( in long id )
757       raises (SALOME::SALOME_Exception);
758
759     long_array GetSubMeshElementsId(in long ShapeID)
760       raises (SALOME::SALOME_Exception);
761
762     long_array GetSubMeshNodesId(in long ShapeID, in boolean all )
763       raises (SALOME::SALOME_Exception);
764     
765     ElementType GetSubMeshElementType(in long ShapeID)
766       raises (SALOME::SALOME_Exception);
767
768
769     /*!
770      * Methods to set meshing order of submeshes
771      */
772
773     /*!
774      * \brief Return submesh objects list in meshing order
775      */
776     submesh_array_array GetMeshOrder();
777
778     /*!
779      * \brief Set submesh object order
780      */
781     boolean SetMeshOrder(in submesh_array_array theSubMeshArray);
782
783
784     /*!
785      * Get mesh description
786      */
787     string Dump();
788
789     /*!
790      * Get mesh pointer
791      */
792     long long GetMeshPtr();
793
794     /*!
795      * Get XYZ coordinates of node as list of double
796      * If there is not node for given ID - returns empty list
797      */
798     double_array GetNodeXYZ(in long id);
799
800     /*!
801      * For given node returns list of IDs of inverse elements
802      * If there is not node for given ID - returns empty list
803      */
804     long_array GetNodeInverseElements(in long id);
805
806     /*!
807      * \brief Return position of a node on shape
808      */
809     NodePosition GetNodePosition(in long NodeID);
810
811     /*!
812      * If given element is node returns IDs of shape from position
813      * If there is not node for given ID - returns -1
814      */
815     long GetShapeID(in long id);
816
817     /*!
818      * For given element returns ID of result shape after 
819      * ::FindShape() from SMESH_MeshEditor
820      * If there is not element for given ID - returns -1
821      */
822     long GetShapeIDForElem(in long id);
823
824     /*!
825      * Returns number of nodes for given element
826      * If there is not element for given ID - returns -1
827      */
828     long GetElemNbNodes(in long id);
829
830     /*!
831      * Returns IDs of nodes of given element
832      */
833     long_array GetElemNodes(in long id);
834
835     /*!
836      * Returns ID of node by given index for given element
837      * If there is not element for given ID - returns -1
838      * If there is not node for given index - returns -2
839      */
840     long GetElemNode(in long id, in long index);
841
842     /*!
843      * Returns true if given node is medium node
844      * in given quadratic element
845      */
846     boolean IsMediumNode(in long ide, in long idn);
847
848     /*!
849      * Returns true if given node is medium node
850      * in one of quadratic elements
851      */
852     boolean IsMediumNodeOfAnyElem(in long idn, in ElementType elem_type);
853
854     /*!
855      * Returns number of edges for given element
856      */
857     long ElemNbEdges(in long id);
858
859     /*!
860      * Returns number of faces for given element
861      */
862     long ElemNbFaces(in long id);
863
864     /*!
865      * Returns nodes of given face (counted from zero) for given volumic element.
866      */
867     long_array GetElemFaceNodes(in long elemId, in short faceIndex);
868
869     /*!
870      * Returns an element based on all given nodes.
871      */
872     long FindElementByNodes(in long_array nodes);
873
874     /*!
875      * Returns true if given element is polygon
876      */
877     boolean IsPoly(in long id);
878
879     /*!
880      * Returns true if given element is quadratic
881      */
882     boolean IsQuadratic(in long id);
883
884     /*!
885      * Returns XYZ coordinates of bary center for given element
886      * as list of double
887      * If there is not element for given ID - returns empty list
888      */
889     double_array BaryCenter(in long id);
890
891     /*! Gets information about imported MED file */
892     SALOME_MED::MedFileInfo GetMEDFileInfo();
893
894     /*!
895      *  Sets list of notebook variables used for Mesh operations separated by ":" symbol
896      *  \param theParameters is a string containing the notebook variables
897      */
898     void SetParameters (in string theParameters);
899
900     /*!
901      *  Returns list of notebook variables used for Mesh operations separated by ":" symbol
902      */
903     string GetParameters();
904
905     /*!
906      *  Returns list of notebook variables used for last Mesh operation
907      */
908     string_array GetLastParameters();
909   };
910
911   interface SMESH_subMesh : SALOME::GenericObj, SMESH_IDSource
912   {
913     /*!
914      *
915      */
916     long GetNumberOfElements()
917       raises (SALOME::SALOME_Exception);
918
919     /*!
920      *
921      */
922     long GetNumberOfNodes( in boolean all )
923       raises (SALOME::SALOME_Exception);
924
925     /*!
926      *
927      */
928     long_array GetElementsId()
929       raises (SALOME::SALOME_Exception);
930
931     /*!
932      *
933      */
934     long_array GetElementsByType( in ElementType theType )
935       raises (SALOME::SALOME_Exception);
936     
937     /*!
938      * Return type of submesh element
939      */
940     ElementType GetElementType( in long id, in boolean iselem )
941       raises (SALOME::SALOME_Exception);
942
943     /*!
944      *
945      */
946     long_array GetNodesId()
947       raises (SALOME::SALOME_Exception);
948
949     /*!
950      * Get geom shape the submesh is dedicated to
951      */
952     GEOM::GEOM_Object GetSubShape()
953       raises (SALOME::SALOME_Exception);
954
955     /*!
956      * Get SMESH_Mesh which stores nodes coordinates & elements definition
957      */
958     SMESH_Mesh GetFather()
959       raises (SALOME::SALOME_Exception);
960
961     /*!
962      * Get the internal Id
963      */
964     long GetId();
965
966     /*!
967      * Get MED subMesh
968      */
969     SALOME_MED::FAMILY GetFamily()
970       raises (SALOME::SALOME_Exception);
971   };
972
973 };
974
975 #endif