← Commit history

0.2.80 (unreleased): engine 0.5.1 (standard 0.8.1): the marking font's D and B no longer read as IO and 8

Colby Knox ·153f7a3950 · ·parent 2cf8b98
6 files changed +26−7
CHANGELOG.md+3−2
@@ -2,11 +2,12 @@  ## 0.2.80 (unreleased) -- **`generate_body` is the standard's engine writer now** (#20, standard 0.8.0, adom-eda-checks 0.5.0, vendored as+- **`generate_body` is the standard's engine writer now** (#20, standard 0.8.1, adom-eda-checks 0.5.1, vendored as   published): this bridge's body3d moved into the engine, so Altium, KiCad and Fusion make the same body. The bridge   writes the STEP file. The reply adds `bodies` (the body's box in the bodies companion's form), `writtenFrom` and   `engine`; `pins` is the total pin count in a BGA too (the smallest square grid), and D2/E2 draw a QFN or DFN's-  exposed pad when both are given.+  exposed pad when both are given. The marking font's D and B have a full left side and cut right corners: D was a box+  with a centre bar and read as "IO" ("ADOM" read "AIOM" on a QFN in Altium), and B looked like an 8.  ## 0.2.79 
bridge-rs/Cargo.lock+1−1
@@ -10,7 +10,7 @@ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"  [[package]] name = "adom-eda-checks"-version = "0.5.0"+version = "0.5.1" dependencies = [  "roxmltree",  "serde_json",
bridge-rs/vendor/README.md+1−1
@@ -2,7 +2,7 @@  | Folder | From | Version | |---|---|---|-| `adom-eda-checks/` | adom/eda-bridge-standard `engine/` (the shared checks engine) | standard 0.8.0, engine 0.5.0 |+| `adom-eda-checks/` | adom/eda-bridge-standard `engine/` (the shared checks engine) | standard 0.8.1, engine 0.5.1 | | `pcb-design-rules/records/` | adom/pcb-design-rules `rules/records/` (each fab's published limits, with sources and dates) | head of 2026-10-27 |  The wiki has no git protocol, so these are copied at a version: refresh both from their pages, then run the tests.
bridge-rs/vendor/adom-eda-checks/Cargo.toml+1−1
@@ -1,6 +1,6 @@ [package] name = "adom-eda-checks"-version = "0.5.0"+version = "0.5.1" edition = "2021" description = "The EDA Bridge Standard's checks and board-file writers, computed from the board model JSON: no bridge calls, no tool." license = "MIT"
bridge-rs/vendor/adom-eda-checks/README.md+1−1
@@ -89,7 +89,7 @@ adom-eda-checks import_svg --svg logo.svg --args '{"at": [10, 10], "widthMm": 20  Replies keep the standard envelope (`success`, `errorCode`, `error`, `_hint`) and name verbs without a prefix (`apply_pours`, `add_rule`, `place_vias`): a bridge adds its own. Every reply also carries `engine`-(`"adom-eda-checks 0.5.0"`), so a bridge reports the engine it runs without writing the version by hand.+(`"adom-eda-checks 0.5.1"`), so a bridge reports the engine it runs without writing the version by hand.  ## Tests 
bridge-rs/vendor/adom-eda-checks/src/writers/body3d.rs+19−1
@@ -312,10 +312,16 @@ fn glyph(c: char) -> Option<&'static [((f64, f64), (f64, f64))]> {     const DBL: ((f64, f64), (f64, f64)) = (MM, BL); const DBR: ((f64, f64), (f64, f64)) = (MM, BR);     const LB: ((f64, f64), (f64, f64)) = (ML, BM); const RB: ((f64, f64), (f64, f64)) = (MR, BM);     const DOT: ((f64, f64), (f64, f64)) = ((0.4, 0.0), (0.6, 0.0));+    // D and B: the left side full and the right corners cut, so D does not read as I and O side by side (it was a+    // box with a centre bar: "ADOM" read "AIOM" on a QFN in Altium, 2026-10-28) and B is not an 8+    const KT: (f64, f64) = (0.75, 2.0); const KM: (f64, f64) = (0.75, 1.0); const KB: (f64, f64) = (0.75, 0.0);+    const RT: (f64, f64) = (1.0, 1.75); const RU: (f64, f64) = (1.0, 1.25); const RL: (f64, f64) = (1.0, 0.75); const RB0: (f64, f64) = (1.0, 0.25);+    const DG: &[((f64, f64), (f64, f64))] = &[F, E, (TL, KT), (KT, RT), (RT, RB0), (RB0, KB), (BL, KB)];+    const BG: &[((f64, f64), (f64, f64))] = &[F, E, (TL, KT), (KT, RT), (RT, RU), (RU, KM), (ML, KM), (KM, RL), (RL, RB0), (RB0, KB), (BL, KB)];     Some(match c.to_ascii_uppercase() {         '0' => &[A, B, C, D, E, F, DTR, DBL], '1' => &[V], '2' => &[A, B, G, E, D], '3' => &[A, B, G2, C, D],         '4' => &[F, G, B, C], '5' => &[A, F, G, C, D], '6' => &[A, F, E, D, C, G], '7' => &[A, B, C], '8' => &[A, B, C, D, E, F, G],-        '9' => &[A, B, C, D, F, G], 'A' => &[E, F, A, B, C, G], 'B' => &[A, B, C, D, V, G2], 'C' => &[A, F, E, D], 'D' => &[A, B, C, D, V],+        '9' => &[A, B, C, D, F, G], 'A' => &[E, F, A, B, C, G], 'B' => BG, 'C' => &[A, F, E, D], 'D' => DG,         'E' => &[A, F, E, D, G1], 'F' => &[A, F, E, G1], 'G' => &[A, F, E, D, C, G2], 'H' => &[F, E, B, C, G], 'I' => &[A, V, D],         'J' => &[B, C, D, E], 'K' => &[F, E, G1, DTR, DBR], 'L' => &[F, E, D], 'M' => &[E, F, B, C, DTL, DTR], 'N' => &[E, F, B, C, DTL, DBR],         'O' => &[A, B, C, D, E, F], 'P' => &[A, B, F, E, G], 'Q' => &[A, B, C, D, E, F, DBR], 'R' => &[A, B, F, E, G, DBR],@@ -520,4 +526,16 @@ mod tests {         // pins is the total in a BGA too: 64 balls are an 8 x 8 grid         assert_eq!(package("bga", json!({"pins": 64}).as_object().unwrap()).unwrap().len(), 65);     }++    #[test]+    fn d_and_b_are_not_i_o_or_8() {+        // D was a box with a centre bar and read as "IO"; B was an 8 with a bar+        assert_ne!(glyph('D'), glyph('O'));+        assert_ne!(glyph('B'), glyph('8'));+        for c in ['D', 'B'] {+            let g = glyph(c).unwrap();+            assert!(g.iter().all(|s| s.0 .0 != 0.5 || s.1 .0 != 0.5), "{c} has no centre bar");+            assert!(!g.iter().any(|s| (s.0 == (1.0, 2.0)) || (s.1 == (1.0, 2.0))), "{c}'s top-right corner is cut");+        }+    } }