Weird behavior with zone filling

I have a problem that I cannot understand where it comes from when filling zone next to NPTH. I used to not have it, and now I cannot get rid of it:


I want the filling to fill all the way next to the NPTH. I have co custom rule about NPTH, and all my clearance settings are set to 0 both for the zone and global:


This becomes even more confusing looking at the back layer which is filled differently (light blue above) which is filled differently?

Can anyone hint me on how to make the zone fill all the way to the NPTH. Actually, even better would be if the zone also filled the NPTH. That is the recommended way to have copper from the PCB vendor.

1 Like

I just did a quick test and it is working out for me

I only change the following values as you did

I am using v6.0.4

There was a very similar question a few days ago:

What I don’t understand is why you want a NPTH surrounded by copper. Why not just juse a plated hole? Plated holes are easy for PCB manufacturers because the process is already in place for making via’s (Although not in the same diameter).

@der.ule , It looks like you are using a regular via hole which I think is different.

@paulvdh , this is the way my PCB vendor wants it. I want npth-holes for various reasons and my vendor wants copper all the way until the hole edge.

I think this is a bug in 6.0.4. Great if someone can confirm. I did not have this problem in earlier versions of KiCAD.

I have attached an example demonstrating the problem:
image

The gap to the NPTH cannot be made smaller than 100 µm. I can make it larger by increasing the clearance setting, but not smaller.
npth_bug.zip (269.5 KB)

I think this is a bug in 6.0.4.

I don’t think so. Try:
Board-setup → Design Rules → Constraint → Copper → Coppper to hole clearance → 0.1mm

Does not help unfortunately. I want to have is smaller than 0.1 mm. I want it to be 0.

image

No, I actually used a “Mounting_Hole” footprint for the example.

EDIT: I opened your example an this is how it looks like to me


But actually, because of a bug, I am not running v6.0.4, but a testing version (one or two weeks older than v6.0.4) and I assume therefore I do not see it.


Application: KiCad PCB Editor (64-bit)

Version: (6.0.4-53-gbf8c7d7697), release build

Libraries:
	wxWidgets 3.1.5
	libcurl/7.78.0-DEV Schannel zlib/1.2.11

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

Build Info:
	Date: Mar 24 2022 22:10:09
	wxWidgets: 3.1.5 (wchar_t,wx containers)
	Boost: 1.76.0
	OCC: 7.6.0
	Curl: 7.78.0-DEV
	ngspice: 36
	Compiler: Visual C++ 1928 without C++ ABI

Build settings:
	KICAD_USE_OCC=ON
	KICAD_SPICE=ON

@der.ule : I think you need to zoom onto the hole in the centre of the pcb, not the pads.

@ravn : Does not help unfortunately. I want to have is smaller than 0.1 mm. I want it to be 0.

I know, but the value was set to 0.1mm in your project. After setting to 0 and recalculating the fill:

Ok. Thanks. No matter what I change it to in my version of KiCAD I cannot get it below 0.1mm. I know it was set to something other than 0 in the example file. The point is that it does not help to set it to 0 in that file on my machine.

@mf_ibfeew , which version of KiCAD are you using? This is mine:

Application: KiCad PCB Editor (64-bit)

Version: (6.0.4), release build

Libraries:
wxWidgets 3.1.5
libcurl/7.78.0-DEV Schannel zlib/1.2.11

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

Build Info:
Date: Mar 18 2022 03:04:44
wxWidgets: 3.1.5 (wchar_t,wx containers)
Boost: 1.76.0
OCC: 7.6.0
Curl: 7.78.0-DEV
ngspice: 36
Compiler: Visual C++ 1928 without C++ ABI

Build settings:
KICAD_USE_OCC=ON
KICAD_SPICE=ON

@mf_ibfeew you are totally right, I didn’t even notice

However I tried again (this time in the correct hole -.- ), the distance from the copper to the hole was set to 0.1mm I changed to 0mm and now it seems correct

