I got some photos here for a sub-spindle I made for the Deckel to do engraving. For simple machining like for this I use a program called F-Engrave which is free from Scorchworks. It takes a .dxf or .svg file and can convert it to a path for an engraver. There is also a program to quickly write out text and position as desired. It also has functionality for v-groove cutting and taking a grey scale image and converting it to a machined height map. I believe that code was then implemented into EMC LinuxCNC.
Once the code was complete, I made this little post processor to convert the G-Code to what the Dialog 11 requires. The only additions to the code needed are:
add at the start of a program which is numbered 115
and at the end of the code, add:
To run the code, copy and paste into a text file named process.sh or something similar. If on Linux, use BASH. If on Windows, get BASH. Do a
To get to the directory. Then, for a g-code file named input.txt
The output will be in the folder beside the process.sh in a file named output.txt
Here is the code as of yet. It is just adding line numbers and converting G70 to G90 as the ISO was a little different at that time to now and things like that. Maybe it will help someone out there? Who knows. Enjoy
Once the code was complete, I made this little post processor to convert the G-Code to what the Dialog 11 requires. The only additions to the code needed are:
add at the start of a program which is numbered 115
Code:
%115*%
Code:
?
To run the code, copy and paste into a text file named process.sh or something similar. If on Linux, use BASH. If on Windows, get BASH. Do a
Code:
cd /mnt/c/<folder where process.sh and the desired g code file is located>
Code:
./process.sh input.txt
Here is the code as of yet. It is just adding line numbers and converting G70 to G90 as the ISO was a little different at that time to now and things like that. Maybe it will help someone out there? Who knows. Enjoy
Code:
cat $1
echo running on file $1
#starts a blank file
echo > output.txt
n=0
cat $1 | while read line; do
#this checks to see if the pattern is X and any 0-9 number
if [[ $line =~ ^X[0-9].*$ ]]; then
line="G1 $line"
fi
#Shitty lazy code, deal with it ;)
if [[ $line =~ ^(G20)(.*)$ ]]; then
line="G70 ${BASH_REMATCH[2]}"
fi
if [[ $line =~ ^(G21)(.*)$ ]]; then
line="G71 ${BASH_REMATCH[2]}"
fi
if [[ $line =~ ^(G28)(.*)$ ]]; then
line="${BASH_REMATCH[2]}"
fi
if [[ $line =~ ^(G30)(.*)$ ]]; then
line="${BASH_REMATCH[2]}"
fi
if [[ $line =~ ^(G19)(.*)$ ]]; then
line="G91*1 ${BASH_REMATCH[2]}"
fi
#add the line number to the next line
echo N$n $line >> output.txt
n=$[$n + 1]
done
sed -i -e 's/(/[/g' output.txt
sed -i -e 's/)/]/g' output.txt
echo OUTPUT:
cat output.txt