Skip to content

Intersection error on barely touching polygons #281

@ZuiDet

Description

@ZuiDet

I found a very strange bug for the intersection of the following two polygons:

poly1 = GI.Polygon([[(0.0, 0.9), (0.09999999999999998, 0.9), (0.09999999999999998, 1.0), (0.0, 1.0), (0.0, 0.9)]]);
poly2 = GI.Polygon([[(-0.1000000000000057, 0.9000000000000031), (-4.761357969939932e-15, 0.8999999999999989), (1.0572338493419614e-30, 1.0), (-0.09999999999999998, 1.0), (-0.1000000000000057, 0.9000000000000031)]]);

Image

poly_int = GO.intersection(poly2 poly1; target=GI.PolygonTrait()); returns an empty list as expected

However,
poly_int = GO.intersection(poly1 poly2; target=GI.PolygonTrait());

returns the left polygon completely.

Image

I assume, this is connected to #193.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingclippingAbout polygon clipping or processing

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions