Skip to content

Instantly share code, notes, and snippets.

@datapaganism
Last active August 15, 2022 14:23
Show Gist options
  • Save datapaganism/b1e325695e36ebefe3b4b2482d5a58d8 to your computer and use it in GitHub Desktop.
Save datapaganism/b1e325695e36ebefe3b4b2482d5a58d8 to your computer and use it in GitHub Desktop.
Takes two parameters, the original STL file and a patch and will update the original file with the patch
# ./patch_stl.sh <originalFile> <patchFile>
# remember to chmod +x
# Takes two parameters, the original STL file and a patch and will update the original file with the patch
# xxd $1 > $1.hex && patch $1.hex < $2 && xxd -r $1.hex > $1
# rm $1.hex
cp $1 $1.backup
xxd -r $2 $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment