From 99c67a994b34899d5577d78a164bad553f667844 Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 21 Mar 2014 16:27:14 +0400 Subject: [PATCH] 22525: EDF 2863 SMESH : problem between BLSurf with viscous layer and projection Always check zero UV --- src/SMESH/SMESH_MesherHelper.cxx | 13 +++++++++---- src/SMESHUtils/SMESH_File.cxx | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/SMESH/SMESH_MesherHelper.cxx b/src/SMESH/SMESH_MesherHelper.cxx index ded66ca31..6a97d4724 100644 --- a/src/SMESH/SMESH_MesherHelper.cxx +++ b/src/SMESH/SMESH_MesherHelper.cxx @@ -478,7 +478,10 @@ bool SMESH_MesherHelper::toCheckPosOnShape(int shapeID ) const void SMESH_MesherHelper::setPosOnShapeValidity(int shapeID, bool ok ) const { - ((SMESH_MesherHelper*)this)->myNodePosShapesValidity.insert( make_pair( shapeID, ok)); + std::map< int,bool >::iterator sh_ok = + ((SMESH_MesherHelper*)this)->myNodePosShapesValidity.insert( make_pair( shapeID, ok)).first; + if ( !ok ) + sh_ok->second = ok; } //======================================================================= @@ -661,9 +664,10 @@ bool SMESH_MesherHelper::CheckNodeUV(const TopoDS_Face& F, const bool force, double distXYZ[4]) const { - int shapeID = n->getshapeId(); + int shapeID = n->getshapeId(); bool infinit = ( Precision::IsInfinite( uv.X() ) || Precision::IsInfinite( uv.Y() )); - if ( force || toCheckPosOnShape( shapeID ) || infinit ) + bool zero = ( uv.X() == 0. && uv.Y() == 0. ); + if ( force || toCheckPosOnShape( shapeID ) || infinit || zero ) { // check that uv is correct TopLoc_Location loc; @@ -898,7 +902,8 @@ bool SMESH_MesherHelper::CheckNodeU(const TopoDS_Edge& E, { int shapeID = n->getshapeId(); bool infinit = Precision::IsInfinite( u ); - if ( force || toCheckPosOnShape( shapeID ) || infinit ) + bool zero = ( u == 0. ); + if ( force || toCheckPosOnShape( shapeID ) || infinit || zero ) { TopLoc_Location loc; double f,l; Handle(Geom_Curve) curve = BRep_Tool::Curve( E,loc,f,l ); diff --git a/src/SMESHUtils/SMESH_File.cxx b/src/SMESHUtils/SMESH_File.cxx index ae5f9bb11..c31c2e8bc 100644 --- a/src/SMESHUtils/SMESH_File.cxx +++ b/src/SMESHUtils/SMESH_File.cxx @@ -21,8 +21,8 @@ // Created : Wed Mar 10 11:23:25 2010 // Author : Edward AGAPOV (eap) // + #include "SMESH_File.hxx" -#include "utilities.h" #include #include -- 2.39.2