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.
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.
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.
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.
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
Got it. But…
You only need to check all ( ) possible lines to infinity and select one with the smallest number of intersections.
I know that checking all lines will take some time