await eda.dmt_EditorControl.openDocument('9a6096762e036e23'); await new Promise(r => setTimeout(r, 1500)); const segs = []; for (const w of await eda.sch_PrimitiveWire.getAll()) { const l = w.getState_Line(); if (!l) continue; for (let i = 0; i + 3 < l.length; i += 2) { const a = [Math.round(l[i]), Math.round(l[i+1])], b = [Math.round(l[i+2]), Math.round(l[i+3])]; const inBox = p => p[0] >= 820 && p[0] <= 1000 && p[1] >= 300 && p[1] <= 700; if (inBox(a) || inBox(b)) segs.push([a[0], a[1], b[0], b[1]]); } } return {n: segs.length, segs};