const L = await eda.pcb_PrimitiveLine.getAll(); const V = await eda.pcb_PrimitiveVia.getAll(); const want = ['USB1_DP','USB1_DM','USB5_DP','UP_DP','SCL','SDA','+3V3','+3V3_HUB','EFUSE_EN1','GND','+12V','VO1']; const cl = {}, cv = {}; for (const o of L) { const n=o.net; if(want.includes(n)) cl[n]=(cl[n]||0)+1; } for (const o of V) { const n=o.net; if(want.includes(n)) cv[n]=(cv[n]||0)+1; } const byLayer = {}; for (const o of L) byLayer[o.layer]=(byLayer[o.layer]||0)+1; return {lines: cl, vias: cv, byLayer, total: L.length};