Help with Segmentize

Help with Segmentize

Postby icecube45 » Wed Mar 11, 2015 4:32 am

Hello!
I finally got my GUS (mostly) done today, but when I went to run the postprocessing script, I recieved this error..

Code: Select all
Traceback (most recent call last):
  File "gustest.py", line 198, in <module>
    abcline=getABC(line)
  File "gustest.py", line 113, in getABC
    a1=MAX_LENGTH_1-math.sqrt((xs-x1)**2+(ys-y1)**2+(zs-z1)**2)
TypeError: unsupported operand type(s) for -: 'str' and 'float'


It seems that the "xs" variable is set to "YZ", a string..
I have no idea how this could have happened, yet it persists way back in the commits for the repository..
The ys and zs variables are fine..
icecube45
 
Posts: 15
Joined: Fri Feb 27, 2015 5:13 am

Re: Help with Segmentize

Postby Nicholas Seward » Wed Mar 11, 2015 4:55 am

I bet you anything you have a gcode line that has

Code: Select all
... X YZ ...


I would change the pass on line 182 to a print "error". If "error" prints then it is a gcode formatting problem. I used Slic3r to make my gcode and it puts space between each part. I was lazy and didn't try to generalize for the broader spec.

GOOD
Code: Select all
G1 X100 Y100 Z100


BAD (for me but not for most interpreters)
Code: Select all
G1X100Y100Z100
Nicholas Seward
 
Posts: 738
Joined: Mon Nov 25, 2013 10:41 pm

Re: Help with Segmentize

Postby icecube45 » Wed Mar 11, 2015 5:16 am

Thank you so much! I was sending my homing command as G161 XYZ, I have now changed it to G161 X Y Z and segmentize worked perfectly.
icecube45
 
Posts: 15
Joined: Fri Feb 27, 2015 5:13 am

Re: Help with Segmentize

Postby Nicholas Seward » Wed Mar 11, 2015 5:25 am

I am surprised it works. I need to make any unrecognized command just pass through.

Happy printing!
Nicholas Seward
 
Posts: 738
Joined: Mon Nov 25, 2013 10:41 pm

Re: Help with Segmentize

Postby icecube45 » Wed Mar 11, 2015 5:26 am

Nicholas Seward wrote:I am surprised it works. I need to make any unrecognized command just pass through.

Happy printing!


Currently heating up the extruder for my first dry print :D
icecube45
 
Posts: 15
Joined: Fri Feb 27, 2015 5:13 am


Return to GUS Simpson

Who is online

Users browsing this forum: No registered users and 2 guests

cron