cnc-club / gcodetools

CAM extension for Inkscape to export paths to Gcode

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is it possible to use this extension from command line?

CarstenHoyer opened this issue · comments

I would like to be able to input a config file for gcodetools and and svg and then generate a gcode file by running inkscape as a cli. Is something like that possible?

commented

yes. basically, all inkscape's extensions are cli utilities, but you will have to find how the parameters are transferred.
What are you planning to use it for?

Hey @cnc-club, sorry for the late reply. December went fast.

My use case is converting svg to gcode for plotting. The plots are made with PaperJS.

I ended up running inkscape and gcodetools with node-inkscape. I was unable to provide gcodetools with options from cli, so I did a terrible hack: Before running inkscape I symlink custom inx files into the extensions folder. Those inx files are a copy of the gcodetools files, where I set the parameters the way I want them. Then I call those inx instead of gcodetools. After I have run Inkscape I delete the symlinks. It works. Its bad :)

I am thinking there might be better ways to do this, using a JavaScript library instead of bridging to Inkscape. But I have not found one, that makes paths on par with gcodetools.