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

Gerber Circular Interpolation not handled correctly #6

Open
ldoolitt opened this issue Feb 2, 2020 · 1 comment
Open

Gerber Circular Interpolation not handled correctly #6

ldoolitt opened this issue Feb 2, 2020 · 1 comment

Comments

@ldoolitt
Copy link

ldoolitt commented Feb 2, 2020

I have a Gerber file that originated in PADS. I can run it through translate2geda and read the resulting .fp file with pcb-rnd freshly built from subversion (2020-02-01, r29589). The straight lines look perfect, the arcs are definitely not.

One such case:
G01X235154Y850183D02*
G03X235154I-2061J0D01*

pretty clear circle according to Gerber spec:

  • G01 linear interp
  • X Y coordinates
  • D02 move
  • G03 circular counterclockwise
  • X coordinate, same as before
  • I center offset
  • D01 draw

Note that the Gerber spec is clear about the possible ambiguity of 0 vs. 360 degrees. In Multi quadrant (G75) mode, "If the start point of the arc is equal to the end point, the arc is a full circle of 360deg". And yes, this Gerber file sets G75.

The output from translate2geda seems to be four flashed apertures scattered around the circumference.

@erichVK5
Copy link
Owner

erichVK5 commented Apr 21, 2022

I will need to ponder lines 1707 to 1776 in Plotter.java some more.

The code I repurposed for this is a bit opaque.

If you have a test file, with examples of right and wrong parsing, it would help.

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