Skip to content

Fix Eagle/Fusion SMD corner radius using pad height instead of shorter side - #581

Merged
qu1ck merged 1 commit into
openscopeproject:masterfrom
DominikPalo:fix-eagle-smd-roundness
Oct 6, 2026
Merged

qu1ck merged 1 commit into
openscopeproject:masterfrom
DominikPalo:fix-eagle-smd-roundness

Conversation

@DominikPalo

@DominikPalo DominikPalo commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Eagle defines SMD roundness as a percentage of half the shorter side of the pad: 0% is a plain rectangle and 100% gives fully rounded ends. The Eagle/Fusion parser always computed the radius from dy:

pad['radius'] = roundness / 100 * dy / 2

That is correct for pads that are wider than they are tall, but for pads taller than they are wide (dy > dx) the radius exceeds half the pad width. The rounded-rect path then overlaps itself and the pad renders as a distorted shape, while lower roundness values look far rounder than in Eagle.

This change uses min(dx, dy) instead. The unrotated pad size is used, so pad rotation does not affect the result.

Testing

Hand-written .brd with one package containing these pads, parsed and rendered on master vs this branch:

Pad (dx × dy, roundness) radius on master radius with this PR
0.5 × 1.5, 100% 0.75 (distorted render) 0.25 (stadium shape)
1.5 × 0.5, 100% 0.25 0.25 (unchanged)
0.5 × 1.5, 50% 0.375 (renders fully round) 0.125
1 × 1, no roundness rect rect (unchanged)

I haven't tested with a real-world Eagle/Fusion design.

Screenshots

Pads from the test board rendered in the generated BOM (front layer, same view for both):

Before: master

After: this PR

The tall pad at 100% roundness goes from a distorted shape to a proper stadium, and the 50% pad no longer looks fully round. The wide pad and the plain rect are unchanged.

References: EAGLE forum: SMD pad roundness (the shorter side drives the radius), EAGLE help: SMD (100 gives fully round corners).

🤖 Generated with Claude Code

…r side

Eagle defines SMD roundness relative to the shorter side of the pad (100%
gives fully rounded ends), but the parser always used dy. For pads taller
than they are wide the radius exceeded half the pad width and the pad was
drawn distorted, and lower roundness values were exaggerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@qu1ck
qu1ck merged commit 9cc681f into openscopeproject:master Oct 6, 2026
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.

2 participants