Skip to content

Handling Large Shrinking Deltas for Polygons #879

@bektaskemal

Description

@bektaskemal

Hi, and thanks for the excellent work on this library!

I want to use this library for shrinking polygons and it worked well for me during tests. The operation understandably fails when the delta exceeds size limits, but for my specific use case, I need a slightly different behavior.

I've attached an image illustrating the desired behavior:
image

For example, with a rectangle, I would like the following behavior:
delta < w/2: The offset behaves normally.
w/2 <= delta < h/2: The shape reduces to a line in the center, which becomes smaller as the delta increases.
h/2 <= delta: The shape reduces to a single point in the center.

I'm aiming for similar behavior with more complex shapes, as shown in the image.

Would it be possible to achieve this behavior with the current library? If not, do you have any suggestions or workarounds that might help?

Thanks in advance for your assistance!

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