arpruss / gcodeplot

Use a 3-axis machine as a pen plotter
Other
167 stars 60 forks source link

Adding default config file #14

Open SanZamoyski opened 5 years ago

SanZamoyski commented 5 years ago

Hi again!

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

Regards!

arpruss commented 5 years ago

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

nylen commented 4 years ago

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.