nebarnix / img2gco

Image to reprap gcode converter
GNU General Public License v3.0
56 stars 29 forks source link

Bounding Box (Skirt) #4

Closed systmdamage closed 7 years ago

systmdamage commented 7 years ago

First, Thank you so much for this and adding it to github! This has been such a huge help! With that being said, is there anyway you could add a bounding box (skirt) option to it so we can make sure the object we are engraving centered correctly? Like if i'm engraving a 5x7 image, just burn a 5x7 box where the image would go...then pause for user interaction before the rest of the burn starts...Thanks in advance, this works great! And I really appreciate all your work!

systmdamage commented 7 years ago

I found and edited the php code to accommodate. I added the following lines to the code around line 176 in the gcode PHP (my printer starts at x22 y25). I haven't tested yet, but it appears correct in the gcode. I'll test tonight.

print("M106 S255\n"); print("G1 X22 Y25\n"); print("G1 X".round($sizeX+25,2)); print("\n G1 Y".round($sizeY +25,2)); print("\n G1 X22 \n"); print("G1 Y25 \n"); print("M106 S8 \n"); print("M300 \n"); print("M226 \n");

nebarnix commented 7 years ago

Dang. You're fast!

On Jun 5, 2017 11:33 AM, "systmdamage" notifications@github.com wrote:

Closed #4 https://github.com/nebarnix/img2gco/issues/4.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nebarnix/img2gco/issues/4#event-1110465472, or mute the thread https://github.com/notifications/unsubscribe-auth/AAnQxMydYaz0Ofh_uDfYrUsmqvacuVFwks5sBEoGgaJpZM4Nvn7N .