image-to-gcode icon indicating copy to clipboard operation
image-to-gcode copied to clipboard

Never Stoped

Open OmarObando opened this issue 1 year ago • 5 comments

Hi, I ready try to run the program, but never end in my terminal and I had to stop from keyaboard, If I let running never stoped, any suggestions?

OmarObando avatar Feb 26 '24 16:02 OmarObando

You can try to resize the image you are passing to the script beforehand, since if it's too big it's going to take long

Stypox avatar Feb 27 '24 07:02 Stypox

Alrdy, I tried different resolution, and something work or something doesn't work, another question the size of gcode is in millimeters?, and the second is exist a form to define the size? ty <3

OmarObando avatar Feb 28 '24 20:02 OmarObando

There is no option to change gcode size, but you should get away by editing the file and multiplying x and y by a constant at the following lines: https://github.com/Stypox/image-to-gcode/blob/master/image_to_gcode.py#L84 https://github.com/Stypox/image-to-gcode/blob/master/image_to_gcode.py#L106 https://github.com/Stypox/image-to-gcode/blob/master/image_to_gcode.py#L137

Stypox avatar Feb 28 '24 23:02 Stypox

It worked <3, ty, some question more, I want to add like a pen up and pen down, it's posible?, something when move to another section that isn't connected with the actual point up the pen and then down?

Btw Idk why some img get this error

RecursionError: maximum recursion depth exceeded in comparison

The img Is this

photo

OmarObando avatar Mar 01 '24 16:03 OmarObando

I want to add like a pen up and pen down, it's posible?

That's what should already be happening. Commands starting with G1 are with pen down, while with G0 pen up. Although your plotter might interpret them differently, so you might want to e.g. find-and-replace all G0s with another command that makes the pen go up specific to your plotter (I am not knowledgeable enough about this topic to give clearer indications unfortunately).

RecursionError: maximum recursion depth exceeded in comparison

Yeah this tool is pretty basic, so with bigger images it can easily take too much time or memory, thus running into these kinds of errors.

Stypox avatar Apr 01 '24 13:04 Stypox