Nice project! I see the tool can already handle polylines, so in theory you should be able to add support for Bézier curves and arcs by converting them to polylines. But of course, the devil is usually in the details. I hope it works out.
Yes, the details have gotten so niggling that I've decided it's time for a re-write as a "Literate Program" as noted elsethread. I'll be using the docmfp package which I think will keep the complexity manageable, we'll see.