Salome HOME
Merge branch 'V9_9_BR'
[modules/smesh.git] / idl / SMESH_BasicHypothesis.idl
index 186b066810f8dfa2267aaaa9ad1a16498a9e4fe1..763402030cb7a1ea695487c39421fd0f172515a6 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2022  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
@@ -128,7 +128,7 @@ module StdMeshers
   };
 
   /*!
-   * Common inteface of 1D hypotheses that can be reversed
+   * Common interface of 1D hypotheses that can be reversed
    */
   interface Reversible1D
   {
@@ -161,32 +161,32 @@ module StdMeshers
     /*!
      * Builds and returns point distribution according to passed density function
      */
-    SMESH::double_array BuildDistributionExpr( in string func, in long nbSeg, in long conv )
+    SMESH::double_array BuildDistributionExpr( in string func, in long nbSeg, in long  conv )
       raises (SALOME::SALOME_Exception);
-    SMESH::double_array BuildDistributionTab( in SMESH::double_array func, in long nbSeg, in long conv )
+    SMESH::double_array BuildDistributionTab( in SMESH::double_array func, in long  nbSeg, in long  conv )
       raises (SALOME::SALOME_Exception);
   
     /*!
      * Sets <number of segments> parameter value
      */
-    void SetNumberOfSegments(in long segmentsNumber)
+    void SetNumberOfSegments(in SMESH::smIdType  segmentsNumber)
       raises (SALOME::SALOME_Exception);
 
     /*!
      * Returns <number of segments> parameter value
      */
-    long GetNumberOfSegments();
+    long  GetNumberOfSegments();
 
     /*!
      * Sets <distribution type> parameter value
      */
-    void SetDistrType(in long typ)
+    void SetDistrType(in long  typ)
       raises (SALOME::SALOME_Exception);
 
     /*!
      * Returns <distribution type> parameter value
      */
-    long GetDistrType();
+    long  GetDistrType();
 
     /*!
      * Sets <scale factor> parameter value
@@ -227,13 +227,13 @@ module StdMeshers
     /*!
      * Sets <conversion mode> parameter value for functional distributions
      */
-    void SetConversionMode(in long conv )
+    void SetConversionMode(in long  conv )
       raises (SALOME::SALOME_Exception);
 
     /*!
      * Returns <conversion mode> parameter value for functional distributions
      */
-    long ConversionMode()
+    long  ConversionMode()
       raises (SALOME::SALOME_Exception);
   };
 
@@ -323,13 +323,13 @@ module StdMeshers
     /*!
      * Sets <mode> parameter value
      */
-    void SetMode(in long mode) 
+    void SetMode(in long  mode) 
       raises (SALOME::SALOME_Exception);
 
     /*!
      * Returns <mode> parameter value
      */
-    long GetMode();
+    long  GetMode();
   };
 
   /*!
@@ -395,7 +395,7 @@ module StdMeshers
      */
     void SetPoints(in SMESH::double_array listParams) 
       raises (SALOME::SALOME_Exception);
-    void SetNbSegments(in SMESH::long_array listNbSeg) 
+    void SetNbSegments(in SMESH::smIdType_array listNbSeg)
       raises (SALOME::SALOME_Exception);
 
     /*!
@@ -406,7 +406,7 @@ module StdMeshers
     /*!
      * Returns list of numbers of segments
      */
-    SMESH::long_array GetNbSegments();
+    SMESH::smIdType_array GetNbSegments();
 
   };
 
@@ -519,13 +519,13 @@ module StdMeshers
     /*!
      * Sets <number of segments> parameter value
      */
-    void SetNumberOfLayers(in long numberOfLayers) 
+    void SetNumberOfLayers(in long  numberOfLayers) 
       raises (SALOME::SALOME_Exception);
 
     /*!
      * Returns <number of layers> parameter value
      */
-    long GetNumberOfLayers();
+    long  GetNumberOfLayers();
 
   };
 
@@ -665,7 +665,7 @@ module StdMeshers
      * Result may be nil if association not set.
      * Valid indices are 1 and 2
      */
-    GEOM::GEOM_Object  GetSourceVertex(in long i)
+    GEOM::GEOM_Object  GetSourceVertex(in long  i)
       raises (SALOME::SALOME_Exception);
 
     /*!
@@ -673,7 +673,7 @@ module StdMeshers
      * Result may be nil if association not set.
      * Valid indices are 1 and 2
      */
-    GEOM::GEOM_Object  GetTargetVertex(in long i)
+    GEOM::GEOM_Object  GetTargetVertex(in long  i)
       raises (SALOME::SALOME_Exception);
   };
 
@@ -722,7 +722,7 @@ module StdMeshers
      * Result may be nil if association not set.
      * Valid indices are 1 and 2
      */
-    GEOM::GEOM_Object  GetSourceVertex(in long i)
+    GEOM::GEOM_Object  GetSourceVertex(in long  i)
       raises (SALOME::SALOME_Exception);
 
     /*!
@@ -730,7 +730,7 @@ module StdMeshers
      * Result may be nil if association not set.
      * Valid indices are 1 and 2
      */
