mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-28 02:10:35 +05:00
0019923: EDF 765 SMESH : default values of hypothesis
+ * \brief Initialize my parameter values by linear size of mesh element. + * \retval bool - true if parameter values have been successfully defined + */ + virtual bool SetParametersByElementSize(double elemLenght, const SMESH_Mesh* theMesh=0)=0;
This commit is contained in:
parent
f35204c6bd
commit
2420f68007
@ -286,12 +286,7 @@ bool SMESH_Algo::IsReversedSubMesh (const TopoDS_Face& theFace,
|
|||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief Initialize my parameter values by the mesh built on the geometry
|
* \brief Just return false as the algorithm does not hold parameters values
|
||||||
* \param theMesh - the built mesh
|
|
||||||
* \param theShape - the geometry of interest
|
|
||||||
* \retval bool - true if parameter values have been successfully defined
|
|
||||||
*
|
|
||||||
* Just return false as the algorithm does not hold parameters values
|
|
||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
@ -300,7 +295,10 @@ bool SMESH_Algo::SetParametersByMesh(const SMESH_Mesh* /*theMesh*/,
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
bool SMESH_Algo::SetParametersByElementSize(double, const SMESH_Mesh*)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
//================================================================================
|
//================================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief Fill vector of node parameters on geometrical edge, including vertex nodes
|
* \brief Fill vector of node parameters on geometrical edge, including vertex nodes
|
||||||
|
@ -164,12 +164,10 @@ public:
|
|||||||
bool InitCompatibleHypoFilter( SMESH_HypoFilter & theFilter,
|
bool InitCompatibleHypoFilter( SMESH_HypoFilter & theFilter,
|
||||||
const bool ignoreAuxiliary) const;
|
const bool ignoreAuxiliary) const;
|
||||||
/*!
|
/*!
|
||||||
* \brief Initialize my parameter values by the mesh built on the geometry
|
* \brief Just return false as the algorithm does not hold parameters values
|
||||||
*
|
|
||||||
* Just return false as the algorithm does not hold parameters values
|
|
||||||
*/
|
*/
|
||||||
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh,
|
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
||||||
const TopoDS_Shape& theShape);
|
virtual bool SetParametersByElementSize(double elemLenght, const SMESH_Mesh* theMesh=0);
|
||||||
/*!
|
/*!
|
||||||
* \brief return compute error
|
* \brief return compute error
|
||||||
*/
|
*/
|
||||||
|
@ -80,12 +80,18 @@ public:
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Initialize my parameter values by the mesh built on the geometry
|
* \brief Initialize my parameter values by the mesh built on the geometry
|
||||||
* \param theMesh - the built mesh
|
* \param theMesh - the built mesh
|
||||||
* \param theShape - the geometry of interest
|
* \param theShape - the geometry of interest
|
||||||
* \retval bool - true if parameter values have been successfully defined
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
*/
|
*/
|
||||||
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape)=0;
|
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape)=0;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
virtual bool SetParametersByElementSize(double elemLenght, const SMESH_Mesh* theMesh=0)=0;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Return true if me is an auxiliary hypothesis
|
* \brief Return true if me is an auxiliary hypothesis
|
||||||
* \retval bool - auxiliary or not
|
* \retval bool - auxiliary or not
|
||||||
|
@ -197,3 +197,17 @@ bool StdMeshers_Arithmetic1D::SetParametersByMesh(const SMESH_Mesh* theMesh,
|
|||||||
}
|
}
|
||||||
return nbEdges;
|
return nbEdges;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
bool StdMeshers_Arithmetic1D::SetParametersByElementSize(double elemLenght,
|
||||||
|
const SMESH_Mesh* /*mesh*/)
|
||||||
|
{
|
||||||
|
return bool( _begLength = _endLength = elemLenght );
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -58,6 +58,12 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
double _begLength, _endLength;
|
double _begLength, _endLength;
|
||||||
};
|
};
|
||||||
|
@ -368,3 +368,37 @@ bool StdMeshers_AutomaticLength::SetParametersByMesh(const SMESH_Mesh* theMesh
|
|||||||
|
|
||||||
return nbEdges;
|
return nbEdges;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
bool StdMeshers_AutomaticLength::SetParametersByElementSize(double elemLenght,
|
||||||
|
const SMESH_Mesh* theMesh)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// assure the base automatic length is stored in _TShapeToLength
|
||||||
|
// GetLength( theMesh, elemLenght );
|
||||||
|
|
||||||
|
// // find maximal edge length
|
||||||
|
// double maxLen = 0;
|
||||||
|
// map<const TopoDS_TShape*, double>::iterator
|
||||||
|
// tshape_length = _TShapeToLength.begin(), slEnd = _TShapeToLength.end();
|
||||||
|
// for ( ; tshape_length != slEnd; ++tshape_length )
|
||||||
|
// if ( tshape_length->second > maxLen )
|
||||||
|
// maxLen = tshape_length->second;
|
||||||
|
|
||||||
|
// // automatic length for longest element
|
||||||
|
// double autoLen = GetLength( theMesh, maxLen );
|
||||||
|
|
||||||
|
// // elemLenght = autoLen / (theCoarseConst + theFineConst * _fineness) -->
|
||||||
|
// _fineness = ( autoLen / elemLenght - theCoarseConst ) / theFineConst;
|
||||||
|
|
||||||
|
// return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -97,6 +97,12 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::map<const TopoDS_TShape*, double> _TShapeToLength;
|
std::map<const TopoDS_TShape*, double> _TShapeToLength;
|
||||||
const SMESH_Mesh* _mesh;
|
const SMESH_Mesh* _mesh;
|
||||||
|
@ -222,3 +222,16 @@ bool StdMeshers_Deflection1D::SetParametersByMesh(const SMESH_Mesh* theMesh,
|
|||||||
}
|
}
|
||||||
return nbEdges;
|
return nbEdges;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
bool StdMeshers_Deflection1D::SetParametersByElementSize(double /*elemLenght*/,
|
||||||
|
const SMESH_Mesh* /*theMesh*/)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@ -56,7 +56,13 @@ class STDMESHERS_EXPORT StdMeshers_Deflection1D:public SMESH_Hypothesis
|
|||||||
*/
|
*/
|
||||||
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
||||||
|
|
||||||
protected:
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
|
||||||
|
|
||||||
|
protected:
|
||||||
double _value;
|
double _value;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -146,3 +146,15 @@ bool StdMeshers_LayerDistribution::SetParametersByMesh(const SMESH_Mesh* ,
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
bool StdMeshers_LayerDistribution::SetParametersByElementSize(double elemLenght,
|
||||||
|
const SMESH_Mesh* theMesh)
|
||||||
|
{
|
||||||
|
return myHyp ? myHyp->SetParametersByElementSize(elemLenght,theMesh) : false;
|
||||||
|
}
|
||||||
|
@ -84,6 +84,12 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SMESH_Hypothesis* myHyp;
|
SMESH_Hypothesis* myHyp;
|
||||||
std::string mySavedHyp;
|
std::string mySavedHyp;
|
||||||
|
@ -153,3 +153,15 @@ bool StdMeshers_LengthFromEdges::SetParametersByMesh(const SMESH_Mesh* /*theMesh
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
bool StdMeshers_LengthFromEdges::SetParametersByElementSize(double /*elemLenght*/,
|
||||||
|
const SMESH_Mesh* /*theMesh*/)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
@ -62,6 +62,12 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int _mode;
|
int _mode;
|
||||||
};
|
};
|
||||||
|
@ -235,3 +235,16 @@ bool StdMeshers_LocalLength::SetParametersByMesh(const SMESH_Mesh* theMesh,
|
|||||||
|
|
||||||
return nbEdges;
|
return nbEdges;
|
||||||
}
|
}
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
bool StdMeshers_LocalLength::SetParametersByElementSize(double elemLenght,
|
||||||
|
const SMESH_Mesh* /*theMesh*/)
|
||||||
|
{
|
||||||
|
return bool( _length = elemLenght );
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -60,6 +60,12 @@ class STDMESHERS_EXPORT StdMeshers_LocalLength: public SMESH_Hypothesis
|
|||||||
*/
|
*/
|
||||||
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
double _length;
|
double _length;
|
||||||
double _precision;
|
double _precision;
|
||||||
|
@ -186,3 +186,16 @@ bool StdMeshers_MaxElementArea::SetParametersByMesh(const SMESH_Mesh* theMesh,
|
|||||||
}
|
}
|
||||||
return _maxArea > 0;
|
return _maxArea > 0;
|
||||||
}
|
}
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
bool StdMeshers_MaxElementArea::SetParametersByElementSize(double elemLenght,
|
||||||
|
const SMESH_Mesh* /*theMesh*/)
|
||||||
|
{
|
||||||
|
return bool( _maxArea = elemLenght*elemLenght );
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -58,6 +58,12 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
double _maxArea;
|
double _maxArea;
|
||||||
};
|
};
|
||||||
|
@ -198,3 +198,16 @@ bool StdMeshers_MaxElementVolume::SetParametersByMesh(const SMESH_Mesh* theMes
|
|||||||
}
|
}
|
||||||
return _maxVolume > 0;
|
return _maxVolume > 0;
|
||||||
}
|
}
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
bool StdMeshers_MaxElementVolume::SetParametersByElementSize(double elemLenght,
|
||||||
|
const SMESH_Mesh* /*theMesh*/)
|
||||||
|
{
|
||||||
|
return bool( _maxVolume = elemLenght*elemLenght*elemLenght );
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -60,6 +60,12 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
double _maxVolume;
|
double _maxVolume;
|
||||||
};
|
};
|
||||||
|
@ -111,5 +111,18 @@ istream & operator >> (istream & load, StdMeshers_NotConformAllowed & hyp)
|
|||||||
bool StdMeshers_NotConformAllowed::SetParametersByMesh(const SMESH_Mesh* /*theMesh*/,
|
bool StdMeshers_NotConformAllowed::SetParametersByMesh(const SMESH_Mesh* /*theMesh*/,
|
||||||
const TopoDS_Shape& /*theShape*/)
|
const TopoDS_Shape& /*theShape*/)
|
||||||
{
|
{
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
bool StdMeshers_NotConformAllowed::SetParametersByElementSize(double /*elemLenght*/,
|
||||||
|
const SMESH_Mesh* /*theMesh*/)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -56,6 +56,12 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include "StdMeshers_NumberOfLayers.hxx"
|
#include "StdMeshers_NumberOfLayers.hxx"
|
||||||
|
|
||||||
|
|
||||||
|
#include "SMESH_Mesh.hxx"
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -160,3 +161,17 @@ bool StdMeshers_NumberOfLayers::SetParametersByMesh(const SMESH_Mesh* ,
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
bool StdMeshers_NumberOfLayers::SetParametersByElementSize(double elemLenght,
|
||||||
|
const SMESH_Mesh* theMesh)
|
||||||
|
{
|
||||||
|
return bool( theMesh ? _nbLayers = int( theMesh->GetShapeDiagonalSize() / elemLenght/ 2.) : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -75,6 +75,12 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int _nbLayers;
|
int _nbLayers;
|
||||||
};
|
};
|
||||||
|
@ -65,7 +65,7 @@ StdMeshers_NumberOfSegments::StdMeshers_NumberOfSegments(int hypId,
|
|||||||
int studyId,
|
int studyId,
|
||||||
SMESH_Gen * gen)
|
SMESH_Gen * gen)
|
||||||
: SMESH_Hypothesis(hypId, studyId, gen),
|
: SMESH_Hypothesis(hypId, studyId, gen),
|
||||||
_numberOfSegments(1),
|
_numberOfSegments(15),//issue 19923
|
||||||
_distrType(DT_Regular),
|
_distrType(DT_Regular),
|
||||||
_scaleFactor(1.),
|
_scaleFactor(1.),
|
||||||
_convMode(1) //cut negative by default
|
_convMode(1) //cut negative by default
|
||||||
@ -684,3 +684,16 @@ bool StdMeshers_NumberOfSegments::SetParametersByMesh(const SMESH_Mesh* theMes
|
|||||||
|
|
||||||
return nbEdges;
|
return nbEdges;
|
||||||
}
|
}
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
bool StdMeshers_NumberOfSegments::SetParametersByElementSize(double elemLenght,
|
||||||
|
const SMESH_Mesh* /*theMesh*/)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -172,6 +172,12 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
|
||||||
|
|
||||||
virtual std::ostream & SaveTo(std::ostream & save);
|
virtual std::ostream & SaveTo(std::ostream & save);
|
||||||
virtual std::istream & LoadFrom(std::istream & load);
|
virtual std::istream & LoadFrom(std::istream & load);
|
||||||
friend std::ostream& operator << (std::ostream & save, StdMeshers_NumberOfSegments & hyp);
|
friend std::ostream& operator << (std::ostream & save, StdMeshers_NumberOfSegments & hyp);
|
||||||
|
@ -230,3 +230,16 @@ void StdMeshers_ProjectionSource1D::RestoreParams(const TopoDS_Shape& s1,
|
|||||||
_sourceMesh = mesh;
|
_sourceMesh = mesh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
bool StdMeshers_ProjectionSource1D::SetParametersByElementSize(double /*elemLenght*/,
|
||||||
|
const SMESH_Mesh* /*theMesh*/)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -138,6 +138,12 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
TopoDS_Shape _sourceEdge;
|
TopoDS_Shape _sourceEdge;
|
||||||
|
@ -298,3 +298,17 @@ void StdMeshers_ProjectionSource2D::RestoreParams(const TopoDS_Shape& s1,
|
|||||||
_targetVertex2 = TopoDS::Vertex( s5 );
|
_targetVertex2 = TopoDS::Vertex( s5 );
|
||||||
_sourceMesh = mesh;
|
_sourceMesh = mesh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
bool StdMeshers_ProjectionSource2D::SetParametersByElementSize(double /*elemLenght*/,
|
||||||
|
const SMESH_Mesh* /*theMesh*/)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -148,6 +148,12 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
TopoDS_Shape _sourceFace;
|
TopoDS_Shape _sourceFace;
|
||||||
|
@ -297,3 +297,17 @@ void StdMeshers_ProjectionSource3D::RestoreParams(const TopoDS_Shape& s1,
|
|||||||
_targetVertex2 = TopoDS::Vertex( s5 );
|
_targetVertex2 = TopoDS::Vertex( s5 );
|
||||||
_sourceMesh = mesh;
|
_sourceMesh = mesh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
bool StdMeshers_ProjectionSource3D::SetParametersByElementSize(double /*elemLenght*/,
|
||||||
|
const SMESH_Mesh* /*theMesh*/)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -140,6 +140,12 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
TopoDS_Shape _sourceShape;
|
TopoDS_Shape _sourceShape;
|
||||||
|
@ -97,6 +97,7 @@ ostream & operator << (ostream & save, StdMeshers_Propagation & hyp) { return
|
|||||||
istream & operator >> (istream & load, StdMeshers_Propagation & hyp) { return hyp.LoadFrom(load); }
|
istream & operator >> (istream & load, StdMeshers_Propagation & hyp) { return hyp.LoadFrom(load); }
|
||||||
bool StdMeshers_Propagation::SetParametersByMesh(const SMESH_Mesh*,
|
bool StdMeshers_Propagation::SetParametersByMesh(const SMESH_Mesh*,
|
||||||
const TopoDS_Shape& ) { return false; }
|
const TopoDS_Shape& ) { return false; }
|
||||||
|
bool StdMeshers_Propagation::SetParametersByElementSize(double,const SMESH_Mesh*) { return false; }
|
||||||
void StdMeshers_Propagation::SetPropagationMgr(SMESH_subMesh* subMesh) { PropagationMgr::Set( subMesh ); }
|
void StdMeshers_Propagation::SetPropagationMgr(SMESH_subMesh* subMesh) { PropagationMgr::Set( subMesh ); }
|
||||||
/*!
|
/*!
|
||||||
* \brief Return an edge from which hypotheses are propagated from
|
* \brief Return an edge from which hypotheses are propagated from
|
||||||
|
@ -80,5 +80,12 @@ class STDMESHERS_EXPORT StdMeshers_Propagation:public SMESH_Hypothesis
|
|||||||
* Just return false as this hypothesis does not have parameters values
|
* Just return false as this hypothesis does not have parameters values
|
||||||
*/
|
*/
|
||||||
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
|
||||||
|
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -114,3 +114,17 @@ bool StdMeshers_QuadranglePreference::SetParametersByMesh(const SMESH_Mesh* /*th
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
bool StdMeshers_QuadranglePreference::SetParametersByElementSize(double /*elemLenght*/,
|
||||||
|
const SMESH_Mesh* /*theMesh*/)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -60,6 +60,12 @@ class STDMESHERS_EXPORT StdMeshers_QuadranglePreference:public SMESH_Hypothesis
|
|||||||
*/
|
*/
|
||||||
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -109,3 +109,17 @@ bool StdMeshers_QuadraticMesh::SetParametersByMesh(const SMESH_Mesh*, const Topo
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
bool StdMeshers_QuadraticMesh::SetParametersByElementSize(double /*elemLenght*/,
|
||||||
|
const SMESH_Mesh* /*theMesh*/)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -62,6 +62,12 @@ class STDMESHERS_EXPORT StdMeshers_QuadraticMesh:public SMESH_Hypothesis
|
|||||||
*/
|
*/
|
||||||
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -30,14 +30,15 @@
|
|||||||
#include "StdMeshers_Regular_1D.hxx"
|
#include "StdMeshers_Regular_1D.hxx"
|
||||||
#include "StdMeshers_Distribution.hxx"
|
#include "StdMeshers_Distribution.hxx"
|
||||||
|
|
||||||
#include "StdMeshers_LocalLength.hxx"
|
|
||||||
#include "StdMeshers_NumberOfSegments.hxx"
|
|
||||||
#include "StdMeshers_Arithmetic1D.hxx"
|
#include "StdMeshers_Arithmetic1D.hxx"
|
||||||
#include "StdMeshers_StartEndLength.hxx"
|
|
||||||
#include "StdMeshers_Deflection1D.hxx"
|
|
||||||
#include "StdMeshers_AutomaticLength.hxx"
|
#include "StdMeshers_AutomaticLength.hxx"
|
||||||
#include "StdMeshers_SegmentLengthAroundVertex.hxx"
|
#include "StdMeshers_Deflection1D.hxx"
|
||||||
|
#include "StdMeshers_LocalLength.hxx"
|
||||||
|
#include "StdMeshers_MaxLength.hxx"
|
||||||
|
#include "StdMeshers_NumberOfSegments.hxx"
|
||||||
#include "StdMeshers_Propagation.hxx"
|
#include "StdMeshers_Propagation.hxx"
|
||||||
|
#include "StdMeshers_SegmentLengthAroundVertex.hxx"
|
||||||
|
#include "StdMeshers_StartEndLength.hxx"
|
||||||
|
|
||||||
#include "SMESH_Gen.hxx"
|
#include "SMESH_Gen.hxx"
|
||||||
#include "SMESH_Mesh.hxx"
|
#include "SMESH_Mesh.hxx"
|
||||||
@ -81,6 +82,7 @@ StdMeshers_Regular_1D::StdMeshers_Regular_1D(int hypId, int studyId,
|
|||||||
_shapeType = (1 << TopAbs_EDGE);
|
_shapeType = (1 << TopAbs_EDGE);
|
||||||
|
|
||||||
_compatibleHypothesis.push_back("LocalLength");
|
_compatibleHypothesis.push_back("LocalLength");
|
||||||
|
_compatibleHypothesis.push_back("MaxLength");
|
||||||
_compatibleHypothesis.push_back("NumberOfSegments");
|
_compatibleHypothesis.push_back("NumberOfSegments");
|
||||||
_compatibleHypothesis.push_back("StartEndLength");
|
_compatibleHypothesis.push_back("StartEndLength");
|
||||||
_compatibleHypothesis.push_back("Deflection1D");
|
_compatibleHypothesis.push_back("Deflection1D");
|
||||||
@ -146,14 +148,28 @@ bool StdMeshers_Regular_1D::CheckHypothesis
|
|||||||
const StdMeshers_LocalLength * hyp =
|
const StdMeshers_LocalLength * hyp =
|
||||||
dynamic_cast <const StdMeshers_LocalLength * >(theHyp);
|
dynamic_cast <const StdMeshers_LocalLength * >(theHyp);
|
||||||
ASSERT(hyp);
|
ASSERT(hyp);
|
||||||
//_value[ BEG_LENGTH_IND ] = _value[ END_LENGTH_IND ] = hyp->GetLength();
|
|
||||||
_value[ BEG_LENGTH_IND ] = hyp->GetLength();
|
_value[ BEG_LENGTH_IND ] = hyp->GetLength();
|
||||||
_value[ END_LENGTH_IND ] = hyp->GetPrecision();
|
_value[ PRECISION_IND ] = hyp->GetPrecision();
|
||||||
ASSERT( _value[ BEG_LENGTH_IND ] > 0 );
|
ASSERT( _value[ BEG_LENGTH_IND ] > 0 );
|
||||||
_hypType = LOCAL_LENGTH;
|
_hypType = LOCAL_LENGTH;
|
||||||
aStatus = SMESH_Hypothesis::HYP_OK;
|
aStatus = SMESH_Hypothesis::HYP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if (hypName == "MaxLength")
|
||||||
|
{
|
||||||
|
const StdMeshers_MaxLength * hyp =
|
||||||
|
dynamic_cast <const StdMeshers_MaxLength * >(theHyp);
|
||||||
|
ASSERT(hyp);
|
||||||
|
_value[ BEG_LENGTH_IND ] = hyp->GetLength();
|
||||||
|
if ( hyp->GetUsePreestimatedLength() ) {
|
||||||
|
if ( int nbSeg = aMesh.GetNbElementsPerDiagonal() )
|
||||||
|
_value[ BEG_LENGTH_IND ] = aMesh.GetShapeDiagonalSize() / nbSeg;
|
||||||
|
}
|
||||||
|
ASSERT( _value[ BEG_LENGTH_IND ] > 0 );
|
||||||
|
_hypType = MAX_LENGTH;
|
||||||
|
aStatus = SMESH_Hypothesis::HYP_OK;
|
||||||
|
}
|
||||||
|
|
||||||
else if (hypName == "NumberOfSegments")
|
else if (hypName == "NumberOfSegments")
|
||||||
{
|
{
|
||||||
const StdMeshers_NumberOfSegments * hyp =
|
const StdMeshers_NumberOfSegments * hyp =
|
||||||
@ -226,11 +242,11 @@ bool StdMeshers_Regular_1D::CheckHypothesis
|
|||||||
StdMeshers_AutomaticLength * hyp = const_cast<StdMeshers_AutomaticLength *>
|
StdMeshers_AutomaticLength * hyp = const_cast<StdMeshers_AutomaticLength *>
|
||||||
(dynamic_cast <const StdMeshers_AutomaticLength * >(theHyp));
|
(dynamic_cast <const StdMeshers_AutomaticLength * >(theHyp));
|
||||||
ASSERT(hyp);
|
ASSERT(hyp);
|
||||||
//_value[ BEG_LENGTH_IND ] = _value[ END_LENGTH_IND ] = hyp->GetLength( &aMesh, aShape );
|
_value[ BEG_LENGTH_IND ] = _value[ END_LENGTH_IND ] = hyp->GetLength( &aMesh, aShape );
|
||||||
_value[ BEG_LENGTH_IND ] = hyp->GetLength( &aMesh, aShape );
|
// _value[ BEG_LENGTH_IND ] = hyp->GetLength( &aMesh, aShape );
|
||||||
_value[ END_LENGTH_IND ] = Precision::Confusion(); // ?? or set to zero?
|
// _value[ END_LENGTH_IND ] = Precision::Confusion(); // ?? or set to zero?
|
||||||
ASSERT( _value[ BEG_LENGTH_IND ] > 0 );
|
ASSERT( _value[ BEG_LENGTH_IND ] > 0 );
|
||||||
_hypType = LOCAL_LENGTH;
|
_hypType = MAX_LENGTH;
|
||||||
aStatus = SMESH_Hypothesis::HYP_OK;
|
aStatus = SMESH_Hypothesis::HYP_OK;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -413,11 +429,6 @@ static void compensateError(double a1, double an,
|
|||||||
|
|
||||||
void StdMeshers_Regular_1D::SetEventListener(SMESH_subMesh* subMesh)
|
void StdMeshers_Regular_1D::SetEventListener(SMESH_subMesh* subMesh)
|
||||||
{
|
{
|
||||||
// static VertexEventListener listener;
|
|
||||||
// SMESH_subMeshIteratorPtr smIt = subMesh->getDependsOnIterator(false,false);
|
|
||||||
// while (smIt->more()) {
|
|
||||||
// subMesh->SetEventListener( &listener, 0, smIt->next() );
|
|
||||||
// }
|
|
||||||
StdMeshers_Propagation::SetPropagationMgr( subMesh );
|
StdMeshers_Propagation::SetPropagationMgr( subMesh );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -567,10 +578,18 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
|
|||||||
switch( _hypType )
|
switch( _hypType )
|
||||||
{
|
{
|
||||||
case LOCAL_LENGTH:
|
case LOCAL_LENGTH:
|
||||||
|
case MAX_LENGTH:
|
||||||
case NB_SEGMENTS: {
|
case NB_SEGMENTS: {
|
||||||
|
|
||||||
double eltSize = 1;
|
double eltSize = 1;
|
||||||
if ( _hypType == LOCAL_LENGTH )
|
if ( _hypType == MAX_LENGTH )
|
||||||
|
{
|
||||||
|
double nbseg = ceil(theLength / _value[ BEG_LENGTH_IND ]); // integer sup
|
||||||
|
if (nbseg <= 0)
|
||||||
|
nbseg = 1; // degenerated edge
|
||||||
|
eltSize = theLength / nbseg;
|
||||||
|
}
|
||||||
|
else if ( _hypType == LOCAL_LENGTH )
|
||||||
{
|
{
|
||||||
// Local Length hypothesis
|
// Local Length hypothesis
|
||||||
double nbseg = ceil(theLength / _value[ BEG_LENGTH_IND ]); // integer sup
|
double nbseg = ceil(theLength / _value[ BEG_LENGTH_IND ]); // integer sup
|
||||||
@ -601,7 +620,7 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
|
|||||||
}
|
}
|
||||||
if (!isFound) // not found by meshed edge in the propagation chain, use precision
|
if (!isFound) // not found by meshed edge in the propagation chain, use precision
|
||||||
{
|
{
|
||||||
double aPrecision = _value[ END_LENGTH_IND ];
|
double aPrecision = _value[ PRECISION_IND ];
|
||||||
double nbseg_prec = ceil((theLength / _value[ BEG_LENGTH_IND ]) - aPrecision);
|
double nbseg_prec = ceil((theLength / _value[ BEG_LENGTH_IND ]) - aPrecision);
|
||||||
if (nbseg_prec == (nbseg - 1)) nbseg--;
|
if (nbseg_prec == (nbseg - 1)) nbseg--;
|
||||||
}
|
}
|
||||||
|
@ -96,13 +96,14 @@ protected:
|
|||||||
StdMeshers_SegmentLengthAroundVertex* getVertexHyp(SMESH_Mesh & theMesh,
|
StdMeshers_SegmentLengthAroundVertex* getVertexHyp(SMESH_Mesh & theMesh,
|
||||||
const TopoDS_Vertex & theV);
|
const TopoDS_Vertex & theV);
|
||||||
|
|
||||||
enum HypothesisType { LOCAL_LENGTH, NB_SEGMENTS, BEG_END_LENGTH, DEFLECTION, ARITHMETIC_1D, NONE };
|
enum HypothesisType { LOCAL_LENGTH, MAX_LENGTH, NB_SEGMENTS, BEG_END_LENGTH, DEFLECTION, ARITHMETIC_1D, NONE };
|
||||||
|
|
||||||
enum ValueIndex {
|
enum ValueIndex {
|
||||||
SCALE_FACTOR_IND = 0,
|
SCALE_FACTOR_IND = 0,
|
||||||
BEG_LENGTH_IND = 0,
|
BEG_LENGTH_IND = 0,
|
||||||
END_LENGTH_IND = 1,
|
END_LENGTH_IND = 1,
|
||||||
DEFLECTION_IND = 0
|
DEFLECTION_IND = 0,
|
||||||
|
PRECISION_IND = 0
|
||||||
};
|
};
|
||||||
|
|
||||||
enum IValueIndex {
|
enum IValueIndex {
|
||||||
|
@ -202,3 +202,17 @@ bool StdMeshers_SegmentLengthAroundVertex::SetParametersByMesh(const SMESH_Mesh*
|
|||||||
|
|
||||||
return nbSegs;
|
return nbSegs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
bool StdMeshers_SegmentLengthAroundVertex::SetParametersByElementSize(double,
|
||||||
|
const SMESH_Mesh*)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -61,6 +61,12 @@ class STDMESHERS_EXPORT StdMeshers_SegmentLengthAroundVertex:public SMESH_Hypoth
|
|||||||
*/
|
*/
|
||||||
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
double _length;
|
double _length;
|
||||||
};
|
};
|
||||||
|
@ -198,3 +198,17 @@ bool StdMeshers_StartEndLength::SetParametersByMesh(const SMESH_Mesh* theMesh,
|
|||||||
}
|
}
|
||||||
return nbEdges;
|
return nbEdges;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
bool StdMeshers_StartEndLength::SetParametersByElementSize(double elemLenght,
|
||||||
|
const SMESH_Mesh* /*theMesh*/)
|
||||||
|
{
|
||||||
|
return bool(_begLength = _endLength = elemLenght );
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -57,6 +57,12 @@ class STDMESHERS_EXPORT StdMeshers_StartEndLength:public SMESH_Hypothesis
|
|||||||
*/
|
*/
|
||||||
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
double _begLength, _endLength;
|
double _begLength, _endLength;
|
||||||
};
|
};
|
||||||
|
@ -114,3 +114,17 @@ bool StdMeshers_TrianglePreference::SetParametersByMesh(const SMESH_Mesh* /*theM
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
bool StdMeshers_TrianglePreference::SetParametersByElementSize(double /*elemLenght*/,
|
||||||
|
const SMESH_Mesh* /*theMesh*/)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -59,6 +59,12 @@ class STDMESHERS_EXPORT StdMeshers_TrianglePreference:public SMESH_Hypothesis
|
|||||||
*/
|
*/
|
||||||
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user