]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
6.12.2013.Fix of HasIntersection method.
authorszy <szy@opencascade.com>
Fri, 6 Dec 2013 11:59:30 +0000 (11:59 +0000)
committerszy <szy@opencascade.com>
Fri, 6 Dec 2013 11:59:30 +0000 (11:59 +0000)
src/HYDROData/HYDROData_Stream.cxx

index ecdaab9f24c285da97bc0a741b545a837b5ca585..7f1bce4a11aec8755d3b0cc4aa1f0597fbe27b52 100644 (file)
@@ -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;