//
#include "SMESH_Octree.hxx"
+#include <Precision.hxx>
+#include <limits>
+
//===========================================================================
/*!
* Constructor. limit must be provided at tree root construction.
{
gp_XYZ halfSize = 0.5 * ( box->CornerMax() - box->CornerMin() );
for ( int iDim = 1; iDim <= 3; ++iDim )
- halfSize.SetCoord( iDim, factor * halfSize.Coord( iDim ));
+ {
+ double newHSize = factor * halfSize.Coord( iDim );
+ if ( newHSize < std::numeric_limits<double>::min() )
+ newHSize = Precision::Confusion(); // 1.e-7
+ halfSize.SetCoord( iDim, newHSize );
+ }
box->SetHSize( halfSize );
}
}