Salome HOME
Update copyrights in the documentation.
[modules/smesh.git] / idl / SMESH_Mesh.idl
index 059170dcb2864ac2ee8f23daa6bdeaa358755b77..805b21df68590e0e04a7c16b1de072b6bd6eba82 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,
@@ -88,19 +89,19 @@ module SMESH
   typedef sequence<log_block> log_array;
 
   struct PointStruct { double x;
-                      double y;
-                      double z; } ;
+                       double y;
+                       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 y;
+                       double z;
+                       double vx;
+                       double vy;
+                       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
   };
   
   /*!
@@ -215,7 +217,8 @@ module SMESH
     HYP_BAD_DIM,      // bad dimension
     HYP_BAD_SUBSHAPE, // shape is neither the main one, nor its sub-shape, nor a group
     HYP_BAD_GEOMETRY, // geometry mismatches algorithm's expectation
-    HYP_NEED_SHAPE    // algorithm can work on shape only
+    HYP_NEED_SHAPE,   // algorithm can work on shape only
+    HYP_INCOMPAT_HYPS // several additional hypotheses are incompatible one with other
   };
 
   /*!
@@ -252,7 +255,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
    */
@@ -312,6 +323,11 @@ module SMESH
      * happen if mesh data is not yet fully loaded from the file of study.
      */
     boolean IsMeshInfoCorrect();
+
+    /*!
+     * Returns mesh unstructed grid information.
+     */
+    SALOMEDS::TMPFile GetVtkUgStream();
   };
 
   interface SMESH_Group;
@@ -333,7 +349,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()
@@ -373,7 +389,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);
@@ -389,7 +405,7 @@ module SMESH
      * Create a group
      */
     SMESH_Group CreateGroup( in ElementType elem_type,
-                            in string      name )
+                             in string      name )
       raises (SALOME::SALOME_Exception);
 
     /*!
@@ -491,14 +507,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);
 
     /*!
@@ -508,31 +531,29 @@ module SMESH
       raises (SALOME::SALOME_Exception);
 
     /*!
-     * Add hypothesis to the mesh, under a particular Sub-shape
+     * Add hypothesis to the mesh, under a particular sub-shape
      * (or the main shape itself)
-     * The Add method is only used to prepare the build of the mesh and store
+     * This method is only used to prepare the build of the mesh and store
      * the algorithms and associated parameters.
-     * Actual job of mesh the shape is done by MESH_Gen.
+     * Actual job of meshing the shape is done by SMESH_Gen::Compute()
      * @params
-     * - aSubShape : sub-shape obtained by a shape explode in GEOM
+     * - aSubObject : sub-shape obtained by a shape explode in GEOM
      *   (or main shape)
-     * - anHyp : hypothesis object
+     * - anHyp : an hypothesis object
      * @return
-     * - OK if the hypothesis is compatible with the sub-shape
-     *   (and all previous hypothesis on the sub-shape)
-     * - NOK if the hypothesis is not compatible with the sub-shape
-     *   (or one previous hypothesis on the sub-shape)
-     * raises exception if hypothesis has not been created
+     * - An enum item explaining what's up
+     * - anErrorText: an optional textual description of a problem (if any)
      */
     Hypothesis_Status AddHypothesis(in GEOM::GEOM_Object aSubObject,
-                                   in SMESH_Hypothesis anHyp)
+                                    in SMESH_Hypothesis  anHyp,
+                                    out string           anErrorText)
       raises (SALOME::SALOME_Exception);
 
     /*!
      * Remove an hypothesis previouly added with AddHypothesis.
      */
     Hypothesis_Status RemoveHypothesis(in GEOM::GEOM_Object aSubObject,
-                                      in SMESH_Hypothesis anHyp)
+                                       in SMESH_Hypothesis anHyp)
       raises (SALOME::SALOME_Exception);
 
     /*!
@@ -758,6 +779,9 @@ module SMESH
     long NbPolygons()
       raises (SALOME::SALOME_Exception);
 
+    long NbPolygonsOfOrder(in ElementOrder order)
+      raises (SALOME::SALOME_Exception);
+
     long NbVolumes()
       raises (SALOME::SALOME_Exception);
 
@@ -1020,7 +1044,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);