app
Adom Footprint
Public Made by Adomby adom
KiCad footprint creator with layer HUD viewer and delivery to KiCad/Fusion 360
← Commit history
Publish 1.0.20
6 files changed
+17−8
Cargo.lock+1−1@@ -4,7 +4,7 @@ version = 4 [[package]] name = "adom-footprint"-version = "1.0.19"+version = "1.0.20" dependencies = [ "anyhow", "clap",
Cargo.toml+1−1@@ -1,6 +1,6 @@ [package] name = "adom-footprint"-version = "1.0.19"+version = "1.0.20" edition = "2021" description = "Create, preview, lint, and deliver KiCad footprints (.kicad_mod) with interactive FpView viewer"
bin/adom-footprint⋯ 1 unchanged line ⋯
package.json+1−1@@ -1,6 +1,6 @@ { "slug": "adom-footprint",- "version": "1.0.19",+ "version": "1.0.20", "type": "app", "description": "KiCad footprint creator with layer HUD viewer and delivery to KiCad/Fusion 360", "dependencies": {
page.json+1−1@@ -1,6 +1,6 @@ { "slug": "adom-footprint",- "version": "1.0.19",+ "version": "1.0.20", "type": "app", "description": "KiCad footprint creator with layer HUD viewer and delivery to KiCad/Fusion 360", "dependencies": {
src/paste.rs+13−4@@ -77,10 +77,9 @@ pub fn paste_apertures(kicad_mod: &str) -> Vec<Aperture> { } let block = &kicad_mod[start..=end.min(kicad_mod.len() - 1)]; search = end + 1;- // Only SMD pads on the paste layer get jetted paste. Skip NPTH/edge pads.+ // Only SMD pads get jetted paste. Skip NPTH/edge pads. let smd = block.contains(" smd ");- let has_paste = block.contains("F.Paste") || !block.contains("(layers"); // default smd → paste- if !smd || !has_paste {+ if !smd { continue; } if let (Some(a), Some(s)) = (at_re.captures(block), size_re.captures(block)) {@@ -89,7 +88,17 @@ pub fn paste_apertures(kicad_mod: &str) -> Vec<Aperture> { let rot = a.get(3).and_then(|m| m.as_str().parse().ok()).unwrap_or(0.0); let w: f64 = s[1].parse().unwrap_or(0.0); let h: f64 = s[2].parse().unwrap_or(0.0);- if w > 0.0 && h > 0.0 {+ if w <= 0.0 || h <= 0.0 {+ continue;+ }+ let has_paste = block.contains("F.Paste") || !block.contains("(layers"); // default smd → paste+ // The exposed thermal pad still gets jetted paste (in the via gaps) even+ // when the source omits F.Paste — the paddle needs solder to bond, and+ // Adom jets paste directly (no stencil), so F.Paste in the file isn't a+ // prerequisite. Matches the exposed-pad test in heatsink_vias().+ let square = { let r = w / h.max(0.001); (0.6..=1.67).contains(&r) };+ let is_exposed_pad = w.min(h) >= 1.8 && square;+ if has_paste || is_exposed_pad { out.push(Aperture { cx, cy, w, h, rot }); } }