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.87: schematic_review reads each sheet's drawing (engine 0.23.0 drawing checks); one document per path spelling kept
17 files changed
+290−23
CHANGELOG.md+10bridge-rs/Cargo.lock+1−1bridge-rs/src/main.rs+1−1bridge-rs/src/schreview.rs+15−1bridge-rs/src/schwire.rs+91−2bridge-rs/vendor/adom-eda-checks/Cargo.toml+1−1bridge-rs/vendor/adom-eda-checks/README.md+2−2bridge-rs/vendor/adom-eda-checks/src/lib.rs+1−1bridge-rs/vendor/adom-eda-checks/src/main.rs+2−2bridge-rs/vendor/adom-eda-checks/src/placement.rs+19−2bridge-rs/vendor/adom-eda-checks/src/schreview.rs+103−2dev-skills/altium-bridge-test/run_verb_tests.py+4−1package.json+5−2page.json+5−2src/BRIDGE_VERSION+1−1src/agent/AdomAgent.pas.tmpl+28−1src/bridge.json+1−1CHANGELOG.md+10@@ -1,5 +1,15 @@ # Changelog +## 0.2.87++- **`schematic_review` reads the drawing** (EDA Bridge Standard #29, engine 0.23.0 / standard 0.28, vendored as published). Each sheet of the project is read live and handed to the engine as its `sheetDrawing` (docs/conventions.md: mm, origin top left, y down: y counts from the sheet's top edge, from its standard style and orientation or its custom size; each entry carries `sizeMm`), so the drawing checks run for Altium too: `dangling_wire_end`, `floating_label` (a label touching no wire or pin) and `overlap` (two symbols drawn over each other).+ - Wires come as their segments.+ - Power ports and ports come as power and hierarchical labels, a port at whichever end meets the wiring.+ - A sheet symbol's entries come as hierarchical labels, and a bus entry as a short wire with a junction where it meets the bus.+ - The agent's sheet dump gains each symbol's box: its pins and the body drawn for the part and display mode it shows, never its designator or comment.+ - `drawing: false` keeps the review to the files.+ - Measured on the battery's lane project: one finding, and a real one, at (48.26, 38.1) mm on LaneSub: its port N1 has a wire that runs on from its end to nothing, the spot Altium's compile calls "Unconnected Port N1".+ ## 0.2.86 - **The last two verbs of the standard** (EDA Bridge Standard #29, standard 0.27), so Altium answers all 247:
bridge-rs/Cargo.lock+1−1@@ -10,7 +10,7 @@ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "adom-eda-checks"-version = "0.22.0"+version = "0.23.0" dependencies = [ "roxmltree", "serde_json",
bridge-rs/src/main.rs+1−1@@ -73,7 +73,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.86";+pub const BRIDGE_VERSION: &str = "0.2.87"; 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/src/schreview.rs+15−1@@ -28,11 +28,25 @@ pub fn schematic_review(args: &Value) -> Value { let r = crate::schdoc::read_sheet_file(&json!({"path": s, "pins": true})); match r["components"].as_array() { Some(a) => parts.extend(a.iter().cloned()), None => unread.push(json!({"sheet": s, "error": r.get("error").cloned().unwrap_or(Value::Null)})) } }+ // each sheet's drawing (the open sheet, read live), for the standard's drawing checks: dangling wire ends, labels+ // off their wire, symbols drawn over each other. drawing:false keeps to the files.+ let mut drawing = Vec::new();+ if args.get("drawing").and_then(|v| v.as_bool()) != Some(false) {+ for s in &sheets {+ let name = std::path::Path::new(&s.replace('\\', "/")).file_name().map(|n| n.to_string_lossy().to_string()).unwrap_or_default();+ match crate::schwire::load(&json!({"sheet": s})) {+ Ok((_, sh)) => drawing.push(crate::schwire::drawing(&name, &sh)),+ Err(e) => unread.push(json!({"sheet": s, "drawing": e.get("error").cloned().unwrap_or(Value::Null)})),+ }+ }+ } let n = crate::hier::netlist(&json!({"projectPath": prj})); if n.get("success").and_then(|b| b.as_bool()) != Some(true) { return n; } // the standard's review (adom-eda-checks schematic_review): the pin checks, decoupling, and the design checks // (floating reset or enable, I2C pull-ups, LED resistors, regulator capacitors) that read each part's value and libRef- let mut out = adom_eda_checks::schreview::schematic_review(&json!({"sheetParts": parts, "netlist": {"nets": n["nets"], "names": n.get("names").cloned().unwrap_or(Value::Null)}}));+ let mut input = json!({"sheetParts": parts, "netlist": {"nets": n["nets"], "names": n.get("names").cloned().unwrap_or(Value::Null)}});+ if !drawing.is_empty() { input["sheetDrawing"] = json!(drawing); }+ let mut out = adom_eda_checks::schreview::schematic_review(&input); if out.get("success").and_then(|b| b.as_bool()) != Some(true) { return out; } out["sheets"] = json!(sheets); out["unreadSheets"] = json!(unread);
bridge-rs/src/schwire.rs+91−2@@ -32,7 +32,7 @@ pub struct Item { pub struct Pin { pub r: String, pub num: String, pub name: String, pub elec: i64, pub at: P, pub dir: i64, pub hidden: bool } #[derive(Debug, Clone, Default)]-pub struct Comp { pub r: String, pub at: P, pub lib: String, pub lib_path: String, pub rot: i64, pub mirror: bool, pub des: [i64; 4], pub cmt: [i64; 4] }+pub struct Comp { pub r: String, pub at: P, pub lib: String, pub lib_path: String, pub rot: i64, pub mirror: bool, pub des: [i64; 4], pub cmt: [i64; 4], pub bx: Option<[i64; 4]> } #[derive(Debug, Clone, Default)] pub struct Sheet { pub k: f64, pub items: Vec<Item>, pub pins: Vec<Pin>, pub comps: Vec<Comp>, pub page: Value, pub document: String }@@ -65,7 +65,8 @@ pub fn parse(d: &Value) -> Sheet { if t == 'C' { let f4 = |v: &Value| { let mut a = [0i64; 4]; for (k, x) in a.iter_mut().enumerate() { *x = i(&v[k]); } a }; sh.comps.push(Comp { r: st(&it["ref"]), at: (i(&it["x"]), i(&it["y"])), lib: st(&it["lib"]), lib_path: st(&it["libPath"]),- rot: i(&it["rot"]), mirror: it["mirror"].as_bool() == Some(true), des: f4(&it["des"]), cmt: f4(&it["cmt"]) });+ rot: i(&it["rot"]), mirror: it["mirror"].as_bool() == Some(true), des: f4(&it["des"]), cmt: f4(&it["cmt"]),+ bx: it["box"].as_array().filter(|b| b.len() == 4).map(|_| f4(&it["box"])) }); continue; } let pts: Vec<P> = it["pts"].as_array().cloned().unwrap_or_default().iter().map(|p| (i(&p[0]), i(&p[1]))).collect();@@ -98,6 +99,64 @@ fn on_seg(p: P, a: P, b: P, tol: i64) -> (bool, bool) { fn same(a: P, b: P, tol: i64) -> bool { (a.0 - b.0).abs() <= tol && (a.1 - b.1).abs() <= tol } +/// The sheet's size in mm, (width, height), from its page: Altium's standard styles (A4 .. E, Letter, Legal, Tabloid,+/// OrCAD A .. E, in mil, landscape; portrait swaps them) or its custom size. None when the style is unknown.+pub fn sheet_size_mm(sh: &Sheet) -> Option<(f64, f64)> {+ let pg = &sh.page;+ let mil = |w: f64, h: f64| (w * 0.0254, h * 0.0254);+ let (w, h) = if pg["custom"].as_bool() == Some(true) {+ let (cx, cy) = (pg["cx"].as_f64()?, pg["cy"].as_f64()?);+ if cx <= 0.0 || cy <= 0.0 { return None; }+ // the API answers raw units on some builds and Altium's 10 mil units on others+ if cx > 100_000.0 { (sh.mm(cx as i64), sh.mm(cy as i64)) } else { mil(cx * 10.0, cy * 10.0) }+ } else {+ const STYLES: [(f64, f64); 18] = [(11500., 7600.), (15500., 11100.), (22300., 15700.), (31500., 22300.), (44600., 31500.),+ (9500., 7500.), (15000., 9500.), (20000., 15000.), (32000., 20000.), (42000., 32000.), (11000., 8500.), (14000., 8500.),+ (17000., 11000.), (9900., 7900.), (15400., 9900.), (20600., 15600.), (32600., 20600.), (42800., 32800.)];+ let (w, h) = *STYLES.get(pg["style"].as_u64()? as usize)?;+ mil(w, h)+ };+ Some(if pg["orientation"].as_i64() == Some(1) { (h, w) } else { (w, h) })+}++/// The sheet as the standard's sheetDrawing (docs/conventions.md, #29): mm, y down (Altium's y negated), wires split+/// into their segments. Altium's other connection points come as what they are to the checks: power ports and ports+/// as power and hierarchical labels (a port at whichever end meets the wiring), a sheet symbol's entries as+/// hierarchical labels, and a bus entry as a short wire with a junction where it meets the bus. Pure.+pub fn drawing(name: &str, sh: &Sheet) -> Value {+ // origin top left, y down: y from the sheet's top edge (Altium's own y negated when the sheet size is unknown)+ let size = sheet_size_mm(sh);+ let top = size.map(|s| s.1).unwrap_or(0.0);+ let flip = |y: i64| ((top - sh.mm(y)) * 10000.0).round() / 10000.0;+ let pt = |p: P| json!([sh.mm(p.0), flip(p.1)]);+ let tol = sh.tol();+ let (mut wires, mut buses, mut junctions, mut ncs, mut labels) = (vec![], vec![], vec![], vec![], vec![]);+ let wire_points: Vec<P> = sh.items.iter().filter(|it| it.t == 'W').flat_map(|it| it.pts.clone()).collect();+ for it in &sh.items {+ match it.t {+ 'W' | 'B' => for w in it.pts.windows(2) {+ let seg = json!({"a": pt(w[0]), "b": pt(w[1])});+ if it.t == 'W' { wires.push(seg) } else { buses.push(seg) }+ },+ 'E' => { wires.push(json!({"a": pt(it.at), "b": pt(it.corner)})); junctions.push(pt(it.at)); }+ 'J' => junctions.push(pt(it.at)),+ 'X' => ncs.push(pt(it.at)),+ 'N' => labels.push(json!({"text": it.text, "kind": "local", "at": pt(it.at)})),+ 'O' => labels.push(json!({"text": it.text, "kind": "power", "at": pt(it.at)})),+ 'P' => {+ let ends = port_ends(it);+ let wired = ends.iter().find(|e| wire_points.iter().any(|w| same(**e, *w, tol)) || sh.pins.iter().any(|p| same(**e, p.at, tol))).copied();+ labels.push(json!({"text": it.text, "kind": "hierarchical", "at": pt(wired.unwrap_or(it.at))}));+ }+ 'S' => for (n, side, dist, _) in &it.entries { labels.push(json!({"text": n, "kind": "hierarchical", "at": pt(entry_point(it, *side, *dist))})); },+ _ => {}+ }+ }+ let pins: Vec<Value> = sh.pins.iter().filter(|p| !p.hidden).map(|p| json!({"ref": p.r, "number": p.num, "at": pt(p.at)})).collect();+ let symbols: Vec<Value> = sh.comps.iter().filter_map(|c| c.bx.map(|b| json!({"ref": c.r, "box": [sh.mm(b[0]), flip(b[3]), sh.mm(b[2]), flip(b[1])]}))).collect();+ json!({"sheet": name, "sizeMm": size.map(|s| json!([((s.0 * 100.0).round() / 100.0), ((s.1 * 100.0).round() / 100.0)])), "wires": wires, "buses": buses, "junctions": junctions, "noConnects": ncs, "labels": labels, "pins": pins, "symbols": symbols})+}+ /// A sheet entry's point on its symbol's edge (Altium: Side 0 left, 1 right, 2 top, 3 bottom; distance from the top /// or the left). pub fn entry_point(s: &Item, side: i64, dist: i64) -> P {@@ -801,6 +860,36 @@ pub fn fix_connectivity(args: &Value) -> Value { mod tests { use super::*; + #[test]+ fn the_sheet_as_the_standards_drawing() {+ let k = 10_000_000.0; // raw units per inch: 1 mm = k / 25.4+ let mm = |v: f64| (v * k / 25.4).round() as i64;+ let it = |t: char, pts: Vec<P>, at: P| Item { t, key: format!("{t}"), pts, at, ..Default::default() };+ let mut sh = Sheet { k, ..Default::default() };+ sh.items.push(it('W', vec![(0, 0), (mm(10.0), 0), (mm(10.0), mm(5.0))], (0, 0)));+ sh.items.push(it('J', vec![], (mm(10.0), 0)));+ let mut port = it('P', vec![], (mm(20.0), mm(5.0))); port.w = mm(4.0); port.text = "IO".into();+ sh.items.push(port);+ sh.pins.push(Pin { r: "U1".into(), num: "3".into(), at: (mm(24.0), mm(5.0)), ..Default::default() });+ sh.pins.push(Pin { r: "U1".into(), num: "9".into(), at: (0, 0), hidden: true, ..Default::default() });+ sh.comps.push(Comp { r: "U1".into(), bx: Some([mm(24.0), 0, mm(40.0), mm(20.0)]), ..Default::default() });+ let d = drawing("Main.SchDoc", &sh);+ assert_eq!(d["wires"].as_array().unwrap().len(), 2, "a polyline is its segments");+ assert_eq!(d["wires"][1], json!({"a": [10.0, 0.0], "b": [10.0, -5.0]}), "y down");+ assert_eq!(d["junctions"][0], json!([10.0, 0.0]));+ // the port's far end meets U1.3, so that is where its label sits+ assert_eq!(d["labels"][0], json!({"text": "IO", "kind": "hierarchical", "at": [24.0, -5.0]}));+ assert_eq!(d["pins"].as_array().unwrap().len(), 1, "a hidden pin has no end on the drawing");+ assert_eq!(d["symbols"][0]["box"], json!([24.0, -20.0, 40.0, 0.0]));+ // on an A4 landscape sheet (7600 mil = 193.04 mm tall) y counts down from the top edge+ sh.page = json!({"style": 0, "custom": false, "orientation": 0});+ let d = drawing("Main.SchDoc", &sh);+ assert_eq!(d["sizeMm"], json!([292.1, 193.04]));+ assert_eq!(d["wires"][1], json!({"a": [10.0, 193.04], "b": [10.0, 188.04]}));+ sh.page = json!({"style": 0, "custom": false, "orientation": 1});+ assert_eq!(sheet_size_mm(&sh).map(|s| s.0.round()), Some(193.0), "portrait swaps the sides");+ }+ fn wire(pts: &[P]) -> Item { Item { t: 'W', key: format!("W:{pts:?}"), pts: pts.to_vec(), ..Default::default() } } fn item(t: char, at: P, text: &str) -> Item { Item { t, key: format!("{t}:{at:?}:{text}"), at, text: text.into(), ..Default::default() } } fn pin(r: &str, n: &str, at: P) -> Pin { Pin { r: r.into(), num: n.into(), name: n.into(), at, ..Default::default() } }
bridge-rs/vendor/adom-eda-checks/Cargo.toml+1−1@@ -1,6 +1,6 @@ [package] name = "adom-eda-checks"-version = "0.22.0"+version = "0.23.0" 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@@ -31,12 +31,12 @@ boards the engine gives the same answers the Altium bridge 0.2.76 gives. | `length_tune` | board, rules? | a serpentine on the net's longest straight track with room beside it, its bumps sized to add exactly what `targetMm` (or `matchTo`, another net's length) asks, every bump `clearance` (the board's strictest rule) from other nets' pads, routed tracks and vias and inside the board; answered as the track to `remove` and the `routeNet` that replaces it. From the Altium bridge's lengthtune.rs | | `lint_library` | library | is a symbol or footprint library fit to ship (standard #28): the shared rules with a fixed severity each (`no_pads`, `zero_size_pad`, `duplicate_pad_number`, `no_courtyard`, `origin_off_part`, `pin_without_pad`, `pad_without_pin`, `no_part_number`, ...; `rules` in the reply lists them), checked from the footprints and symbols the bridge sends; a key left out is not checked, a key sent empty is a finding; the bridge's own findings (`tool_refuses_file`) pass through | | `net_lengths` | board | the routed length of each net (tracks and arcs, by layer, with its vias), the skew of each differential pair (`pairs`, else found by net name: `_P`/`_N`, `+`/`-`) and the spread of each matched-length group against its tolerance (`groups`). From the Altium bridge's lengths.rs |-| `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; plus a 0-100 score and grade (from kicad-bridge's score_placement): connectors farther than `connectorEdgeMm` from the edge, decoupling capacitors farther than `decouplingMm` from their IC's pin on the same rail, and the ratsnest's length against the board diagonal |+| `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; plus a 0-100 score and grade (from kicad-bridge's score_placement): connectors farther than `connectorEdgeMm` from the edge, decoupling capacitors farther than `decouplingMm` from their IC's pin on the same rail, and the ratsnest's length against the board diagonal; a body-less SMD test point counts as flat, so it can sit stacked under a raised module | | `plan_fanout` | board, stack?, rules? | the fanout of a BGA or QFN/QFP (`ref`): pitch and package from its pads; a BGA's outer ring escapes on the surface and each inner ball takes a dogbone via, or a via in the pad when the dogbone does not fit (`style` auto); a perimeter pad takes an outward stub, with a via at its end for ground or `viaPerimeter`, and an exposed pad a via grid. `calls` are route_net arguments, one per net; `conflicts` lists each via and stub closer than the clearance to another net's pad, track, arc or via anywhere on the board. A pin its net's copper already reaches is skipped (`includeRouted` plans it anyway), the exposed-pad grid keeps clear of holes already there, and `crossesPours` names other nets' pours the plan runs into (repour before DRC). From the KiCad bridge's place_tools | | `plan_route` | board, rules? | a path between two pads of a net (`from`, `to` as Ref.Pad) on any listed copper `layers`, with through vias between them: a bounded orthogonal A* on `gridMm`, width and via from the args, else the board's width and via rules (`planner.widthFrom`, `viaFrom`), keeping `widthMm/2` + the board's strictest board-wide copper clearance rule from other nets' copper (pads by their real outline), inside the outline, no via in a pad; a through via is checked on every copper layer of the board (`planner.viasCheckedOn`), not only the planned ones. `routeNet` is route_net's arguments, unchanged. Pours are not obstacles (repour after), but `crossesPours` names each other net's pour the route runs through, since that can split it; `avoidPours: true` keeps the route out of them (or a list of nets: out of theirs only), and `pourCost` makes a mm inside one cost 1 + pourCost mm, a preference where a hard block finds no path; a pour that holds the route's own end pad is exempt and named (`planner.avoidExempt`); with no path, `ends` names the avoided pours at each end pad and whether they are exempt, and `withoutAvoid` says whether a path exists through them. The grid path is smoothed to straight and 45-degree segments where they keep the same clearance (`smooth: false` keeps it) | | `review_board` | board, sheetParts?, rules? | small design-review checks, errors first: placeholder values, single-pin nets, duplicate designators, parts with pads off the outline polygon or near the edge (`edgeMm`), parts with no footprint name, off-grid parts (with `gridMm`); from the sheet parts, missing Mouser/DigiKey/LCSC numbers and datasheets and placeholder comments; from the rules, disabled ones, missing clearance/width/hole-size/short-circuit rules and same-priority ties (rules classed from a standard kind, a descriptor, Altium's ordinal or the rule's own name; `alwaysChecked` names classes a tool always checks, like EAGLE's shorts). `skipped` and `notImplemented` say what was not judged. From the Altium bridge's review.rs | | `route_pair` | board, stack?, rules? | a differential pair planned as one centreline (pad midpoints through `via` waypoints) with each net offset half a pitch to its own side, mitred corners and a `fanMm` fan-out; width and gap given, or from `diffOhms` and the stack. `problems` names a crossing or other copper (pads by outline, routed tracks, vias) closer than the clearance; `routeNet` holds both nets' route_net arguments and `widthRule` the pair's add_rule. From the Altium bridge's pairroute.rs |-| `schematic_review` | sheetParts, netlist | every placed pin, with its electrical type, against the compiled netlist: power pins on no net and outputs driving each other (errors); unconnected pins, one-pin nets, inputs nothing drives and IC supplies with no capacitor to ground (warnings; a regulator's switch node on an inductor is no missing capacitor). From the Altium bridge's schreview.rs; plus the design checks from kicad-bridge's design_review and sch_check: I2C lines with no pull-up, reset and enable pins floating or with nothing setting their level, LEDs with no series resistor, regulators missing input or output capacitors, rails with no bulk capacitor, unannotated or doubled designators, no-connect flags on wired pins, and two names on one net (`netlist.names`); each with `message` and `fix` |+| `schematic_review` | sheetParts, netlist | every placed pin, with its electrical type, against the compiled netlist: power pins on no net and outputs driving each other (errors); unconnected pins, one-pin nets, inputs nothing drives and IC supplies with no capacitor to ground (warnings; a regulator's switch node on an inductor is no missing capacitor). From the Altium bridge's schreview.rs; plus the design checks from kicad-bridge's design_review and sch_check: I2C lines with no pull-up, reset and enable pins floating or with nothing setting their level, LEDs with no series resistor, regulators missing input or output capacitors, rails with no bulk capacitor, unannotated or doubled designators, no-connect flags on wired pins, and two names on one net (`netlist.names`); each with `message` and `fix`; with the `sheetDrawing` companion (one entry per sheet: wires, buses, junctions, noConnects, labels, pins, symbol boxes, mm, y down) also dangling wire ends (with the nearest pin or label), labels on no wire or pin, and symbols drawn over each other, which are listed in `unread` without it | | `silk_designators` | board, silk | a place for each reference designator: one size (`size`, stepping down to `minSize`), beside its own part, clear of every pad by `padClearance`, of other parts' bodies and of other labels, inside the board. `applyArgs` is apply_silkscreen's arguments; parts with no clear spot are listed, not forced. From the Altium bridge's silkplace.rs | | `teardrops` | board, rules? | a tapered fill where a track meets a via or pad of its own net (`targets` via, tht, smd), as wide as the pad at its centre (`widthRatio`) and narrowing to the track `lengthRatio` x the pad's size past its edge; each a polygon on the track's layer kept clear of other nets' copper by the board's clearance, the joints with no room skipped and named | | `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 |
bridge-rs/vendor/adom-eda-checks/src/lib.rs+1−1@@ -4,7 +4,7 @@ //! answers the verb under its own prefix (`kicad_return_path`). Replies keep the standard envelope (`success`, //! `errorCode`, `error`, `_hint`) and name verbs without a prefix. //!-//! Every check takes one input bundle, `{board, stack?, pours?, rules?, silk?, fab?, bodies?, prices?, sheetParts?, netlist?, library?, args?}` (see `input`).+//! Every check takes one input bundle, `{board, stack?, pours?, rules?, silk?, fab?, bodies?, prices?, sheetParts?, netlist?, sheetDrawing?, library?, args?}` (see `input`). use serde_json::Value; pub mod assembly;
bridge-rs/vendor/adom-eda-checks/src/main.rs+2−2@@ -23,8 +23,8 @@ fn bundle(rest: &[String]) -> Result<Value, String> { while let Some(flag) = it.next() { let val = it.next().ok_or_else(|| format!("{flag} needs a value"))?; match flag.as_str() {- "--board" | "--stack" | "--pours" | "--rules" | "--silk" | "--fab" | "--bodies" | "--prices" | "--sheet-parts" | "--netlist" | "--drc" | "--library" => {- let key = match flag.as_str() { "--sheet-parts" => "sheetParts", f => &f[2..] };+ "--board" | "--stack" | "--pours" | "--rules" | "--silk" | "--fab" | "--bodies" | "--prices" | "--sheet-parts" | "--netlist" | "--drc" | "--library" | "--sheet-drawing" => {+ let key = match flag.as_str() { "--sheet-parts" => "sheetParts", "--sheet-drawing" => "sheetDrawing", f => &f[2..] }; b[key] = read(val)?; } "--args" => b["args"] = serde_json::from_str(val).map_err(|e| format!("--args: {e}"))?,
bridge-rs/vendor/adom-eda-checks/src/placement.rs+19−2@@ -111,10 +111,20 @@ pub fn is_stacked(pads: &[Value], bs: &[crate::bodies::BodyBox], a: &str, b: &st }).collect() }; let (pa, pb) = (pad_rects(a), pad_rects(b)); if pa.is_empty() || pb.is_empty() || pa.iter().any(|x| pb.iter().any(|y| hit(grow(*x, margin), grow(*y, margin)))) { return false; }- let (ba, bb): (Vec<_>, Vec<_>) = (bs.iter().filter(|x| x.part == a).collect(), bs.iter().filter(|x| x.part == b).collect());+ // a body-less SMD test point is flat copper: it stands 0 mm tall (fusion-lane, BQ25792's TP1.. under a module)+ let flat = |r: &str| -> Option<crate::bodies::BodyBox> {+ let ps: Vec<&Value> = pads.iter().filter(|p| p["ref"].as_str() == Some(r)).collect();+ if prefix(r) != "TP" || ps.is_empty() || ps.iter().any(|p| f(&p["drill"]) > 0.0) { return None; }+ let b = pad_rects(r).into_iter().fold((f64::MAX, f64::MAX, f64::MIN, f64::MIN), |a, x| (a.0.min(x.0), a.1.min(x.1), a.2.max(x.2), a.3.max(x.3)));+ Some(crate::bodies::BodyBox { part: r.to_string(), top: true, x0: b.0, y0: b.1, x1: b.2, y1: b.3, z0: 0.0, z1: 0.0, turned: None })+ };+ let (mut ba, mut bb): (Vec<crate::bodies::BodyBox>, Vec<crate::bodies::BodyBox>) = (bs.iter().filter(|x| x.part == a).cloned().collect(), bs.iter().filter(|x| x.part == b).cloned().collect());+ if ba.is_empty() { ba.extend(flat(a)); }+ if bb.is_empty() { bb.extend(flat(b)); } if ba.is_empty() || bb.is_empty() { return false; } // bodies meet when their footprints come within twice the margin (turned ones by their rectangles) and their heights overlap- !ba.iter().any(|p| bb.iter().any(|q| { let (h, d) = crate::bodies::xy_meet(p, q); (h || d < 2.0 * margin) && p.z0.max(q.z0) < p.z1.min(q.z1) }))+ // a flat test point (z 0..0) meets a body that reaches the board (z0 at or below 0)+ !ba.iter().any(|p| bb.iter().any(|q| { let (h, d) = crate::bodies::xy_meet(p, q); (h || d < 2.0 * margin) && (p.z0.max(q.z0) < p.z1.min(q.z1) || (p.z1 == p.z0 && q.z0 <= p.z0) || (q.z1 == q.z0 && p.z0 <= q.z0)) })) } fn prefix(r: &str) -> String { r.chars().take_while(|c| c.is_ascii_alphabetic()).collect::<String>().to_ascii_uppercase() }@@ -311,6 +321,13 @@ mod tests { 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));+ // a body-less SMD test point under the raised board is flat: stacked; under a body that sits on the board: not+ let st2 = json!({"outline": st["outline"], "outlineEdges": st["outlineEdges"], "components": [{"ref": "M1", "side": "top"}, {"ref": "TP1", "side": "top"}],+ "pads": [pad("M1", 0.0, 0.0), pad("M1", 10.0, 0.0), pad("TP1", 5.0, 0.0)]});+ let tp = placement_check(&json!({"board": st2, "bodies": {"bodies": [body("M1", -1.0, 11.0, 3.0, 4.0)]}, "args": {}}));+ assert_eq!(tp["stacked"][0]["parts"], json!(["M1", "TP1"]), "{tp}");+ let tp_low = placement_check(&json!({"board": st2, "bodies": {"bodies": [body("M1", -1.0, 11.0, -0.05, 1.7)]}, "args": {}}));+ assert_eq!(tp_low["courtyardOverlaps"].as_array().unwrap().len(), 1, "{tp_low}"); // 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));
bridge-rs/vendor/adom-eda-checks/src/schreview.rs+103−2@@ -377,8 +377,78 @@ fn sheet_parts(input: &Value) -> Option<Vec<Value>> { p.get("components").or(Some(&p)).and_then(|x| x.as_array()).cloned() } -/// schematic_review: input {sheetParts, netlist}. The netlist companion is {nets: {net: ["U1.8", ...]}, names?: {net:-/// [every label or port name joined into it]}} (or the nets map). Parts may carry value (or comment), libRef (or libId)+type Pt = (f64, f64);+fn pt(v: &Value) -> Option<Pt> { Some((v.get(0)?.as_f64()?, v.get(1)?.as_f64()?)) }+fn d2(a: Pt, b: Pt) -> f64 { ((a.0 - b.0).powi(2) + (a.1 - b.1).powi(2)).sqrt() }+fn on_seg(p: Pt, a: Pt, b: Pt) -> f64 {+ let (dx, dy) = (b.0 - a.0, b.1 - a.1);+ let l2 = dx * dx + dy * dy;+ let t = if l2 > 0.0 { (((p.0 - a.0) * dx + (p.1 - a.1) * dy) / l2).clamp(0.0, 1.0) } else { 0.0 };+ d2(p, (a.0 + t * dx, a.1 + t * dy))+}+fn r2(v: f64) -> f64 { (v * 100.0).round() / 100.0 }++/// The checks that need a sheet's drawing (kicad-bridge's sch_check, #29), from the sheetDrawing companion: one entry+/// per sheet {sheet, wires [{a, b}], buses?, junctions [[x, y]], noConnects, labels [{text, kind, at}], pins [{ref,+/// number, at}], symbols [{ref, box: [x0, y0, x1, y1]}]}, mm, y down. A point connects when it lies within 0.01 mm of+/// another item; a wire end on another wire's middle connects only with a junction there. Pure.+pub fn drawing_checks(sheets: &[Value]) -> Vec<Value> {+ const TOL: f64 = 0.01;+ let mut out = Vec::new();+ for sh in sheets {+ let name = sh["sheet"].as_str().unwrap_or("").to_string();+ let list = |k: &str| sh[k].as_array().cloned().unwrap_or_default();+ let wires: Vec<(Pt, Pt)> = list("wires").iter().filter_map(|w| Some((pt(&w["a"])?, pt(&w["b"])?))).collect();+ let points = |k: &str| -> Vec<Pt> { list(k).iter().filter_map(pt).collect() };+ let (junctions, ncs) = (points("junctions"), points("noConnects"));+ let labels: Vec<(String, String, Pt)> = list("labels").iter().filter_map(|l| Some((l["text"].as_str()?.to_string(), l["kind"].as_str().unwrap_or("local").to_string(), pt(&l["at"])?))).collect();+ let pins: Vec<(String, Pt)> = list("pins").iter().filter_map(|p| Some((format!("{}.{}", p["ref"].as_str()?, p["number"].as_str().map(String::from).or_else(|| p["number"].as_i64().map(|n| n.to_string()))?), pt(&p["at"])?))).collect();+ let near = |p: Pt, q: Pt| d2(p, q) <= TOL;+ // dangling wire ends+ for (i, (a, b)) in wires.iter().enumerate() {+ for e in [*a, *b] {+ let joined = pins.iter().any(|x| near(e, x.1)) || labels.iter().any(|x| near(e, x.2)) || junctions.iter().any(|j| near(e, *j)) || ncs.iter().any(|n| near(e, *n))+ || wires.iter().enumerate().any(|(k, (c, d))| k != i && (near(e, *c) || near(e, *d) || (on_seg(e, *c, *d) <= TOL && junctions.iter().any(|j| near(e, *j)))));+ if joined { continue; }+ let mut cand: Vec<(f64, String, Pt)> = pins.iter().map(|x| (d2(e, x.1), format!("pin {}", x.0), x.1)).chain(labels.iter().map(|x| (d2(e, x.2), format!("label {}", x.0), x.2))).filter(|c| c.0 <= 1.27).collect();+ cand.sort_by(|x, y| x.0.total_cmp(&y.0));+ let hint = cand.first().map(|c| format!("; {} is {} mm away at ({}, {})", c.1, r2(c.0), r2(c.2 .0), r2(c.2 .1))).unwrap_or_default();+ out.push(json!({"check": "dangling_wire_end", "sheet": name, "at": [r2(e.0), r2(e.1)], "refs": [], "nets": [],+ "message": format!("Wire end at ({}, {}) connects to nothing{hint}", r2(e.0), r2(e.1)),+ "fix": "Extend the wire onto the pin or label it was meant for (a pin's end, not its middle), or delete the stub."}));+ }+ }+ // labels touching no wire or pin+ for (text, kind, at) in &labels {+ if wires.iter().any(|(a, b)| on_seg(*at, *a, *b) <= TOL) || pins.iter().any(|p| near(*at, p.1)) { continue; }+ out.push(json!({"check": "floating_label", "sheet": name, "at": [r2(at.0), r2(at.1)], "refs": [], "nets": [text], "kind": kind,+ "message": format!("Label {text} at ({}, {}) touches no wire or pin", r2(at.0), r2(at.1)),+ "fix": "Move the label onto its wire (its anchor point must sit on the wire), or delete it: a label off its wire names nothing."}));+ }+ // symbols drawn over each other (more than 0.1 mm both ways)+ let syms: Vec<(String, [f64; 4])> = list("symbols").iter().filter_map(|s| {+ let b = s["box"].as_array()?;+ let v: Vec<f64> = b.iter().filter_map(|x| x.as_f64()).collect();+ (v.len() == 4).then(|| (s["ref"].as_str().unwrap_or("").to_string(), [v[0].min(v[2]), v[1].min(v[3]), v[0].max(v[2]), v[1].max(v[3])]))+ }).collect();+ for i in 0..syms.len() {+ for j in i + 1..syms.len() {+ let (a, b) = (&syms[i].1, &syms[j].1);+ let (ox, oy) = (a[2].min(b[2]) - a[0].max(b[0]), a[3].min(b[3]) - a[1].max(b[1]));+ if ox > 0.1 && oy > 0.1 {+ out.push(json!({"check": "overlap", "sheet": name, "refs": [syms[i].0, syms[j].0], "nets": [],+ "message": format!("{} and {} overlap", syms[i].0, syms[j].0),+ "fix": "Move one of them (sch_edit moveBy) so their bodies and pins are apart; overlapping pins can join nets by accident."}));+ }+ }+ }+ }+ out+}++/// schematic_review: input {sheetParts, netlist, sheetDrawing?}. The netlist companion is {nets: {net: ["U1.8", ...]}, names?: {net:+/// [every label or port name joined into it]}} (or the nets map). sheetDrawing (see drawing_checks) adds the checks+/// that need the drawing; without it they are listed in `unread`. Parts may carry value (or comment), libRef (or libId) /// and unit, which the design checks use. pub fn schematic_review(input: &Value) -> Value { let Some(parts) = sheet_parts(input) else { return crate::input::refuse("bad_args", "pass the sheets' parts (read_sheet_file with pins, every sheet) as sheetParts") };@@ -396,6 +466,15 @@ pub fn schematic_review(input: &Value) -> Value { } } }+ // the checks that need the drawing, when the bridge sends it+ match crate::input::part(input, "sheetDrawing") {+ Some(d) => {+ let sheets = d.get("sheets").or(Some(&d)).and_then(|x| x.as_array()).cloned().unwrap_or_default();+ for f in drawing_checks(&sheets) { out["warnings"].as_array_mut().unwrap().push(f); }+ out["drawingChecked"] = json!(true);+ }+ None => { out["drawingChecked"] = json!(false); out["unread"] = json!(["dangling_wire_end", "floating_label", "overlap"]); }+ } out["success"] = json!(true); out["_hint"] = json!("errors stop a board (a power pin on no net, two outputs on one net, a floating reset or enable, a designator unannotated or used twice); warnings deserve a look (pins on no net, one-pin nets, inputs nothing drives, an IC supply with no capacitor to ground, I2C with no pull-up, an LED with no resistor, a regulator without its capacitors, a no-connect flag on a wired pin, two names on one net); infos are gaps (a rail with no bulk capacitor). Each design finding has message and fix. Pin types come from the symbols: a passive pin is never 'undriven'. Fix on the sheets (sch_connect, sch_place_part), then update_pcb."); out@@ -420,6 +499,28 @@ mod tests { json!({"designator": des, "pins": pins.iter().map(|(n, nm, e)| json!({"number": n, "name": nm, "electrical": e})).collect::<Vec<_>>()}) } + #[test]+ fn the_drawing_checks_find_kicads_examples() {+ let sheet = json!({"sheet": "/", "wires": [{"a": [101.6, 76.2], "b": [127.0, 76.2]}, {"a": [127.0, 76.2], "b": [127.0, 90.0]}, {"a": [60.0, 40.0], "b": [80.0, 40.0]}],+ "junctions": [], "noConnects": [],+ "labels": [{"text": "SDA", "kind": "local", "at": [120.65, 63.5]}, {"text": "SCL", "kind": "local", "at": [70.0, 40.0]}],+ "pins": [{"ref": "U1", "number": "3", "at": [101.6, 75.89]}, {"ref": "R1", "number": "1", "at": [127.0, 90.0]}, {"ref": "R1", "number": "2", "at": [80.0, 40.0]}],+ "symbols": [{"ref": "R3", "box": [10.0, 10.0, 20.0, 15.0]}, {"ref": "C7", "box": [18.0, 12.0, 25.0, 18.0]}, {"ref": "C8", "box": [20.0, 30.0, 25.0, 35.0]}]});+ let f = drawing_checks(&[sheet]);+ let msgs: Vec<&str> = f.iter().map(|x| x["message"].as_str().unwrap()).collect();+ // the wire's left end misses U1.3 by 0.31 mm; the far-left wire starts at (60, 40) on nothing; SDA floats; SCL+ // sits on its wire's middle, so it is fine+ assert!(msgs.contains(&"Wire end at (101.6, 76.2) connects to nothing; pin U1.3 is 0.31 mm away at (101.6, 75.89)"), "{msgs:#?}");+ assert!(msgs.contains(&"Wire end at (60, 40) connects to nothing"), "{msgs:#?}");+ assert!(msgs.contains(&"Label SDA at (120.65, 63.5) touches no wire or pin"));+ assert!(!msgs.iter().any(|m| m.contains("SCL")));+ assert!(msgs.contains(&"R3 and C7 overlap") && !msgs.iter().any(|m| m.contains("C8")));+ assert_eq!(f.len(), 4, "{msgs:#?}");+ // without the drawing the three checks are listed unread+ let r = schematic_review(&json!({"sheetParts": [], "netlist": {"nets": {}}}));+ assert_eq!(r["unread"], json!(["dangling_wire_end", "floating_label", "overlap"]));+ }+ #[test] fn the_design_checks_find_kicads_examples() { let p = |des: &str, lib: &str, value: &str, pins: &[(&str, &str, &str)]| json!({"designator": des, "libRef": lib, "value": value,
dev-skills/altium-bridge-test/run_verb_tests.py+4−1@@ -383,7 +383,10 @@ def matrix(w): and isinstance(d.get("issues"), list) and (d.get("orderForm") or {}).get("layers") == 2) # 0.2.75: reviews, pair routing, thermal vias, the board report, placement, classes and length tuning on the lane M["schematic_review"] = dict(phase=3.5, timeout=340, **ok(projectPath=LP),- check=lambda d: (d.get("pins") or 0) > 0 and isinstance(d.get("warnings"), list) and isinstance(d.get("decoupling"), list))+ check=lambda d: (d.get("pins") or 0) > 0 and isinstance(d.get("warnings"), list) and isinstance(d.get("decoupling"), list)+ # 0.2.87: every sheet's drawing read, so the drawing checks ran (none listed as unread)+ and not [u for u in d.get("unreadSheets") or [] if "drawing" in u]+ and "dangling_wire_end" not in str(d.get("unread") or "")) M["pin_pad_check"] = dict(phase=3.5, timeout=220, **ok(projectPath=LP, pcbPath=LB), check=lambda d: (d.get("partsChecked") or 0) >= 1) M["placement_check"] = dict(phase=3.5, timeout=200, **ok(filePath=LB), check=lambda d: (d.get("parts") or 0) >= 1 and isinstance(d.get("offOrOverEdge"), list)) M["auto_classes"] = dict(phase=3.5, timeout=200, **ok(filePath=LB), check=lambda d: d.get("applied") is False and "GND" in ((d.get("proposal") or {}).get("classes") or {}))
package.json+5−2@@ -1,6 +1,6 @@ { "slug": "altium-bridge",- "version": "0.2.86",+ "version": "0.2.87", "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": [@@ -275,7 +275,10 @@ "apply several schematic edits at once in altium", "undo a batch of altium schematic changes", "altium messages panel warnings",- "what did altium complain about"+ "what did altium complain about",+ "check my altium schematic for dangling wires",+ "altium schematic label not on a wire",+ "overlapping symbols altium schematic" ], "discovery_pitch": "An AI that runs Altium Designer in the user's own session: libraries, schematics, Update PCB, stack-up, routing, DRC, Gerbers and BOMs.", "sample_prompts": [
page.json+5−2@@ -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.86",+ "version": "0.2.87", "hero": { "type": "image", "path": "screenshots/hero.png"@@ -267,7 +267,10 @@ "apply several schematic edits at once in altium", "undo a batch of altium schematic changes", "altium messages panel warnings",- "what did altium complain about"+ "what did altium complain about",+ "check my altium schematic for dangling wires",+ "altium schematic label not on a wire",+ "overlapping symbols altium schematic" ], "discovery_pitch": "An AI that runs Altium Designer in the user's own session: libraries, schematics, Update PCB, stack-up, routing, DRC, Gerbers and BOMs.", "metadata": {},
src/BRIDGE_VERSION+1−1@@ -1 +1 @@-0.2.86+0.2.87
src/agent/AdomAgent.pas.tmpl+28−1@@ -9389,6 +9389,11 @@ Var En : ISch_SheetEntry; S, P, V, En2 : String; J, Dir, HX, HY : Integer;+ BL, BB, BR, BT : Integer;+ HasB : Boolean;+ GIt : ISch_Iterator;+ G : ISch_GraphicalObject;+ R : TCoordRect; Begin Doc := SchServer.GetCurrentSchDocument; If (Doc = Nil) Or (Doc.ObjectID = eSchLib) Then Begin Result := '{' + JRaw('ok','false') + ',' + JStr('errorCode','no_current_schematic') + ',' + JStr('error','no current schematic sheet (open a .SchDoc first)') + '}'; Exit; End;@@ -9404,6 +9409,23 @@ Begin If Obj.ObjectID = eSchComponent Then Begin C := Obj;+ { the symbol's box (sheetDrawing): its pins and the body drawn for the part and display mode it shows,+ never its designator or comment }+ HasB := False; BL := 0; BB := 0; BR := 0; BT := 0;+ GIt := C.SchIterator_Create;+ GIt.AddFilter_ObjectSet(MkSet(eRectangle, eRoundRectangle, eLine, ePolyline, ePolygon, eArc, eEllipse, eEllipticalArc, ePie, eBezier));+ G := GIt.FirstSchObject;+ While G <> Nil Do+ Begin+ If ((G.OwnerPartId = C.CurrentPartID) Or (G.OwnerPartId = 0)) And (G.OwnerPartDisplayMode = C.DisplayMode) Then+ Begin+ R := G.BoundingRectangle;+ If Not HasB Then Begin BL := R.Left; BB := R.Bottom; BR := R.Right; BT := R.Top; HasB := True; End+ Else Begin If R.Left < BL Then BL := R.Left; If R.Bottom < BB Then BB := R.Bottom; If R.Right > BR Then BR := R.Right; If R.Top > BT Then BT := R.Top; End;+ End;+ G := GIt.NextSchObject;+ End;+ C.SchIterator_Destroy(GIt); PIt := C.SchIterator_Create; PIt.AddFilter_ObjectSet(MkSet(ePin)); Pin := PIt.FirstSchObject;@@ -9417,6 +9439,10 @@ Begin Else If Dir = 1 Then HY := HY + Pin.PinLength Else If Dir = 2 Then HX := HX - Pin.PinLength Else HY := HY - Pin.PinLength;+ If Not HasB Then Begin BL := HX; BB := HY; BR := HX; BT := HY; HasB := True; End;+ If HX < BL Then BL := HX; If HX > BR Then BR := HX; If HY < BB Then BB := HY; If HY > BT Then BT := HY;+ If Pin.Location.X < BL Then BL := Pin.Location.X; If Pin.Location.X > BR Then BR := Pin.Location.X;+ If Pin.Location.Y < BB Then BB := Pin.Location.Y; If Pin.Location.Y > BT Then BT := Pin.Location.Y; If P <> '' Then P := P + ','; P := P + '["' + JsonEsc(C.Designator.Text) + '","' + JsonEsc(Pin.Designator) + '","' + JsonEsc(Pin.Name) + '",' + I2S(Pin.Electrical) + ',' + I2S(HX) + ',' + I2S(HY) + ',' + I2S(Dir) + ',' + JBool(Pin.IsHidden) + ',' +@@ -9429,7 +9455,8 @@ Begin S := S + '{"t":"C","key":"","ref":"' + JsonEsc(C.Designator.Text) + '","x":' + I2S(C.Location.X) + ',"y":' + I2S(C.Location.Y) + ',"lib":"' + JsonEsc(C.LibReference) + '","libPath":"' + JsonEsc(C.LibraryPath) + '","part":' + I2S(C.CurrentPartID) + ',"rot":' + I2S(C.Orientation) + ',"mirror":' + JBool(C.IsMirrored) + ',"des":[' + I2S(C.Designator.Location.X) + ',' + I2S(C.Designator.Location.Y) + ',' + I2S(C.Designator.Orientation) + ',' + I2S(C.Designator.Justification) + ']' +- ',"cmt":[' + I2S(C.Comment.Location.X) + ',' + I2S(C.Comment.Location.Y) + ',' + I2S(C.Comment.Orientation) + ',' + I2S(C.Comment.Justification) + ']}';+ ',"cmt":[' + I2S(C.Comment.Location.X) + ',' + I2S(C.Comment.Location.Y) + ',' + I2S(C.Comment.Orientation) + ',' + I2S(C.Comment.Justification) + ']' ++ ',"box":[' + I2S(BL) + ',' + I2S(BB) + ',' + I2S(BR) + ',' + I2S(BT) + ']}'; End Else Begin
src/bridge.json+1−1@@ -2,7 +2,7 @@ "manifest_version": 1, "name": "altium", "displayName": "Altium Designer",- "version": "0.2.86",+ "version": "0.2.87", "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",