← Commit history
CHANGELOG.md+8
@@ -1,5 +1,13 @@ # Changelog +## 0.2.110++- **New verb `altium_gloss`: tidy routing with Altium's own Gloss** (Route > Gloss Selected). Name the nets (`nets`) and it shortens their routes and removes corners within the board's rules, pours the board again, and answers what changed: each net's length, pieces and corners before and after (`nets[]`), and a DRC comparison (`drc.new`, `drc.clean`). `dryRun:true` says what would be glossed and changes nothing.+- **It leaves alone what Gloss would spoil.** By default (`protect`) every net in a differential pair and every net a length or matched-length rule governs, even in part, is left out (`protected`). Locked tracks are left as they are. `all:true` glosses every routed net, but a net tuned for length with no rule behind it cannot be told from the board, so `exclude` it or lock its tracks.+- Only tracks at multiples of 45 degrees are glossed: Altium leaves the others as they are, and the reply lists them (`offAngle`).+- Gloss cannot be undone from a script: the board is left unsaved, so reopening it without saving goes back, and `altium_save` keeps it.+- Tested on Altium Designer 26.11.1: a test board's detour went from 40.8 to 16.1 mm (6 corners to 4) with DRC clean, a locked net was left alone, and an off-angle piece was reported and kept. On Altium's SODIMM example, `all:true` protected 144 length-ruled and 36 differential-pair nets and shortened 49 others by 658 mm with no length-matching violation. The only new DRC entries there were the example's pours shorting two mounting holes, which any repour of that board does on Altium 26. Altium Designer Develop has the same Gloss command.+ ## 0.2.109  - **`altium_routing_drc` checks the board you name.** `filePath` was ignored, so the board in front was checked and its violations came back as the named board's. It now opens the named board first.
README.md+5−4
@@ -15,7 +15,7 @@ normal session. Ask in plain words and it: - makes the outputs: Gerbers, NC drill, pick and place, BOMs grouped by MPN (JLCPCB, Mouser, DigiKey files),   schematic PDF and STEP, checking that the outline and every copper layer reached the Gerbers -281 commands, tested on Altium Designer 26.11 and Altium Designer Develop. It runs in **Hydrogen**, Adom's free+282 commands, tested on Altium Designer 26.11 and Altium Designer Develop. It runs in **Hydrogen**, Adom's free desktop app, through Adom Bridge. You bring your own AI subscription and your own Altium licence.  ::youtube{id="dFecpcIzdSE" title="An AI designs a 12 V to 5 V buck converter in Altium Designer"}@@ -29,7 +29,7 @@ and the verb prefix `altium_`.  ## What it can do -Tested on Altium Designer 26.11.1 and Altium Designer Develop. 281 verbs; each row names the ones+Tested on Altium Designer 26.11.1 and Altium Designer Develop. 282 verbs; each row names the ones behind it (prefix `altium_`).  | Area | What the AI can do | Verbs |@@ -70,7 +70,7 @@ This bridge is the reference for the [EDA Bridge Standard](https://wiki.adom.inc  Altium Designer is the user's own **host app**. The bridge finds an installed Altium (`%ProgramFiles%\Altium\AD*\X2.EXE`, Designer or Develop), starts it in the background, runs a small-**DelphiScript agent** inside it, and gives the AI 281 `altium_*` verbs.+**DelphiScript agent** inside it, and gives the AI 282 `altium_*` verbs.  - **Page and docs:** https://wiki.adom.inc/adom/altium-bridge - **Bridge SDK:** https://wiki.adom.inc/adom/adom-bridge-sdk@@ -170,7 +170,7 @@ way to read it). A stopped engine is restarted with `altium_agent_recover`.  <!-- verbs:start (tools/readme_verbs.py writes this list) --> -All 281 verbs, by area (prefix `altium_`). `altium_describe` returns the live catalog with every input, output, hint and example.+All 282 verbs, by area (prefix `altium_`). `altium_describe` returns the live catalog with every input, output, hint and example.  ### Running Altium: launch, close, health, dialogs @@ -338,6 +338,7 @@ All 281 verbs, by area (prefix `altium_`). `altium_describe` returns the live ca - `altium_pour_state`: Every polygon pour with the copper it actually poured: filled area per pour and per layer, and the pours that poured nothing. - `altium_remove_pours`: Delete polygon pours by net (and layer), or all of them, and the pour keepouts (cutouts) apply_pours made. - `altium_repour`: Repour every polygon on the board (Altium's Repour All) and answer the copper after.+- `altium_gloss`: Gloss the routing of the nets you name with Altium's own Gloss (Route > Gloss Selected): shorter routes with fewer corners, within the board's rules. - `altium_routing_drc`: Design-rule violations on the current board (or filePath, opened first) WITH locations, plus the unrouted (ratsnest) count, as one clean/not-clean answer. - `altium_build_board`: Build a NEW board from a parts list and a netlist: outline (rounded corners allowed), every footprint from one PcbLib placed by its own origin, pad nets assigned, saved; then read back pin by pin. - `altium_set_outline`: Reshape the current board's outline (a rectangle with rounded corners, or a polygon).
bridge-rs/src/gloss.rsadded+240
@@ -0,0 +1,240 @@+//! altium_gloss: Altium's own Gloss (Route > Gloss Selected) on the nets asked for, with the routing it must not touch+//! left out, the pours poured again after, and what changed measured (length and corners per net, DRC before and after).+//! Measured on Altium Designer 26.11.1 (2026-11-25): Gloss acts only on tracks at 90/45-degree steps, straightens length+//! tuning (79 matched-length violations on Altium's SODIMM example when every track was taken), runs tracks into pours+//! until they are poured again, and cannot be undone from a script. So the board is left unsaved, and reopening it+//! without saving is the way back.+use serde_json::{json, Value};+use std::collections::{BTreeMap, BTreeSet};+use std::time::{Duration, Instant};++fn f(v: &Value) -> f64 {+    v.as_f64().unwrap_or(0.0)+}++fn r3(v: f64) -> f64 {+    (v * 1000.0).round() / 1000.0+}++/// One net's routing: length (mm), track and arc pieces, and corners (where two straight pieces of the net meet end to+/// end at an angle).+#[derive(Debug, Default, Clone, PartialEq)]+pub struct NetRoute {+    pub length: f64,+    pub segments: usize,+    pub corners: usize,+}++/// Every routed net's length, pieces and corners, from a routing_state board model. Pure.+pub fn net_routes(st: &Value) -> BTreeMap<String, NetRoute> {+    let mut out: BTreeMap<String, NetRoute> = BTreeMap::new();+    // the directions of the straight pieces meeting at each end point, per net and layer+    let mut ends: BTreeMap<(String, String, i64, i64), Vec<(f64, f64)>> = BTreeMap::new();+    let key = |x: f64, y: f64| ((x * 1000.0).round() as i64, (y * 1000.0).round() as i64);+    for t in st["tracks"].as_array().cloned().unwrap_or_default() {+        let Some(net) = t["net"].as_str().filter(|n| !n.is_empty()) else { continue };+        let (x0, y0, x1, y1) = (f(&t["start"]["x"]), f(&t["start"]["y"]), f(&t["end"]["x"]), f(&t["end"]["y"]));+        let len = ((x1 - x0).powi(2) + (y1 - y0).powi(2)).sqrt();+        let e = out.entry(net.to_string()).or_default();+        e.length += len;+        e.segments += 1;+        if len < 1e-6 { continue; }+        let layer = t["layer"].as_str().unwrap_or("").to_string();+        let (ux, uy) = ((x1 - x0) / len, (y1 - y0) / len);+        let (a, b) = (key(x0, y0), key(x1, y1));+        ends.entry((net.to_string(), layer.clone(), a.0, a.1)).or_default().push((ux, uy));+        ends.entry((net.to_string(), layer, b.0, b.1)).or_default().push((-ux, -uy));+    }+    for a in st["arcs"].as_array().cloned().unwrap_or_default() {+        let Some(net) = a["net"].as_str().filter(|n| !n.is_empty()) else { continue };+        let mut sweep = f(&a["endAngle"]) - f(&a["startAngle"]);+        if sweep <= 0.0 { sweep += 360.0; }+        let e = out.entry(net.to_string()).or_default();+        e.length += f(&a["radius"]) * sweep.to_radians();+        e.segments += 1;+    }+    for ((net, _, _, _), dirs) in ends {+        // a corner: exactly two pieces meet and do not carry straight on+        if dirs.len() == 2 {+            let dot = dirs[0].0 * dirs[1].0 + dirs[0].1 * dirs[1].1;+            if dot > -0.9998 { out.entry(net).or_default().corners += 1; }+        }+    }+    for v in out.values_mut() { v.length = r3(v.length); }+    out+}++/// The tracks of these nets Gloss will not touch because they do not run at a multiple of 45 degrees, counted per net.+/// Pure.+pub fn off_angle(st: &Value, nets: &BTreeSet<String>) -> BTreeMap<String, usize> {+    let mut out = BTreeMap::new();+    for t in st["tracks"].as_array().cloned().unwrap_or_default() {+        let Some(net) = t["net"].as_str().filter(|n| nets.contains(&n.to_uppercase())) else { continue };+        let (dx, dy) = (f(&t["end"]["x"]) - f(&t["start"]["x"]), f(&t["end"]["y"]) - f(&t["start"]["y"]));+        if (dx * dx + dy * dy).sqrt() < 0.01 { continue; }+        let deg = dy.atan2(dx).to_degrees().rem_euclid(45.0);+        if deg.min(45.0 - deg) > 0.5 { *out.entry(net.to_string()).or_insert(0) += 1; }+    }+    out+}++fn drc_key(v: &Value) -> String {+    let mut objs: Vec<String> = v["objects"].as_array().cloned().unwrap_or_default().iter().filter_map(|o| o.as_str().map(str::to_string)).collect();+    objs.sort();+    format!("{}|{}", v["rule"].as_str().unwrap_or(""), objs.join("|"))+}++/// Violations after that were not there before, and those before that are gone. Pure.+pub fn drc_diff(before: &[Value], after: &[Value]) -> (Vec<Value>, Vec<Value>) {+    let b: BTreeSet<String> = before.iter().map(drc_key).collect();+    let a: BTreeSet<String> = after.iter().map(drc_key).collect();+    (after.iter().filter(|v| !b.contains(&drc_key(v))).cloned().collect(),+     before.iter().filter(|v| !a.contains(&drc_key(v))).cloned().collect())+}++fn names(args: &Value, k: &str) -> Vec<String> {+    match &args[k] {+        Value::Array(a) => a.iter().filter_map(|v| v.as_str().map(|s| s.trim().to_string())).filter(|s| !s.is_empty()).collect(),+        Value::String(s) => s.split([',', ';']).map(|x| x.trim().to_string()).filter(|x| !x.is_empty()).collect(),+        _ => Vec::new(),+    }+}++fn drc(full: bool) -> Value {+    crate::routing::routing_drc(&json!({"full": full}))+}++fn effort() -> Value {+    let r = crate::prefs::preferences(&json!({"key": "AdvPCB/SystemOptions/EffortForGlossRetrace"}));+    r["current"]["AdvPCB/SystemOptions/EffortForGlossRetrace"].clone()+}++/// altium_gloss {nets?, all?, exclude?, protect?, repour?, dryRun?, filePath?}+pub fn gloss(args: &Value) -> Value {+    if let Some(g) = crate::support::need_licensed() { return g; }+    if let Some(b) = crate::support::s(args, "filePath").filter(|p| p.to_lowercase().ends_with(".pcbdoc")) {+        if let Some(e) = crate::support::must_open(&b, 60) { return e; }+    }+    let all = args["all"].as_bool() == Some(true);+    let nets = names(args, "nets");+    let exclude = names(args, "exclude");+    if !all && nets.is_empty() {+        return json!({"success": false, "errorCode": "bad_args", "error": "name the nets to gloss (nets), or pass all:true for every routed net",+            "_hint": "Gloss straightens length tuning: on a board with tuned nets, name the nets you routed rather than all:true."});+    }+    let protect = args["protect"].as_bool() != Some(false);+    let dry = args["dryRun"].as_bool() == Some(true);+    let t0 = Instant::now();+    let st0 = crate::routing::routing_state(&json!({}));+    if st0["success"] != json!(true) { return st0; }+    let known: BTreeSet<String> = st0["nets"].as_array().cloned().unwrap_or_default().iter().filter_map(|n| n.as_str().map(|s| s.to_uppercase())).collect();+    let unknown: Vec<&String> = nets.iter().filter(|n| !known.contains(&n.to_uppercase())).collect();+    if !unknown.is_empty() {+        return json!({"success": false, "errorCode": "no_such_net", "error": format!("not nets on this board: {}", unknown.iter().map(|s| s.as_str()).collect::<Vec<_>>().join(", ")), "unknownNets": unknown});+    }+    let mut payload: Vec<String> = nets.clone();+    payload.extend(exclude.iter().map(|n| format!("X|{n}")));+    let mut params: Vec<(&str, String)> = Vec::new();+    if all { params.push(("all", "1".into())); }+    if protect { params.push(("protect", "1".into())); }+    if dry { params.push(("dry", "1".into())); }+    let sel = crate::agent::call("gloss_select", &params, Some(&payload.join("\n")), Duration::from_secs(300));+    let Some(sd) = sel.get("data").filter(|d| d["ok"] == json!(true)).cloned() else { return sel };+    let protected_nets: BTreeSet<String> = ["lengthNets", "pairNets"].iter()+        .flat_map(|k| sd[*k].as_array().cloned().unwrap_or_default()).filter_map(|v| v.as_str().map(|s| s.to_uppercase())).collect();+    let ex: BTreeSet<String> = exclude.iter().map(|s| s.to_uppercase()).collect();+    let taken: BTreeSet<String> = if all { known.iter().cloned().collect() } else { nets.iter().map(|s| s.to_uppercase()).collect() };+    let taken: BTreeSet<String> = taken.into_iter().filter(|n| !ex.contains(n) && !protected_nets.contains(n)).collect();+    let skipped = off_angle(&st0, &taken);+    let protected = json!({"lengthRuled": sd["lengthNets"], "differentialPairs": sd["pairNets"], "lockedTracks": sd["lockedTracks"], "lockedOn": sd["lockedNets"]});+    let selected = sd["selected"].as_i64().unwrap_or(0);+    if dry || selected == 0 {+        return json!({"success": true, "dryRun": dry, "glossed": false, "tracksSelected": selected, "protected": protected,+            "offAngle": skipped, "excluded": exclude, "glossEffort": effort(),+            "_hint": if selected == 0 { "No track of these nets can be glossed (all protected, excluded or not routed); nothing changed." }+                     else { "Nothing changed. These tracks would be glossed; offAngle lists tracks Gloss leaves alone because they are not at a multiple of 45 degrees." }});+    }+    let before_drc = drc(true);+    let run = crate::agent::call("run_process", &[("process", "PCB:Gloss".into()), ("params", "Track=True".into())], None, Duration::from_secs(600));+    if run.get("data").and_then(|d| d.get("ok")) != Some(&json!(true)) {+        return json!({"success": false, "errorCode": "gloss_failed", "error": "Altium's Gloss did not run", "run": run, "protected": protected});+    }+    let pours = st0["counts"]["polygons"].as_i64().unwrap_or(0) > 0;+    let repoured = if pours && args["repour"].as_bool() != Some(false) {+        let r = crate::routing::repour(&json!({}));+        json!(r["success"] == json!(true))+    } else { Value::Null };+    let st1 = crate::routing::routing_state(&json!({}));+    let mut after_drc = drc(true);+    // a read straight after a repour once answered 0 on a board with 91 violations: a clean answer then is read again+    if !repoured.is_null() && after_drc["errors"].as_i64() == Some(0) && before_drc["errors"].as_i64().unwrap_or(0) > 0 {+        std::thread::sleep(Duration::from_secs(2));+        after_drc = drc(true);+    }+    let (r0, r1) = (net_routes(&st0), net_routes(&st1));+    let mut changed = Vec::new();+    let (mut l0, mut l1) = (0.0, 0.0);+    for (n, a) in &r0 {+        if !taken.contains(&n.to_uppercase()) { continue; }+        let b = r1.get(n).cloned().unwrap_or_default();+        l0 += a.length; l1 += b.length;+        if (a.length - b.length).abs() > 0.001 || a.segments != b.segments || a.corners != b.corners {+            changed.push(json!({"net": n, "lengthMm": [a.length, b.length], "segments": [a.segments, b.segments], "corners": [a.corners, b.corners]}));+        }+    }+    changed.sort_by(|a, b| {+        let d = |v: &Value| f(&v["lengthMm"][1]) - f(&v["lengthMm"][0]);+        d(a).partial_cmp(&d(b)).unwrap_or(std::cmp::Ordering::Equal)+    });+    let arr = |v: &Value| v["violations"].as_array().cloned().unwrap_or_default();+    let (new, cleared) = drc_diff(&arr(&before_drc), &arr(&after_drc));+    let unconnected = (st0["unconnected"].clone(), st1["unconnected"].clone());+    let connections_lost = unconnected.1.as_i64().unwrap_or(0) > unconnected.0.as_i64().unwrap_or(0);+    json!({"success": true, "glossed": true, "tracksSelected": selected, "netsChanged": changed.len(), "nets": changed,+        "totalLengthMm": [r3(l0), r3(l1)], "protected": protected, "offAngle": skipped, "excluded": exclude,+        "repoured": repoured, "unconnected": [unconnected.0, unconnected.1],+        "drc": {"before": before_drc["errors"], "after": after_drc["errors"], "new": new, "cleared": cleared.len(), "clean": new.is_empty() && !connections_lost},+        "glossEffort": effort(), "revision": st1["revision"], "saved": false, "durationMs": t0.elapsed().as_millis() as u64,+        "undo": "Gloss cannot be undone from a script: the board is left unsaved, so reopen it without saving to go back (altium_close_document, then open it again). altium_save keeps the result.",+        "_hint": if new.is_empty() && !connections_lost { "Glossed: nets[] gives each changed net's length, pieces and corners before and after, and DRC found nothing new. offAngle lists tracks left alone because they are not at a multiple of 45 degrees. The board is unsaved: altium_save keeps it." }+                 else { "Glossed, but DRC found new violations (drc.new) or connections were lost (unconnected): check them; reopening the board without saving undoes the gloss." }})+}++#[cfg(test)]+mod tests {+    use super::*;++    fn tr(net: &str, a: (f64, f64), b: (f64, f64)) -> Value {+        json!({"net": net, "layer": "F.Cu", "start": {"x": a.0, "y": a.1}, "end": {"x": b.0, "y": b.1}})+    }++    #[test]+    fn a_route_is_measured_by_length_pieces_and_corners() {+        // a U-shaped detour: up, across, down, with one straight joint in the middle of the top run+        let st = json!({"tracks": [tr("N1", (0.0, 0.0), (0.0, 5.0)), tr("N1", (0.0, 5.0), (5.0, 5.0)), tr("N1", (5.0, 5.0), (10.0, 5.0)),+                                   tr("N1", (10.0, 5.0), (10.0, 0.0)), tr("GND", (0.0, 0.0), (3.0, 3.0))], "arcs": []});+        let r = net_routes(&st);+        assert_eq!(r["N1"], NetRoute { length: 20.0, segments: 4, corners: 2 }, "the straight joint is not a corner");+        assert_eq!(r["GND"].corners, 0);+    }++    #[test]+    fn tracks_off_the_45_degree_steps_are_found() {+        let st = json!({"tracks": [tr("N1", (0.0, 0.0), (1.0, 3.0)), tr("N1", (0.0, 0.0), (3.0, 3.0)), tr("N1", (0.0, 0.0), (0.0, 4.0)), tr("N2", (0.0, 0.0), (2.0, 7.0))]});+        let nets: BTreeSet<String> = ["N1".to_string()].into_iter().collect();+        let off = off_angle(&st, &nets);+        assert_eq!(off.get("N1"), Some(&1), "only the 71-degree piece of N1");+        assert!(off.get("N2").is_none(), "a net not asked for is not reported");+    }++    #[test]+    fn drc_is_compared_by_rule_and_objects() {+        let v = |rule: &str, o: &[&str]| json!({"rule": rule, "objects": o});+        let before = vec![v("Clearance", &["Track A", "Pad B"]), v("ShortCircuit", &["P", "Q"])];+        let after = vec![v("Clearance", &["Pad B", "Track A"]), v("MatchedLengths_BL0", &["x", "y"])];+        let (new, cleared) = drc_diff(&before, &after);+        assert_eq!(new.len(), 1);+        assert_eq!(new[0]["rule"], json!("MatchedLengths_BL0"));+        assert_eq!(cleared.len(), 1, "the short is gone; the clearance pair is the same in either order");+    }+}
bridge-rs/src/main.rs+2−1
@@ -8,6 +8,7 @@ mod dsnwrk; mod assembly; mod installs; mod keepouts;+mod gloss; mod autoclass; mod board; mod bodies;@@ -83,7 +84,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.109";+pub const BRIDGE_VERSION: &str = "0.2.110";  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/verbs.rs+7−1
@@ -22,7 +22,7 @@ pub const KNOWN: &[&str] = &[     "list_nets", "net_connections", "layers", "copper_layers", "read_rules",     "set_layer_visibility", "footprint_primitives", "schematic_data", "layer_stack", "net_classes", "diff_pairs", "board_outline", "set_track_width", "find_space", "selection", "check_orientation", "replicate_layout", "outjob_info", "find_symbol", "part_parameters",     // the live-board lane AI Flow drives-    "sch_no_connect", "sch_label", "sch_wire", "edit_tracks", "select_items", "preferences", "extensions", "cancel_run", "physical_properties", "model_check", "place_parts", "routing_state", "route_net", "plan_route", "move_parts", "place_decoupling", "plan_fanout", "estimate_cost", "simulate", "export_spice", "update_footprints_from_library", "lint_library", "export_pos", "verb_times", "prewarm", "render_board", "log_tail", "sch_batch", "import_step", "edit_pours", "export_3d", "tool_update", "import_design", "export_library_part", "create_part_project", "library_views", "render_board_3d", "render_board_layers", "document_info", "close_all_documents", "project_info", "project_create", "project_rename", "project_snapshot", "cross_probe", "read_footprint", "export_odb", "export_ipc2581", "export_ipc356", "export_dxf", "export_gencad", "import_svg", "edit_footprint", "generate_body", "remove_parts", "edit_parts", "align_parts", "set_layer_count", "copy_routing", "check_clearance", "remove_graphics", "place_vias", "board_features", "sch_sheet_symbol", "netlist", "silkscreen_prep", "net_lengths", "teardrops", "component_classes", "read_sheet_file", "fab_check", "panelize", "impedance", "current_capacity", "height_check", "bodies", "copper_balance", "return_path", "silk_designators", "via_fence", "assembly_check", "jlcpcb_order", "schematic_review", "pin_pad_check", "route_pair", "thermal_vias", "board_report", "placement_check", "auto_classes", "length_tune", "remove_items", "ripup_nets", "apply_pours", "pour_state", "remove_pours", "repour", "routing_drc", "build_board", "set_outline", "set_design_rules", "zoom_to", "add_rule", "build_schematic", "export_manufacturing", "select_net", "silk_state", "apply_silkscreen",+    "sch_no_connect", "sch_label", "sch_wire", "edit_tracks", "select_items", "preferences", "extensions", "cancel_run", "physical_properties", "model_check", "place_parts", "routing_state", "route_net", "plan_route", "move_parts", "place_decoupling", "plan_fanout", "estimate_cost", "simulate", "export_spice", "update_footprints_from_library", "lint_library", "export_pos", "verb_times", "prewarm", "render_board", "log_tail", "sch_batch", "import_step", "edit_pours", "export_3d", "tool_update", "import_design", "export_library_part", "create_part_project", "library_views", "render_board_3d", "render_board_layers", "document_info", "close_all_documents", "project_info", "project_create", "project_rename", "project_snapshot", "cross_probe", "read_footprint", "export_odb", "export_ipc2581", "export_ipc356", "export_dxf", "export_gencad", "import_svg", "edit_footprint", "generate_body", "remove_parts", "edit_parts", "align_parts", "set_layer_count", "copy_routing", "check_clearance", "remove_graphics", "place_vias", "board_features", "sch_sheet_symbol", "netlist", "silkscreen_prep", "net_lengths", "teardrops", "component_classes", "read_sheet_file", "fab_check", "panelize", "impedance", "current_capacity", "height_check", "bodies", "copper_balance", "return_path", "silk_designators", "via_fence", "assembly_check", "jlcpcb_order", "schematic_review", "pin_pad_check", "route_pair", "thermal_vias", "board_report", "placement_check", "auto_classes", "length_tune", "remove_items", "ripup_nets", "apply_pours", "pour_state", "remove_pours", "repour", "gloss", "routing_drc", "build_board", "set_outline", "set_design_rules", "zoom_to", "add_rule", "build_schematic", "export_manufacturing", "select_net", "silk_state", "apply_silkscreen",     // surfaces     "show_project", "show_schematic", "show_2d_board", "show_3d_board", "show_library",     "show_symbol", "show_footprint", "show_3d_chip", "list_library", "demo",@@ -584,6 +584,11 @@ fn describe() -> Value {         verb_doc("remove_pours", "Delete polygon pours by net (and layer), or all of them, and the pour keepouts (cutouts) apply_pours made. Tracks and vias are untouched.",             json!({"pours": "(optional) \"all\" or [{net, layer?} | {name} - one pour by the name apply_pours answered]", "cutouts": "(optional) \"all\" or [{layer}] - only the cutouts apply_pours landed (named Adom...)", "expectedRevision": "string (optional) - refused with stale_board if the board changed since you read it"}), json!({"removed": "int", "cutoutsRemoved": "int", "rulesRemoved": "int - AdomPC connect rules whose pour is gone", "revision": "string"}), 300,             "Use before re-pouring a changed plan; the connect rules of removed pours go with them. altium_ripup_nets clears copper.", &["apply_pours", "ripup_nets"], &[], json!({"pours": [{"net": "GND"}]})),+        verb_doc("gloss", "Gloss the routing of the nets you name with Altium's own Gloss (Route > Gloss Selected): shorter routes with fewer corners, within the board's rules. Leaves out length-tuned and differential-pair nets, pours again after, and answers each net's length and corners before and after with a DRC comparison.",+            json!({"nets": "[net] the nets to gloss (required unless all)", "all": "bool, default false: every routed net. Gloss straightens length tuning, so name your own routes instead on a board with tuned nets", "exclude": "[net] nets to leave alone", "protect": "bool, default true: leave out every net in a differential pair and every net a length or matched-length rule governs", "repour": "bool, default true: pour the board again after (glossed tracks can run into pours until then)", "dryRun": "bool, default false: say what would be glossed and what is protected, change nothing", "filePath": "optional: the .PcbDoc, opened first"}),+            json!({"glossed": "bool", "tracksSelected": "int", "nets": "[{net, lengthMm:[before, after], segments:[..], corners:[..]}] the nets that changed, most shortened first", "totalLengthMm": "[before, after] of the glossed nets", "protected": "{lengthRuled:[net], differentialPairs:[net], lockedTracks, lockedOn:[net]}", "offAngle": "{net: tracks} Gloss leaves alone: not at a multiple of 45 degrees", "drc": "{before, after, new:[violation], cleared, clean}", "unconnected": "[before, after]", "repoured": "bool|null", "glossEffort": "Altium's Gloss and Retrace effort preference", "saved": "false", "undo": "how to go back"}), 900,+            "Gloss works on tracks at multiples of 45 degrees (altium_plan_route's routes are); other tracks are left as they are and listed in offAngle. Locked tracks are left alone too. A net tuned for length with no rule behind it cannot be told from the board, so all:true can straighten it: exclude it or lock its tracks. Gloss cannot be undone from a script: the board is left unsaved, and reopening it without saving goes back.",+            &["plan_route", "route_net", "routing_state", "repour", "routing_drc", "save"], &["Needs a board with routed tracks.", "Takes a few seconds per thousand tracks, plus a repour and two batch DRCs.", "The board is left unsaved."], json!({"nets": ["N1", "GND"]})),         verb_doc("repour", "Repour every polygon on the board (Altium's Repour All) and answer the copper after. Runs outside the script engine so scoped rules apply.",             json!({"inScript": "bool (default false) - repour from inside the agent instead (scoped rules then match nothing)"}), json!({"zones": "[...]", "filledAreaByLayerMm2": "{...}", "unfilled": "[...]", "run": "{helperExited, seconds, agentStart}"}), 600,             "Run after moving parts or copper that pours flow around. Altium evaluates rule queries through its scripting system, so a repour from inside the resident agent ignores every scoped rule (a pour's own connect style, net-class clearances); this verb stops the agent, repours, and starts it again (a few seconds). apply_pours does the same on its own when it wrote connect rules.",@@ -2145,6 +2150,7 @@ pub fn dispatch(command: &str, args: &Value, _forwarded: &[(String, String)]) ->         "pour_state" => { if let Some(g) = need_licensed() { return g; } crate::routing::pour_state(args) }         "remove_pours" => { if let Some(g) = need_licensed() { return g; } crate::routing::remove_pours(args) }         "repour" => { if let Some(g) = need_licensed() { return g; } crate::routing::repour(args) }+        "gloss" => crate::gloss::gloss(args),         "routing_drc" => { if let Some(g) = need_licensed() { return g; } crate::routing::routing_drc(args) }         "build_board" => { if let Some(g) = need_licensed() { return g; } crate::routing::build_board(args) }         "set_outline" => { if let Some(g) = need_licensed() { return g; } crate::routing::set_outline(args) }
dev-skills/altium-bridge-test/run_verb_tests.py+4
@@ -261,6 +261,10 @@ def matrix(w):     M["plan_route"] = dict(phase=3.5, timeout=300, **ok(net="N1", **{"from": "U1.8", "to": "U2.1"}, gridMm=0.25),                            check=lambda d: d.get("found") is True and (d.get("routeNet") or {}).get("net") == "N1" and (d.get("lengthMm") or 0) > 10)     M["route_net"] = dict(phase=3.5, **ok(net="N1", width=0.25, paths=[[{"pad": "U1.8"}, {"pad": "U2.1"}]], expectPath=LB))+    # 0.2.110: Altium's Gloss on the route just drawn (straight already, so it stays connected and DRC finds nothing new)+    M["gloss"] = dict(phase=3.5, timeout=600, **ok(nets=["N1"]),+                      check=lambda d: d.get("glossed") is True and (d.get("tracksSelected") or 0) >= 1+                                      and (d.get("unconnected") or [0, 0])[1] <= (d.get("unconnected") or [0, 0])[0] and not (d.get("drc") or {}).get("new"))     M["place_vias"] = dict(phase=3.5, **ok(vias=[{"net": "GND", "x": 20, "y": 16, "size": 0.6, "drill": 0.3}], expectPath=LB))     M["select_net"] = dict(phase=3.5, **ok(net="N1", zoom=True))     M["zoom_to"] = dict(phase=3.5, **ok(ref="U1"))
docs/discovery-triggers-all.jsonadded+253
@@ -0,0 +1,253 @@+{+ "note": "Every search phrase this page carried before the wiki limited a page to 50 discovery triggers (2026-11-25). package.json carries the 50 kept.",+ "triggers": [+  "open my design in altium",+  "show me the board in altium",+  "open altium",+  "launch altium designer",+  "altium schematic",+  "altium pcb",+  "show the pcb in 3d in altium",+  "altium 3d board",+  "run drc in altium",+  "altium design rule check",+  "compile my altium project",+  "altium erc",+  "generate gerbers from altium",+  "altium gerber",+  "altium outjob",+  "run the output job",+  "altium bom",+  "export bom from altium",+  "altium pick and place",+  "altium odb++",+  "open an altium library",+  "altium symbol",+  "altium footprint",+  "altium schlib",+  "altium pcblib",+  "run a delphiscript in altium",+  "altium script",+  "altium eval",+  "altium process launcher",+  "control altium designer",+  "drive altium",+  "automate altium",+  "altium bridge",+  "altium demo",+  "altium screenshot",+  "what is open in altium",+  "altium dialog",+  "altium not responding",+  "add a part to my altium library",+  "import a component into altium",+  "altium part with lcsc number",+  "altium part with mouser number",+  "add a resistor to altium",+  "import kicad symbol into altium",+  "kicad to altium",+  "convert kicad library to altium",+  "altium intlib import",+  "ai for altium",+  "altium ai",+  "ai altium designer",+  "let an ai run altium",+  "chatgpt altium",+  "claude altium",+  "altium copilot",+  "altium mcp",+  "ai pcb design in altium",+  "altium update pcb",+  "annotate my altium schematic",+  "altium stack-up",+  "altium net class",+  "altium diff pair",+  "altium mounting holes",+  "altium fiducials",+  "altium stitching vias",+  "altium 365 workspace part",+  "altium jlcpcb bom",+  "altium step export",+  "altium multi-part symbol",+  "altium no erc",+  "altium hierarchical schematic",+  "altium sheet symbol",+  "altium sheet entry",+  "add a sheet in altium",+  "altium netlist",+  "check my altium netlist",+  "altium port",+  "make an altium footprint from a datasheet",+  "altium footprint from land pattern",+  "altium qfn footprint",+  "altium soic footprint",+  "altium bga footprint",+  "altium footprint wizard",+  "altium ipc footprint",+  "altium silkscreen over pads",+  "altium silkscreen preparation",+  "clip silkscreen altium",+  "altium silk to solder mask",+  "altium net length",+  "altium length matching",+  "altium matched length rule",+  "altium differential pair rule",+  "altium teardrops",+  "altium room",+  "altium component class",+  "altium via style rule",+  "altium skew",+  "altium odb++ export",+  "altium ipc-2581 export",+  "export odb++ from altium",+  "altium assembly drawing pdf",+  "altium fabrication drawing",+  "altium keepout",+  "altium polygon connect style rule",+  "altium impedance calculator",+  "altium controlled impedance trace width",+  "altium 90 ohm usb differential pair width",+  "altium trace current capacity",+  "will this trace carry 3a altium",+  "altium panelize",+  "altium panel array step and repeat",+  "altium fab capability check",+  "read altium schdoc without altium",+  "altium v-score panel",+  "altium v-cut panel jlcpcb",+  "altium mouse bites panel",+  "panelize for jlcpcb",+  "altium component height check enclosure",+  "altium 3d clearance check",+  "altium copper balance",+  "altium return path check",+  "signal crossing a split plane altium",+  "jlcpcb design rule check altium",+  "check my altium board against jlcpcb capabilities",+  "jlcpcb assembly check",+  "is my board ready for jlcpcb assembly",+  "altium place reference designators",+  "designators overlapping pads altium",+  "altium via fence",+  "via stitching along rf trace",+  "altium jlcpcb order files",+  "export altium board for jlcpcb order",+  "altium gerber zip for jlcpcb",+  "fix return path gap altium",+  "altium schematic review",+  "check altium schematic before update pcb",+  "altium footprint pin mismatch",+  "altium differential pair routing",+  "route usb pair in altium",+  "altium length matching serpentine",+  "altium thermal vias exposed pad",+  "altium placement check",+  "altium board report pdf",+  "altium net classes automatically",+  "altium jlcpcb design rules",+  "flip a part to the bottom side in altium",+  "move a component to the other side of the altium board",+  "altium 3d body sizes of every part",+  "wire these pins together in altium",+  "add a bus in an altium schematic",+  "altium schematic junction dots and labels",+  "trace a net on an altium schematic sheet",+  "create a new schematic sheet in altium",+  "altium sheet hierarchy page numbers",+  "render an altium schematic to an image",+  "update altium symbols from library",+  "remove a part from the altium board",+  "align parts in altium",+  "change altium board layer count to 4",+  "copy routing to another channel in altium",+  "altium part clearance check",+  "export ipc-2581 from altium",+  "check my altium board against pcbway limits",+  "which altium documents are open",+  "close all altium documents without losing changes",+  "altium project summary",+  "create a new altium project",+  "rename an altium project",+  "snapshot my altium project",+  "cross probe altium schematic to pcb",+  "read an altium footprint's pads",+  "export one part from an altium library",+  "make a demo project for an altium part",+  "render altium board in 3d to an image",+  "render altium copper layer to png",+  "show altium symbol and footprint images",+  "export ipc-356 netlist from altium",+  "export gencad from altium",+  "export altium board layers to dxf",+  "altium board outline dxf for enclosure",+  "import svg logo onto altium pcb",+  "add a logo to altium silkscreen",+  "edit an altium footprint's pads",+  "renumber pads in an altium footprint",+  "generate a 3d step body for a soic",+  "make a 3d model from package dimensions",+  "route a net between two pads in altium",+  "find a path for a trace in altium",+  "plan a route in altium",+  "route one net in altium",+  "place decoupling caps in altium",+  "fan out a bga in altium",+  "escape routing for a qfn in altium",+  "estimate pcb cost from altium",+  "how much will this altium board cost",+  "simulate this circuit in altium",+  "run an ac analysis in altium",+  "transient simulation in altium",+  "spice netlist from altium",+  "altium mixed signal simulation",+  "update footprints from library in altium",+  "bring altium footprints up to date with the library",+  "replace placed footprints with the library version",+  "lint my altium library",+  "check an altium library before i ship it",+  "does every symbol pin have a pad altium",+  "export pick and place from altium",+  "altium cpl file for jlcpcb",+  "altium centroid file",+  "how long do altium verbs take",+  "prewarm the altium bridge",+  "render my altium board",+  "apply several schematic edits at once in altium",+  "undo a batch of altium schematic changes",+  "altium messages panel warnings",+  "what did altium complain about",+  "check my altium schematic for dangling wires",+  "altium schematic label not on a wire",+  "overlapping symbols altium schematic",+  "export my altium board as parasolid",+  "altium vrml export",+  "edit a polygon pour in altium",+  "place an enclosure step with my altium board",+  "does the board fit the enclosure altium",+  "which altium version is installed",+  "import an eagle design into altium",+  "eagle to altium",+  "import eagle board into altium",+  "check for altium updates",+  "is there a newer altium version",+  "turn off altium update check",+  "place a no connect flag in altium",+  "no erc marker altium",+  "add a net label on a wire in altium",+  "draw a wire in altium schematic",+  "place footprints on an altium board",+  "change a track width in altium",+  "check 3d models on an altium board",+  "list altium extensions",+  "read altium preferences",+  "change an altium setting",+  "select parts in altium",+  "cancel a running altium job",+  "release my altium licence seat",+  "gloss the routing in altium",+  "tidy up traces in altium",+  "altium gloss selected",+  "shorten routes in altium",+  "clean up routing in altium"+ ]+}\ No newline at end of file
package.json+24−217
@@ -1,6 +1,6 @@ {   "slug": "altium-bridge",-  "version": "0.2.109",+  "version": "0.2.110",   "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": [@@ -64,248 +64,55 @@     "uninstall.sh"   ],   "discovery_triggers": [+    "ai for altium",+    "let an ai run altium",+    "claude altium",+    "chatgpt altium",+    "altium mcp",+    "automate altium",     "open my design in altium",     "show me the board in altium",-    "open altium",-    "launch altium designer",-    "altium schematic",-    "altium pcb",-    "show the pcb in 3d in altium",-    "altium 3d board",     "run drc in altium",-    "altium design rule check",-    "compile my altium project",     "altium erc",     "generate gerbers from altium",-    "altium gerber",-    "altium outjob",-    "run the output job",-    "altium bom",     "export bom from altium",     "altium pick and place",     "altium odb++",-    "open an altium library",-    "altium symbol",-    "altium footprint",-    "altium schlib",-    "altium pcblib",-    "run a delphiscript in altium",-    "altium script",-    "altium eval",-    "altium process launcher",-    "control altium designer",-    "drive altium",-    "automate altium",-    "altium bridge",-    "altium demo",-    "altium screenshot",-    "what is open in altium",-    "altium dialog",-    "altium not responding",+    "altium step export",+    "make an altium footprint from a datasheet",     "add a part to my altium library",     "import a component into altium",-    "altium part with lcsc number",-    "altium part with mouser number",-    "add a resistor to altium",-    "import kicad symbol into altium",     "kicad to altium",-    "convert kicad library to altium",-    "altium intlib import",-    "ai for altium",-    "altium ai",-    "ai altium designer",-    "let an ai run altium",-    "chatgpt altium",-    "claude altium",-    "altium copilot",-    "altium mcp",-    "ai pcb design in altium",+    "eagle to altium",     "altium update pcb",     "annotate my altium schematic",+    "wire these pins together in altium",+    "create a new schematic sheet in altium",+    "altium hierarchical schematic",     "altium stack-up",     "altium net class",-    "altium diff pair",-    "altium mounting holes",-    "altium fiducials",-    "altium stitching vias",-    "altium 365 workspace part",-    "altium jlcpcb bom",-    "altium step export",-    "altium multi-part symbol",-    "altium no erc",-    "altium hierarchical schematic",-    "altium sheet symbol",-    "altium sheet entry",-    "add a sheet in altium",-    "altium netlist",-    "check my altium netlist",-    "altium port",-    "make an altium footprint from a datasheet",-    "altium footprint from land pattern",-    "altium qfn footprint",-    "altium soic footprint",-    "altium bga footprint",-    "altium footprint wizard",-    "altium ipc footprint",-    "altium silkscreen over pads",-    "altium silkscreen preparation",-    "clip silkscreen altium",-    "altium silk to solder mask",-    "altium net length",+    "altium differential pair routing",+    "route a net between two pads in altium",+    "gloss the routing in altium",     "altium length matching",-    "altium matched length rule",-    "altium differential pair rule",-    "altium teardrops",-    "altium room",-    "altium component class",-    "altium via style rule",-    "altium skew",-    "altium odb++ export",-    "altium ipc-2581 export",-    "export odb++ from altium",-    "altium assembly drawing pdf",-    "altium fabrication drawing",-    "altium keepout",-    "altium polygon connect style rule",     "altium impedance calculator",-    "altium controlled impedance trace width",-    "altium 90 ohm usb differential pair width",-    "altium trace current capacity",     "will this trace carry 3a altium",     "altium panelize",-    "altium panel array step and repeat",-    "altium fab capability check",-    "read altium schdoc without altium",-    "altium v-score panel",-    "altium v-cut panel jlcpcb",-    "altium mouse bites panel",-    "panelize for jlcpcb",-    "altium component height check enclosure",-    "altium 3d clearance check",-    "altium copper balance",-    "altium return path check",-    "signal crossing a split plane altium",-    "jlcpcb design rule check altium",-    "check my altium board against jlcpcb capabilities",-    "jlcpcb assembly check",     "is my board ready for jlcpcb assembly",-    "altium place reference designators",-    "designators overlapping pads altium",-    "altium via fence",-    "via stitching along rf trace",     "altium jlcpcb order files",-    "export altium board for jlcpcb order",-    "altium gerber zip for jlcpcb",-    "fix return path gap altium",-    "altium schematic review",-    "check altium schematic before update pcb",-    "altium footprint pin mismatch",-    "altium differential pair routing",-    "route usb pair in altium",-    "altium length matching serpentine",-    "altium thermal vias exposed pad",+    "jlcpcb design rule check altium",+    "altium mounting holes",+    "altium stitching vias",+    "altium teardrops",     "altium placement check",-    "altium board report pdf",-    "altium net classes automatically",-    "altium jlcpcb design rules",-    "flip a part to the bottom side in altium",-    "move a component to the other side of the altium board",-    "altium 3d body sizes of every part",-    "wire these pins together in altium",-    "add a bus in an altium schematic",-    "altium schematic junction dots and labels",-    "trace a net on an altium schematic sheet",-    "create a new schematic sheet in altium",-    "altium sheet hierarchy page numbers",-    "render an altium schematic to an image",-    "update altium symbols from library",-    "remove a part from the altium board",-    "align parts in altium",-    "change altium board layer count to 4",-    "copy routing to another channel in altium",-    "altium part clearance check",-    "export ipc-2581 from altium",-    "check my altium board against pcbway limits",-    "which altium documents are open",-    "close all altium documents without losing changes",-    "altium project summary",-    "create a new altium project",-    "rename an altium project",-    "snapshot my altium project",-    "cross probe altium schematic to pcb",-    "read an altium footprint's pads",-    "export one part from an altium library",-    "make a demo project for an altium part",-    "render altium board in 3d to an image",-    "render altium copper layer to png",-    "show altium symbol and footprint images",-    "export ipc-356 netlist from altium",-    "export gencad from altium",-    "export altium board layers to dxf",-    "altium board outline dxf for enclosure",-    "import svg logo onto altium pcb",-    "add a logo to altium silkscreen",-    "edit an altium footprint's pads",-    "renumber pads in an altium footprint",-    "generate a 3d step body for a soic",-    "make a 3d model from package dimensions",-    "route a net between two pads in altium",-    "find a path for a trace in altium",-    "plan a route in altium",-    "route one net in altium",     "place decoupling caps in altium",     "fan out a bga in altium",-    "escape routing for a qfn in altium",-    "estimate pcb cost from altium",-    "how much will this altium board cost",     "simulate this circuit in altium",-    "run an ac analysis in altium",-    "transient simulation in altium",-    "spice netlist from altium",-    "altium mixed signal simulation",-    "update footprints from library in altium",-    "bring altium footprints up to date with the library",-    "replace placed footprints with the library version",-    "lint my altium library",-    "check an altium library before i ship it",-    "does every symbol pin have a pad altium",-    "export pick and place from altium",-    "altium cpl file for jlcpcb",-    "altium centroid file",-    "how long do altium verbs take",-    "prewarm the altium bridge",     "render my altium board",-    "apply several schematic edits at once in altium",-    "undo a batch of altium schematic changes",-    "altium messages panel warnings",-    "what did altium complain about",-    "check my altium schematic for dangling wires",-    "altium schematic label not on a wire",-    "overlapping symbols altium schematic",-    "export my altium board as parasolid",-    "altium vrml export",-    "edit a polygon pour in altium",-    "place an enclosure step with my altium board",-    "does the board fit the enclosure altium",-    "which altium version is installed",-    "import an eagle design into altium",-    "eagle to altium",-    "import eagle board into altium",-    "check for altium updates",-    "is there a newer altium version",-    "turn off altium update check",-    "place a no connect flag in altium",-    "no erc marker altium",-    "add a net label on a wire in altium",-    "draw a wire in altium schematic",-    "place footprints on an altium board",-    "change a track width in altium",-    "check 3d models on an altium board",-    "list altium extensions",-    "read altium preferences",-    "change an altium setting",-    "select parts in altium",-    "cancel a running altium job",+    "altium 3d clearance check",+    "altium silkscreen preparation",+    "altium schematic review",+    "estimate pcb cost from altium",     "release my altium licence seat"   ],   "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.",
page.json+25−218
@@ -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.109",+  "version": "0.2.110",   "hero": {     "type": "image",     "path": "screenshots/hero.png"@@ -52,248 +52,55 @@     }   ],   "discovery_triggers": [+    "ai for altium",+    "let an ai run altium",+    "claude altium",+    "chatgpt altium",+    "altium mcp",+    "automate altium",     "open my design in altium",     "show me the board in altium",-    "open altium",-    "launch altium designer",-    "altium schematic",-    "altium pcb",-    "show the pcb in 3d in altium",-    "altium 3d board",     "run drc in altium",-    "altium design rule check",-    "compile my altium project",     "altium erc",     "generate gerbers from altium",-    "altium gerber",-    "altium outjob",-    "run the output job",-    "altium bom",     "export bom from altium",     "altium pick and place",     "altium odb++",-    "open an altium library",-    "altium symbol",-    "altium footprint",-    "altium schlib",-    "altium pcblib",-    "run a delphiscript in altium",-    "altium script",-    "altium eval",-    "altium process launcher",-    "control altium designer",-    "drive altium",-    "automate altium",-    "altium bridge",-    "altium demo",-    "altium screenshot",-    "what is open in altium",-    "altium dialog",-    "altium not responding",+    "altium step export",+    "make an altium footprint from a datasheet",     "add a part to my altium library",     "import a component into altium",-    "altium part with lcsc number",-    "altium part with mouser number",-    "add a resistor to altium",-    "import kicad symbol into altium",     "kicad to altium",-    "convert kicad library to altium",-    "altium intlib import",-    "ai for altium",-    "altium ai",-    "ai altium designer",-    "let an ai run altium",-    "chatgpt altium",-    "claude altium",-    "altium copilot",-    "altium mcp",-    "ai pcb design in altium",+    "eagle to altium",     "altium update pcb",     "annotate my altium schematic",+    "wire these pins together in altium",+    "create a new schematic sheet in altium",+    "altium hierarchical schematic",     "altium stack-up",     "altium net class",-    "altium diff pair",-    "altium mounting holes",-    "altium fiducials",-    "altium stitching vias",-    "altium 365 workspace part",-    "altium jlcpcb bom",-    "altium step export",-    "altium multi-part symbol",-    "altium no erc",-    "altium hierarchical schematic",-    "altium sheet symbol",-    "altium sheet entry",-    "add a sheet in altium",-    "altium netlist",-    "check my altium netlist",-    "altium port",-    "make an altium footprint from a datasheet",-    "altium footprint from land pattern",-    "altium qfn footprint",-    "altium soic footprint",-    "altium bga footprint",-    "altium footprint wizard",-    "altium ipc footprint",-    "altium silkscreen over pads",-    "altium silkscreen preparation",-    "clip silkscreen altium",-    "altium silk to solder mask",-    "altium net length",+    "altium differential pair routing",+    "route a net between two pads in altium",+    "gloss the routing in altium",     "altium length matching",-    "altium matched length rule",-    "altium differential pair rule",-    "altium teardrops",-    "altium room",-    "altium component class",-    "altium via style rule",-    "altium skew",-    "altium odb++ export",-    "altium ipc-2581 export",-    "export odb++ from altium",-    "altium assembly drawing pdf",-    "altium fabrication drawing",-    "altium keepout",-    "altium polygon connect style rule",     "altium impedance calculator",-    "altium controlled impedance trace width",-    "altium 90 ohm usb differential pair width",-    "altium trace current capacity",     "will this trace carry 3a altium",     "altium panelize",-    "altium panel array step and repeat",-    "altium fab capability check",-    "read altium schdoc without altium",-    "altium v-score panel",-    "altium v-cut panel jlcpcb",-    "altium mouse bites panel",-    "panelize for jlcpcb",-    "altium component height check enclosure",-    "altium 3d clearance check",-    "altium copper balance",-    "altium return path check",-    "signal crossing a split plane altium",-    "jlcpcb design rule check altium",-    "check my altium board against jlcpcb capabilities",-    "jlcpcb assembly check",     "is my board ready for jlcpcb assembly",-    "altium place reference designators",-    "designators overlapping pads altium",-    "altium via fence",-    "via stitching along rf trace",     "altium jlcpcb order files",-    "export altium board for jlcpcb order",-    "altium gerber zip for jlcpcb",-    "fix return path gap altium",-    "altium schematic review",-    "check altium schematic before update pcb",-    "altium footprint pin mismatch",-    "altium differential pair routing",-    "route usb pair in altium",-    "altium length matching serpentine",-    "altium thermal vias exposed pad",+    "jlcpcb design rule check altium",+    "altium mounting holes",+    "altium stitching vias",+    "altium teardrops",     "altium placement check",-    "altium board report pdf",-    "altium net classes automatically",-    "altium jlcpcb design rules",-    "flip a part to the bottom side in altium",-    "move a component to the other side of the altium board",-    "altium 3d body sizes of every part",-    "wire these pins together in altium",-    "add a bus in an altium schematic",-    "altium schematic junction dots and labels",-    "trace a net on an altium schematic sheet",-    "create a new schematic sheet in altium",-    "altium sheet hierarchy page numbers",-    "render an altium schematic to an image",-    "update altium symbols from library",-    "remove a part from the altium board",-    "align parts in altium",-    "change altium board layer count to 4",-    "copy routing to another channel in altium",-    "altium part clearance check",-    "export ipc-2581 from altium",-    "check my altium board against pcbway limits",-    "which altium documents are open",-    "close all altium documents without losing changes",-    "altium project summary",-    "create a new altium project",-    "rename an altium project",-    "snapshot my altium project",-    "cross probe altium schematic to pcb",-    "read an altium footprint's pads",-    "export one part from an altium library",-    "make a demo project for an altium part",-    "render altium board in 3d to an image",-    "render altium copper layer to png",-    "show altium symbol and footprint images",-    "export ipc-356 netlist from altium",-    "export gencad from altium",-    "export altium board layers to dxf",-    "altium board outline dxf for enclosure",-    "import svg logo onto altium pcb",-    "add a logo to altium silkscreen",-    "edit an altium footprint's pads",-    "renumber pads in an altium footprint",-    "generate a 3d step body for a soic",-    "make a 3d model from package dimensions",-    "route a net between two pads in altium",-    "find a path for a trace in altium",-    "plan a route in altium",-    "route one net in altium",     "place decoupling caps in altium",     "fan out a bga in altium",-    "escape routing for a qfn in altium",-    "estimate pcb cost from altium",-    "how much will this altium board cost",     "simulate this circuit in altium",-    "run an ac analysis in altium",-    "transient simulation in altium",-    "spice netlist from altium",-    "altium mixed signal simulation",-    "update footprints from library in altium",-    "bring altium footprints up to date with the library",-    "replace placed footprints with the library version",-    "lint my altium library",-    "check an altium library before i ship it",-    "does every symbol pin have a pad altium",-    "export pick and place from altium",-    "altium cpl file for jlcpcb",-    "altium centroid file",-    "how long do altium verbs take",-    "prewarm the altium bridge",     "render my altium board",-    "apply several schematic edits at once in altium",-    "undo a batch of altium schematic changes",-    "altium messages panel warnings",-    "what did altium complain about",-    "check my altium schematic for dangling wires",-    "altium schematic label not on a wire",-    "overlapping symbols altium schematic",-    "export my altium board as parasolid",-    "altium vrml export",-    "edit a polygon pour in altium",-    "place an enclosure step with my altium board",-    "does the board fit the enclosure altium",-    "which altium version is installed",-    "import an eagle design into altium",-    "eagle to altium",-    "import eagle board into altium",-    "check for altium updates",-    "is there a newer altium version",-    "turn off altium update check",-    "place a no connect flag in altium",-    "no erc marker altium",-    "add a net label on a wire in altium",-    "draw a wire in altium schematic",-    "place footprints on an altium board",-    "change a track width in altium",-    "check 3d models on an altium board",-    "list altium extensions",-    "read altium preferences",-    "change an altium setting",-    "select parts in altium",-    "cancel a running altium job",+    "altium 3d clearance check",+    "altium silkscreen preparation",+    "altium schematic review",+    "estimate pcb cost from altium",     "release my altium licence seat"   ],   "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.",@@ -352,4 +159,4 @@     "tools/symbol_modes.py",     "uninstall.sh"   ]-}\ No newline at end of file+}
skills/altium-boards/SKILL.md+20−1
@@ -5,7 +5,7 @@ description: >-   diff pairs, track widths, mounting holes, fiducials, stitching vias, free space, footprint swaps,   readback, 3D heights and clearance, impedance, current capacity, copper balance, return paths, fab limits, panels   with V-score or mouse bites. Use when asked for an altium stack-up, net class, mounting holes, a 50 or 90 ohm trace-  width, will a trace carry 3 A, does it fit the enclosure, copper balance, return path, place the designators, a+  width, will a trace carry 3 A, does it fit the enclosure, copper balance, return path, place the designators, gloss or tidy the routing, a   via fence, route a differential pair, route one net between two pads, find a path for a net, place decoupling caps, fan out   a BGA or QFN, estimate the board's cost, tune a length, thermal vias, check the placement, or panelize a board. ---@@ -195,6 +195,25 @@ altium_plan_route '{"net":"N1","from":"U1.8","to":"U2.1","gridMm":0.25,"apply":t   this grid and clearance, or the search bound `maxNodes`). - Use it for the nets the autorouter leaves, or one net at a time where you want to see each route before the next. +## Tidy routes: `altium_gloss` (0.2.110)++```bash+altium_gloss '{"nets":["N1","GND"],"dryRun":true}'   # what would be glossed, what is protected: changes nothing+altium_gloss '{"nets":["N1","GND"]}'                 # Altium's own Gloss (Route > Gloss Selected), then measured+```++- Altium's Gloss shortens routes and removes corners within the board's rules. The reply gives each changed net's+  length, pieces and corners before and after (`nets[]`), and a DRC comparison (`drc.new`, `drc.clean`).+- Name the nets you routed. `all:true` takes every routed net, but Gloss straightens length tuning: by default+  (`protect`) nets in a differential pair or under a length or matched-length rule are left out (`protected`), and+  a net tuned with no rule behind it cannot be told apart, so exclude it (`exclude`) or lock its tracks. Locked+  tracks are left alone.+- Only tracks at multiples of 45 degrees are glossed: others are listed in `offAngle` and left as they are.+  altium_plan_route's routes qualify.+- The board is poured again after (`repour`, default true): glossed tracks run into pours until then.+- It cannot be undone from a script. The board is left unsaved: reopen it without saving to go back, or+  `altium_save` to keep it.+ ## Decoupling, fanout and cost (0.2.80)  ```bash
src/BRIDGE_VERSION+1−1
@@ -1 +1 @@-0.2.109+0.2.110
src/agent/AdomAgent.pas.tmpl+124
@@ -9501,6 +9501,129 @@ Begin         JRaw('pads', IntToStr(NP)) + ',' + JRaw('pours', IntToStr(NPoly)) + ',' + JRaw('other', IntToStr(NO)) + '}') + '}'; End; +{ a string list as a JSON array of strings }+Function JList(L : TStringList) : String;+Var+    I : Integer;+Begin+    Result := '';+    For I := 0 To L.Count - 1 Do+    Begin+        If I > 0 Then Result := Result + ',';+        Result := Result + '"' + JsonEsc(L[I]) + '"';+    End;+    Result := '[' + Result + ']';+End;++{ gloss_select: select the routed tracks and arcs altium_gloss will gloss, and nothing else. Payload: one net per line+  (all = 1 takes every net), "X|net" lines leave a net out. protect = 1 leaves out every net in a differential pair and+  every net a length or matched-length rule governs (Gloss straightens length tuning). Pour pieces and footprint copper+  are never taken. dry = 1 only sorts the nets. Locked tracks are counted: Gloss leaves them as they are. }+Function CmdGlossSelect(Lines : TStringList; Payload : String) : String;+Var+    Board : IPCB_Board;+    BIt   : IPCB_BoardIterator;+    Prim  : IPCB_Primitive;+    DP    : IPCB_DifferentialPair;+    Want, Skip, Pairs, ProtLen, ProtPair, Locked, Body : TStringList;+    AllNets, Protect, Dry, Take : Boolean;+    I, N, NL, NP, NK : Integer;+    Net, Ln : String;+Begin+    Board := PCBServer.GetCurrentPCBBoard;+    If Board = Nil Then Begin Result := '{' + JRaw('ok','false') + ',' + JStr('error','no current PCB board (open a .PcbDoc first)') + '}'; Exit; End;+    AllNets := Param(Lines, 'all') = '1';+    Protect := Param(Lines, 'protect') = '1';+    Dry := Param(Lines, 'dry') = '1';+    Want := TStringList.Create; Want.Sorted := True;+    Skip := TStringList.Create; Skip.Sorted := True;+    Pairs := TStringList.Create; Pairs.Sorted := True;+    ProtLen := TStringList.Create; ProtLen.Sorted := True;+    ProtPair := TStringList.Create; ProtPair.Sorted := True;+    Locked := TStringList.Create; Locked.Sorted := True;+    Body := TStringList.Create;+    Body.Text := Payload;+    For I := 0 To Body.Count - 1 Do+    Begin+        Ln := Trim(Body[I]);+        If Ln = '' Then Continue;+        If Copy(Ln, 1, 2) = 'X|' Then Skip.Add(UpperCase(Copy(Ln, 3, Length(Ln) - 2))) Else Want.Add(UpperCase(Ln));+    End;+    If Protect Then+    Begin+        BIt := Board.BoardIterator_Create;+        BIt.AddFilter_ObjectSet(MkSet(eDifferentialPairObject));+        BIt.AddFilter_LayerSet(AllLayers);+        BIt.AddFilter_Method(eProcessAll);+        DP := BIt.FirstPCBObject;+        While DP <> Nil Do+        Begin+            If DP.PositiveNet <> Nil Then Pairs.Add(UpperCase(DP.PositiveNet.Name));+            If DP.NegativeNet <> Nil Then Pairs.Add(UpperCase(DP.NegativeNet.Name));+            DP := BIt.NextPCBObject;+        End;+        Board.BoardIterator_Destroy(BIt);+    End;+    { a length rule can govern only part of a net (an xSignal from driver to termination): a net with ANY governed track+      is left out whole, so the first pass looks at every track of the nets asked for }+    If Protect Then+    Begin+        BIt := Board.BoardIterator_Create;+        BIt.AddFilter_ObjectSet(MkSet(eTrackObject, eArcObject));+        BIt.AddFilter_LayerSet(AllLayers);+        BIt.AddFilter_Method(eProcessAll);+        Prim := BIt.FirstPCBObject;+        While Prim <> Nil Do+        Begin+            If (Not Prim.InComponent) And (Not Prim.InPolygon) And (Prim.Net <> Nil) Then+            Begin+                Net := Prim.Net.Name;+                If (AllNets Or (Want.IndexOf(UpperCase(Net)) >= 0)) And (Skip.IndexOf(UpperCase(Net)) < 0) And+                   (Pairs.IndexOf(UpperCase(Net)) < 0) And (ProtLen.IndexOf(Net) < 0) Then+                    If (Board.FindDominantRuleForObject(Prim, eRule_MatchedLengths) <> Nil) Or (Board.FindDominantRuleForObject(Prim, eRule_MaxMinLength) <> Nil) Then+                        ProtLen.Add(Net);+            End;+            Prim := BIt.NextPCBObject;+        End;+        Board.BoardIterator_Destroy(BIt);+    End;+    N := 0; NL := 0; NP := 0; NK := 0;+    BIt := Board.BoardIterator_Create;+    BIt.AddFilter_ObjectSet(MkSet(eTrackObject, eArcObject));+    BIt.AddFilter_LayerSet(AllLayers);+    BIt.AddFilter_Method(eProcessAll);+    Prim := BIt.FirstPCBObject;+    While Prim <> Nil Do+    Begin+        Take := False;+        If (Not Prim.InComponent) And (Not Prim.InPolygon) And (Prim.Net <> Nil) Then+        Begin+            Net := Prim.Net.Name;+            If (AllNets Or (Want.IndexOf(UpperCase(Net)) >= 0)) And (Skip.IndexOf(UpperCase(Net)) < 0) Then+            Begin+                Take := True;+                If Protect Then+                Begin+                    If Pairs.IndexOf(UpperCase(Net)) >= 0 Then Begin Take := False; ProtPair.Add(Net); NP := NP + 1; End+                    Else If ProtLen.IndexOf(Net) >= 0 Then Begin Take := False; NL := NL + 1; End;+                End;+                If Take And (Not Prim.Moveable) Then Begin Locked.Add(Net); NK := NK + 1; End;+            End;+        End;+        If Take Then+        Begin+            If Not Dry Then Prim.Selected := True;+            N := N + 1;+        End+        Else If Prim.Selected And (Not Dry) Then Prim.Selected := False;+        Prim := BIt.NextPCBObject;+    End;+    Board.BoardIterator_Destroy(BIt);+    Result := '{' + JRaw('ok','true') + ',' + JRaw('selected', IntToStr(N)) + ',' + JRaw('lengthRuled', IntToStr(NL)) + ',' + JRaw('pairTracks', IntToStr(NP)) + ',' ++        JRaw('lockedTracks', IntToStr(NK)) + ',' + JRaw('lengthNets', JList(ProtLen)) + ',' + JRaw('pairNets', JList(ProtPair)) + ',' + JRaw('lockedNets', JList(Locked)) + '}';+    Want.Free; Skip.Free; Pairs.Free; ProtLen.Free; ProtPair.Free; Locked.Free; Body.Free;+End;+ { ------------------------------------------------------------- silkscreen --- }  Function TextJson(T : IPCB_Text; Shown : Boolean) : String;@@ -10896,6 +11019,7 @@ Begin     Else If Cmd = 'set_layer_visibility' Then Result := CmdSetLayerVisibility(Lines)     Else If Cmd = 'footprint_primitives' Then Result := CmdFootprintPrimitives(Lines)     Else If Cmd = 'routing_state' Then Result := CmdRoutingState(Lines)+    Else If Cmd = 'gloss_select' Then Result := CmdGlossSelect(Lines, Payload)     Else If Cmd = 'edit_board' Then Result := CmdEditBoard(Lines, Payload)     Else If Cmd = 'apply_pours' Then Result := CmdApplyPours(Lines, Payload)     Else If Cmd = 'edit_pour' Then Result := CmdEditPour(Lines, Payload)
src/bridge.json+3−1
@@ -2,7 +2,7 @@   "manifest_version": 1,   "name": "altium",   "displayName": "Altium Designer",-  "version": "0.2.109",+  "version": "0.2.110",   "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",@@ -185,6 +185,7 @@     "altium_render_board_layers",     "altium_render_schematic",     "altium_replicate_layout",+    "altium_gloss",     "altium_repour",     "altium_return_path",     "altium_review_board",@@ -384,6 +385,7 @@       "pour_state": 180,       "remove_pours": 300,       "repour": 600,+      "gloss": 900,       "routing_drc": 300,       "build_board": 900,       "set_outline": 120,