Circular cutout on "edge.cuts" not handled correctly

Hello,

I drew the contour of a board on “edge.cuts” with two cutouts inside (one square and one circle). The result is correctly rendered in the 3D viewer.
image image

However it seems that KiCad removes the circle from the generated Gerber, as observed in GerbView. It is replaced by a tiny “D10” code, for which the drill map doesn’t seem to have an information.
image image

  • How can I avoid the transformation of the circle into a drill code? (I want this one to be milled, not drilled)
  • How can I generate a suitable Gerber?

Olivier (KiCad 5.1.2, Debian Linux)

Can you indicate the version of KiCad you’re currently using please (Help / About KiCad / Copy Version Info) ?

Yes, sorry, I updated my post accordingly.

I remember some posts or a bug report about troubles with Circles in board outlines, but can’t recall any context.

A workaround was to use 2 arcs instead of a single circle.

I could not find a similar topic. I found a topic about a circular outer contour, but it was old and did not seem to be linked to my current problem.

Yes, the workaround works well. Thank you for the suggestion.

But apart from this workaround, what is the expected normal behavior? Is it “normal” that circles are handled differently as squares? Is it “normal” that they are discarded from the Gerber/Drill output? Is it a bug that should be filed?

You should report it and upload the pcb file posted above, so devs can recreate the issue more easily. And add the complete version text in your report in case of inconsistency between OS etc.

Done there: https://bugs.launchpad.net/kicad/+bug/1832096

1 Like

this is a kicad GerbView error in displaying the gerber file
Opening it in an external gerber viewer (i.e. gEDA Gerbv), the circle is just fine

2 Likes

Nice observation! I installed gerbv and I confirm that it displays the circle correctly.
So it seems to be a bug in GerbView (and I was then mistaken in my understanding)

J.P Charras found the problem and wrote a correcting patch.

2 Likes

That is a bug in a third party Gerber processing toll used by some of the low cost PCB fabs.
Just beware that circles may display correctly down the full KiCad chain and still get made wrong

Could it be a wize idea to convert every circle into 2 semi circles (or 4 quarter circles) while generating Gerbers if errors are so common?

Edit:
Did some homework, and the text below may be not worth reading.

In RS-274D “G-Code”, which is closely related to (at least the old) Gerber format, a well known limitation is that real circles do not exist, and arc’s are used instead.
G02 and G03, with either a “R” parameter for radius, or “I” and “J” coordinates which are relative positions of the arc center.

A further limitation is that arc’s with an included angle of close to 180degrees or 360 degrees, when specified with the “R”-adius parameter are very susceptible to rounding errors and are usually avoided.

At the moment I mostly assume that the person(s) who made the Gerber generators for KiCad know what they are doing, but I may be naive.

{ homework }
So I made a little test PCB, generated a gerber of Edge.Cuts and opened in a text editor.
I recognise the circle in the Gerber as:

G03X130000000Y-85000000I-5000000J0D01*

In G-code this would be:

  • G03 - Counter Clockwise ARC.
  • Full circle because X and Y are the same as (X, Y) before the ARC.
  • Defined with I and J relative locations for the center.
    ( Only “R” has the rounding error sensitivity)
    I do not recognize the “D01*”, but that is very likely because of differences between Gerber and “G-Code”.

{ /homework }

That is an interesting idea.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.