Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-75146

Numerical instability with QLineF::intersect and QLineF::BoundedIntersection

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.6.3, 5.12.0
    • Core: Other
    • None
    • macOS, Windows

    Description

      When trying to intersect (almost) parallel lines, QLineF::intersect may return the intersection type incorrectly as QLineF::BoundedIntersection when it is actually QLineF::UnboundedIntersection (or QLineF::NoIntersection)

      Since the values in the debugger are converted from double and are not the same as in memory, I dumped the memory values and attached the images. I also created a test code that demonstrates the issue.

      Attachments

        1. debugInfo.png
          debugInfo.png
          447 kB
        2. l.png
          l.png
          23 kB
        3. l1.png
          l1.png
          31 kB
        4. lines.png
          lines.png
          348 kB
        5. main.cpp
          0.5 kB
        6. testIntersect.cpp
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thiago Thiago Macieira
            ahi Adriel Jr.
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change