Help: Some polygon filled areas not showing up in gerber file

I made a board that filled tracks with polygons. For some reason it renders fine in horizon but when I got the boards I noticed that two of the tracks weren’t filled (was in a rush so didn’t notice it when ordering…) 2 out of the 12 tracks where I used this technique were missing.

Horizon’s 3D Rendering

Horizon’s Board view



I’m not sure what I did, any ideas?

Hm, that’s unfortunate. Can you share a minimum working example that exhibits this bug?

Unfortunately I’m not sure how to reproduce it… I did add some print statements and see that the planes are being written to the gerber files.

One potentially odd thing I found is that it writes a bunch of layer ‘0’ planes then writes a layer ‘-100’ gnd plane and goes back to writing the layer ‘0’ planes (which has the two planes that are missing).

I’m not sure if the out of order writes matters since they should be going to separate files.

Edit: I have no idea why but I just deleted and re-drew the planes and now it shows up properly…

This particular issue got caused by overlapping plane outlines of the same priority and the overlapping plane being enclosed by a track.

All planes get filled ordered by their priority, so planes of the same priority don’t “know” about each other and could have their fragments (calculated shape) overlap. Usually, this gets caught in DRC. In your case, the GND plane was pushed back from the offending plane by the surrounding track.

So why did this cause the inner plane to vanish from the gerber document? Gerber doesn’t really know about holes in polygons. Instead, you draw another polygon with the polarity set to “light” that will erase everything underneath it. Obviously, this introduces a dependency on the order things get drawn in. Conceptually, planes of lower priority sit “on top of” planes of higher priority, so planes of higher priority need to get drawn first.

Since all planes on your board have the same priority, the order they’re drawn in is random, so the hole in the GND plane can erase the plane underneath it.

Setting the top GND plane’s priority to 1 fixes the gerber output.

Making sure that planes of identical priority don’t overlap isn’t really a task for humans, so we now have a check for that: board rules: check for plane priorities · horizon-eda/horizon@644e2c8 · GitHub As it runs more or less instantly, I also added it to the checks performed before exporting the fabrication output.


Ah Just my luck… it might be good to also add a tooltip for the priority field saying a higher number means lower priority. I tried incrementing the priority of the track’s plane but I should have did that for the ground plane instead…

Thank you for the explanation and for adding a rule to check this!

In some issue on github, someone suggested renaming “priority” to “fill order” to get around that confusion. Since apparently more than one user got confused, it’s now called “fill order”.

Thanks for the hint. That would have passed the check, but would still result in broken gerbers. The check now makes sure that a plane completely enclosing another one needs to have a higher fill order.

Thank you for debugging and fixing this issue.

When addressing this issue, shouldn’t Horizon 3D rendering be fixed as well as it did not match the look of the Gerber or is that unreasonable expectation? Normally I would expect PCB design to be WYSIWYG.