arpruss / gcodeplot

Use a 3-axis machine as a pen plotter
Other
167 stars 60 forks source link

"Drawing out of range" - floating-point issues #18

Open nylen opened 4 years ago

nylen commented 4 years ago
$ python gcodeplot/gcodeplot.py --work-z=0.9 --lift-delta=0.6 --safe-delta-z=3 --z-speed=45 --pens=pens.txt mandala.svg
Optimizing...[0%][5%][10%][15%][20%][25%][30%][35%][40%][45%][50%][55%][60%][65%][70%][75%][80%][85%][90%][95%]
Transport time improvement: 89.1% (took 1.64 seconds).
Drawing out of range: [0.0, 5.291666695939057e-06] [176.38888447916665, 176.38888977083334]
No points.

Files needed to reproduce the issue: gcodeplot-fpbug.zip

I commented out the "Drawing out of range" section to make the print work, and it turned out awesome. I think it would be better to add a tolerance here though (or just allow negative values, since they're not necessarily invalid).

pooltable500 commented 3 years ago

Not sure if this is too late to ask, and sorry for bringing up an old post. I am having the same issue with having negative coordinates as I am using this on my 3018 CNC. Can you point out what lines you commented out?

arpruss commented 3 years ago

I don't recommend this fix as you lose the safety measure: your cnc may bump against the edges. Instead, use the --area commandline argument.

sashokbg commented 2 years ago

I have the same problem. Is there a solution besides commenting out the exception ?