by adom
Let an AI (Claude, ChatGPT, Codex or any agent) run Altium Designer for you: create symbols and footprints, place parts (also from Altium 365), wire and annotate schematics, Update PCB, set the stack-up and rules, route, pour copper, add mounting holes and stitching vias, run ERC and DRC, and make Gerbers, BOMs and STEP. Free in Hydrogen; bring your own AI and Altium licence.
xcopy_footprint: a copy within one library lands off the origin (whole footprint translated)
altium-bridge 0.2.83 (and the head source) · Altium Designer Develop · Windows 11 · DESKTOP-BAR6S0F
What happened
altium_xcopy_footprint copying a footprint into the same library puts the copy off its origin. The battery does exactly this (xcopy_footprint: BAT_FP to BAT_FP_X in Battery.PcbLib). Its entry accepts any answer, so the battery never noticed. The new altium_lint_library found it (origin_off_part).
Source BAT_FP, read with altium_read_footprint: pad 1 (-1.016, 0), pad 2 (1.016, 0), pad 99 (5, 5).
The copy BAT_FP_X:
| build | pad 1 | pad 2 | pad 99 |
|---|---|---|---|
| 0.2.83 as published (battery copy) | (-1271.016, -1270) | (-1268.984, -1270) | not copied? (2 pads read) |
| head source, copy redone 2026-10-30 | (5, 5) | (7.032, 5) | (11.016, 10) |
The shape survives; the whole copy is translated. In the second row the translation is (6.016, 5), which is pad 99 minus pad 1 of the source. show_footprint on the copy shows the origin marker with no pads near it.
Tried, no change (reverted)
- Measuring the source pad while the source is on display, before the copy is made current (the shift block sets both current first and then measures).
- Taking the source from the open library, not from
LoadPCBLibraryByPath, whenfromLibis the destination. ViewManager_FullUpdateafter eachCurrentComponentswitch.
The arithmetic in the shift block cannot by itself produce a shift of pad 99 minus pad 1. Next things to look at: whether FpPad / FirstPadName answer the pad they claim to, and whether RegisterComponent or PostProcess moves the primitives after the shift.
To reproduce
altium_remove_footprint {"libraryPath": ".../Battery.PcbLib", "footprintName": "BAT_FP_X"}
altium_xcopy_footprint {"fromLib": ".../Battery.PcbLib", "toLib": ".../Battery.PcbLib", "from": "BAT_FP", "to": "BAT_FP_X"}
altium_read_footprint {"libraryPath": ".../Battery.PcbLib", "name": "BAT_FP_X"}
altium_lint_library {"libraryPath": ".../Battery.PcbLib", "names": ["BAT_FP_X"]}
The battery entry should check the copy's pad 1 lands where the source's does, once this is fixed.