Salome HOME
IMP19942 - Convert group on geometry into group of elements
[modules/smesh.git] / idl / SMESH_Mesh.idl
index 0e9d8ceb8abc167faaafe6448e35b4de92ba3d20..d55204ef4cae34162fc3190771517dcf7370aeb6 100644 (file)
@@ -61,6 +61,7 @@ module SMESH
       CHANGE_ELEMENT_NODES,
       CHANGE_POLYHEDRON_NODES,
       RENUMBER,
+      CLEAR_MESH,
       ADD_QUADEDGE,
       ADD_QUADTRIANGLE,
       ADD_QUADQUADRANGLE,
@@ -93,6 +94,14 @@ module SMESH
                       double vy;
                       double vz; } ;
 
+  /*!
+   * Node location on a shape
+   */
+  struct NodePosition {
+    long             shapeID;
+    GEOM::shape_type shapeType;
+    double_array     params; // [U] on EDGE, [U,V] on FACE, [] on the rest shapes
+  };
 
   /*!
    * Enumeration for element type, like in SMDS
@@ -133,7 +142,8 @@ module SMESH
     HYP_ALREADY_EXIST,// such hypothesis already exist
     HYP_BAD_DIM,      // bad dimension
     HYP_BAD_SUBSHAPE, // shape is neither the main one, nor its subshape, nor a group
-    HYP_BAD_GEOMETRY  // geometry mismatches algorithm's expectation
+    HYP_BAD_GEOMETRY, // geometry mismatches algorithm's expectation
+    HYP_NEED_SHAPE    // algorithm can work on shape only
   };
 
   /*!
@@ -169,6 +179,22 @@ module SMESH
   const long EXTRUSION_FLAG_BOUNDARY = 1;
   const long EXTRUSION_FLAG_SEW = 2;
   
+  /*!
+   * Structure used in mesh edit preview data (MeshPreviewStruct)
+   */
+  struct ElementSubType { ElementType SMDS_ElementType;
+                          boolean     isPoly;
+                          long        nbNodesInElement; };
+
+  typedef sequence<ElementSubType> types_array;
+
+  /*!
+   * Structure containing mesh edit preview data
+   */
+  struct MeshPreviewStruct { nodes_array nodesXYZ;
+                             long_array  elementConnectivities;
+                             types_array elementTypes; };
+
   interface SMESH_IDSource
   {
     /*!
@@ -196,6 +222,17 @@ module SMESH
     GEOM::GEOM_Object GetShapeToMesh()
       raises (SALOME::SALOME_Exception);
 
+    /*!
+     * Remove all nodes and elements
+     */
+    void Clear()
+      raises (SALOME::SALOME_Exception);
+
+    /*!
+     * Remove all nodes and elements of submesh
+     */
+    void ClearSubMesh(in long ShapeID)
+      raises (SALOME::SALOME_Exception);
 
     /*!
      * Get the subMesh object associated to a subShape. The subMesh object
@@ -246,6 +283,12 @@ module SMESH
     ListOfGroups GetGroups()
       raises (SALOME::SALOME_Exception);
 
+    /*!
+     *  Get number of groups existing in the mesh
+     */
+    long NbGroups()
+      raises (SALOME::SALOME_Exception);
+
     /*!
      * Union of two groups
      *    New group is created. All mesh elements that are
@@ -255,6 +298,15 @@ module SMESH
                              in SMESH_GroupBase aGroup2,
                              in string          name )
       raises (SALOME::SALOME_Exception);
+      
+    /*!
+     * Union of list of groups
+     * New group is created. All mesh elements that are
+     * present in initial groups are added to the new one
+     */
+    SMESH_Group UnionListOfGroups (in ListOfGroups aListOfGroups,
+                                   in string       name )
+      raises (SALOME::SALOME_Exception);
 
     /*!
      *  Intersection of two groups
@@ -265,6 +317,15 @@ module SMESH
                                  in SMESH_GroupBase aGroup2,
                                  in string          name )
       raises (SALOME::SALOME_Exception);
+      
+    /*!
+     *  Intersection of list of groups
+     *  New group is created. All mesh elements that are
+     *  present in all initial groups simultaneously are added to the new one.
+     */
+    SMESH_Group IntersectListOfGroups (in ListOfGroups aListOfGroups,
+                                       in string       name)
+      raises (SALOME::SALOME_Exception);
 
     /*!
      *  Cut of two groups
@@ -272,8 +333,35 @@ module SMESH
      *  main group but do not present in tool group are added to the new one
      */
     SMESH_Group CutGroups (in SMESH_GroupBase aMainGroup,
-                          in SMESH_GroupBase aToolGroup,
-                          in string          name )
+                           in SMESH_GroupBase aToolGroup,
+                           in string          name )
+      raises (SALOME::SALOME_Exception);
+      
+    /*!
+     *  Cut of lists of groups
+     *  New group is created. All mesh elements that are present in
+     *  main groups but do not present in tool groups are added to the new one
+     */
+    SMESH_Group CutListOfGroups (in ListOfGroups aMainGroups,
+                                 in ListOfGroups aToolGroups,
+                                 in string       name)
+      raises (SALOME::SALOME_Exception);
+      
+    /*!
+     *  Create groups of entities from existing groups of superior dimensions 
+     *  New group is created. System 
+     *  1) extract all nodes from each group,
+     *  2) combine all elements of specified dimension laying on these nodes.
+     */
+    SMESH_Group CreateDimGroup( in ListOfGroups aListOfGroups,
+                                in ElementType  anElemType,
+                                in string       name )
+      raises (SALOME::SALOME_Exception);
+
+    /*!
+     * Convert group on geometry into standalone group
+     */
+    SMESH_Group ConvertToStandalone( in SMESH_GroupOnGeom theGeomGroup )
       raises (SALOME::SALOME_Exception);
 
     /*!
@@ -335,6 +423,20 @@ module SMESH
     void ClearLog()
       raises (SALOME::SALOME_Exception);
 
+    /*!
+     * Toggle auto color mode on the object.
+     * @params
+     * - theAutoColor : flag which toggles auto color mode.
+     */
+    void SetAutoColor(in boolean theAutoColor)
+      raises (SALOME::SALOME_Exception);
+
+    /*!
+     * Get flag of object's auto color mode.
+     */
+    boolean GetAutoColor()
+      raises (SALOME::SALOME_Exception);
+
     /*!
      * Get the internal Id
      */
@@ -382,6 +484,11 @@ module SMESH
     void ExportMED( in string file, in boolean auto_groups )
       raises (SALOME::SALOME_Exception);
 
+    /*!
+     * Return string representation of a MED file version comprising nbDigits
+     */
+    string GetVersionString(in MED_VERSION version, in short nbDigits);
+
     /*!
      * Export Mesh to DAT, UNV and STL Formats
      * (UNV supported version is I-DEAS 10)
@@ -517,6 +624,11 @@ module SMESH
      */
     long_array GetNodeInverseElements(in long id);
 
+    /*!
+     * \brief Return position of a node on shape
+     */
+    NodePosition GetNodePosition(in long NodeID);
+
     /*!
      * If given element is node returns IDs of shape from position
      * If there is not node for given ID - returns -1
@@ -587,6 +699,8 @@ module SMESH
      */
     double_array BaryCenter(in long id);
 
+    /*! Gets information about imported MED file */
+    SALOME_MED::MedFileInfo GetMEDFileInfo();
   };
 
   interface SMESH_subMesh : SALOME::GenericObj, SMESH_IDSource