gcodeplot icon indicating copy to clipboard operation
gcodeplot copied to clipboard

Adding default config file

Open SanZamoyski opened this issue 6 years ago • 2 comments

Hi again!

Is there any way to put somewhere some default config file instead of using switches?

Regards!

SanZamoyski avatar May 16 '19 07:05 SanZamoyski

No. But you can use --config=filename.

arpruss avatar May 16 '19 07:05 arpruss

You probably want to make a short shell script with your configuration.

Example:

#!/bin/bash

set -e

svg="$1"
gcode="${svg%.svg}.gcode"

python "$(dirname "$0")/gcodeplot/gcodeplot.py" \
    --work-z=0.9 \
    --lift-delta=0.6 \
    --safe-delta-z=3 \
    --z-speed=45 \
    --pens=pens.txt \
    "$svg" \
    > "$gcode.tmp"

# This avoids overwriting the gcode file if the script fails
mv "$gcode.tmp" "$gcode"

echo "Wrote gcode file: $gcode"

Save that as convert.sh, update the path to where you have gcodeplot downloaded, and then run bash convert.sh yourfile.svg.

nylen avatar Oct 14 '19 19:10 nylen