-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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
// 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
bool IsGridBySpacing(const int axis) const throw ( SALOME_Exception );
+ /*!
+ * 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 double p[3], bool toUnset);
+ bool GetFixedPoint(double p[3]) const;
+
/*!
* \brief Computes node coordinates by spacing functions
* \param x0 - lower coordinate
std::vector<std::string>& spaceFuns,
std::vector<double>& points,
std::vector<double>& coords,
- const std::string& axis ) throw (SALOME_Exception);
+ const std::string& axis,
+ const double* xForced=0) throw (SALOME_Exception);
/*!
* Return coordinates of node positions along the three axes.
* If the grid is defined by spacing functions, the coordinates are computed
std::vector<double>& yNodes,
std::vector<double>& zNodes,
const Bnd_Box& bndBox) const throw ( SALOME_Exception );
+
+ /*!
+ * \brief Set custom direction of axes
+ */
+ void SetAxisDirs(const double* the9DirComps) throw ( SALOME_Exception );
+ const double* GetAxisDirs() const { return _axisDirs; }
+ /*!
+ * \brief Returns axes at which number of hexahedra is maximal
+ */
+ static void ComputeOptimalAxesDirs(const TopoDS_Shape& shape,
+ const bool isOrthogonal,
+ double dirCoords[9]);
/*!
* 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 \athreshold times less than the size of the initial hexahedron.
*/
void SetSizeThreshold(const double threshold) throw ( SALOME_Exception );
/*!
*/
double GetSizeThreshold() const;
+ /*!
+ * \brief 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(bool toAdd);
+ bool GetToAddEdges() const;
+
/*!
* \brief Return true if parameters are well defined
*/
std::vector<std::string> _spaceFunctions[3];
std::vector<double> _internalPoints[3];
+ double _axisDirs [9];
+ double _fixedPoint[3];
+
double _sizeThreshold;
+ bool _toAddEdges;
};
#endif