EDIT: Already two replies, where this is discussed :no_mouth:

I always find it encouraging when people attach a test project to a thread.

I’ve tried various things and KiCad tries to outsmart and ignore the settings I enter.

For example, I’ve added a “Mountinghole_Pad” to the schematic and attached it to the GND net, but NPTH footprints on the PCB do not accept a net name.

Setting the pad diameter to bigger then the hole diameter draws the pad as expected, but because a NPTH does not accept a net name, there is still a clearance.

I’ve tried to set the pad diameter smaller then the hole diameter, but the zone recognizes the hole is bigger then the pad and keeps a clearance from the hole.

Negative clearances are also not accepted.

The method suggested by mf_ibfeew also does not work properly
I can set that clearance to zero, and refil, and that does create a hole of the drill diameter (verified in the created Gerber files, but it only works because the clearance of the zone itself is also set to zero, and that is something that never works properly. The result is that the two connectors on the left are also shorted to the zone.

KiCad behaves quite weirdly for these NPTH.
If the pad is set to bigger then the hole size, the whole pad is drawn (also in the Gerbers)
If the pad is set to smaller then the hole size, the pad is not drawn at all (in the Gerber).

I think I consider it a bug that the pad of a NPTH does not accept a net name. If the pad just accepted a net name, then it can be attacked properly to the zone.

@ravn : I have to apologize, in fact I have also not the stock 6.0.4., but a later testing build ((6.0.4-159-g729cf7a39d)) from 26.4.2022. (like der.ule).
So try to download a current testing-version from Downloads | KiCad EDA. If you choose the *_lite.exe no settings+libraries will be overwritten - so very little risk to damage anything on your installation.

And what’s even better, 6.0.5 was tagged in the source code yesterday, so the final 6.0.5 which will be announced within about a week should be identical to this (unless some even newer bugfix has been introduced to the testing builds).

EDIT: there actually seems to be a new bugfix and a fix to the fix added after the 6.0.5 tag, but it’s related to SPICE. Crash when exporting Spice Netlist to read-only directory (#11516) · Issues · KiCad / KiCad Source Code / kicad · GitLab

1 Like

Select the NPTH. Shift-select the zone.

Go to Inspect menu and choose Clearance Resolution…

What does it say?

Thanks @JeffYoung , really good tool I was not aware. Here is the result:
Selected encircles hole and marked zone:


If I read this correctly, clearance should be 0 for both. Interestingly after running the clearance resolution tool and refilling the zones, the gap diapers! A bit opportunistic of KiCAD I must say :slight_smile:

So, in both my projects (my live project and the minimal reproducing one submitted above), doing no change whatsoever except running the clearance resolution thingee corrects the filling issue.

This of course solved my problem, but it looks even more like a bug to me. Thanks everyone for engaging and helping out! @JeffYoung , let me know if you want me to file a bug report.

Well that’s a head-scratcher. Any chance you upgraded versions or anything since the last time you did a zone fill? (There were bugs in this area. I can’t remember if any of the fixes were as late as 6.0.5 though…)

Yes strange indeed.
I did not do anything to KiCAD, so this is running 6.0.4 built mars 18.
I reported another fill bug that you @JeffYoung helped out with regarding rounded traces. But I suspect this is unrelated.

I think I have some more information on the issue now. Opening a KiCAD project, the NPTH gets netclass <invalid>:


Doing Tools → Update Footprints from Library…
changes the netclass of the NPTH to Default:

And then the clearance calculation is correctly set (to the Default clearance, which in my case is not what I want actually).

So the problem seem to be:

  1. Netclass of NPTH is not stored in the KiCAD file and is set to <invalid> for a newly opened file.
  2. Netclass cannot be set for NPTH in KiCAD
  3. Doing Tools -> Update Footprints from Library... changes netclass of NPTH to Default
3 Likes

Cool; that gives me more to go on…

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