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