From 9a4f5e4852afef4eac26f069ea33de5bcbfdc72b Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 5 Aug 2013 12:30:05 +0000 Subject: [PATCH] progress bar: fix for viscous layers --- src/SMESH/SMESH_Mesh.cxx | 8 ++++++-- src/SMESH/SMESH_MesherHelper.cxx | 7 +------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/SMESH/SMESH_Mesh.cxx b/src/SMESH/SMESH_Mesh.cxx index bcddd46d5..4ae04c647 100644 --- a/src/SMESH/SMESH_Mesh.cxx +++ b/src/SMESH/SMESH_Mesh.cxx @@ -1486,12 +1486,16 @@ double SMESH_Mesh::GetComputeProgress() const currentSubIds.Add( smToCompute[i]->GetId() ); } double rate = algo->GetProgress(); - if ( !( 0. < rate && rate < 1.001 )) + if ( 0. < rate && rate < 1.001 ) + { + computedCost += rate * ( algoDoneCost + algoNotDoneCost ); + } + else { rate = algo->GetProgressByTic(); + computedCost += algoDoneCost + rate * algoNotDoneCost; } // cout << "rate: "<ShapeToIndex( F ) ); -#endif + << " not in face " << GetMeshDS()->ShapeToIndex( F ) ); // get UV of a vertex closest to the node double dist = 1e100; gp_Pnt pn = XYZ( n ); @@ -909,7 +907,6 @@ bool SMESH_MesherHelper::CheckNodeU(const TopoDS_Edge& E, { double r = Max( 0.5, 1 - tol*n->GetID()); // to get a unique u on edge u = f*r + l*(1-r); - MESSAGE("curve.IsNull: " << u); } } else @@ -966,7 +963,6 @@ bool SMESH_MesherHelper::CheckNodeU(const TopoDS_Edge& E, } else if ( fabs( u ) > numeric_limits::min() ) { - MESSAGE("fabs( u ) > numeric_limits::min() ; u " << u << " f " << f << " l " << l); setPosOnShapeValidity( shapeID, true ); } if (( u < f-tol || u > l+tol ) && force ) @@ -4677,4 +4673,3 @@ void SMESH_MesherHelper::FixQuadraticElements(SMESH_ComputeErrorPtr& compError, } } } - -- 2.39.2