Polarsandtisch

hallo Vincentbraillard

hir der link zum Downloaden.(Danke Jeffeb3 zum bereitstellen der Datei)
Mann benötigt aber ein Github-Konto um den link zu öffnen.

servus Klaus

1 Like

@ jeffeb3

hab versucht deinen Kodeumwandler zu verwenden, war aber Erfolglos.
war auf der Plattform nicht berechtigt etwas zu ändern.
hab dann deinen Code in meinen Account kopiert.
link
Bekomme immer eine Fehlermeldung.

danke
klaus

It is trying to open a file “sandify.thr”. In the top, you can add a file by trying to add a new tab. Just upload a file named sandify.thr and try running it again.

Ich bekomme diese Fehlermeldung:

Datei “main.py”, Zeile 24, in
(theta, rho) = parts [0] .split ()
ValueError: Zu viele Werte zum Entpacken (erwartet 2)

danke Klaus

Aha. To get the .thr file, you need to use sandify and export it as a .thr file.

This looks like it is a gcode export, but with a .thr extension.

Guten Tag

Habe grade nochmal eine thr Datei von Sandify exportiert.
Leider ohne Erfolg bei der umrechnung in SCARA Datei (transformed.gcode)
Habe immernoch die gleiche Fehlermeldung

servus
klaus

The repl.it program just reads the file that is also in that workspace called “sandify.thr”. In the workspace you shared, this is what I see in that file:

;  Created by Sandify
;  https://sandify.org
...
; File name: 'sandify'
;

G01 X210.247 Y171.338
G01 X208.400 Y174.891
G01 X208.000 Y179.875
G01 X207.744 Y184.868
G01 X207.631 Y189.867
G01 X207.658 Y194.867
G01 X207.825 Y199.864
G01 X208.129 Y204.855
G01 X208.570 Y209.835

It should look like this:

#  Created by Sandify
#  https://sandify.org
# File name: 'sunburst 11'
#

2.76472 1.00000
2.76472 0.99743
2.76365 0.98950
2.76256 0.98157
2.76146 0.97365
2.76034 0.96572
2.75919 0.95780

In Sandify, click “Export” and then in “Export As”, choose “Theta Rho (.thr)”.

Download that file as a .thr and then in the repl.it, replace the “sandify.thr” file with the one you downloaded. Then run the script and download the transformed.gcode and it should have gcode in it.

@Breslauklaus Hello klaus. Thanks for the link but I had it already. My question was how did you do to flash the firmware to your arduino mega? Did you use arduino IDE?

@jeffeb3 if marlin Firmware can itself read Gcode file and control a scara, why we should use .thr file?

Imagine a square with these coordinates:

100,100
-100,100
-100,-100
100,-100
100,100

Those are straight line in cartesian, but they are not in polar. Converting each point into polar would be this (angle, radius):

pi/4, 141
3pi/4, 141
5pi/4, 141
7pi/4, 141
pi/4, 141

There are two things wrong with that. 1. Those need to be straight lines in xy. 2. We shouldn’t “unwind” from 7pi/4 to pi/4. We should go to 9pi/4. Sandify does those fixes when exporting in thr. The script takes the thr coordinates and then computes two angles for a scara machine. That file can be used by Marlin that does not know it is a scara.

If you are using marlin scara, then maybe you don’t need the thr file or conversion script. But I have not tried it. The firmware I recommended Klaus is not marlin-scara. It just thinks it is an XY machine, but the magic is in the input gcode.

I don’t know which firmware you are using. But new Marlin does not compile right away in arduino in windows. The V1 MarlinBuilder releases have fixed this for now by deleting some unused files. But if you are using marlin from somewhere else, you may need to use platformio in vscode. It is not much more complicated than the arduino ide.

There are also instructions for flashing in arduino

@Breslauklaus, did you get the script to work?

Hi. Ahve you finally test the fabri under the sand. What kind of fabric? Thanks

1 Like

Sorry, I have not got around to doing that yet. :sweat_smile:

Hi

@ jeffeb3 thanks the script works very well.
I’ve spent the last few days setting up the Silet Driver on my Marlin board because the engine noise bothered me a bit.
I still had a pair of 2208 V3 lying around.
It was frustrating but I’ve made it now
they finally run properly and no engine noise.

@ jeffeb3 have a question.
Why are we actually pushing the ball and not pulling it?
From a purely physical point of view, the effort required to pull is less?

Servus Klaus

Hmmm. I don’t know what you mean. I am intrigued.

I’m glad the scripts are working. I was worried you got frustrated and left.

Hi. Me to. What do you mean by pushing/pulling. The magnet always works to attrac the ball!

I’m confused. Yesterday in Sandify I created a fractal in the standard machine profile and then d/l ed the G code called sandifycartesian. Then I change the machine to polar and d/led the same fractalas sandify polar. Then I compared the cartesian to the polar. I was not surprised that they were quite different. Then I decided that a graphical screen shot of the tool path would make sense to me. Shockingly ,they were pretty much the same but only differed in the start location



Here are a couple screen shots. So I am confused that sandify would put out polar G code that was basically able to run on a cartesian program

There are really only two reasonable output modes in sandify. 1) Rectangular gcode and 2) Polar theta rho.

I’m not sure why I even allow polar gcode, but I am guessing it doesn’t make sense to anyone else either.

Are you trying to get gcode with angles encoded in X, Y for a machine that understands gcode (like the other scara users)? Or what are you shooting for?

Yes I am building a scara arm but am confused as I mentioned because i expected the polar output from sandify to have the angles in the output. But since I probably would’nt use an Arduino it looks like the polar output from sandify would work just fine as a cartesian equivalent. At least that is what I am hoping. But it will be a week before i have the scara arm completed but while waiting for parts I thought I would try to figure out what g code the scara would run giving the same output as a cartesian would have.

Sorry. It is really confusing. But the way the other scara tables have had success is to configure sandify with polar and use the thr output, then run it through a python script I wrote to convert the thr locations to gcode angles. The python script can be ran locally or in repl.it.

I actually coded up a change to sandify to output the scara angles directly. But I am not sure that will lead to less confusion overall.

It is a little chicken and egg. If there was an open sourcish hardware project with a scara robot, and some documentation on flashing marlin or grbl, then the instructions and knobs in sandify could be a lot simpler. But without sandify output, it make it harder for a project like that to be adopted.

I have sort of created a new standard with my 6 units per rotation unit in gcode. So far, it has been used by… IDK 4 people?

1 Like