output.push(points);

// send output to local bridge (via HTTP or file) Run locally. Listens on localhost:3000 , receives JSON paths, converts to HPGL (common for GCC cutters):

Illustrator (JSX/CEP) → local HTTP/WebSocket → Node.js/Python app → sends HPGL / GCC commands → cutter Step 1 – Extract vector paths from Illustrator In ExtendScript ( .jsx ):

function pathsToHPGL(paths, originX, originY) let hpgl = "IN;PU0,0;\n"; paths.forEach(path => let first = path[0]; hpgl += `PU$first.x + originX,$first.y + originY;\nPD`; for (let i = 1; i < path.length; i++) hpgl += `$path[i].x + originX,$path[i].y + originY,`; hpgl = hpgl.slice(0, -1) + ";\n"; ); hpgl += "SP0;\n"; return hpgl;