From: eap Date: Mon, 16 Jul 2018 16:07:34 +0000 (+0300) Subject: 23566: EDF 17146 - Problem with viscous layer X-Git-Tag: SHAPER_V9_1_0RC1~17^2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2dff5149228562f2747c624f65bdfeb8969deb95;p=modules%2Fsmesh.git 23566: EDF 17146 - Problem with viscous layer --- diff --git a/src/SMESH/SMESH_MesherHelper.cxx b/src/SMESH/SMESH_MesherHelper.cxx index eacdbbb3c..274a5d8f7 100644 --- a/src/SMESH/SMESH_MesherHelper.cxx +++ b/src/SMESH/SMESH_MesherHelper.cxx @@ -818,6 +818,7 @@ bool SMESH_MesherHelper::CheckNodeUV(const TopoDS_Face& F, } // uv incorrect, project the node to surface GeomAPI_ProjectPointOnSurf& projector = GetProjector( F, loc, tol ); + projector.SetExtremaFlag( Extrema_ExtFlag_MIN ); projector.Perform( nodePnt ); if ( !projector.IsDone() || projector.NbPoints() < 1 ) { @@ -836,8 +837,20 @@ bool SMESH_MesherHelper::CheckNodeUV(const TopoDS_Face& F, } if ( dist > tol ) { - MESSAGE( "SMESH_MesherHelper::CheckNodeUV(), invalid projection" ); - return false; + Handle(ShapeAnalysis_Surface) sprojector = GetSurface( F ); + uv = sprojector->ValueOfUV( nodePnt, tol ).XY(); + surfPnt = sprojector->Value( uv ); + dist = nodePnt.Distance( surfPnt ); + if ( distXYZ ) { + surfPnt.Transform( loc ); + distXYZ[0] = dist; + distXYZ[1] = surfPnt.X(); distXYZ[2] = surfPnt.Y(); distXYZ[3]=surfPnt.Z(); + } + if ( dist > tol ) + { + MESSAGE( "SMESH_MesherHelper::CheckNodeUV(), invalid projection" ); + return false; + } } // store the fixed UV on the face if ( myShape.IsSame(F) && shapeID == myShapeID && myFixNodeParameters )