Combining Multiple SVG Elements

I’m creating SVGs in Processing for pen plotting. Everything is going great until I start plotting. The test Truchet tiles I’ve created end up as separate arcs. I’ll attach some example pictures.

The output SVG looks something like this:
https://upload.wikimedia.org/wikipedia/commons/0/00/Truchet_tiling.svg

Everything looks seamless, but each quarter circle is it’s own individual arc. Ideally the arcs that end at the same points would be combined into a single SVG element so the pen plotter can draw each line in one seamless stroke.

However the current plot looks like this:

You can kind of see where each arcs ends and the pen picks up and then sets itself down again.