realthunder / fcad_pcb

FreeCAD scripts for PCB CAD/CAM
MIT License
126 stars 25 forks source link

setNetFilter does not find the nets #71

Open tapegoji opened 3 months ago

tapegoji commented 3 months ago

Hi, I just tried the setNetFilter function. However, it does not find the net, although it is in the nets.

I used test.kicad_pcb board from your github

My commands: from fcad_pcb import kicad pcb = kicad.KicadFcad('./test.kicad_pcb') pcb.setNetFilter('SDA1')

pcb.makeCopper()

Here is the error: 17:42:06 no KISYS3DMOD found 17:42:06 net SDA1 not found 17:42:06 making copper layer F.Cu... 17:42:06 making pads... ""

test.zip

tapegoji commented 3 months ago

found the issue. With the newer versions of kicad the nets are saved in "Net" format. this might be the reason. Looking int the code I think if you change line #832 from ndict[n[1]] = n[0]

to:

ndict[n[1].strip('"')] = n[0]