-    GEOM::GEOM_Object  GetTargetVertex(in long i)
+    GEOM::GEOM_Object  GetTargetVertex(in long  i)
       raises (SALOME::SALOME_Exception);
   };
 
@@ -771,12 +771,12 @@ module StdMeshers
     /*!
      * Set base vertex for triangles
      */
-    void SetTriaVertex( in long vertID );
+    void SetTriaVertex( in long  vertID );
     
     /*!
      * Returns base vertex for triangles
      */
-    long GetTriaVertex();
+    long  GetTriaVertex();
     
     /*!
      * Set entry of the main object
@@ -813,6 +813,16 @@ module StdMeshers
      * Returns entries of shapes defining enforced nodes
      */
     SMESH::string_array GetEnfVertices();
+
+    /*!
+     * Set corner vertices
+     */
+    void SetCorners( in SMESH::long_array vertexIDs );
+
+    /*!
+     * Return IDs of corner vertices
+     */
+    SMESH::long_array GetCorners();
   };
 
   /*!
@@ -857,11 +867,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
   {
@@ -892,10 +917,16 @@ 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();
+
+    void SetMethod( in VLExtrusionMethod how );
+    VLExtrusionMethod GetMethod();
+
+    void SetGroupName(in string name);
+    string GetGroupName();
   };
 
   /*!
@@ -933,17 +964,21 @@ 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();
+
+    void SetGroupName(in string name);
+    string GetGroupName();
   };
 
   /*!
    * 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
   {
@@ -965,8 +1000,8 @@ module StdMeshers
     /*!
      * 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);
 
     /*!
@@ -975,8 +1010,8 @@ module StdMeshers
      *  \param internalPoints - points dividing a grid into parts along an axis
      *  \param axis - index of an axis counterd from zero, i.e. 0==X, 1==Y, 2==Z
      *
-     * Parameter t of spaceFunction f(t) is a position [0,1] withing bounding box of
-     * the shape to mesh or withing an interval defined by internal points
+     * Parameter t of spaceFunction f(t) is a position [0,1] within bounding box of
+     * the shape to mesh or within an interval defined by internal points
      */
     void SetGridSpacing(in SMESH::string_array spaceFunctions,
                         in SMESH::double_array internalPoints,
@@ -986,7 +1021,23 @@ module StdMeshers
                         out SMESH::double_array internalPoints,
                         in short                axis) raises (SALOME::SALOME_Exception);
     /*!
-     * Enables implementation of geometrical edges into the mesh. If this feature
+     * 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);
+
+    /*!
+     * Enable 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
      */
@@ -994,7 +1045,35 @@ module StdMeshers
     boolean GetToAddEdges();
 
     /*!
-     * \brief Computes node coordinates by spacing functions
+     * Enable treatment of geom faces, either shared by solids or internal.
+     */
+    void SetToConsiderInternalFaces(in boolean toTreat);
+    boolean GetToConsiderInternalFaces();
+
+    /*!
+     * Enable applying size threshold to grid cells cut by internal geom faces.
+     */
+    void SetToUseThresholdForInternalFaces(in boolean toUse);
+    boolean GetToUseThresholdForInternalFaces();
+
+    /*!
+     * Enable creation of mesh faces.
+     */
+    void SetToCreateFaces(in boolean toCreate);
+    boolean GetToCreateFaces();
+
+    /*!
+     * Return 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 Compute node coordinates by spacing functions
      *  \param x0 - lower coordinate
      *  \param x1 - upper coordinate
      *  \param spaceFuns - space functions
@@ -1010,6 +1089,25 @@ module StdMeshers
       raises (SALOME::SALOME_Exception);
   };
 
+
+  /*!
+   * interface of "Renumber" hypothesis used by Hexahedron(ijk) algorithm
+   * to renumber mesh of a block to be structured-like
+   */
+  struct BlockCS // Local coordinate system of a block
+  {
+    GEOM::GEOM_Object solid;
+    GEOM::GEOM_Object vertex000;
+    GEOM::GEOM_Object vertex001;
+  };
+  typedef sequence<BlockCS> blockcs_array;
+
+  interface StdMeshers_BlockRenumber : SMESH::SMESH_Hypothesis
+  {
+    void SetBlocksOrientation( in blockcs_array blockCS );
+    blockcs_array GetBlocksOrientation();
+  };
+
   /*!
    * StdMeshers_SegmentAroundVertex_0D: interface of "SegmentAroundVertex" algorithm
    */
@@ -1045,6 +1143,27 @@ 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_PolyhedronPerSolid_3D: interface of "Polyhedron Per Solid" 3D algorithm
+   */
+  interface StdMeshers_PolyhedronPerSolid_3D : SMESH::SMESH_3D_Algo
+  {
+  };
+
   /*!
    * StdMeshers_Hexa_3D: interface of "Hexahedron (i,j,k)" algorithm
    */