-
Notifications
You must be signed in to change notification settings - Fork 494
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
Support arc tracks (GenericJSON) #230
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, some formating nits.
Clicking to highlight will break. Need to handle arcs there too. |
Good point, I had sort of forgotten about the click-to-highlight capability. That was a fun little Sunday morning math quiz, but it seems to be working now. For reference: Eagle/Fusion arc angles (internally) are in the range [0.0, 719.9], following the usual mathematical convention where angle is measured counterclockwise from the positive X axis. Since the Canvas API evidently follows the opposite angle convention, in my Eagle script I simply negated both angles so in the JSON they're always in the range [-719.9, 0.0]. Those values render the arcs in the canvas just fine as-is, but I had to do modulo arithmetic within (side note: a comment in DATAFORMAT.md indicating the angle convention wouldn't hurt) |
Thanks for your contribution. I squashed your commits with a few fixes I made while testing with kicad. |
Support for arc tracks with GenericJSON parser, since Eagle/Fusion 360 Electronics are capable of curved traces.