-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
bugSomething isn't workingSomething isn't workingclippingAbout polygon clipping or processingAbout polygon clipping or processing
Description
Here is an example of inexact calculations causing issues:
scale_fac = 1e5
c1 = [[-28083.868447876892, -58059.13401805979], [-9833.052704767595, -48001.726711609794], [-16111.439295815226, -2.856614689791036e-11], [-76085.95770326033, -2.856614689791036e-11], [-28083.868447876892, -58059.13401805979]]
c1 = [c ./ scale_fac for c in c1]
c2 = [[-53333.333333333336, 0.0], [0.0, 0.0], [0.0, -80000.0], [-60000.0, -80000.0], [-53333.333333333336, 0.0]]
c2 = [c ./ scale_fac for c in c2]
p1 = GI.Polygon([c1])
p2 = GI.Polygon([c2])
GO.intersection(p1, p2; target = GI.PolygonTrait(), fix_multipoly = nothing)
When scale_fac = 1
this doesn't work, but when scale_fac = 1e5
it does work...
Basically, there are two edges over one another on top of the x-axis, but one of the lines is slightly below the x-axis. I am working on a "patch" for this type of issue, but we might want a stronger fix at some point.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingclippingAbout polygon clipping or processingAbout polygon clipping or processing