From: eap Date: Thu, 22 Nov 2012 13:00:03 +0000 (+0000) Subject: 0021543(~14811): EDF 1978 SMESH: Viscous layer for 2D meshes X-Git-Tag: V6_6_0rc1~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=dcc4bf0d8ffd2b77761e4399cee25e8d79c7bbd5;p=modules%2Fsmesh.git 0021543(~14811): EDF 1978 SMESH: Viscous layer for 2D meshes fix finding IN layers boundary on a shrinked EDGE adjacent to a convex EDGE --- diff --git a/src/StdMeshers/StdMeshers_ViscousLayers2D.cxx b/src/StdMeshers/StdMeshers_ViscousLayers2D.cxx index 85d24aeb2..4e4d0ed8e 100644 --- a/src/StdMeshers/StdMeshers_ViscousLayers2D.cxx +++ b/src/StdMeshers/StdMeshers_ViscousLayers2D.cxx @@ -1445,12 +1445,14 @@ bool _ViscousBuilder2D::shrink() bool isConvex = false; if ( L2->_advancable ) { + const uvPtStruct& tang2P1 = points[ isR ? L2->_firstPntInd : L2->_lastPntInd ]; + const uvPtStruct& tang2P2 = points[ isR ? L2->_firstPntInd+1 : L2->_lastPntInd-1 ]; + gp_XY seg2Dir( tang2P2.u - tang2P1.u, + tang2P2.v - tang2P1.v ); int iFSeg2 = isR ? 0 : L2->_segments.size() - 1; int iLSeg2 = isR ? 1 : L2->_segments.size() - 2; gp_XY uvLSeg2In = L2->_lEdges[ iLSeg2 ]._uvIn; - gp_XY uvLSeg2Out = L2->_lEdges[ iLSeg2 ]._uvOut; - gp_XY uvFSeg2Out = L2->_lEdges[ iFSeg2 ]._uvOut; - Handle(Geom2d_Line) seg2Line = new Geom2d_Line( uvLSeg2In, uvFSeg2Out - uvLSeg2Out ); + Handle(Geom2d_Line) seg2Line = new Geom2d_Line( uvLSeg2In, seg2Dir ); Geom2dAdaptor_Curve edgeCurve( pcurve, Min( uf, ul ), Max( uf, ul )); Geom2dAdaptor_Curve seg2Curve( seg2Line );