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.
← Commit history
0.2.79: version stamps; engine 0.4.1 (standard 0.7.1: placement_check calls a part wholly under a raised one stacked); both batteries 250/0/1
11 files changed
+67−14
CHANGELOG.md+3−3bridge-rs/Cargo.lock+1−1bridge-rs/src/main.rs+1−1bridge-rs/vendor/README.md+1−1bridge-rs/vendor/adom-eda-checks/Cargo.toml+1−1bridge-rs/vendor/adom-eda-checks/README.md+2−2bridge-rs/vendor/adom-eda-checks/src/placement.rs+54−1package.json+1−1page.json+1−1src/BRIDGE_VERSION+1−1src/bridge.json+1−1CHANGELOG.md+3−3@@ -1,6 +1,6 @@ # Changelog -## 0.2.79 (unreleased)+## 0.2.79 - **The board-file writers moved into the standard's engine** (EDA Bridge Standard #16, standard 0.5.1, adom-eda-checks 0.2.1, vendored as published; 0.2.1 keys a GenCAD shape by its pads too, so two footprints of one name with@@ -11,9 +11,9 @@ GenCAD and DXF match the bridge's own, line for line. - **`thermal_vias`, `via_fence`, `height_check` and `placement_check` answer through the standard's engine** (#18, #19,- standard 0.7.0, adom-eda-checks 0.4.0, vendored as published). The engine plans the vias from the board model and the+ standard 0.7.1, adom-eda-checks 0.4.1, vendored as published). The engine plans the vias from the board model and the board's rules, and the bridge places them as one undo step, as before. The engine reads `altium_bodies` (the standard's- bodies companion) for heights, clashes and part boxes; placement_check now says `bodiesUsed`. `planned.via.from` now says where the via size came from on thermal_vias too.+ bodies companion) for heights, clashes and part boxes; placement_check now says `bodiesUsed`, and a part wholly under a raised one is `stacked`, not a courtyard overlap. `planned.via.from` now says where the via size came from on thermal_vias too. Every check reply's `engine` is the engine's own version string, no longer written by hand. - `altium_close` no longer calls a save prompt a modal orphan. Altium disables its main window a moment before its
bridge-rs/Cargo.lock+1−1@@ -10,7 +10,7 @@ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "adom-eda-checks"-version = "0.4.0"+version = "0.4.1" dependencies = [ "roxmltree", "serde_json",
bridge-rs/src/main.rs+1−1@@ -67,7 +67,7 @@ use tiny_http::{Header, Method, Response, Server}; /// Attached to every failed reply (see the /command handler). const REPORT_ISSUES: &str = "If this looks like an altium-bridge BUG (not a refusal you expected), report it: check for a duplicate with `adom-wiki issue list adom/altium-bridge`, then `adom-wiki issue create adom/altium-bridge --title \"<verb>: <one-line symptom>\" --category bug-report --body \"<what you ran, what you expected, what happened, the VERBATIM response JSON (and errorShot if present), bridgeVersion, the Altium version from altium_status, the OS>\"`. A relay, routing, toast or lifecycle problem belongs on adom/adom-bridge instead. Reports from real machines are how this bridge gets correct: three different Altium builds behaved three different ways in one weekend."; -pub const BRIDGE_VERSION: &str = "0.2.78";+pub const BRIDGE_VERSION: &str = "0.2.79"; fn json_response(status: u16, body: &serde_json::Value) -> Response<std::io::Cursor<Vec<u8>>> { let data = serde_json::to_vec(body).unwrap_or_else(|_| b"{}".to_vec());
bridge-rs/vendor/README.md+1−1@@ -2,7 +2,7 @@ | Folder | From | Version | |---|---|---|-| `adom-eda-checks/` | adom/eda-bridge-standard `engine/` (the shared checks engine) | standard 0.7.0, engine 0.4.0 |+| `adom-eda-checks/` | adom/eda-bridge-standard `engine/` (the shared checks engine) | standard 0.7.1, engine 0.4.1 | | `pcb-design-rules/records/` | adom/pcb-design-rules `rules/records/` (each fab's published limits, with sources and dates) | head of 2026-10-27 | The wiki has no git protocol, so these are copied at a version: refresh both from their pages, then run the tests.
bridge-rs/vendor/adom-eda-checks/Cargo.toml+1−1@@ -1,6 +1,6 @@ [package] name = "adom-eda-checks"-version = "0.4.0"+version = "0.4.1" edition = "2021" description = "The EDA Bridge Standard's checks and board-file writers, computed from the board model JSON: no bridge calls, no tool." license = "MIT"
bridge-rs/vendor/adom-eda-checks/README.md+2−2@@ -17,7 +17,7 @@ boards the engine gives the same answers the Altium bridge 0.2.76 gives. | `impedance` | stack | the track width (and pair gap) for a target impedance on each copper layer; `apply` answers `add_rule` arguments | | `current_capacity` | board, stack? | per net and layer, the narrowest copper against the width the current needs (IPC-2221), and the vias a layer change needs | | `height_check` | bodies, board? | each part's height on its side, parts over `maxTopMm`/`maxBottomMm` or under a lid region (`regions`), body collisions and near misses (`minGapMm`); `noBody` and `complete: false` when a part has no 3D body |-| `placement_check` | board, bodies? | courtyard overlaps (pads and bodies, grown by `marginMm`), parts off or over the edge, pads within `edgeMm` of the edge, parts on mounting holes; `bodiesUsed: false` when no bodies were given |+| `placement_check` | board, bodies? | courtyard overlaps (pads and bodies, grown by `marginMm`), parts off or over the edge, pads within `edgeMm` of the edge, parts on mounting holes; `stacked` lists plan-view overlaps where one part sits wholly above the other (a part under a raised molecule: pads apart, no bodies meeting in 3D); `bodiesUsed: false` when no bodies were given | | `thermal_vias` | board, rules? | a grid of vias in a part's exposed pad (`ref`, `pad?`), clear of vias already there; `apply` is `place_vias` arguments | | `via_fence` | board, rules? | vias of `viaNet` both sides of the named nets' tracks and/or round the board edge (`edge`), at `pitchMm` or lambda/20 at `freqGHz`, clear of other copper; `apply` is `place_vias` arguments | @@ -88,7 +88,7 @@ adom-eda-checks import_svg --svg logo.svg --args '{"at": [10, 10], "widthMm": 20 Replies keep the standard envelope (`success`, `errorCode`, `error`, `_hint`) and name verbs without a prefix (`apply_pours`, `add_rule`, `place_vias`): a bridge adds its own. Every reply also carries `engine`-(`"adom-eda-checks 0.4.0"`), so a bridge reports the engine it runs without writing the version by hand.+(`"adom-eda-checks 0.4.1"`), so a bridge reports the engine it runs without writing the version by hand. ## Tests
bridge-rs/vendor/adom-eda-checks/src/placement.rs+54−1@@ -116,7 +116,36 @@ pub fn placement_check(input: &Value) -> Value { let holes: Vec<(f64, f64, f64)> = pads.iter().filter(|p| f(&p["drill"]) > 0.0 && p["ref"].as_str().map(|r| r.is_empty()).unwrap_or(true)) .map(|p| (f(&p["x"]), f(&p["y"]), f(&p["sizeX"]).max(f(&p["drill"])) / 2.0)).collect(); let num = |k: &str, d: f64| args.get(k).and_then(|v| v.as_f64()).unwrap_or(d);- let mut out = review(&boxes, &pads, &ring, &holes, num("marginMm", 0.1), num("edgeMm", 0.5));+ let margin = num("marginMm", 0.1);+ let mut out = review(&boxes, &pads, &ring, &holes, margin, num("edgeMm", 0.5));+ // a part under a raised one (an Adom molecule on pins, a connector's overhang) overlaps it in plan view only: when+ // their pads stay clear and no body of one meets a body of the other in 3D, it is a stack, listed apart, not an+ // overlap (fusion-lane #19). A part with no body cannot be shown stacked, so its overlaps stand.+ if let Some(bs) = &given {+ // each pad's own box, turned with it: a molecule's pins span the part under it, so the union of its pads would too+ let pad_rects = |r: &str| -> Vec<Rect> { pads.iter().filter(|p| p["ref"].as_str() == Some(r)).map(|p| {+ let (c, s) = (f(&p["rotation"]).to_radians().cos().abs(), f(&p["rotation"]).to_radians().sin().abs());+ let (hx, hy) = ((f(&p["sizeX"]) * c + f(&p["sizeY"]) * s) / 2.0, (f(&p["sizeX"]) * s + f(&p["sizeY"]) * c) / 2.0);+ (f(&p["x"]) - hx, f(&p["y"]) - hy, f(&p["x"]) + hx, f(&p["y"]) + hy)+ }).collect() };+ let meets = |a: &str, b: &str| {+ let (ba, bb): (Vec<_>, Vec<_>) = (bs.iter().filter(|x| x.part == a).collect(), bs.iter().filter(|x| x.part == b).collect());+ if ba.is_empty() || bb.is_empty() { return true; }+ ba.iter().any(|p| bb.iter().any(|q| hit(grow((p.x0, p.y0, p.x1, p.y1), margin), grow((q.x0, q.y0, q.x1, q.y1), margin)) && p.z0.max(q.z0) < p.z1.min(q.z1)))+ };+ let (mut real, mut stacked) = (Vec::new(), Vec::new());+ for o in out["courtyardOverlaps"].as_array().cloned().unwrap_or_default() {+ let (a, b) = (o["parts"][0].as_str().unwrap_or(""), o["parts"][1].as_str().unwrap_or(""));+ let (pa, pb) = (pad_rects(a), pad_rects(b));+ let pads_meet = pa.is_empty() || pb.is_empty() || pa.iter().any(|x| pb.iter().any(|y| hit(grow(*x, margin), grow(*y, margin))));+ if pads_meet || meets(a, b) { real.push(o) } else { stacked.push(o) }+ }+ if !stacked.is_empty() {+ out["ok"] = json!(real.is_empty() && out["offOrOverEdge"].as_array().map(|a| a.is_empty()).unwrap_or(true) && out["onMountingHoles"].as_array().map(|a| a.is_empty()).unwrap_or(true));+ }+ out["courtyardOverlaps"] = json!(real);+ out["stacked"] = json!(stacked);+ } out["success"] = json!(true); out["bodiesUsed"] = json!(given.is_some()); out["_hint"] = json!("courtyardOverlaps: parts closer than twice marginMm (their pads and bodies): move them apart (move_parts, find_space). offOrOverEdge parts must come onto the board; nearEdge pads risk the router or the V-cut (JLCPCB: 0.4 mm from a V-cut, 0.2 from a routed edge). onMountingHoles: a screw head lands on the part. Without bodies (bodiesUsed false) a part's box is its pads only: pass the bodies companion to count overhanging bodies.");@@ -148,4 +177,28 @@ mod tests { assert_eq!(r["nearEdge"][0]["ref"], "U1"); assert_eq!(r["ok"], json!(false)); }++ #[test]+ fn a_part_under_a_raised_one_is_stacked_not_overlapping() {+ let pad = |r: &str, x: f64, y: f64| json!({"ref": r, "x": x, "y": y, "sizeX": 0.6, "sizeY": 0.6, "rotation": 0.0});+ // M1: a molecule on two pins at x 0 and 10, its board raised 3 to 4 mm; C1 sits under it, between the pins+ let st = json!({"outline": [[-5, -5], [15, -5], [15, 5], [-5, 5]],+ "outlineEdges": [{"kind": "line", "start": [-5.0, -5.0]}, {"kind": "line", "start": [15.0, -5.0]}, {"kind": "line", "start": [15.0, 5.0]}, {"kind": "line", "start": [-5.0, 5.0]}],+ "components": [{"ref": "M1", "side": "top"}, {"ref": "C1", "side": "top"}],+ "pads": [pad("M1", 0.0, 0.0), pad("M1", 10.0, 0.0), pad("C1", 5.0, 0.0), pad("C1", 6.0, 0.0)]});+ let body = |r: &str, x0: f64, x1: f64, z0: f64, z1: f64| json!({"ref": r, "side": "top", "x0": x0, "y0": -2.0, "x1": x1, "y1": 2.0, "z0": z0, "z1": z1});+ let stacked = placement_check(&json!({"board": st, "bodies": {"bodies": [body("M1", -1.0, 11.0, 3.0, 4.0), body("C1", 4.5, 6.5, 0.0, 1.0)]}, "args": {}}));+ assert_eq!(stacked["courtyardOverlaps"].as_array().unwrap().len(), 0, "{stacked}");+ assert_eq!(stacked["stacked"][0]["parts"], json!(["C1", "M1"]));+ assert_eq!(stacked["ok"], json!(true));+ // the same plan, but C1 tall enough to reach the raised board: a real overlap+ let real = placement_check(&json!({"board": st, "bodies": {"bodies": [body("M1", -1.0, 11.0, 3.0, 4.0), body("C1", 4.5, 6.5, 0.0, 3.5)]}, "args": {}}));+ assert_eq!(real["courtyardOverlaps"].as_array().unwrap().len(), 1);+ assert_eq!(real["ok"], json!(false));+ // no bodies: pads only, no stack possible to show, nothing hidden+ let none = placement_check(&json!({"board": st, "args": {}}));+ assert_eq!(none["bodiesUsed"], json!(false));+ assert!(none.get("stacked").is_none());+ } }+
package.json+1−1@@ -1,6 +1,6 @@ { "slug": "altium-bridge",- "version": "0.2.78",+ "version": "0.2.79", "type": "app", "description": "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.", "tags": [
page.json+1−1@@ -4,7 +4,7 @@ "type": "app", "title": "Altium Bridge: AI for Altium Designer", "brief": "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.",- "version": "0.2.78",+ "version": "0.2.79", "hero": { "type": "image", "path": "screenshots/hero.png"
src/BRIDGE_VERSION+1−1@@ -1 +1 @@-0.2.78+0.2.79
src/bridge.json+1−1@@ -2,7 +2,7 @@ "manifest_version": 1, "name": "altium", "displayName": "Altium Designer",- "version": "0.2.78",+ "version": "0.2.79", "description": "Drive Altium Designer from Adom: a resident DelphiScript agent (eval + the 1,100-command process launcher), the X2 -R command line, UIA over the VCL shell, dialogs by PID, screenshots of every Altium window, and Altium 365.", "homepage": "https://wiki.adom.inc/adom/altium-bridge", "docs": "https://wiki.adom.inc/adom/altium-bridge",