Skip to content

USE_IGNORE_SEGMENT_ENDINGS = True fails in this simple case #27

@smldis

Description

@smldis

USE_IGNORE_SEGMENT_ENDINGS = True fails in this case with a false positive (related to handling of floating point precision)

Runnable code:

segments = [((1244.1140298175264, 880.2941002930444),(1243.2055718759748, 880.4612970469328)),
            ((1243.2055718759748, 880.4612970469328),(1244.196882082508, 880.5928419990338))]
intersections = poly_point_isect.isect_segments_include_segments(segments)

Output:

[((1243.2055718761806, 880.4612970469013),
  [((1243.2055718759748, 880.4612970469328),
    (1244.196882082508, 880.5928419990338)),
   ((1243.2055718759748, 880.4612970469328),
    (1244.1140298175264, 880.2941002930444))])]

Expected Output is []

If I change NUM_EPS = Real("1e-10") to 1e-8 it works but I have no idea if I am breaking anything from doing that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions