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
# ./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 |
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
# ./create_stl_patch <originalFile> <updatedFile> | |
# remember to chmod +x | |
# Takes two paramaters, the original STL and the modified STL to create a patch using their differences | |
# diff -u <(xxd $1) <(xxd $2) > $1.patch | |
comm -13 <(xxd $1) <(xxd $2) > $1.patch |