Salome HOME
22244: [CEA] Method to compute the normal to a mesh face
[modules/smesh.git] / idl / SMESH_Mesh.idl
index 9585df7854eb186370bcb620068e3f857801f015..abce2bb25fd06388ad09c891d82ed606d9229a3b 100644 (file)
@@ -29,7 +29,6 @@
 #include "SALOME_Exception.idl"
 #include "SALOME_GenericObj.idl"
 #include "GEOM_Gen.idl"
-#include "MED.idl"
 
 module SMESH
 {
@@ -86,6 +85,7 @@ module SMESH
     double_array coords;
     long_array indexes;
   };
+  typedef sequence<log_block> log_array;
 
   struct PointStruct { double x;
                       double y;
@@ -93,7 +93,7 @@ module SMESH
 
   typedef sequence<PointStruct> nodes_array;
 
-  struct DirStruct   { PointStruct PS ; } ;          // analog to Occ Direction
+  struct DirStruct   { PointStruct PS ; } ;          // analog to OCCT gp_Vec
 
   struct AxisStruct  { double x;
                       double y;
@@ -101,7 +101,6 @@ module SMESH
                       double vx;
                       double vy;
                       double vz; } ;
-
   /*!
    * Node location on a shape
    */
@@ -130,12 +129,13 @@ module SMESH
     FACE,
     VOLUME,
     ELEM0D,
-    BALL
+    BALL,
+    NB_ELEMENT_TYPES
   };
   typedef sequence<ElementType> array_of_ElementType ;
 
   /*!
-   * Enumeration for element geometry type, like in SMDS
+   * Enumeration for element geometry type, like SMDSAbs_GeometryType in SMDSAbs_ElementType.hxx
    */
   enum GeometryType
   {
@@ -162,7 +162,6 @@ module SMESH
     ORDER_QUADRATIC     /*! entities of 2nd order */
   };
 
-
   /*!
    * Enumeration of entity type used in mesh info array,
    * it should be synchronised with enum SMDSAbs_EntityType
@@ -197,7 +196,6 @@ module SMESH
     Entity_Last
   };
 
-
   /*!
    * Enumeration for hypothesis status (used by AddHypothesis() and RemoveHypothesis() methods)
    */
@@ -221,12 +219,12 @@ module SMESH
   };
 
   /*!
-   * Enumeration for DriverMED read status (used by ImportMEDFile() method)
+   * Enumeration for mesh read status (used by SMESH_Gen::CreateMeshesFrom*() methods)
    */
   enum DriverMED_ReadStatus // in the order of severity
   {
     DRS_OK,
-    DRS_EMPTY,          // a MED file contains no mesh with the given name
+    DRS_EMPTY,          // a file contains no mesh with the given name
     DRS_WARN_RENUMBER,  // a MED file has overlapped ranges of element numbers,
                         // so the numbers from the file are ignored
     DRS_WARN_SKIP_ELEM, // some elements were skipped due to incorrect file data
@@ -235,7 +233,7 @@ module SMESH
   };
 
   /*!
-   * Enumeration for DriverMED (used by Perform() method)
+   * Enumeration for ExportToMED*()
    */
   enum MED_VERSION
   {
@@ -243,8 +241,15 @@ module SMESH
     MED_V2_2
   };
 
-  typedef sequence<log_block> log_array;
-
+  /*! 
+   * \brief A structure containing information about MED file
+   */
+  struct MedFileInfo
+  {
+    string fileName; //!< name of file
+    long   fileSize; //!< size of file
+    long   major, minor, release; //!< MED file version
+  };
 
   /*!
    * Auxilary flags for advanced extrusion.
@@ -272,7 +277,7 @@ module SMESH
 
   interface SMESH_Mesh;
 
-  interface SMESH_IDSource
+  interface SMESH_IDSource : SALOME::GenericObj
   {
     /*!
      * Returns a sequence of all element IDs
@@ -280,11 +285,17 @@ module SMESH
     long_array GetIDs();
 
     /*!
-     * Returns statistic of mesh elements
-     * @return array of number enityties by index of EntityType
+     * Returns number of mesh elements of each \a EntityType
+     * @return array of number of elements per \a EntityType
      */
     long_array GetMeshInfo();
 
+    /*!
+     * Returns number of mesh elements of each \a ElementType
+     * @return array of number of elements per \a ElementType
+     */
+    long_array GetNbElementsByType();
+
     /*!
      * Returns types of elements it contains.
      * It's empty if the SMESH_IDSource contains no IDs
@@ -686,12 +697,10 @@ module SMESH
     void ExportPartToSTL( in SMESH_IDSource meshPart,
                           in string         file,
                           in boolean        isascii ) raises (SALOME::SALOME_Exception);
-
     /*!
-     * Get MED Mesh
+     * Return computation progress [0.,1]
      */
-    SALOME_MED::MESH GetMEDMesh()
-      raises (SALOME::SALOME_Exception);
+    double GetComputeProgress();
 
     /*!
      * Get informations about mesh contents
@@ -801,6 +810,9 @@ module SMESH
     EntityType GetElementGeomType( in long id )
       raises (SALOME::SALOME_Exception);
 
+    GeometryType GetElementShape( in long id )
+      raises (SALOME::SALOME_Exception);
+
     long_array GetSubMeshElementsId(in long ShapeID)
       raises (SALOME::SALOME_Exception);
 
@@ -916,6 +928,11 @@ module SMESH
      */
     long_array GetElemFaceNodes(in long elemId, in short faceIndex);
 
+    /*!
+     * Returns three components of normal of given mesh face (or an empty array in KO case)
+     */
+    double_array GetFaceNormal(in long faceId, in boolean normalized);
+
     /*!
      * Returns an element based on all given nodes.
      */
@@ -944,7 +961,7 @@ module SMESH
     double_array BaryCenter(in long id);
 
     /*! Gets information about imported MED file */
-    SALOME_MED::MedFileInfo GetMEDFileInfo();
+    MedFileInfo GetMEDFileInfo();
 
     /*!
      *  Sets list of notebook variables used for Mesh operations separated by ":" symbol
@@ -1017,12 +1034,6 @@ module SMESH
      * Get the internal Id
      */
     long GetId();
-
-    /*!
-     * Get MED subMesh
-     */
-    SALOME_MED::FAMILY GetFamily()
-      raises (SALOME::SALOME_Exception);
   };
 
 };