Salome HOME
Add OVERALL_MESH_QUALITY translation for status bar.
[modules/smesh.git] / idl / SMESH_BasicHypothesis.idl
index 5ec9ebbf0273e389a3dc267098a03f6c1f67ff35..a6a0fef9feaf2863e11511f843b753b2acf9497b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  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
@@ -6,7 +6,7 @@
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -127,10 +127,36 @@ module StdMeshers
     double GetFineness();
   };
 
+  /*!
+   * Common inteface of 1D hypotheses that can be reversed
+   */
+  interface Reversible1D
+  {
+    /*!
+     * Set list of edges to reverse
+     */
+    void SetReversedEdges( in SMESH::long_array list );
+    
+    /*!
+     * Returns list of edges to reverse
+     */
+    SMESH::long_array GetReversedEdges();
+    
+    /*!
+     * Set entry of the main object
+     */
+    void SetObjectEntry( in string entry );
+    
+    /*!
+     * Get the entry of the main object
+     */
+    string GetObjectEntry();
+  };
+
   /*!
    * StdMeshers_NumberOfSegments: interface of "Nb. Segments" hypothesis
    */
-  interface StdMeshers_NumberOfSegments : SMESH::SMESH_Hypothesis
+  interface StdMeshers_NumberOfSegments : SMESH::SMESH_Hypothesis, Reversible1D
   {
     /*!
      * Builds and returns point distribution according to passed density function
@@ -209,32 +235,12 @@ module StdMeshers
      */
     long ConversionMode()
       raises (SALOME::SALOME_Exception);
-
-    /*!
-     * Set list of edges to reverse
-     */
-    void SetReversedEdges( in SMESH::long_array list );
-    
-    /*!
-     * Returns list of edges to reverse
-     */
-    SMESH::long_array GetReversedEdges();
-    
-    /*!
-     * Set entry of the main object
-     */
-    void SetObjectEntry( in string entry );
-    
-    /*!
-     * Get the entry of the main object
-     */
-    string GetObjectEntry();
   };
 
   /*!
    * StdMeshers_Arithmetic1D: interface of "Arithmetic 1D" hypothesis
    */
-  interface StdMeshers_Arithmetic1D : SMESH::SMESH_Hypothesis
+  interface StdMeshers_Arithmetic1D : SMESH::SMESH_Hypothesis, Reversible1D
   {
     /*!
      * Sets <start segment length> or <end segment length> parameter value
@@ -260,26 +266,36 @@ module StdMeshers
      * Returns <start segment length> or <end segment length> parameter value
      */
     double GetLength(in boolean isStartLength);
-    
+
+  };
+
+  /*!
+   * StdMeshers_Arithmetic1D: interface of "Geometric 1D" hypothesis
+   */
+  interface StdMeshers_Geometric1D : SMESH::SMESH_Hypothesis, Reversible1D
+  {
     /*!
-     * Set list of edges to reverse
+     * Sets length of the first segment
      */
-    void SetReversedEdges( in SMESH::long_array list );
-    
+    void SetStartLength(in double length) 
+      raises (SALOME::SALOME_Exception);
+
     /*!
-     * Returns list of edges to reverse
+     * Sets value of Common Ratio
      */
-    SMESH::long_array GetReversedEdges();
-    
+    void SetCommonRatio(in double factor)
+      raises (SALOME::SALOME_Exception);
+
     /*!
-     * Set entry of the main object
+     * Returns length of the first segment
      */
-    void SetObjectEntry( in string entry );
-    
+    double GetStartLength();
+
     /*!
-     * Get the entry of the main object
+     * Returns value of Common Ratio
      */
-    string GetObjectEntry();
+    double GetCommonRatio();
+
   };
 
   /*!
@@ -319,7 +335,7 @@ module StdMeshers
   /*!
    * StdMeshers_StartEndLength: interface of "Start and End Length" hypothesis
    */
-  interface StdMeshers_StartEndLength : SMESH::SMESH_Hypothesis
+  interface StdMeshers_StartEndLength : SMESH::SMESH_Hypothesis, Reversible1D
   {
     /*!
      * Sets <start segment length> or <end segment length> parameter value
@@ -346,25 +362,6 @@ module StdMeshers
      */
     double GetLength(in boolean isStartLength);
 
-    /*!
-     * Set list of edges to reverse
-     */
-    void SetReversedEdges( in SMESH::long_array list );
-    
-    /*!
-     * Returns list of edges to reverse
-     */
-    SMESH::long_array GetReversedEdges();
-    
-    /*!
-     * Set entry of the main object
-     */
-    void SetObjectEntry( in string entry );
-    
-    /*!
-     * Get the entry of the main object
-     */
-    string GetObjectEntry();
   };
 
 
