AxiDraw Plugin: Plotting Grasshopper Curves on Paper
I built the AxiDraw plugin to connect Grasshopper curves to a physical plotting workflow. It contains two components: AxiDraw exports SVG and starts or manages a plot, while SVG Import brings SVG geometry and colors back into Grasshopper. A four color dot drawing provides an example of the path from viewport preview to marks on paper.

What the two components do
AxiDraw takes a list of curves to plot. An optional Paper curve sets the SVG page extent and position; it does not scale the input curves to fit the page. The port and output folder can also be supplied. If the port is left empty, AxiCLI searches for the device. The component exports an SVG and reports its path, the command it has prepared, and a log. The user checks the result and then clicks Plot; a routine Grasshopper recomputation does not start the machine.
In this definition, upstream components generate curves and preview the dots before passing the curves to AxiDraw. The component's indicator distinguishes connecting, connected, and disconnected or error states so the device connection can be checked before plotting.
Export, inspect, then plot
The AxiDraw component writes valid curves to an SVG and builds the AxiCLI command. It can be configured with pen up and down heights, drawing and travel speeds, acceleration, pen movement rates and delays, and path optimization. Its .SVG, Cmd, Log, and Info outputs expose the file, command, run messages, and device environment.
Only after the SVG page and paths have been checked does clicking Plot start python -m axicli. This short excerpt shows the process launch; the implementation also constructs arguments and handles asynchronous execution, state, and errors:
ProcessStartInfo startInfo = new ProcessStartInfo
{
FileName = "python",
Arguments = arguments, // Includes -m axicli, the SVG path, and plot settings
UseShellExecute = false,
CreateNoWindow = true
};
During a plot, Pause terminates the current AxiCLI process. Afterward, Reset raises the pen with the current settings, returns to the recorded Home, and releases the motors. Before a full plot, lets the user check pen contact; the pen up and down heights can also be adjusted.
This workflow uses AxiCLI rather than the Python module's interactive XY control; see the AxiDraw CLI documentation and Python API documentation.

SVG Import takes an SVG file path. After Compute is clicked, it outputs geometry, object colors, and a paper boundary curve. Filled shapes can be imported as hatches or curves. This brings an SVG back into Grasshopper for inspection or further editing. When the path and settings are unchanged, the component reuses the imported result. F takes the file path and H selects how fills are imported; G, O, and P output geometry, color, and the paper boundary.
From color plates to plottable curves
In this example, the Grasshopper definition processes four grayscale C, M, Y, and K plates and turns the resulting dot pattern into curves for the AxiDraw component. Color separation and dot generation happen upstream; the AxiDraw component receives the finished curves. The plates correspond to cyan, magenta, yellow, and black; the colors on paper depend on the pens and surface used.




Plotting on paper
The photograph and video show the component driving a pen plotter through the dot drawing. Dots in the viewport are a path preview; marks on paper also depend on the pen, ink, and surface. Individual colored dots remain visible up close and combine into an image from farther away.

Download
Download on Food4Rhino: AxiDraw plugin.
