app
AI Flow
Public Made by Adomby adom
Adom's AI Flow: a tool to help the AI follow all of the steps it takes to build a board.
main
John Lauer
source: the crates, flows, docs and skills of adom-aiflow 0.1.5, so PRs can be opened against them
ad411ea
use aiflow_board::Board;
fn main() {
let p = std::env::args().nth(1).unwrap();
let b = Board::load(&p).unwrap();
let thru = b.pads.iter().filter(|p| p.thru).count();
let f = b.pads.iter().filter(|p| p.on_f && !p.thru).count();
let bb = b.pads.iter().filter(|p| p.on_b && !p.thru).count();
println!("pads {} thru {} smd-f {} smd-b {} footprints {} nets {} layers {:?} bbox {:?}", b.pads.len(), thru, f, bb, b.footprints.len(), b.nets.len(), b.copper_layers, b.bbox);
let mut by_ref: std::collections::BTreeMap<String, usize> = Default::default();
for p in &b.pads { *by_ref.entry(p.reference.clone()).or_default() += 1; }
println!("{:?}", by_ref.iter().take(12).collect::<Vec<_>>());
}