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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.6.3, 5.12.0
    • Fix Version/s: None
    • Component/s: Core: Other
    • Labels:
      None
    • Platform/s:
      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
          447 kB
          Adriel Jr.
        2. l.png
          23 kB
          Adriel Jr.
        3. l1.png
          31 kB
          Adriel Jr.
        4. lines.png
          348 kB
          Adriel Jr.
        5. main.cpp
          0.5 kB
          Konstantin Shegunov
        6. testIntersect.cpp
          1 kB
          Adriel Jr.
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              thiago Thiago Macieira
              Reporter:
              ahi Adriel Jr.
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes