convert cartesian XY G code to polar coordinates G code for a scara kinetic art
convert cartesian XY G code to polar coordinates G code for a scara kinetic art
Has anyone created a excel spreadsheet or know of a program that will take XY g code and convert it to polar coordinate g code using G 16. I\m building a scar robotic arm and need such a program.
Dan Mauch
Dan Mauch
Re: convert cartesian XY G code to polar coordinates G code for a scara kinetic art
havent seen such a beast...
-
- Old Timer
- Posts: 47
- Joined: Sat Apr 07, 2012 10:22 am
Re: convert cartesian XY G code to polar coordinates G code for a scara kinetic art
Dan,
As Art already mentioned such a program would be a real BEAST.... ;)
Isn't it possible for you to set your G-code X and Y coordinates in 2 columns/rows in Excel and put the formulas beside it ?
=SQRT((B1*B1)+(B2*B2)) (Pythagoras; distance)
=ATAN(B2/B1)*57.2958 (Cartesian to Polar; angle)
Hessel
As Art already mentioned such a program would be a real BEAST.... ;)
Isn't it possible for you to set your G-code X and Y coordinates in 2 columns/rows in Excel and put the formulas beside it ?
=SQRT((B1*B1)+(B2*B2)) (Pythagoras; distance)
=ATAN(B2/B1)*57.2958 (Cartesian to Polar; angle)
Hessel
Re: convert cartesian XY G code to polar coordinates G code for a scara kinetic art
A friend of mine converted a cartessian G code to polar. He says it was pretty simple. He created a couple macro's to pull upo the code into a spreadsheet, do the conversion and then revert the format back to a polar text file. Best of all he said that if I needed to convert many files he woul;d write a program to do that. But before I have him do that I want to get the scara running with the new harmonoic drive Y axis.
Dan mauch
Dan mauch
Re: convert cartesian XY G code to polar coordinates G code for a scara kinetic art
Thanks! That was exactly what I needed. It converts cartesian G code to polar g code. I test ran it yesterday and it works great. Since there wasn't a narrative with the link you provided I thought I would go ahead and post the application in formation.
"You must have python 3 installed. You also need the ?pathlib? library. Type ?pip install pathlib? in your python scripts folder to get that. The easiest way to run it, is to put the file you want to convert in the folder with the python script. To convert a file called test.gcode you type ?python PolarPreProcessor.py test.gcode. It will print done when complete and you will now have a new gcode file called test_polar.gcode. If python is not in your path, you will need to put the location info in front, like c:python3python PolarPreProcessor.py test.gcode."
Dan Mauch
"You must have python 3 installed. You also need the ?pathlib? library. Type ?pip install pathlib? in your python scripts folder to get that. The easiest way to run it, is to put the file you want to convert in the folder with the python script. To convert a file called test.gcode you type ?python PolarPreProcessor.py test.gcode. It will print done when complete and you will now have a new gcode file called test_polar.gcode. If python is not in your path, you will need to put the location info in front, like c:python3python PolarPreProcessor.py test.gcode."
Dan Mauch
Re: convert cartesian XY G code to polar coordinates G code for a scara kinetic art
Was that for your sand plotter?
Kirk
Kirk
Re: convert cartesian XY G code to polar coordinates G code for a scara kinetic art
Yes and I also have a scara project that will follow.
Dan
Dan
Re: convert cartesian XY G code to polar coordinates G code for a scara kinetic art
It would be nice if this old version of SMF had a like button, but it doesn't. Consider the missing button clicked!
Kirk
Kirk
Who is online
Users browsing this forum: No registered users and 8 guests