@@ -385,11 +382,10 @@ module StdMeshers
     double GetDeflection();
   };
 
-
   /*!
    * StdMeshers_FixedPoints1D: interface of "Fixed points 1D" hypothesis
    */
-  interface StdMeshers_FixedPoints1D : SMESH::SMESH_Hypothesis
+  interface StdMeshers_FixedPoints1D : SMESH::SMESH_Hypothesis, Reversible1D
   {
     /*!
      * Sets some points on edge using parameter on curve from 0 to 1
@@ -411,29 +407,34 @@ module StdMeshers
      * Returns list of numbers of segments
      */
     SMESH::long_array GetNbSegments();
-    
-    /*!
-     * Set list of edges to reverse
-     */
-    void SetReversedEdges( in SMESH::long_array list );
-    
+
+  };
+
+  /*!
+   * StdMeshers_Adaptive1D: interface of "Adaptive" hypothesis
+   */
+  interface StdMeshers_Adaptive1D : SMESH::SMESH_Hypothesis
+  {
     /*!
-     * Returns list of edges to reverse
+     * Sets minimal allowed segment length
      */
-    SMESH::long_array GetReversedEdges();
-    
+    void SetMinSize(in double minSegLen) raises (SALOME::SALOME_Exception);
+    double GetMinSize();
+
     /*!
-     * Set entry of the main object
+     * Sets maximal allowed segment length
      */
-    void SetObjectEntry( in string entry );
-    
+    void SetMaxSize(in double maxSegLen) raises (SALOME::SALOME_Exception);
+    double GetMaxSize();
+
     /*!
-     * Get the entry of the main object
+     * Sets <deflection> parameter value, 
+     * i.e. a maximal allowed distance between a segment and an edge.
      */
-    string GetObjectEntry();
+    void SetDeflection(in double deflection) raises (SALOME::SALOME_Exception);
+    double GetDeflection();
   };
 
-
   /*!
    * StdMeshers_MaxElementVolume: interface of "Max. Hexahedron or Tetrahedron Volume" hypothesis
    */
@@ -460,7 +461,8 @@ module StdMeshers
   };
 
   /*!
-   * StdMeshers_Propagation: interface of "Propagation" hypothesis.
+   * StdMeshers_Propagation: interface of "Propagation of 1D Hyp. on
+   * Opposite Edges" hypothesis.
    * Presence of this hypothesis on any edge propagates any other 1D
    * hypothesis from this edge on all edges, opposite to it.
    * It concerns only edges of quadrangle faces.
@@ -469,6 +471,17 @@ module StdMeshers
   {
   };
 
+  /*!
+   * StdMeshers_Propagation: interface of "Propagation of Node
+   * Distribution on Opposite Edges" hypothesis.
+   * Presence of this hypothesis on any edge propagates distribution of nodes
+   * from this edge on all edges, opposite to it.
+   * It concerns only edges of quadrangle faces.
+   */
+  interface StdMeshers_PropagOfDistribution : SMESH::SMESH_Hypothesis
+  {
+  };
+
   /*!
    * StdMeshers_QuadranglePreference: interface of "QuadranglePreference" hypothesis.
    * This hypothesis is used by StdMeshers_Quadrangle_2D algorithm.
@@ -784,6 +797,22 @@ module StdMeshers
      * Get the type of quadrangulation
      */
     QuadType GetQuadType();
