Salome HOME
Merge branch 'V8_4_BR'
[modules/smesh.git] / idl / SMESH_Mesh.idl
index e143062f6237f23a19c6e2de91692c09a2564ed3..66f5faa6f79d30b9aaa2bfbcbffc5473d16cb0de 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -66,6 +66,7 @@ module SMESH
       ADD_QUADEDGE,
       ADD_QUADTRIANGLE,
       ADD_QUADQUADRANGLE,
+      ADD_QUADPOLYGON,
       ADD_QUADTETRAHEDRON,
       ADD_QUADPYRAMID,
       ADD_QUADPENTAHEDRON,
@@ -89,18 +90,18 @@ module SMESH
 
   struct PointStruct { double x;
                        double y;
-                       double z; } ;
+                       double z; };
 
   typedef sequence<PointStruct> nodes_array;
 
-  struct DirStruct   { PointStruct PS ; } ;          // analog to OCCT gp_Vec
+  struct DirStruct   { PointStruct PS; };          // analog to OCCT gp_Vec
 
   struct AxisStruct  { double x;
                        double y;
                        double z;
                        double vx;
                        double vy;
-                       double vz; } ;
+                       double vz; };
   /*!
    * Node location on a shape
    */
@@ -132,7 +133,7 @@ module SMESH
     BALL,
     NB_ELEMENT_TYPES
   };
-  typedef sequence<ElementType> array_of_ElementType ;
+  typedef sequence<ElementType> array_of_ElementType;
 
   /*!
    * Enumeration for element geometry type, like SMDSAbs_GeometryType in SMDSAbs_ElementType.hxx
@@ -150,7 +151,8 @@ module SMESH
     Geom_PENTA,
     Geom_HEXAGONAL_PRISM,
     Geom_POLYHEDRA,
-    Geom_BALL
+    Geom_BALL,
+    Geom_LAST
   };
   
   /*!
@@ -189,6 +191,7 @@ module SMESH
     Entity_TriQuad_Hexa,
     Entity_Penta,
     Entity_Quad_Penta,
+    Entity_BiQuad_Penta,
     Entity_Hexagonal_Prism,
     Entity_Polyhedra,
     Entity_Quad_Polyhedra,
@@ -203,7 +206,7 @@ module SMESH
   {
     HYP_OK,
     HYP_MISSING,      // algo misses a hypothesis
-    HYP_CONCURENT,    // several applicable hypotheses
+    HYP_CONCURRENT,   // several applicable hypotheses
     HYP_BAD_PARAMETER,// hypothesis has a bad parameter value
     HYP_HIDDEN_ALGO,  // an algo is hidden by an upper dim algo generating all-dim elements
     HYP_HIDING_ALGO,  // an algo hides lower dim algos by generating all-dim elements
@@ -235,11 +238,28 @@ module SMESH
 
   /*!
    * Enumeration for ExportToMED*()
+   * MED_V2_1 and MED_V2_2 are here for compatibility and mean respectively obsolete and MED_LATEST.
+   * MED_MINOR_0 to MED_MINOR_9 are use to specify the minor version used by MEDfichier
+   * to write MED files (major version cannot be changed).
+   * This allows backward compatibility from a newer version of SALOME to an older one:
+   * for instance, a MESH produced in SALOME 8.4 (med 3.3) can be written in med 3.2 format
+   * to be read in SALOME 8.3.
    */
   enum MED_VERSION
   {
     MED_V2_1,
-    MED_V2_2
+    MED_V2_2,
+    MED_LATEST,
+    MED_MINOR_0,
+    MED_MINOR_1,
+    MED_MINOR_2,
+    MED_MINOR_3,
+    MED_MINOR_4,
+    MED_MINOR_5,
+    MED_MINOR_6,
+    MED_MINOR_7,
+    MED_MINOR_8,
+    MED_MINOR_9
   };
 
   /*! 
@@ -253,7 +273,15 @@ module SMESH
   };
 
   /*!
-   * Auxilary flags for advanced extrusion.
+   * Enumeration for CreateDimGroup()
+   */
+  enum NB_COMMON_NODES_ENUM
+  {
+    ALL_NODES, MAIN, AT_LEAST_ONE, MAJORITY
+  };
+
+  /*!
+   * Auxiliary flags for advanced extrusion.
    * BOUNDARY: create or not boundary for result of extrusion
    * SEW:      try to use existing nodes or create new nodes in any case
    */
@@ -339,7 +367,7 @@ module SMESH
       raises (SALOME::SALOME_Exception);
 
     /*!
-     * Get geom shape to mesh. A result sould not be nil. Use HasShapeToMesh()
+     * Get geom shape to mesh. A result should not be nil. Use HasShapeToMesh()
      * to know if a returned shape 
      */
     GEOM::GEOM_Object GetShapeToMesh()
