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

Calculate footprint centroid based on its pads. #381

Merged
merged 1 commit into from
Dec 27, 2023

Conversation

dzid26
Copy link
Contributor

@dzid26 dzid26 commented Oct 26, 2023

Solves issue #379 that silkscreen was affecting centroid position calculation.

Nice and center now regardless of the uneven silk:
image

@Bouni
Copy link
Owner

Bouni commented Nov 24, 2023

I completely overlooked this PR, soory 🥵

Have you tested this with V7 and V7.99?

@dzid26
Copy link
Contributor Author

dzid26 commented Nov 24, 2023

I did.
The one thing you may want to consider is whether this method of calculation of the center should be used for all footprints (smd, thruhole, and undefined), or just undefined (which is what I've got after importing footprints from altium).
#379 (comment)
In the end, I decided it would use bounding boxes for all of them.

@Bouni
Copy link
Owner

Bouni commented Nov 28, 2023

Please rebase and fix the linter issue (ruff --fix fabrication.py)

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.

None yet

2 participants