Nondeterministic gerber file generation

I have a board with many of the same donut/ring shaped pad like those described in this post:

These pads exist on the front and back of my board, but when I generate the gerber files the pads on the back layers (mask, paste, and copper) are incorrectly generated as filled circles instead of rings. The front generates as expected. What’s worse, I can generate gerber files and sometimes some of the pads on some of the back layers generate correctly (i.e. pad 1 on the back mask might generate correctly, but copper and paste for pad 1 will still be incorrect, pad 3 on the back copper might generate correctly, etc.), then I can immediately generate gerber files again without making any changes and the back pads that generate correctly will have changed. I’m kind of at a loss so any guidance or even best guesses would be appreciated.

I found that checking “Disable aperture macros (not recommended)” in the Plot dialog fixes my problem, but I’m unsure why, or if checking that box can/has introduced any other problems.

What version are you using? Copy the full info from Help → About KiCad → Copy Version Info

Application: KiCad PCB Editor (64-bit)

Version: (6.0.5), release build

Libraries:
wxWidgets 3.1.5
libcurl/7.82.0-DEV Schannel zlib/1.2.12

Platform: Windows 10 (build 19043), 64-bit edition, 64 bit, Little endian, wxMSW

Build Info:
Date: May 3 2022 00:36:16
wxWidgets: 3.1.5 (wchar_t,wx containers)
Boost: 1.79.0
OCC: 7.6.0
Curl: 7.82.0-DEV
ngspice: 36
Compiler: Visual C++ 1929 without C++ ABI

Build settings:
KICAD_USE_OCC=ON
KICAD_SPICE=ON

It may be a bug (sounds like it is), so you can help to fix it by attaching a zipped example project here which we can try.

I’m unable to share the project, but I’ll see if I can duplicate the problem in a smaller scale test project and share that.

1 Like

That’s preferred anyway, the smaller the better, so that the problem is isolated.

1 Like

Attached is a zip file containing a test project with two PCBs, one which tests a donut footprint and the other which tests an “almost donut”. The “almost donut” (which is similar to the footprint I was having trouble with) has a 0.0001" section removed from it, making it kind of a “C” shape. I wasn’t able to duplicate the problem exactly as I was seeing it, but I think the problem identified by the attached test project is the same problem. In the case of this test project, even checking “Disable aperture macros” doesn’t prevent the almost donuts from being filled in, and the problem exists on the front layer as well as the back. The true donut, however, works as expected.

When I created the footprint I was having problems with I started by creating a donut shape using two concentric circles, which doesn’t work. That is what lead me to create the “almost donut” shape. I didn’t realize until today that I should have used the line width feature to obtain the correct donut thickness, thus negating the need for concentric circles, or concentric arcs in the case of the “almost donut”.

test.zip (627.6 KB)

1 Like

My guess would be this is a rounding problem. But there may be something else, too.

(pad "1" smd custom (at 0 25.4) (size 6.35 6.35) (layers "F.Cu" "F.Paste" "F.Mask")
  (options (clearance outline) (anchor circle))
  (primitives
    (gr_poly (pts
        (arc (start 0.00127 3.175) (mid 0 -53.975) (end -0.00127 3.175))
        (arc (start -0.00127 -3.175) (mid 0 -47.625) (end 0.00127 -3.175))
      ) (width 0.00254) (fill yes))
  ) (tstamp e4a887fb-5848-4a2b-882f-b1993120184e))

It’s impossible to create this kind of polygon shape in KiCad. The DXF converter has accepted it, though (although you didn’t descbribe your process).

1 Like

Yes, I typically draw my shapes in SolidWorks and then import the graphics. I included the SolidWorks and DXF drawings in the test project (in the “graphics” directory). Sorry I didn’t mention that. I see what you are talking about though. When I make the same shape in KiCad I get “fp_poly” points, not “gr_poly” points. I haven’t tested to see if my original problem exists when the shape was created in KiCad.

1 Like

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