Bug in CSGModeller rayFaceIntersectionDist?

Developers
2015-06-03
2015-06-13
  • Alain Bonnaud

    Alain Bonnaud - 2015-06-03

    In rayFaceIntersectionDist, in the following code:
    else if (t <= TOL)
    {
    // Perform more checks to determine whether the face is in front or behind
    double dist1 = f.norm.dot(v1) - f.distRoot;
    double dist2 = f.norm.dot(v2) - f.distRoot;
    double dist3 = f.norm.dot(v2) - f.distRoot;
    if (dist1 < -TOL || dist2 < -TOL || dist3 < -TOL)
    return Double.MAX_VALUE;
    else if (dist1 > TOL || dist2 > TOL || dist3 > TOL)
    t = TOL;
    else
    t = 0;
    }

    So, dist3 is equal to dist2!!
    I think we should we have "double dist3 = f.norm.dot(v3) - f.distRoot;"

    I have not use cases where it has a consequence.

     
  • Pete

    Pete - 2015-06-09

    Confirmed:

    • On Notepad++ the line number is 1528.
    • The CSGModeller.java -file is dated 2015-Jan-10 18:45
     
  • Peter Eastman

    Peter Eastman - 2015-06-13

    Thanks! I've checked in the fix.

    Peter

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks