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

Too many edges generated for simple shape #3

Closed
mantasarm opened this issue Jul 22, 2024 · 3 comments
Closed

Too many edges generated for simple shape #3

mantasarm opened this issue Jul 22, 2024 · 3 comments

Comments

@mantasarm
Copy link

image

For this shape a 8x8 texture, with a single pixel missing, the multi_image_edges_raw() function for some reason generates 8 edges instead of just 2. Happens everytime. A fix or solution would be very appreciated. I'm happy to provide anymore details needed.

@shnewto
Copy link
Owner

shnewto commented Aug 13, 2024

Hi @mantasarm thanks for raising this issue! I'll be digging into this over the next couple days.

@shnewto
Copy link
Owner

shnewto commented Aug 16, 2024

This is a really good bug 😵 Working on it I realized what a wrench single pixel boundaries throw into my approach. Part of the algorithm for sorting points into "drawing order" is using a distance of 1 pixel to decide what the neighboring edges are. When there's only 1 pixel between two distinct "shapes with edges" , or when a single pixel is shared between edges, my approach is breaking down. But it doesn't have to, and of course, shouldn't break down.

Thanks a ton for raising this issue @mantasarm, it might take me a minute to sort out the right way to handle this but it's a really good thing to have spotted and for me to able to address.

@shnewto
Copy link
Owner

shnewto commented Nov 12, 2024

@mantasarm we just had a major rework done by @salam99823 and they had your use case in mind for a large part of it. I believe version 0.4 now addresses this specific scenario 🚀 thanks again for raising this issue!

@shnewto shnewto closed this as completed Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants