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