Overlapping two cutouts restores the PCB surface

I drew two components that have an identical cutout:

  1. Reverse mounting LED


image

  1. Capacitive touch sensor pad

image
image

As you can see both render correctly the cuts on the PCB.
Now I put both at the same place:

I’m expecting to see the LED inside the slot (like in the image above) and the top copper traces around it. Instead it does not show the cut anymore:

image

Did I make a mistake or is it a limitation of Kicad?

Application: KiCad PCB Editor x86_64 on x86_64

Version: 9.0.0-9.0.0-2~ubuntu24.10.1, release build

Libraries:
	wxWidgets 3.2.5
	FreeType 2.13.3
	HarfBuzz 9.0.0
	FontConfig 2.15.0
	libcurl/8.9.1 OpenSSL/3.3.1 zlib/1.3.1 brotli/1.1.0 zstd/1.5.6 libidn2/2.3.7 libpsl/0.21.2 libssh2/1.11.0 nghttp2/1.62.1 librtmp/2.3 OpenLDAP/2.6.8

Platform: Ubuntu 24.10, 64 bit, Little endian, wxGTK, X11, ubuntu, x11
OpenGL: NVIDIA Corporation, NVIDIA GeForce RTX 4080/PCIe/SSE2, 4.6.0 NVIDIA 560.35.03

Build Info:
	Date: Feb 20 2025 21:17:37
	wxWidgets: 3.2.5 (wchar_t,wx containers) GTK+ 3.24
	Boost: 1.83.0
	OCC: 7.8.1
	Curl: 8.9.1
	ngspice: 43
	Compiler: GCC 14.2.0 with C++ ABI 1019
	KICAD_IPC_API=ON

Locale: 
	Lang: en_GB
	Enc: UTF-8
	Num: 1,234.5
	Encoded кΩ丈: D0BACEA9E4B888 (sys), D0BACEA9E4B888 (utf8)

I suspect your overlapping Edge.Cuts line are causing the issue . . . have the edge cuts in either the Led or the Touch pad . . . not both.

I think :wink:

1 Like

Good catch! Removing either one leads to correctly show the cuts.

Anyway it makes no sense to me: in this application I need both overlapped, but each footprint can be still used alone and they should show the slot…

Report it as feature request.
I suppose KiCad assumes outermost Edge.Cuts shape is PCB.
Edge.Cuts shape in it is the hole.
Edge.Cuts shape in hole is the PCB (floating).
Next shape may be will be next hole and so on.
I didn’t checked if it is so.

I don’t know if in any case such floating pcb in hole in main PCB makes some sense. I suppose not.
Your case seems being rationale.
I would also think that two same size circular holes but having not the same center would form 8-shape hole.
May be the rule should be that going towar internal from outer Edge.Cuts shape anything at Edge.Cuts starts a hole and it can’t be back a PCB.

But problems generated by how it is now are rather rare and easy to bypass. Maybe spending time on solving it new way will be waste of time.

1 Like

Edge.Cuts have to be contiguous and non overlapping . . . if you run a DRC you will see an error.

Y0u can probably address this by making one set of Edge.Cut very slightly smaller, maybe as little at 10microns compared to the other, so for example the Edge.Cuts in the LED correct size, the ones in the Touch Pad 10microns smaller.

1 Like

Thank you both.
I (wrongly) assumed any footprint can “cut” the PCB, and a cut in a cut does nothing than a… cut!

In “computer math”, a cut in a cut typically results in something like an island. Computers determine if something is in a hole by drawing an infinite line from the point towards e.g. the east and then count the number of intersections with the boundary lines (in this case the edge cuts layer). If the number of intersections is even, you’re in a hole (or not on the PCB at all). If it is odd, you’re on the PCB or on an island inside the PCB.

Because of this, you can see that two identical overlapping rectangles on the edge cuts layer does basically nothing, as being inside both rectangles increases the numbers of intersections towards infinity by 2, which changes nothing regarding even-/oddness.

1 Like

Thanks for the explanation, I wasn’t aware of this method, it makes sense now. Naively, I was thinking about a physics model.

In a 3D software the cut is a cut, then your first approach would create a correct pcb model.
Anyway as explained above, this is the way in which kicad is managing edge cuts.

1 Like

If it is calculated (not only explained) that way than changing the condition for being in PCB region from (x%2)==1 into x==1 should be possible and more in accordance with real life where hole in hole is not PCB :slight_smile:

That wouldn’t work for e.g. U-shaped PCBs:

image

e.g. here the read beam to infinity has 3 intersections with the edge cuts, even though it’s clearly starting inside the PCB.

Got it. But…
You only need to check all ( :slight_smile: ) possible lines to infinity and select one with the smallest number of intersections.
I know that checking all lines will take some time :slight_smile: