← Commit history
crates/aiflow-board/src/lib.rs+11
@@ -63,6 +63,9 @@ pub struct Pad {     /// Issue #236: a castellated (half-hole) edge pad, KiCad's `(property pad_prop_castellated)`: centred on the     /// board edge on purpose, the fab routes through its plated hole     pub castellated: bool,+    /// Issue #263: the footprint's jumper pad group this pad is in (`(jumper_pad_groups ("13" "14"))`, e.g. a jack's+    /// shield tabs joined by its metal shell): "REF#k", empty when none. Pads of one group are one terminal.+    pub jumper: String, }  impl Pad {@@ -356,8 +359,15 @@ impl Board {             let layer = fp.find("layer").and_then(|l| l.value()).unwrap_or("F.Cu").to_string();             let fp_clearance = fp.find("clearance").and_then(|c| c.number(1)).unwrap_or(0.0);             self.footprints.insert(reference.clone(), Footprint { reference: reference.clone(), x: fx, y: fy, rot, layer, lib: fp.value().unwrap_or("").to_string(), start: fp.start, end: fp.end });+            // issue #263: pads joined inside the footprint (KiCad 8+ jumper pad groups)+            let jumper_groups: Vec<Vec<String>> = fp.find("jumper_pad_groups").map(|g| g.nodes().map(|n| {+                let mut v = vec![n.tag.clone()];+                v.extend(n.items.iter().filter_map(|it| if let sx::Item::Atom { text, .. } = it { Some(text.clone()) } else { None }));+                v+            }).collect()).unwrap_or_default();             for pn in fp.find_all("pad") {                 let name = pn.value().unwrap_or("").to_string();+                let jumper = jumper_groups.iter().position(|g| !name.is_empty() && g.contains(&name)).map(|k| format!("{reference}#{k}")).unwrap_or_default();                 let ptype = pn.atom(2).unwrap_or("");                 let shape = pn.atom(3).unwrap_or("rect").to_string();                 let mut on_f = false;@@ -421,6 +431,7 @@ impl Board {                     on_f: on_f && (thru || true) && on_f, on_b: on_b || thru, polys, fp_x: fx, fp_y: fy, long_axis: axis, half_long, half_short,                     uuid: pn.find("uuid").and_then(|u| u.value()).unwrap_or("").to_string(), polys_centre: (x + ccx, y + ccy), clearance: fp_clearance.max(pclr),                     castellated: pn.find("property").and_then(|p| p.value()).is_some_and(|v| v == "pad_prop_castellated"),+                    jumper,                 });             }         }
crates/aiflow-router/src/board_copper.rs+6
@@ -254,6 +254,12 @@ impl Router {         let pads = self.board.pads.clone();         let tc = std::time::Instant::now();         let mut dsu = copper_groups(&pads, &tracks, &vias, &islands);+        // issue #263: pads of one jumper pad group are joined inside the part (a jack's shield tabs by its shell)+        let mut first_of: HashMap<&str, usize> = HashMap::new();+        for (pi, p) in pads.iter().enumerate() {+            if p.jumper.is_empty() { continue; }+            match first_of.get(p.jumper.as_str()) { Some(&q) => dsu.join(pi, q), None => { first_of.insert(p.jumper.as_str(), pi); } }+        }         let conn_s = tc.elapsed().as_secs_f64();         let mut kind = vec![CompCopper::default(); np + nt + nv + islands.len()];         for k in 0..nt { kind[np + k] = CompCopper { copper: true, via_or_zone: false }; }
crates/aiflow-router/src/drive.rs+4−2
@@ -802,7 +802,8 @@ impl Router {                 None => {                     let p = self.board.pads[cl.primary].clone();                     let (i, j) = g.to_cell(p.x, p.y);-                    if self.via_clear_exact(net, p.x, p.y) {+                    // issue #217: a via in an SMD pad is opt-in (spec allowViaInPad), here as in connect()+                    if (p.thru || self.rules.allow_via_in_pad) && self.via_clear_exact(net, p.x, p.y) {                         let mut r = Route::new(vec![Term::new(pl, i, j)], track, End::Pad(c, Term::new(pl, i, j)), End::Via);                         r.via_end = true;                         r.via_end_layer = other;@@ -811,7 +812,8 @@ impl Router {                         self.nets[net].via_in_pad.push(key.clone());                         self.stat("viaInPad", 1);                     } else {-                        self.nets[net].failed.push((key.clone(), format!("no via site within {:.0} mm", self.rules.via_search_mm)));+                        self.nets[net].failed.push((key.clone(), format!("no via site within {:.0} mm{}", self.rules.via_search_mm,+                            if self.rules.allow_via_in_pad || p.thru { "" } else { " (via-in-pad not allowed: spec allowViaInPad)" })));                     }                 }                 Some(cells) => {
crates/aiflow-router/src/lib.rs+56−3
@@ -191,6 +191,9 @@ pub struct Router {     pub verbose: bool,     pub nets: Vec<NetState>,     pub net_ids: HashMap<String, usize>,+    /// Issue #262: per net index, its isolation domain (-1: none, -2: exempt) and that domain's clearance+    pub dom: Vec<(i32, f64)>,+    pub dom_max: f64,     pub pad_raw: [Vec<i16>; 2],     pub pad_owner: [Vec<i16>; 2],     pub route_raw: [Vec<i16>; 2],@@ -296,7 +299,7 @@ impl Router {             }         }         let mut r = Router {-            grid: grid.clone(), rules, verbose, nets, net_ids,+            grid: grid.clone(), dom: Vec::new(), dom_max: 0.0, rules, verbose, nets, net_ids,             pad_raw: [vec![-1; n], vec![-1; n]], pad_owner: [vec![-1; n], vec![-1; n]], route_raw: [vec![-1; n], vec![-1; n]],             big_clr: [grid.mask(), grid.mask()], big_clr_val: 0.0, smd_pad_cells: HashMap::new(), thru_cells: grid.mask(),             history: [vec![0; n], vec![0; n]], chan_count: vec![0; n], chan_lines: HashMap::new(), vias: Vec::new(), fp_index,@@ -306,6 +309,17 @@ impl Router {             keep: Vec::new(), keep_raw: [vec![-1; n], vec![-1; n]], ko_track: [grid.mask(), grid.mask()], ko_via: grid.mask(), keep_inner_raw: vec![-1; n], inner_raw: vec![-1; n], region_masks: Vec::new(), pairs: Vec::new(), order: variants::NetOrder::default(), board,         };         r.big_clr_val = r.rules.clearance;+        // issue #262: isolation domains by net index (a spec name with or without the leading "/")+        r.dom = r.nets.iter().map(|n| {+            let same = |s: &String| s == &n.name || s.trim_start_matches('/') == n.name.trim_start_matches('/');+            if r.rules.isolation_exempt.iter().any(same) { return (-2, 0.0); }+            r.rules.isolation.iter().enumerate().find(|(_, (nets, _))| nets.iter().any(same)).map(|(k, (_, c))| (k as i32, *c)).unwrap_or((-1, 0.0))+        }).collect();+        r.dom_max = r.dom.iter().map(|d| d.1).fold(0.0, f64::max);+        if r.dom_max > 0.0 {+            let n_in = r.dom.iter().filter(|d| d.0 >= 0).count();+            r.log(format!("router: {} isolation domain(s), {} net(s) in them, barrier up to {:.2} mm (issue #262)", r.rules.isolation.len(), n_in, r.dom_max));+        }         // issue #183: a board with no vias has no plane to stitch down to; its plane nets are routed as         // tracks like any other net (a pour can still be added after routing)         if !r.rules.vias_allowed() {@@ -673,10 +687,13 @@ impl Router {                 let mut groups: Vec<(Vec<usize>, HashSet<usize>)> = Vec::new();                 for pi in pads {                     let mask: HashSet<usize> = self.pad_cells[&pi].iter().copied().collect();+                    // issue #263: pads of one jumper pad group are joined inside the part (a jack's shell)+                    let jg = self.board.pads[pi].jumper.clone();                     let mut merged: Option<usize> = None;                     let mut gi = 0;                     while gi < groups.len() {-                        if !groups[gi].1.is_disjoint(&mask) {+                        let same_jumper = !jg.is_empty() && groups[gi].0.iter().any(|&q| self.board.pads[q].jumper == jg);+                        if same_jumper || !groups[gi].1.is_disjoint(&mask) {                             if let Some(m) = merged {                                 let (gp, gc) = groups.remove(gi);                                 groups[m].0.extend(gp);@@ -963,6 +980,16 @@ impl Router {         true     } +    /// Issue #262: the barrier between net `net` and the net with id `other` (0.0: none). Nets of one domain, nets+    /// outside every domain and exempt nets keep only the ordinary clearances.+    pub fn barrier(&self, net: usize, other: i16) -> f64 {+        if other < 0 || self.dom.is_empty() { return 0.0; }+        let (a, ca) = self.dom[net];+        let (b, cb) = self.dom.get(other as usize).copied().unwrap_or((-1, 0.0));+        if a == -2 || b == -2 || a == b { return 0.0; }+        ca.max(cb)+    }+     // -- obstacle maps ---------------------------------------------------------------     /// (obs_o, obs_d, soft, via_ok) for the window (i0, j0, i1, j1 inclusive), each a Mask of window size.     pub fn obstacle_maps(&mut self, net: usize, width: f64, win: (i64, i64, i64, i64), soft: bool) -> ([Mask; 2], [Mask; 2], [Option<Mask>; 2], Mask) {@@ -977,7 +1004,8 @@ impl Router {         let r_big = (self.big_clr_val + width / 2.0 + slop()) / RES;         // issue #250: a project rule area's clearance reaches as far as its own radius         let r_reg_max = self.region_masks.iter().map(|(_, c)| (c + width.max(self.nets[net].via) / 2.0 + slop() + 0.0707) / RES).fold(0.0, f64::max);-        let pad_r = (r_d.max(r_big).max(r_reg_max)).ceil() as i64 + 1;+        let r_bar_max = if self.dom_max > 0.0 { (self.dom_max + width.max(self.nets[net].via) / 2.0 + slop() + 0.0707) / RES } else { 0.0 };+        let pad_r = (r_d.max(r_big).max(r_reg_max).max(r_bar_max)).ceil() as i64 + 1;         let (pi0, pj0) = ((i0 - pad_r).max(0), (j0 - pad_r).max(0));         let (pi1, pj1) = ((i1 + pad_r).min(g.w as i64 - 1), (j1 + pad_r).min(g.h as i64 - 1));         let ww = (pi1 - pi0 + 1) as usize;@@ -997,6 +1025,8 @@ impl Router {             let mut other_pads = Mask::new(ww, hh);             let mut other_routes = Mask::new(ww, hh);             let mut big = Mask::new(ww, hh);+            // issue #262: obstacles of nets across an isolation barrier, per barrier width: (width, pads+fixed, routes)+            let mut bar: Vec<(f64, Mask, Mask)> = Vec::new();             for jj in 0..hh {                 let base = (pj0 as usize + jj) * g.w + pi0 as usize;                 for ii in 0..ww {@@ -1010,6 +1040,18 @@ impl Router {                     other_pads.bits[jj * ww + ii] = op;                     other_routes.bits[jj * ww + ii] = orr;                     big.bits[jj * ww + ii] = self.big_clr[l].bits[c] && op;+                    if self.dom_max > 0.0 && (op || orr) {+                        for (owner, is_route) in [(pr, false), (fr, false), (rr, true)] {+                            if owner < 0 || owner == nid { continue; }+                            let b = self.barrier(net, owner);+                            if b <= 0.0 { continue; }+                            let k = match bar.iter().position(|e| (e.0 - b).abs() < 1e-9) {+                                Some(k) => k,+                                None => { bar.push((b, Mask::new(ww, hh), Mask::new(ww, hh))); bar.len() - 1 }+                            };+                            if is_route { bar[k].2.bits[jj * ww + ii] = true; } else { bar[k].1.bits[jj * ww + ii] = true; }+                        }+                    }                 }             }             let mut hard = other_pads.clone();@@ -1020,6 +1062,17 @@ impl Router {             o.or_with(&sub.dilate(&big, r_big));             let mut d = sub.dilate(&hard, r_d);             d.or_with(&sub.dilate(&big, r_big + 0.0707 / RES));+            // issue #262: across an isolation barrier the obstacle keeps the barrier, for tracks and for vias+            for (b, hard_b, routes_b) in &bar {+                let mut hb = hard_b.clone();+                if !soft { hb.or_with(routes_b); }+                let rb = (b + width / 2.0 + slop()) / RES;+                o.or_with(&sub.dilate(&hb, rb));+                d.or_with(&sub.dilate(&hb, rb + 0.0707 / RES));+                let mut vb = hard_b.clone();+                vb.or_with(routes_b);+                via_block.or_with(&sub.dilate(&vb, (b + via / 2.0 + slop() + 0.0707) / RES));+            }             // issue #250: in a project rule area every net keeps the area's clearance: from obstacles inside it,             // and (for a track inside or touching it) from any obstacle             for (rm, rc) in &self.region_masks {
crates/aiflow-router/src/project_rules.rs+17
@@ -103,6 +103,7 @@ pub fn read(board: &Board, pro: Option<&str>, dru: Option<&str>, base: f64) -> P         for c in cs { if let Some(&v) = class_clr.get(c) { raise(&mut out, net, v); } }     }     let re_class = regex_lite::Regex::new(r#"[AB]\.NetClass\s*==\s*'([^']+)'"#).unwrap();+    let re_class_pair = regex_lite::Regex::new(r#"[AB]\.NetClass\s*!=\s*'|!\s*[AB]\.hasNetclass\("#).unwrap();     let re_area = regex_lite::Regex::new(r#"(?:insideArea|intersectsArea|enclosedByArea)\('([^']+)'\)"#).unwrap();     for (name, cond, v) in dru.map(dru_clearance_rules).unwrap_or_default() {         if v <= base + 1e-9 { continue; }@@ -111,6 +112,10 @@ pub fn read(board: &Board, pro: Option<&str>, dru: Option<&str>, base: f64) -> P                 Some(poly) => out.regions.push(ClearRegion { name: c[1].to_string(), poly, clearance: v }),                 None => out.not_applied.push(format!("rule {name}: {cond} (no board zone named {})", &c[1])),             }+        } else if re_class_pair.is_match(&cond) {+            // issue #262: a clearance between one class and the others (an isolation barrier) is not a clearance+            // from every net, its own class included; the router holds it as spec `isolationDomains`+            out.not_applied.push(format!("rule {name}: {cond} (between net classes: give the router spec isolationDomains)"));         } else if let Some(c) = re_class.captures(&cond) {             let class = c[1].to_string();             for (net, cs) in &member { if cs.contains(&class) { raise(&mut out, net, v); } }@@ -125,6 +130,18 @@ pub fn read(board: &Board, pro: Option<&str>, dru: Option<&str>, base: f64) -> P mod tests {     use super::*; +    #[test]+    fn a_class_to_other_class_rule_is_not_a_clearance_from_every_net() {+        let pro = r#"{"net_settings": {"classes": [{"name": "Default", "clearance": 0.1}, {"name": "Iso", "clearance": 0.15}],+            "netclass_patterns": [{"netclass": "Iso", "pattern": "/HV_*"}]}}"#;+        let dru = r#"(version 1)+(rule "Iso to logic" (condition "A.NetClass == 'Iso' && B.NetClass != 'Iso'") (constraint clearance (min 2.0mm)))"#;+        let b = Board::from_text("t.kicad_pcb", BOARD.to_string()).unwrap();+        let c = read(&b, Some(pro), Some(dru), 0.1);+        assert!(c.nets.get("/HV_BUS").copied().unwrap_or(0.0) < 1.0, "{:?}", c.nets);+        assert!(c.not_applied.iter().any(|n| n.contains("isolationDomains")), "{:?}", c.not_applied);+    }+     const BOARD: &str = r#"(kicad_pcb (layers (0 "F.Cu" signal) (31 "B.Cu" signal))   (net 1 "/HV_BUS") (net 2 "/SENSE") (net 3 "GND")   (zone (net 0) (net_name "") (layers "F&B.Cu") (name "HV") (keepout (tracks allowed) (vias allowed) (pads allowed) (copperpour allowed) (footprints allowed))
crates/aiflow-router/src/rules.rs+21−1
@@ -57,6 +57,14 @@ pub struct Rules {     /// opt in on a VIPPO-capable fab.     #[serde(default)]     pub allow_via_in_pad: bool,+    /// Issue #262: isolation domains (spec `isolationDomains`: [{nets, clearance}]). A net in one domain keeps the+    /// domain's clearance from every net outside it (a net outside every domain keeps the other domain's), and only+    /// the ordinary clearance from nets of its own domain: an isolation barrier between net groups, the way a KiCad+    /// rule `A.NetClass == 'X' && B.NetClass != 'X'` reads.+    pub isolation: Vec<(Vec<String>, f64)>,+    /// Nets no barrier applies to (spec `isolationExempt`), for a part that bridges the barrier on purpose (the+    /// mid-node of two Y capacitors in series).+    pub isolation_exempt: Vec<String>, }  fn is_true(b: &bool) -> bool { *b }@@ -93,7 +101,7 @@ impl Default for Rules {             track: 0.25, clearance: 0.2, net_clearance: Default::default(), via: 0.8, drill: 0.4, via_small: 0.6, drill_small: 0.3, edge: 0.5,             stub: 0.25, narrow: 0.5, escape: 0.45, corridor: 0.5, ic_zone: 2.0, channel: 2.5,             planes: BTreeMap::new(), wide: BTreeMap::new(), mid: BTreeMap::new(), hole_to_hole: 0.25, via_search_mm: 6.0, kelvin: BTreeMap::new(), signal_priority: Vec::new(), plane_under: Vec::new(), decoupling: Vec::new(), impedance: BTreeMap::new(), clear_regions: Vec::new(),-            route_layers: Vec::new(), vias: true, allow_via_in_pad: false,+            route_layers: Vec::new(), vias: true, allow_via_in_pad: false, isolation: Vec::new(), isolation_exempt: Vec::new(),         }     } }@@ -148,6 +156,18 @@ impl Rules {         // issue #183: single-face / no-via boards (main.rs also reads the project's .kicad_dru)         r.route_layers = spec_route_layers(spec).unwrap_or_default();         if let Some(v) = spec.get("vias").and_then(|v| v.as_bool()) { r.vias = v; }+        // issue #262: isolation domains, each {nets: [...], clearance: mm}+        if let Some(a) = spec.get("isolationDomains").and_then(|v| v.as_array()) {+            for d in a {+                let nets: Vec<String> = d.get("nets").and_then(|v| v.as_array()).map(|x| x.iter().filter_map(|n| n.as_str().map(String::from)).collect()).unwrap_or_default();+                if let Some(c) = d.get("clearance").and_then(|v| v.as_f64()) {+                    if !nets.is_empty() && c > 0.0 { r.isolation.push((nets, c)); }+                }+            }+        }+        if let Some(a) = spec.get("isolationExempt").and_then(|v| v.as_array()) {+            r.isolation_exempt = a.iter().filter_map(|n| n.as_str().map(String::from)).collect();+        }         r     } 
crates/aiflow-router/src/simplify.rs+13
@@ -520,6 +520,19 @@ impl Router {                 if self.big_clr[l].bits[c] && p != -1 && p != nid { return false; }             }         }+        // issue #262: across an isolation barrier a straightened segment keeps the barrier too+        if self.dom_max > 0.0 && nid >= 0 {+            let mut widths: Vec<f64> = self.dom.iter().map(|d| d.1).filter(|&c| c > 0.0).collect();+            widths.sort_by(|x, y| x.partial_cmp(y).unwrap());+            widths.dedup_by(|x, y| (*x - *y).abs() < 1e-9);+            for bw in widths {+                for c in g.segment_cells(a, b, bw + width / 2.0 + slop(), Some(0.0)) {+                    for o in [self.pad_raw[l][c], self.route_raw[l][c], self.fixed_raw[l][c]] {+                        if o >= 0 && o != nid && self.barrier(nid as usize, o) >= bw - 1e-9 { return false; }+                    }+                }+            }+        }         true     } 
crates/aiflow-router/tests/isolation.rsadded+73
@@ -0,0 +1,73 @@+//! Issue #262 (isolation domains) and issue #263 (jumper pad groups).+use aiflow_board::Board;+use aiflow_router::{Router, Rules};+use serde_json::json;++const BOARD: &str = r#"(kicad_pcb+  (layers (0 "F.Cu" signal) (31 "B.Cu" signal))+  (net 1 "/HV_A") (net 2 "/HV_B") (net 3 "/LV") (net 4 "/MID")+  (gr_rect (start 0 0) (end 20 20) (layer "Edge.Cuts"))+  (footprint "test" (layer "F.Cu") (at 10 10) (property "Reference" "U1")+    (pad "1" smd rect (at -5 0) (size 1 1) (layers "F.Cu") (net 1 "/HV_A"))+    (pad "2" smd rect (at -5 4) (size 1 1) (layers "F.Cu") (net 2 "/HV_B"))+    (pad "3" smd rect (at 5 0) (size 1 1) (layers "F.Cu") (net 3 "/LV"))+    (pad "4" smd rect (at 5 4) (size 1 1) (layers "F.Cu") (net 3 "/LV"))+    (pad "5" smd rect (at 0 -6) (size 1 1) (layers "F.Cu") (net 4 "/MID"))+    (pad "6" smd rect (at 0 6) (size 1 1) (layers "F.Cu") (net 4 "/MID"))))"#;++fn router(spec: serde_json::Value) -> Router {+    Router::new(Board::from_text("iso.kicad_pcb", BOARD.into()).unwrap(), Rules::from_spec(&spec), false)+}++#[test]+fn isolation_domains_read_from_the_spec() {+    let r = Rules::from_spec(&json!({"isolationDomains": [{"nets": ["/HV_A", "HV_B"], "clearance": 2.0}, {"nets": [], "clearance": 1.0}],+        "isolationExempt": ["/MID"]}));+    assert_eq!(r.isolation, vec![(vec!["/HV_A".to_string(), "HV_B".to_string()], 2.0)], "an empty domain is left out");+    assert_eq!(r.isolation_exempt, vec!["/MID".to_string()]);+}++#[test]+fn the_barrier_holds_between_domains_not_inside_one_nor_for_exempt_nets() {+    let r = router(json!({"isolationDomains": [{"nets": ["/HV_A", "HV_B"], "clearance": 2.0}], "isolationExempt": ["/MID"]}));+    let id = |n: &str| r.net_ids[n];+    assert_eq!(r.barrier(id("/HV_A"), id("/LV") as i16), 2.0, "a net outside every domain keeps the domain's clearance");+    assert_eq!(r.barrier(id("/LV"), id("/HV_B") as i16), 2.0, "both ways, and a spec name without the leading /");+    assert_eq!(r.barrier(id("/HV_A"), id("/HV_B") as i16), 0.0, "nets of one domain keep only the ordinary clearance");+    assert_eq!(r.barrier(id("/MID"), id("/HV_A") as i16), 0.0, "an exempt net bridges the barrier");+    assert_eq!(r.barrier(id("/HV_A"), -1), 0.0);+    assert_eq!(router(json!({})).barrier(id("/HV_A"), id("/LV") as i16), 0.0, "no domains, no barrier");+}++#[test]+fn a_track_of_another_domain_keeps_the_barrier_from_a_pad() {+    // a cell 1.5 mm right of /HV_A's pad edge: free for /LV without domains (track and via), blocked with a 2 mm barrier+    let (x, y) = (5.5 + 1.5, 10.0);+    for (spec, blocked) in [(json!({}), false), (json!({"isolationDomains": [{"nets": ["/HV_A", "/HV_B"], "clearance": 2.0}]}), true)] {+        let mut r = router(spec);+        let lv = r.net_ids["/LV"];+        let (i, j) = r.grid.to_cell(x, y);+        let win = (0, 0, r.grid.w as i64 - 1, r.grid.h as i64 - 1);+        let (orth, _, _, via) = r.obstacle_maps(lv, 0.2, win, false);+        assert_eq!(orth[0].get(i as usize, j as usize), blocked);+        assert_eq!(via.get(i as usize, j as usize), !blocked, "the via map marks where a via may go");+    }+}++#[test]+fn a_jumper_pad_group_is_one_terminal() {+    let shell = |groups: &str| format!(r#"(kicad_pcb+  (layers (0 "F.Cu" signal) (31 "B.Cu" signal))+  (net 1 "SHIELD")+  (gr_rect (start 0 0) (end 30 20) (layer "Edge.Cuts"))+  (footprint "jack" (layer "F.Cu") (at 15 10) (property "Reference" "J1") {groups}+    (pad "13" thru_hole rect (at -10 0) (size 2 2) (drill 1) (layers "*.Cu") (net 1 "SHIELD"))+    (pad "14" thru_hole rect (at 10 0) (size 2 2) (drill 1) (layers "*.Cu") (net 1 "SHIELD"))))"#);+    let b = Board::from_text("j.kicad_pcb", shell(r#"(jumper_pad_groups ("13" "14"))"#)).unwrap();+    let (a, c) = (b.pad_by_key("J1.13").unwrap().jumper.clone(), b.pad_by_key("J1.14").unwrap().jumper.clone());+    assert!(!a.is_empty() && a == c, "{a:?} {c:?}");+    let joined = Router::new(b, Rules::default(), false);+    assert_eq!(joined.nets[joined.net_ids["SHIELD"]].clusters.len(), 1, "tabs joined by the shell need no track");+    let apart = Router::new(Board::from_text("j.kicad_pcb", shell("")).unwrap(), Rules::default(), false);+    assert_eq!(apart.nets[apart.net_ids["SHIELD"]].clusters.len(), 2);+}