Open In progress bug report

tools/kicad2altium.py: np_thru_hole pegs become top-layer pads (never drilled); (drill oval W L) raises ValueError instead of writing a slot

idan gida · ·marked in progress by kcknox

altium-bridge 0.2.120 · Altium Designer 26.3 · Adom Bridge 2.1.211 · Windows 11 (Hydrogen local workspace) · observed 2026-11-28, still in the 0.2.120 tools on 2026-12-04

Summary

tools/kicad2altium.py (the KiCad footprint -> Altium PcbLib converter used when a run library is built for Altium) mishandles two kinds of KiCad hole:

  1. np_thru_hole pads become top-layer SMD pads with a hole. The code reads layer = 'multi' if kind == 'thru_hole' else 'top', so a non-plated peg (np_thru_hole) is written as a top-layer pad. Altium never drills a top-layer pad: the hole is missing from the NC drill file and the peg has nowhere to go.
  2. An oval drill aborts the conversion. hole = num(d[1]) with num = float: for (drill oval 0.6 1.7), d[1] is the string oval, so float('oval') raises ValueError and the footprint is not converted. A local patch that took the long side as a round hole was lost in a bridge update, and it was wrong anyway: the hole must be a slot.

Repro

Any KiCad footprint with pegs and oval drills. Stock example: Connector_USB.pretty/USB_C_Receptacle_GCT_USB4105-xx-A_16P_TopMnt_Horizontal.kicad_mod, which has 2 np_thru_hole pegs and 4 (drill oval 0.6 1.7 | 1.4) shell pads.

Expected

  • np_thru_hole: write a multilayer pad with Plated = False, sized to the drill, with no copper.
  • (drill oval W L): write a slot (HoleType = eSlotHole, HoleSize = W, HoleWidth = L, HoleRotation along the pad's long axis, pad-relative). Plain (drill D) stays round.

How we found it

Reading the exported Gerbers and drill files back: the peg holes were absent from the drill files. The fix we applied on the board was Layer := eMultiLayer; Plated := False for the pegs and eSlotHole for the shells. Without that, the drill set looks complete to every check the bridge runs.

2 Replies

Colby Knox marked this in progress ·
Colby Knox ·

Thanks for the clear report and the stock repro part. Both are real: an np_thru_hole must be a multi-layer, unplated pad, and (drill oval W L) must become a slot, not an abort. I'm fixing both in the converter and in the footprint builder it feeds, and will check the drill files on the USB4105 footprint you named. I'll post here when the build is out.

Colby Knox ·

Fixed in altium-bridge 0.2.123 (insiders now: adom-wiki pkg install adom/altium-bridge, and Adom Bridge picks up the new bridge build).

  • tools/kicad2altium.py: an np_thru_hole pad becomes a multi-layer, unplated hole, and (drill oval W L) becomes a slot W wide and L long, turned to match the pad (a pad rotated 90 or 270 degrees gets its slot turned with it). A (drill D (offset ...)) no longer trips it.
  • altium_build_footprint builds both: HoleType slot with its length and rotation, and Plated off for the unplated holes. The spec's PAD line gains three fields (plated, slot, slotrot); older specs read as before.

Checked with your USB4105 receptacle on Altium Designer 26.11 and Altium Develop: the four shell slots come out as plated slots, the two locating pegs as unplated holes, and Altium's NC drill output carries them (the slots in -SlotHoles.TXT, the pegs in the NON_PLATED section).

If it holds up on your side, say so here and I will close this.

Log in to reply.