Salome HOME
Merge branch 'occ/shaper2smesh'
[modules/smesh.git] / src / StdMeshers_I / StdMeshers_CartesianParameters3D_i.hxx
index e09422d0f4452c2dfcc520c7dd2222c31db4fcf4..1b273ce77b845eb6b6945c1ba3cba82269bedef1 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2019  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
@@ -46,7 +46,6 @@ class STDMESHERS_I_EXPORT StdMeshers_CartesianParameters3D_i:
  public:
   // Constructor
   StdMeshers_CartesianParameters3D_i( PortableServer::POA_ptr thePOA,
-                                      int                     theStudyId,
                                       ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_CartesianParameters3D_i();
@@ -73,8 +72,8 @@ class STDMESHERS_I_EXPORT StdMeshers_CartesianParameters3D_i:
    *  \param internalPoints - points dividing a grid into parts along each direction
    *  \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(const SMESH::string_array& spaceFunctions,
                       const SMESH::double_array& internalPoints,
@@ -83,15 +82,66 @@ class STDMESHERS_I_EXPORT StdMeshers_CartesianParameters3D_i:
   void GetGridSpacing(SMESH::string_array_out xSpaceFunctions,
                       SMESH::double_array_out xInternalPoints,
                       CORBA::Short            axis) throw (SALOME::SALOME_Exception);
+  /*!
+   * Set custom direction of axes
+   */
+  void SetAxesDirs(const SMESH::DirStruct& x,
+                   const SMESH::DirStruct& y,
+                   const SMESH::DirStruct& z) throw (SALOME::SALOME_Exception);
+  void GetAxesDirs(SMESH::DirStruct& x,
+                   SMESH::DirStruct& y,
+                   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(const ::SMESH::PointStruct& p, CORBA::Boolean toUnset);
+  CORBA::Boolean GetFixedPoint(::SMESH::PointStruct& p);
+
+
+  /*!
+   * \brief 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
+   */
+  void SetToAddEdges(CORBA::Boolean toAdd);
+  CORBA::Boolean GetToAddEdges();
+
+  /*!
+   * Enable treatment of geom faces, either shared by solids or internal.
+   */
+  void SetToConsiderInternalFaces(CORBA::Boolean toTreat);
+  CORBA::Boolean GetToConsiderInternalFaces();
 
   /*!
-   * \brief Return true if the grid is defined by spacing functions and 
+   * Enable applying size threshold to grid cells cut by internal geom faces.
+   */
+  void SetToUseThresholdForInternalFaces(CORBA::Boolean toUse);
+  CORBA::Boolean GetToUseThresholdForInternalFaces();
+
+  /*!
+   * Enable creation of mesh faces.
+   */
+  void SetToCreateFaces(CORBA::Boolean toCreate);
+  CORBA::Boolean GetToCreateFaces();
+
+
+  /*!
+   * \brief Return true if the grid is defined by spacing functions and
    *        not by node coordinates
    */
   CORBA::Boolean IsGridBySpacing(CORBA::Short axis);
 
   /*!
-   * \brief Computes node coordinates by spacing functions
+   * Return axes at which number of hexahedra is maximal
+   */
+  void ComputeOptimalAxesDirs(GEOM::GEOM_Object_ptr shape,
+                              CORBA::Boolean        isOrthogonal,
+                              SMESH::DirStruct&     x,
+                              SMESH::DirStruct&     y,
+                              SMESH::DirStruct&     z) throw (SALOME::SALOME_Exception);
+  /*!
+   * \brief Compute node coordinates by spacing functions
    *  \param x0 - lower coordinate
    *  \param x1 - upper coordinate
    *  \param spaceFuns - space functions
@@ -110,6 +160,13 @@ class STDMESHERS_I_EXPORT StdMeshers_CartesianParameters3D_i:
 
   // Verify whether hypothesis supports given entity type 
   CORBA::Boolean IsDimSupported( SMESH::Dimension type );
+
+
+  // Methods for copying mesh definition to other geometry
+  virtual bool getObjectsDependOn( std::vector< std::string > & entryArray,
+                                   std::vector< int >         & subIDArray ) const { return false; }
+  virtual bool setObjectsDependOn( std::vector< std::string > & entryArray,
+                                   std::vector< int >         & subIDArray ) { return true; }
 };
 
 #endif