Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buffer gives incorrect result for negative distance #1262

Closed
jdmarsh opened this issue Mar 26, 2024 · 2 comments
Closed

Buffer gives incorrect result for negative distance #1262

jdmarsh opened this issue Mar 26, 2024 · 2 comments
Assignees
Labels
Milestone

Comments

@jdmarsh
Copy link

jdmarsh commented Mar 26, 2024

I have a polygon where I want to buffer inwards using a negative distance. The result I get is incorrect.

Polygon(red) and then the result of the buffer command "output" (green).
image

The expected result of this buffer is for the output to be empty, instead the green triangle is huge.

  • At the top left corner, it's buffered inwards but not by the -1.8 units specified.
  • At the top right corner, the output goes outside the outer boundary of the polygon
  • The center should certainly not be filled in

The code to generate this can be found here:
https://godbolt.org/z/18sq55oTG

@barendgehrels
Copy link
Collaborator

Fixed recently in acaed28
I will create a unit test

@barendgehrels barendgehrels self-assigned this Mar 27, 2024
@barendgehrels barendgehrels added this to the 1.85 milestone Mar 27, 2024
@barendgehrels
Copy link
Collaborator

Thanks for the report.
For the record, the PR was #1248

barendgehrels added a commit to barendgehrels/geometry that referenced this issue Mar 27, 2024
vissarion pushed a commit to vissarion/geometry that referenced this issue May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants