From 98115fe1b8082eeb458a048ebb268130c4159b84 Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 28 Oct 2014 15:37:01 +0300 Subject: [PATCH] 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 --- src/SMESH/CMakeLists.txt | 1 + src/SMESH/SMESH_Mesh.cxx | 6 ++++-- src/StdMeshers/StdMeshers_ViscousLayers.cxx | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/SMESH/CMakeLists.txt b/src/SMESH/CMakeLists.txt index 17e8d7b9c..a23c8c468 100644 --- a/src/SMESH/CMakeLists.txt +++ b/src/SMESH/CMakeLists.txt @@ -58,6 +58,7 @@ SET(_link_LIBRARIES ${CAS_TKG2d} ${CAS_TKCDF} ${GEOM_NMTTools} + ${GEOM_GEOMUtils} ${Boost_LIBRARIES} SMESHDS SMESHControls diff --git a/src/SMESH/SMESH_Mesh.cxx b/src/SMESH/SMESH_Mesh.cxx index b0dcee9ac..8b27cba54 100644 --- a/src/SMESH/SMESH_Mesh.cxx +++ b/src/SMESH/SMESH_Mesh.cxx @@ -55,8 +55,10 @@ #include "DriverCGNS_Write.hxx" #endif +#include + #undef _Precision_HeaderFile -#include +//#include #include #include #include @@ -327,7 +329,7 @@ double SMESH_Mesh::GetShapeDiagonalSize(const TopoDS_Shape & aShape) { if ( !aShape.IsNull() ) { Bnd_Box Box; - BRepBndLib::Add(aShape, Box); + GEOMUtils::PreciseBoundingBox(aShape, Box); return sqrt( Box.SquareExtent() ); } return 0; diff --git a/src/StdMeshers/StdMeshers_ViscousLayers.cxx b/src/StdMeshers/StdMeshers_ViscousLayers.cxx index 49d0e09af..704144d7a 100644 --- a/src/StdMeshers/StdMeshers_ViscousLayers.cxx +++ b/src/StdMeshers/StdMeshers_ViscousLayers.cxx @@ -5386,7 +5386,7 @@ int _LayerEdge::Smooth(const int step, const bool isConcaveFace, const bool find // get worse? if ( nbOkAfter < nbOkBefore ) continue; - if (( isConcaveFace ) && + if (( isConcaveFace || findBest ) && ( nbOkAfter == nbOkBefore ) && //( iFun > -1 || nbOkAfter < _simplices.size() ) && ( minVolAfter <= minVolBefore )) -- 2.39.2