domoszlai / juicy-gcode

A lightweight SVG to GCode converter for maximal curve fitting
https://hackage.haskell.org/package/juicy-gcode
MIT License
110 stars 7 forks source link

Some files cause a freeze #11

Closed berkut0 closed 4 years ago

berkut0 commented 4 years ago
This svg code cause a freeze ```xml ```

It can be rendered with -b command, but because of #10 (or something else) full file isn't drawing correctly.

domoszlai commented 4 years ago

I saw a similar problem at #9 , my guess is that the algorithm does not converge for whatever reason. I'll have a look

domoszlai commented 4 years ago

Branch approx-freeze fixes your issue. It also introduces a parameter, called RESOLUTION, to control the approximation. Would you be able to test it from the branch?

berkut0 commented 4 years ago

Looks like this is not freezing anymore, later I can try to draw the resulting g-code.

berkut0 commented 4 years ago

Maybe it's a little off topic, but maybe you should note this tool written in Rust: https://github.com/RazrFalcon/resvg/tree/master/usvg

berkut0 commented 4 years ago

I made two tests with huge files with difficult small details and it looks like it works perfect but now I noticed that there is no a tooloff comand at the end, actually it's a very strange move which needs some investigation

изображение

domoszlai commented 4 years ago

Could you please explain why it is unexpected?

domoszlai commented 4 years ago

FYI: Juicy-GCode v0.1.0.10 has been released with the stability fix

berkut0 commented 4 years ago
code respectively ![image](https://user-images.githubusercontent.com/8849896/90620293-ef4c3f00-e21a-11ea-9797-f4bd10ac9185.png) ![image](https://user-images.githubusercontent.com/8849896/90620277-e9565e00-e21a-11ea-96c8-ac000db5091e.png)

I know, this is a typo at the end, but anyway. Looks like the last movement was not contained in the original file. Z2 — tooloff, Z-0.5 — toolon

domoszlai commented 4 years ago

Could you attach the SVG file as well, please?

domoszlai commented 4 years ago

If Z2 is tooloff, then how come that the G00 after that draws something?

berkut0 commented 4 years ago

Last row is the "end" part of the flavor

But another file just finished printing and it's perfect except that i'm explicitly put neccesary code at the end block

изображение изображение

domoszlai commented 4 years ago

I'm a bit confused. The problem is that the software does not generates a tooloff after the last drawing operation?

berkut0 commented 4 years ago

Yes, for now, after all investigations, it seems like left only one problem. I don't know what it was, but I sure that it was my mistake. If I see anything in the future, I’ll let you know.

domoszlai commented 4 years ago

Great! Then I close the ticket. Thank you for contributing