User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
equipment:bungard-ccd:pcb2gcode [2019/05/25 22:16] – created Lars Christensenequipment:bungard-ccd:pcb2gcode [2025/09/25 21:38] (current) Morten Frederiksen
Line 16: Line 16:
 #!/bin/sh -exu #!/bin/sh -exu
 # Generate front+back mill + cut gcode # Generate front+back mill + cut gcode
 +INPUTDIR=${1:-.} # Use argument as input dir or default to .
 +optional_arg () { echo "${2:+$1 "$2"}"; }
 pcb2gcode \ pcb2gcode \
-  --back *-B.Cu.gbr \ +  $(optional_arg --back "${INPUTDIR}"/*-B_Cu.gbr
-  --front *-F.Cu.gbr \ +  $(optional_arg --front "${INPUTDIR}"/*-F_Cu.gbr
-  --outline *-Edge.Cuts.gbr \+  --outline "${INPUTDIR}"/*-Edge.Cuts.gbr \
   --drill *-PTH.drl \   --drill *-PTH.drl \
   --cut-feed=128 \   --cut-feed=128 \
Line 47: Line 49:
 # notooldrill.ngc is the drill file without tool changes # notooldrill.ngc is the drill file without tool changes
 grep -v "^T" drill.ngc > notooldrill.ngc grep -v "^T" drill.ngc > notooldrill.ngc
 +
 +# Make outline occupy the same coordinate space as back and drill files
 +sed -e "s/X/X-/g" outline.ngc > flipped-outline.ngc
 +
 </code> </code>

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also, you acknowledge that you have read and understand our Privacy Policy. If you do not agree, please leave the website.

More information