IPAL52557: TC7.5.0: default value in Hypothesis is different in new and saved studies

Use a precise bnd box to find the shape diagonal
This commit is contained in:
eap 2014-10-28 15:37:01 +03:00
parent dba2484945
commit 98115fe1b8
3 changed files with 6 additions and 3 deletions

View File

@ -58,6 +58,7 @@ SET(_link_LIBRARIES
${CAS_TKG2d} ${CAS_TKG2d}
${CAS_TKCDF} ${CAS_TKCDF}
${GEOM_NMTTools} ${GEOM_NMTTools}
${GEOM_GEOMUtils}
${Boost_LIBRARIES} ${Boost_LIBRARIES}
SMESHDS SMESHDS
SMESHControls SMESHControls

View File

@ -55,8 +55,10 @@
#include "DriverCGNS_Write.hxx" #include "DriverCGNS_Write.hxx"
#endif #endif
#include <GEOMUtils.hxx>
#undef _Precision_HeaderFile #undef _Precision_HeaderFile
#include <BRepBndLib.hxx> //#include <BRepBndLib.hxx>
#include <BRepPrimAPI_MakeBox.hxx> #include <BRepPrimAPI_MakeBox.hxx>
#include <Bnd_Box.hxx> #include <Bnd_Box.hxx>
#include <TColStd_MapOfInteger.hxx> #include <TColStd_MapOfInteger.hxx>
@ -327,7 +329,7 @@ double SMESH_Mesh::GetShapeDiagonalSize(const TopoDS_Shape & aShape)
{ {
if ( !aShape.IsNull() ) { if ( !aShape.IsNull() ) {
Bnd_Box Box; Bnd_Box Box;
BRepBndLib::Add(aShape, Box); GEOMUtils::PreciseBoundingBox(aShape, Box);
return sqrt( Box.SquareExtent() ); return sqrt( Box.SquareExtent() );
} }
return 0; return 0;

View File

@ -5386,7 +5386,7 @@ int _LayerEdge::Smooth(const int step, const bool isConcaveFace, const bool find
// get worse? // get worse?
if ( nbOkAfter < nbOkBefore ) if ( nbOkAfter < nbOkBefore )
continue; continue;
if (( isConcaveFace ) && if (( isConcaveFace || findBest ) &&
( nbOkAfter == nbOkBefore ) && ( nbOkAfter == nbOkBefore ) &&
//( iFun > -1 || nbOkAfter < _simplices.size() ) && //( iFun > -1 || nbOkAfter < _simplices.size() ) &&
( minVolAfter <= minVolBefore )) ( minVolAfter <= minVolBefore ))