Skip to content

ecadlib 0.3.1

Choose a tag to compare

@oliBrowne oliBrowne released this 17 Oct 19:36
· 1203 commits to main since this release
d12b395

Added

  • Altium builds the libraries itself (ecadlib/altium_native.py, docs/altium-native.md): every .PcbLib / .SchLib ecadlib writes gets a .ecadbuild recipe, and a DelphiScript (ecadlib_build.pas) rebuilds them inside Altium with its own object API; ecadlib altium-native write|compare and a Rebuild with Altium step in altium-pkg (--no-native-build to skip). compare reads Altium's result back pad by pad and pin by pin.
  • The ecadlib menu in Altium lets Altium build the library files itself before it reinstalls the library: each job copies the parts' build recipes into the library folder and writes ecadlib_build.txt, and the menu calls BuildLibraries (ecadlib_build.pas, now part of the menu's script project). The dialog says when a library failed to build. native_build=0 in ecadlib_menu.ini turns it off.
  • Altium footprints carry the designator on the assembly drawing too: KiCad's ${REFERENCE} on F.Fab becomes a .Designator on Mechanical 13 (the [layers] assembly layer), and footprints without one get it centred on the body. ecadlib parity and the footprint check compare it between KiCad and Altium (#37).
  • Edits made in Altium are kept: each library ecadlib copies into a library folder gets a .ecadstate (the hash of ecadlib's file and of the file Altium built from it). A library someone changed in Altium afterwards is no longer rebuilt by the native build or replaced by dblib-sync / altium-pkg; they report it instead (dblib-sync --overwrite-edits, altium-native write --rebuild-all replace it). Libraries Altium already built and ecadlib has not changed are not rebuilt on every run.
  • ecadlib fp-edit PLAN --part P show|rename OLD=NEW|same-net A,B|undo: fix a held part's datasheet pad table by hand, e.g. a connector whose pads are named 1+ / 1- or T / R / S (a footprint still needs a pad 1 or A1, so a person picks it). The edit is kept in footprint_edits.json next to the plan, applied whenever the librarian builds the part, and noted on the part with who made it. A part held because its datasheet pad table failed the check now says which check failed and what to do (no pad 1: rename a pad with fp-edit; pads of two nets overlap: same-net if they are one net, else pick a footprint), instead of "there is no footprint yet".
  • ecadlib sources-check and a weekly sources-canary workflow: checks the unofficial EasyEDA / JLCPCB endpoints against known parts.

Changed

  • Pads on one net may overlap in a datasheet pad table: pads whose pins share a name in the pin table (VIN on pins 1, 2 and the paddle) are put in same_net automatically (NC / DNC pins never are). An exposed pad listed twice at the same place with another size (for its thermal vias) is one pad, not a misread; an exact copy is still an error. The accuracy gate's baseline moves to 328/331 (qfn-DAC60504).

  • Official part APIs first: the default provider order is Nexar, DigiKey, Mouser, then the unofficial JLCPCB search and EasyEDA. Nexar / DigiKey / Mouser answers now give the LCSC number and datasheet link. [providers] unofficial = false turns the unofficial endpoints off completely.

  • Altium (Altium 365 first) and KiCad are the supported targets. The Fusion Electronics / EAGLE and EasyEDA Pro exports are marked experimental in the README and ecadlib -h: they keep working but get no new features and may be removed later.

Fixed

  • BOM intake: C1~C4 designator ranges are counted; European decimal quantities are not multiplied by ten; one cp1252 byte no longer garbles a UTF-8 CSV; DNP / DNF in the Value or MPN cell marks the line; a quantity-only footer row is not a part; an MPN that Excel turned into scientific notation is flagged.
  • DbLib table: parts go to the right table (LCSC long descriptions, easyeda:C7593 is an LCSC number, an IC package outranks the description words, menu parts follow their source).
  • Altium: variants per channel and part, variant alternates by Design Item ID, the encoding of a DbLib Altium saved is kept, prune removes the STEP files ecadlib wrote, sheet name case, menu jobs and pin numbers; the native build keeps recipe footprint names as stored and keeps a library when a STEP file is missing.
  • KiCad export: re-export touches nothing unchanged and never loses hand edits; Altium keep-outs and non-copper regions are not written as copper; Bottom Paste / Bottom Solder and fill rotation are kept; KiCad name clashes are reported; a database row never points at another part's symbol.
  • 3D models: the STEP model is turned to the footprint's pads, and more EasyEDA / LCSC package names get the right body.
  • House style: style learn needs coverage before a setting is high and does not write low settings; power_side = "left" puts a lone ground at the bottom.
  • Standard parts refuse land variants, exposed-pad SOTs and contradicting size codes.
  • The approval gate works under house parameter names, and placeholder MPNs are handled.
  • Models: the feedback turn is capped, API keys are redacted, unit repair is strict, configured key names are used.
  • Altium: DbLib table names Altium's database driver can open, install scripts written in cp1252, and a warning for Unicode pin names.
  • Team server: no self-approval through the plan approval route, and an odd sign_as is a plain 400.
  • Security: no API key in network error messages, framing refused in local mode, a deeply nested JSON body is a plain 400.