cleanup
This commit is contained in:
@@ -1,18 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -euo pipefail
|
||||
|
||||
filename=$(basename -- "$1")
|
||||
filename="${filename%.*}"
|
||||
GERBERS_DIR="gerbers"
|
||||
|
||||
kicad-cli pcb export gerbers -o output -l Back $1
|
||||
kicad-cli pcb export gerbers -o output -l Edge.Cuts $1
|
||||
kicad-cli pcb export drill -o output $1
|
||||
usage() {
|
||||
echo "Usage: $0 <kicad_pcb_file>"
|
||||
exit 1
|
||||
}
|
||||
|
||||
mkdir -p gcode
|
||||
PCB_FILE="$1"
|
||||
|
||||
docker run --rm -i -t -u "$(id -u):$(id -g)" -v ".:/data" ptodorov/pcb2gcode \
|
||||
--back="output/$filename-Back.gbl" \
|
||||
--drill="output/$filename.drl" \
|
||||
--outline="output/$filename-Edge_Cuts.gm1"
|
||||
mkdir -p "$GERBERS_DIR"
|
||||
|
||||
# export drill, front and back layers as gerber files
|
||||
kicad-cli pcb export drill -o "$GERBERS_DIR" "$PCB_FILE"
|
||||
kicad-cli pcb export gerbers -o "$GERBERS_DIR" -l Front "$PCB_FILE"
|
||||
kicad-cli pcb export gerbers -o "$GERBERS_DIR" -l Back "$PCB_FILE"
|
||||
kicad-cli pcb export gerbers -o "$GERBERS_DIR" -l Edge.Cuts "$PCB_FILE"
|
||||
|
||||
# Export outlines of the penelized boards only; Use the layer 'User.Eco1'.
|
||||
python3 export_panel_outlines_gerber.py \
|
||||
--layers User.Eco1 \
|
||||
--output "$GERBERS_DIR" \
|
||||
"$PCB_FILE"
|
||||
|
||||
# set input filenames and all milling parameters in `millproject` config file
|
||||
docker run --rm -i -t \
|
||||
-u "$(id -u):$(id -g)" \
|
||||
-v "$(pwd):/data" \
|
||||
ptodorov/pcb2gcode
|
||||
Reference in New Issue
Block a user