await eda.dmt_EditorControl.openDocument('7e9415a16a909c51'); await new Promise(r => setTimeout(r, 1500)); const out = {nPourNow: (await eda.pcb_PrimitivePour.getAll()).length}; const src = [196.8505, 19.68505, "L", 6102.3655, 19.68505, "ARC", 90.0, 6279.53095, 196.8505, "L", 6279.53095, 1397.6385500000001, 5944.8851, 1397.6385500000001, 5944.8851, 2224.4106500000003, 6279.53095, 2224.4106500000003, 6279.53095, 4724.412, "ARC", 90.0, 6102.3655, 4901.57745, "L", 196.8505, 4901.57745, "ARC", 90.0, 19.68505, 4724.412, "L", 19.68505, 196.8505, "ARC", 90.0, 196.8505, 19.68505]; try { const poly = await eda.pcb_MathPolygon.createComplexPolygon([src]); out.poly = !!poly; const pour = await eda.pcb_PrimitivePour.create('GND', 15, poly, 'solid', false, 'probe-board', 1, 10); out.pour = !!pour; if (pour) { out.id = pour.primitiveId; await eda.pcb_PrimitivePour.delete(pour.primitiveId); } } catch (e) { out.err = String(e).slice(0, 120); } return out;