Home / Forum / Software / Image2Gcode – Free Raster Image Laser Engraving Software – Modified for MPCNC / Reply To: Image2Gcode – Free Raster Image Laser Engraving Software – Modified for MPCNC
@noname007 : Thanks for using the tool! It’s come along way since the beginning and the more people that use it, the more it will improve.
“But the resulting code always contains M106 commands for the power level at the beginning – not sure if it is intentional but for me it is at least confusing.”
-That’s a mistake; when I wrote that part I had tunnel vision and forgot about the other possibilities. I will get that fixed.
“Also the move to start the image seems to be calculated wrong as there is no dot.”/”2. Line 11 and 12 show the problem with the wrong calculations from above.”
-The program takes your origin setting (3×3 grid of radio buttons on the first tab), and then moves to the top left corner of the image and starts a boundary box at low power from there. I am a little confused as to why line 11 and 12 are missing decimals. I will look into that as well.
“1. the CR and LF linefeeds are inconsistant, not really a problem unless you need to use some scripts to modify the code (like me ? )”
– I will fix the inconsistencies with the next release
“4. Line 15 to 20 make no real sense to me – could you explain this part a bit please?”
-Line 11 moves the head to the top left corner, Line 12 sets the origin there with respect to the bottom left corner (G92 X0 Y[max]). Line 14 turns the laser on low power (need to fix MXXX), and lines 15-19 draw out a rectangle around where your image is going.
“5. Between every command is an empty line generated, this blows the file up and slows processing – would it be possible to remove those empty lines?”
-Understood, and Leo69 will have to provide insight to this as he did the original conversion. I will poke around and see if the extra blank lines can be removed.
“If I assume correctly then unless a change in speed or power is applied, or it is changed from G1 to G0, power and speed stay the same.”
-Correct. That’s why the feedrate is set once at line 9
“If on top of that there is no change in Y or Z direction, it would mean that every G1 move does the same thing too, only a bit more to the left or right.
So I have to wonder: Wouldn’t it be possible to combine all these tiny G1 moves with no other changes into one single move until the next speed, power or Y axis change?
Together with the removal of empty lines this would shrink the file drastically and speed up processing as well.
(If I understand the logic behind the program correctly than these tiny moves are the result of addressing the single pixels in an image?)”
-Spot on, and that is something that I’ve been wanting to tackle for a while. I run jobs through Octoprint and it can really studder with all the extra unnecessary commands.
“With most firmwares it is possible to compbe the S command with the movement, if possible here it would also shrink the file further.
Is you way of the implementation specific to the MPCNC project or could you allow for the S command to be added to the movement?”
-Leo69 has told me that it needs to be on its own line. Placing it on the same line as the move command was tested and it was not cooperating.
“Since Co2 is powerful it would be great to be able to use some decimal digits for the power settings in the laser profile.
Currently there comes a warning and no . or , is allowed.
Is it a big problem to change this?”
-Ok, not a problem. I can add that to the list.
“Due to my setup I have to flip every image – that is no issue, but the placement often is.”
-Can you just flip your stepper plug around?
“It would be great to allow for an offset for the start of the engraving so you can engrave in the center of something bigger like a name plate.
Is it possible to add a box for a X and Y value offset from the origin?”
-I’m not sure I entirely understand what you’re saying. Can you not use the origin setting and pick the middle?
“I would love to see it taking on Picengrave as a freeware replacement :)”
-That was my goal too 😀
Thanks again for all the comments. I should be able to knock most of these out very easily.