0019923: EDF 765 SMESH : default values of hypothesis

store number of segments per box diagonal in SMESH_Gen not in SMESH_Mesh
This commit is contained in:
eap 2009-01-16 14:56:05 +00:00
parent fd13e26d1e
commit b6e94f69bb
2 changed files with 1 additions and 6 deletions

View File

@ -130,10 +130,6 @@ public:
std::list <const SMESHDS_Hypothesis * >& aHypList,
const bool andAncestors) const;
void SetNbElementsPerDiagonal(int nb) { _nbElemPerDiagonal = nb ;}
int GetNbElementsPerDiagonal() { return _nbElemPerDiagonal; }
const std::list<SMESHDS_Command*> & GetLog() throw(SALOME_Exception);
void ClearLog() throw(SALOME_Exception);
@ -274,7 +270,6 @@ protected:
bool _isAutoColor;
double _shapeDiagonal; //!< diagonal size of bounding box of shape to mesh
int _nbElemPerDiagonal; //!< nb elements per diagonal
TopTools_IndexedDataMapOfShapeListOfShape _mapAncestors;

View File

@ -162,7 +162,7 @@ bool StdMeshers_Regular_1D::CheckHypothesis
ASSERT(hyp);
_value[ BEG_LENGTH_IND ] = hyp->GetLength();
if ( hyp->GetUsePreestimatedLength() ) {
if ( int nbSeg = aMesh.GetNbElementsPerDiagonal() )
if ( int nbSeg = aMesh.GetGen()->GetBoundaryBoxSegmentation() )
_value[ BEG_LENGTH_IND ] = aMesh.GetShapeDiagonalSize() / nbSeg;
}
ASSERT( _value[ BEG_LENGTH_IND ] > 0 );