Closed general

kicad2altium.py: slotted (oval) drills crash the footprint conversion

idan gida · ·closed by Colby Knox

altium-bridge tools/kicad2altium.py fails on slotted (oval) drills

Version: altium-bridge 0.2.120 (tools/kicad2altium.py), called by adom-aiflow 0.2.153 altium library.

A wiki footprint with a slotted hole, e.g. a USB-C receptacle shell tab (drill oval 0.6 1.7), aborts the conversion:

ValueError: could not convert string to float: 'oval'
  File ".../altium-bridge/tools/kicad2altium.py", line 146

Cause: hole = num(d[1]) assumes (drill <dia>). KiCad also writes (drill oval <w> <h>) (and optionally an (offset ...) child).

Suggested fix: parse oval, and extend the PAD spec line with an optional slot length so build_footprint can set the pad's HoleType to slot (eSlotHole) with HoleWidth = w and slot length = h, rotated with the pad. Local workaround used meanwhile: emit the slot width as a round hole and report the slots in stats, then set the slot in Altium afterwards.

2 Replies

Colby Knox ·

Thanks. This is the same converter bug as #45, and it's fixed in the build I'm finishing now. (drill oval W L) becomes a slot (HoleType slot, with the slot length and its rotation along the pad), and a (drill D) with an (offset ...) child no longer trips it. Checked on the USB4105 shell pads: the NC drill output carries four plated 0.6 mm slots. I'll post here when the build is out.

Colby Knox marked this in progress ·
Colby Knox ·

This is out in altium-bridge 0.2.123 (insiders now), together with #45: oval drills become slots, and the conversion no longer stops on them. I'm closing this one as a duplicate of #45; the details are there.

Colby Knox closed this ·

Log in to reply.