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

Fix polygons getting thicker #136

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from
Open

Conversation

u1f992
Copy link
Contributor

@u1f992 u1f992 commented Jun 18, 2024

#134 This is most noticeable in the last image on previous PR, where each of the polygon paths has "padding" that extends outward from expected. I found that for small footprints, this difference results in margin overlapping. We can avoid this problem by setting the width of each path to 0.

Current This PR
image image

However, as we can see, the pad minimized in the previous PR appears as a small circle in the polygon's center. I am working on a way to remove this.

image

@u1f992
Copy link
Contributor Author

u1f992 commented Jun 18, 2024

One inelegant idea is to check if the anchor pad's circle is encapsulated within the polygon. If it is not, move the anchor pad so that it is encapsulated within the polygon, while maintaining the absolute coordinates of all polygon vertices.

@u1f992
Copy link
Contributor Author

u1f992 commented Jun 18, 2024

It took a lot of geometric functions, but it seems to be working initially. The absolute position of the pad is not changed, and the new center point (the small anchor pad position) moved to the intersection. It turned out to be not so 'without too much code modifications' after all, didn't it :-}

image

@u1f992 u1f992 marked this pull request as ready for review June 18, 2024 15:57
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

Successfully merging this pull request may close these issues.

1 participant