GearHeads Corner
April 16, 2021, 12:17:44 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: convert cartesian XY G code to polar coordinates G code for a scara kinetic art  (Read 543 times)
0 Members and 1 Guest are viewing this topic.
Dan Mauch
Full Member
***
Posts: 117


View Profile
« on: February 01, 2021, 03:44:32 PM »

Has anyone created a excel spreadshe et or know of a program that will take XY g code and convert it to polar coordinat e g code using G 16. I\m building a scar robotic arm and need such a program.

Dan Mauch
Logged
ArtF
Administrator
Hero Member
*****
Posts: 5740



View Profile
« Reply #1 on: February 11, 2021, 11:23:34 PM »

havent seen such a beast...
Logged
Hessel Oosten
Newbie
*
Posts: 43


View Profile
« Reply #2 on: February 12, 2021, 05:46:40 AM »

Dan,

As Art already mentioned such a program would be a real BEAST....   Wink

Isn't it possible for you to set your G-code X and Y coordinat es in 2 columns/rows in Excel and put the formulas beside it ?

=SQRT((B1*B1)+(B2*B2))     (Pythagora s; distance)

=ATAN(B2/B1)*57.2958    (Cartesian to Polar; angle)

Hessel
Logged
Mooselake
Hero Member
*****
Posts: 650



View Profile
« Reply #3 on: February 12, 2021, 07:56:48 AM »

Something like this perhaps?

Kirk
Logged
Dan Mauch
Full Member
***
Posts: 117


View Profile
« Reply #4 on: February 13, 2021, 12:56:00 PM »

  A friend of mine converted a cartessia n G code to polar. He says it was pretty simple. He created a couple macro's to pull upo the code into a spreadshe et, do the conversio n 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
Logged
Dan Mauch
Full Member
***
Posts: 117


View Profile
« Reply #5 on: March 23, 2021, 02:35:50 PM »

  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 applicati on 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.gcod e you type “python PolarPreP rocessor. py test.gcod e. It will print done when complete and you will now have a new gcode file called test_pola r.gcode. If python is not in your path, you will need to put the location info in front, like c:python3py thon PolarPreP rocessor. py test.gcod e."

Dan Mauch
Logged
Mooselake
Hero Member
*****
Posts: 650



View Profile
« Reply #6 on: March 23, 2021, 03:39:58 PM »

Was that for your sand plotter?

Kirk
Logged
Dan Mauch
Full Member
***
Posts: 117


View Profile
« Reply #7 on: March 24, 2021, 01:04:28 PM »

Yes and I also have a scara project that will follow.
Dan
Logged
Mooselake
Hero Member
*****
Posts: 650



View Profile
« Reply #8 on: March 27, 2021, 02:23:23 PM »

It would be nice if this old version of SMF had a like button, but it doesn't.  Consider the missing button clicked!

Kirk
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!