Forum

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: Question about changing coordinate transformation
roses
Newbie
Posts: 2
Permalink
Post Question about changing coordinate transformation
on: August 8, 2017, 13:38
Quote

I'm thinking about converting my polargraph to use perpendicular 'XY' rails instead of the current V plotter setup and was wondering if Polargraph's current coordinate transformation is based in the firmware code or the processing code (or both). Is this a straightforward thing to do or am I better off starting with a new arduino and motors?

Very much in the concept phase at this point so any pointers are appreciated.

Thanks!

sandy
Administrator
Posts: 1227
Permalink
sandy
Post Re: Question about changing coordinate transformation
on: August 8, 2017, 21:26
Quote

Probably not that hard to do in principle, but the codebase isn't very tidy to work in, so I expect there'd be a lot of edge cases to figure out how to adapt it.
In the firmware, the conversion functions are in
https://github.com/euphy/polargraph_server_a1/blob/master/util.ino

There's a couple of functions called things like getCartesianX(...) and getCartesianY(...) that convert native coordinates into cartesian, and then a couple of functions called things like getMachineA(...) and getMachineB(...) that do the opposite calculation.

In the controller, in https://github.com/euphy/polargraphcontroller/blob/master/Machine.pde
you'll find a couple of methods called something like asNativeCoords(...) and asCartesianCoords(...).

Not impossible, or even hard ... but a bit messy! If I wasn't the author, I'd probably adapt a firmware and controller that already exists. Use G-code to drive it, which is easier to generate. Kongorilla is a drawing fellow who uses LinuxCNC to run his cartesian machines (I think) - perhaps he can fill in some blanks about how easy that was to configure.

sn

kongorilla
Pro
Posts: 324
Permalink
kongorilla
Post Re: Question about changing coordinate transformation
on: August 9, 2017, 07:02
Quote

For all my cartesian plotters, I use GRBL. I just buy a cheap Uno/CNC shield combo to control them:
https://www.aliexpress.com/item/CNC-Shield-V3-0-UNO-R3-4pcs-A4988-Driver-GRBL-for-Arduino-3D-Printer-TE623/32781225887.html
(I haven't bought from this seller, BTW, just an example showing how incredibly cheap these things have gotten).

Then the issue is choosing the software to generate the gcode. I haven't had much time for plotting recently, but I've played with Laserweb a little ( http://cncpro.co/ ) and in the past I've used the gcode tools in Inkscape and Rick McConney's Penplotter controller software ( https://github.com/RickMcConney/PenPlotter )
Here's a G+ post showing the sort of rig I'm talking about, using Laserweb for gcode:
https://plus.google.com/u/0/+StephenKongsle1/posts/NJiFn4iYtcB

roses
Newbie
Posts: 2
Permalink
Post Re: Question about changing coordinate transformation
on: August 9, 2017, 14:50
Quote

Cool thanks for the detailed responses, I think I'll press ahead with GRBL / gcode route as that path seems well traveled (although I am quite used to navigating unfamiliar or less than pristine software libraries having written some myself 🙂 )

Pages: [1]
Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.026 seconds.