From: szy Date: Fri, 6 Dec 2013 11:59:30 +0000 (+0000) Subject: 6.12.2013.Fix of HasIntersection method. X-Git-Tag: BR_hydro_v_0_4~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=424f8230c9003d00fb27499b2441c4b3a2a28292;p=modules%2Fhydro.git 6.12.2013.Fix of HasIntersection method. --- diff --git a/src/HYDROData/HYDROData_Stream.cxx b/src/HYDROData/HYDROData_Stream.cxx index ecdaab9f..7f1bce4a 100644 --- a/src/HYDROData/HYDROData_Stream.cxx +++ b/src/HYDROData/HYDROData_Stream.cxx @@ -298,7 +298,7 @@ bool HYDROData_Stream::HasIntersection( const Handle(HYDROData_Profile)& theProf hasSol = true; } } - if(hasSol) { + if(hasSol) { if(aSqDist <= SquareTolerance) { // hasInt const gp_Pnt& aPnt = aCC.PointOnE1(anIndx); if(aNum > 1) { @@ -317,7 +317,10 @@ bool HYDROData_Stream::HasIntersection( const Handle(HYDROData_Profile)& theProf outPar += BRep_Tool::Pnt(aV1).Distance(BRep_Tool::Pnt(aV2)); } } - } + } else if(aNum > 1) { + TopExp::Vertices(anEdg1, aV1, aV2); + outPar += BRep_Tool::Pnt(aV1).Distance(BRep_Tool::Pnt(aV2)); + } } if(hasInt) return true;