diff --git a/vcg/space/intersection3.h b/vcg/space/intersection3.h index 74f5b974..449d54a2 100644 --- a/vcg/space/intersection3.h +++ b/vcg/space/intersection3.h @@ -596,7 +596,7 @@ bool IntersectionSegmentTriangle( const vcg::Segment3 & seg, line.Set(seg.P0(),dir); ScalarType orig_dist; if(IntersectionLineTriangle(line,vert0,vert1,vert2,orig_dist,a,b)) - return (orig_dist<=length); + return (orig_dist>=0 && orig_dist<=length); return false; } /**