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; // ⚠️ getState_Line() 是端点对:每 4 个数一段 for (let i = 0; i + 3 < l.length; i += 4) { const s = [Math.round(l[i]), Math.round(l[i+1]), Math.round(l[i+2]), Math.round(l[i+3])]; const inBox = (x, y) => x >= 820 && x <= 1000 && y >= 300 && y <= 700; if (inBox(s[0], s[1]) || inBox(s[2], s[3])) segs.push(s); } } return {n: segs.length, segs};