+
+    /*!
+     * Set positions of enforced nodes
+     */
+    void SetEnforcedNodes(in GEOM::ListOfGO vertices, in SMESH::nodes_array points)
+      raises (SALOME::SALOME_Exception);
+
+    /*!
+     * Returns positions of enforced nodes
+     */
+    void GetEnforcedNodes(out GEOM::ListOfGO vertices, out SMESH::nodes_array points);
+
+    /*!
+     * Returns entries of shapes defining enforced nodes
+     */
+    SMESH::string_array GetEnfVertices();
   };
 
   /*!
@@ -828,11 +857,26 @@ module StdMeshers
     void GetCopySourceMesh(out boolean toCopyMesh,out boolean toCopyGroups);
   };
 
+  /*!
+   * Method of computing translation of a node at Viscous Layers construction
+   */
+  enum VLExtrusionMethod { 
+    // node is translated along normal to a surface with possible further smoothing
+    SURF_OFFSET_SMOOTH,
+    // node is translated along the average normal of surrounding faces till
+    // intersection with a neighbor face translated along its own normal 
+    // by the layers thickness
+    FACE_OFFSET,
+    // node is translated along the average normal of surrounding faces
+    // by the layers thickness
+    NODE_OFFSET
+  };
+
   /*!
    * interface of "Viscous Layers" hypothesis.
    * This hypothesis specifies parameters of layers of prisms to build
    * near mesh boundary. This hypothesis can be used by several 3D algorithms:
-   * NETGEN 3D, GHS3D, Hexahedron(i,j,k)
+   * NETGEN 3D, Hexahedron(i,j,k), MG_Tetra
    */
   interface StdMeshers_ViscousLayers : SMESH::SMESH_Hypothesis
   {
@@ -842,6 +886,58 @@ module StdMeshers
     void SetIgnoreFaces(in SMESH::long_array faceIDs) raises (SALOME::SALOME_Exception);
     SMESH::long_array GetIgnoreFaces();
 
+    /*!
+     * Set faces either to exclude from treatment or to make the Viscous Layers on.
+     */
+    void SetFaces(in SMESH::long_array faceIDs,
+                  in boolean           toIgnore) raises (SALOME::SALOME_Exception);
+    SMESH::long_array GetFaces();
+    boolean           GetIsToIgnoreFaces();
+
+    /*!
+     * Set total thickness of layers of prisms
+     */
+    void SetTotalThickness(in double thickness) raises (SALOME::SALOME_Exception);
+    double GetTotalThickness();
+
+    /*!
+     * Set number of layers of prisms
+     */
+    void SetNumberLayers(in short nb) raises (SALOME::SALOME_Exception);
+    short GetNumberLayers();
+
+    /*!
+     * Set factor (>=1.0) of growth of layer thickness towards inside of mesh
+     */
+    void SetStretchFactor(in double factor) raises (SALOME::SALOME_Exception);
+    double GetStretchFactor();
+
+    void SetMethod( in VLExtrusionMethod how );
+    VLExtrusionMethod GetMethod();
+  };
+
+  /*!
+   * interface of "Viscous Layers 2D" hypothesis.
+   * This hypothesis specifies parameters of layers of quadrilaterals to build
+   * near mesh boundary. This hypothesis can be used by several 2D algorithms:
+   * Mefisto, Quadrangle (mapping), NETGEN, BLSURF
+   */
+  interface StdMeshers_ViscousLayers2D : SMESH::SMESH_Hypothesis
+  {
+    /*!
+     * Set edges to exclude from treatment
+     */
+    void SetIgnoreEdges(in SMESH::long_array edgeIDs) raises (SALOME::SALOME_Exception);
+    SMESH::long_array GetIgnoreEdges();
+
+    /*!
+     * Set edges either to exclude from treatment or to make the Viscous Layers on.
+     */
+    void SetEdges(in SMESH::long_array edgeIDs, 
+                  in boolean           toIgnore) raises (SALOME::SALOME_Exception);
+    SMESH::long_array GetEdges();
+    boolean           GetIsToIgnoreEdges();
+
     /*!
      * Set total thickness of layers of prisms
      */
@@ -855,7 +951,7 @@ module StdMeshers
     short GetNumberLayers();
 
     /*!
-     * Set factor (>1.0) of growth of layer thickness towards inside of mesh
+     * Set factor (>=1.0) of growth of layer thickness towards inside of mesh
      */
     void SetStretchFactor(in double factor) raises (SALOME::SALOME_Exception);
     double GetStretchFactor();
@@ -864,15 +960,16 @@ module StdMeshers
   /*!
    * interface of "Body fitting Parameters" hypothesis.
    * This hypothesis specifies 
-   * - Definition of the Cartesian grid
    * - Size threshold
+   * - Definition of the Cartesian grid
+   * - Direction of grid axes
    */
   interface StdMeshers_CartesianParameters3D : SMESH::SMESH_Hypothesis
   {
     /*!
      * Set size threshold. A polyhedral cell got by cutting an initial
      * hexahedron by geometry boundary is considered small and is removed if
-     * it's size is \athreshold times less than the size of the initial hexahedron. 
+     * it's size is \a threshold times less than the size of the initial hexahedron. 
      * threshold must be > 1.0
      */
     void SetSizeThreshold(in double threshold) raises (SALOME::SALOME_Exception);
@@ -885,10 +982,10 @@ module StdMeshers
     boolean IsGridBySpacing(in short axis);
 
     /*!
-     * Set coordinates of nodes along an axis (counterd from zero)
+     * Set coordinates of nodes along an axis (countered from zero)
      */
-    void SetGrid(in SMESH::double_array coords,
-                 in short               axis) raises (SALOME::SALOME_Exception);
+    void SetGrid(in SMESH::double_array  coords,
+                 in short                axis) raises (SALOME::SALOME_Exception);
     SMESH::double_array GetGrid(in short axis) raises (SALOME::SALOME_Exception);
 
     /*!
@@ -907,6 +1004,39 @@ module StdMeshers
     void GetGridSpacing(out SMESH::string_array spaceFunctions,
                         out SMESH::double_array internalPoints,
                         in short                axis) raises (SALOME::SALOME_Exception);
+    /*!
+     * Set custom direction of axes
+     */
+    void SetAxesDirs(in SMESH::DirStruct x,
+                     in SMESH::DirStruct y,
+                     in SMESH::DirStruct z ) raises (SALOME::SALOME_Exception);
+    void GetAxesDirs(out SMESH::DirStruct x,
+                     out SMESH::DirStruct y,
+                     out SMESH::DirStruct z );
+    /*!
+     * Set/unset a fixed point, at which a node will be created provided that grid
+     * is defined by spacing in all directions
+     */
+    void SetFixedPoint(in SMESH::PointStruct p, in boolean toUnset);
+    boolean GetFixedPoint(out SMESH::PointStruct p);
+
+    /*!
+     * Enables implementation of geometrical edges into the mesh. If this feature
+     * is disabled, sharp edges of the shape are lost ("smoothed") in the mesh if
+     * they don't coincide with the grid lines
+     */
+    void SetToAddEdges(in boolean toAdd);
+    boolean GetToAddEdges();
+
+    /*!
+     * Returns axes at which a number of generated hexahedra is maximal
+     */
+    void ComputeOptimalAxesDirs(in GEOM::GEOM_Object shape,
+                                in boolean           isOrthogonal,
+                                out SMESH::DirStruct x,
+                                out SMESH::DirStruct y,
+                                out SMESH::DirStruct z ) 
+      raises (SALOME::SALOME_Exception);
 
     /*!
      * \brief Computes node coordinates by spacing functions
@@ -914,13 +1044,15 @@ module StdMeshers
      *  \param x1 - upper coordinate
      *  \param spaceFuns - space functions
      *  \param points - internal points
-     *  \param coords - the computed coordinates
+     *  \param axisName - e.g. "X"
+     *  \return the computed coordinates
      */
     SMESH::double_array ComputeCoordinates(in double              x0,
                                            in double              x1,
                                            in SMESH::string_array spaceFuns,
                                            in SMESH::double_array points,
-                                           in string              axisName ) raises (SALOME::SALOME_Exception);
+                                           in string              axisName ) 
+      raises (SALOME::SALOME_Exception);
   };
 
   /*!
@@ -958,6 +1090,20 @@ module StdMeshers
   {
   };
 
+  /*!
+   * StdMeshers_QuadFromMedialAxis_1D2D: interface of "Quadrangle (Medial Axis Projection)" algorithm
+   */
+  interface StdMeshers_QuadFromMedialAxis_1D2D : SMESH::SMESH_2D_Algo
+  {
+  };
+
+  /*!
+   * StdMeshers_PolygonPerFace_2D: interface of "Polygon Per Face" 2D algorithm
+   */
+  interface StdMeshers_PolygonPerFace_2D : SMESH::SMESH_2D_Algo
+  {
+  };
+
   /*!
    * StdMeshers_Hexa_3D: interface of "Hexahedron (i,j,k)" algorithm
    */