Last active
December 18, 2017 04:24
-
-
Save sleemanj/c0db735afe029c3a478b to your computer and use it in GitHub Desktop.
Create image from gerbers with gerbv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
HOLES="$1" | |
SILK="$2" | |
MASK="$3" | |
COPPER="$4" | |
# We need to "invert" the mask, this is dirty but seems to work, further testing required on larger sample set :) | |
echo "%IPNEG*%" > /tmp/newMask.gbr | |
cat "$MASK" | sed -r 's/%IP(POS|NEG)\*%//' >>/tmp/newMask.gbr | |
gerbv -a --border=10 --background="#E0D5B3" --dpi=1200 -o /tmp/dirtyoutput.png -xpng \ | |
--foreground="#FFFFFFFF" "$HOLES" \ | |
--foreground="#FFFFFFFF" "$SILK" \ | |
--foreground="#FF000099" /tmp/newMask.gbr \ | |
--foreground="#FF9D00FF" "$COPPER" | |
echo "Output is in /tmp/dirtyoutput.png" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment