realthunder / fcad_pcb

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

loading pads w/ drills for footprint in kicad v5 #64

Closed easyw closed 7 months ago

easyw commented 1 year ago

fcad_pcb fails in loading pads kicad_mod files when there are pads w/ drills and w/ 'oval' drills

import sys,os
sys.path.append(r"d:")
import fcad_pcb
from fcad_pcb import kicad
import importlib
importlib.reload(kicad)
from kicad_parser import KicadPCB

filename= r"D:\Temp\PinHeader_1x02_P2.54mm_Vertical.kicad_mod" #"Your-full-path-to-kicad-pcbnew-file"  #TH drill
# filename= r"D:\Temp\BarrelJack_Horizontal-kv5.kicad_mod" #"Your-full-path-to-kicad-pcbnew-file"  #TH drill

pcb = kicad.KicadFcad(filename,via_skip_hole=False,via_bound=0)
pcb.setLayer(0) #'F.Cu')
topP=pcb.makePads(shape_type='face',thickness=0.05,holes=True,fit_arcs=True)

normal drills: PinHeader_1x02_P2.54mm_Vertical.zip oval drills: BarrelJack_Horizontal-kv5.zip