@@ -379,7 +407,7 @@ module SMESH
      * Get the subMesh object associated to a Sub-shape. The subMesh object
      * gives access to nodes and elements IDs.
      * SubMesh will be used instead of Sub-shape in a next idl version to
-     * adress a specific subMesh...
+     * address a specific subMesh...
      */
     SMESH_subMesh GetSubMesh(in GEOM::GEOM_Object aSubObject, in string name)
       raises (SALOME::SALOME_Exception);
@@ -497,14 +525,21 @@ module SMESH
       raises (SALOME::SALOME_Exception);
       
     /*!
-     *  Create groups of entities from existing groups of superior dimensions 
-     *  New group is created. System 
-     *  1) extracts all nodes from each group,
-     *  2) combines all elements of specified dimension laying on these nodes.
+     *  Create a group of entities basing on nodes of other groups.
+     *  \param [in] aListOfGroups - list of either groups, sub-meshes or filters.
+     *  \param [in] anElemType - a type of elements to include to the new group.
+     *  \param [in] name - a name of the new group.
+     *  \param [in] nbCommonNodes - criterion of inclusion of an element to the new group.
+     *  \param [in] underlyingOnly - if \c True, an element is included to the 
+     *         new group provided that it is based on nodes of an element of
+     *         \a aListOfGroups
+     *  \return SMESH_Group - the created group
      */
-    SMESH_Group CreateDimGroup( in ListOfGroups aListOfGroups,
-                                in ElementType  anElemType,
-                                in string       name )
+    SMESH_Group CreateDimGroup( in ListOfIDSources      aListOfGroups,
+                                in ElementType          anElemType,
+                                in string               name,
+                                in NB_COMMON_NODES_ENUM nbCommonNodes,
+                                in boolean              underlyingOnly )
       raises (SALOME::SALOME_Exception);
 
     /*!
@@ -533,7 +568,7 @@ module SMESH
       raises (SALOME::SALOME_Exception);
 
     /*!
-     * Remove an hypothesis previouly added with AddHypothesis.
+     * Remove an hypothesis previously added with AddHypothesis.
      */
     Hypothesis_Status RemoveHypothesis(in GEOM::GEOM_Object aSubObject,
                                        in SMESH_Hypothesis anHyp)
@@ -668,8 +703,8 @@ module SMESH
       raises (SALOME::SALOME_Exception);
 
     /*!
-     * Export Mesh to MED_V2_1 MED format
-     * Works, just the same as ExportToMEDX with MED_VERSION parameter equal to MED_V2_1
+     * Export Mesh to MED_LATEST MED format
+     * Works, just the same as ExportToMEDX with MED_VERSION parameter equal to MED_LATEST
      * and overwrite parameter equal to true
      * The method is kept in order to support old functionality
      */
@@ -698,7 +733,8 @@ module SMESH
                     in boolean isascii ) raises (SALOME::SALOME_Exception);
     void ExportCGNS( in SMESH_IDSource meshPart, 
                      in string         file,
-                     in boolean        overwrite ) raises (SALOME::SALOME_Exception);
+                     in boolean        overwrite,
+                     in boolean        groupElemsByType) raises (SALOME::SALOME_Exception);
     void ExportGMF( in SMESH_IDSource  meshPart, 
                     in string          file,
                     in boolean         withRequiredGroups) raises (SALOME::SALOME_Exception);
@@ -715,7 +751,7 @@ module SMESH
     double GetComputeProgress();
 
     /*!
-     * Get informations about mesh contents
+     * Get information about mesh contents
      */
     long NbNodes()
       raises (SALOME::SALOME_Exception);
@@ -762,6 +798,9 @@ module SMESH
     long NbPolygons()
       raises (SALOME::SALOME_Exception);
 
+    long NbPolygonsOfOrder(in ElementOrder order)
+      raises (SALOME::SALOME_Exception);
+
     long NbVolumes()
       raises (SALOME::SALOME_Exception);
 
@@ -955,6 +994,11 @@ module SMESH
      */
     long FindElementByNodes(in long_array nodes);
 
+    /*!
+     * Return elements including all given nodes.
+     */
+    long_array GetElementsByNodes(in long_array nodes, in ElementType elem_type);
+
     /*!
      * Returns true if given element is polygon
      */
@@ -1024,7 +1068,7 @@ module SMESH
       raises (SALOME::SALOME_Exception);
     
     /*!
-     * Return type of submesh element
+     * Returns type of mesh element (same as SMESH_Mesh::GetElementType() )
      */
     ElementType GetElementType( in long id, in boolean iselem )
       raises (SALOME::SALOME_Exception);