arkypita / LaserGRBL

Laser optimized GUI for GRBL
http://lasergrbl.com
Other
1.23k stars 490 forks source link

possible bug: cutting line errors on 5.0.0 #2111

Open goofyseeker311 opened 1 year ago

goofyseeker311 commented 1 year ago

v5.0.0 vectored path mode shows correct tracing image, but results in partially failed cut.

lasergrbl5000cuterror lasergrbl5000cuterror2

Do you think the lasergrbl or creality falcon 10W at 200mm/min causes the problem? The same failed cut appears in line-by-line cut mode too, if I remember correctly, same 5.0.0 version.

Also how would you produce a single pass cut line, like should be in this 4K source image, your down sampling feature does not go below 1.0 to narrow the line to single line, only expand.

arkypita commented 1 year ago

what is the original image?

goofyseeker311 commented 1 year ago

dsl18b-v2h2a-2 dsl18b-v2h2a-2v.nc.zip resulting gcode for reference if there is a bug.

arkypita commented 1 year ago

There is no bug, you are using it wrong.

Line2line is for engraving grayscale images in raster mode: use it for pictures, not cut. Vectorization is the right tools, but your image should by draw as a silhouette. Your images has double edges, any raster line (as thin as you want) has 2 edges, and LaserGRBL vectorization find them both (unless you use "centerline" vectorization).

If you use vectorization you should prepare your image like this: rect294

Understand the concept?

goofyseeker311 commented 1 year ago

well what about the extra lines that was the original issue? the failed extra lines on the rectangle shapes is the issue, not the extra double traced lines, thats was a secondary problem. your program cuts in extra wrong places. there should not be the middle lines in the rectangles, like the source and the display images show.

and the source image is a CAD software image (or pdf vector source), so its supposed to be lines and not filled rectangles. if you need to do by-hand edits to a cad image it will stop/hinder the work flow totally.

centerline vectorization? was not clear that it was vectorization, but something else. should be an option inside the vectorization, not its own option. simplify is better always.

I ended up doing the gcode by hand. btw the hand coded cut time is about 12mins, and centerline stepper is 12min. dsl18b-v2h2a-2v.zip

if you can use it wrong, its ui is not designed as it should be. should be 100% apparent how it should be used, without any instructions how to use it. why your example removes the outline, it needs also cut the parts out of the source material, not only the inner cut-outs.

the center line vectorization is the actual correct method for cad line drawing cut-outs without edits. note: center line ends up producing a very long file with x1.1 x1.2 x1.3 etc tho, not a point-to-point rectangle short line draw cut file. wrong, there should be the option for the vectorize selection that does the center-line style but short vectorized.

I hope you understand what kind of output images CAD software outputs, without edits, and its the standard output cut-out line way.

goofyseeker311 commented 1 year ago

I stress, the gcode that gets quicksaved from that source image (vectorized) adds some lines that are not in the source image, producing finger cuts in the otherwise rectangle sections. those additional line are not shown in the preview image in the app.

It feels like your serial laser program in combination with the laser engraver starts and stops the laser at different location it should. I ran the hand written gcode on the app, and it otherwise was perfect, but the starting location was somehow added an extra cut.

it somehow feels like the first move command (after something) goes to wrong y-location causing the extra cuts.

lasergrblcrealityfalcondebug

goofyseeker311 commented 1 year ago

as a side note, pressing hold then stop will not completely stop the project from running.

goofyseeker311 commented 1 year ago

also the center line mode fails to find some center lines on the x0 side of the source image files, and somehow the X-coordinate of all generated files is X0.1 and not X0, might be related issue.

arkypita commented 1 year ago

well what about the extra lines that was the original issue?

They are not caused by LaserGRBL. If they were, you'd see them in the preview. If you don't believe you can load the exported gcode with a nice third party software like CAMOTICS https://camotics.org that can render a live preview of the job.

I run your file with my laser engraver, here the result.

image

I am 99.999% that the issue is hardware side, very high probability your machine has hit a curb and lost its position, or the engine loses its steps in a certain position. If you keep an eye on the machine while it is working you will see that this is the case.

and the source image is a CAD software image (or pdf vector source), so its supposed to be lines and not filled rectangles. if you need to do by-hand edits to a cad image it will stop/hinder the work flow totally.

Again you are using it wrong. If the source is a vector then save it as .svg (vector format recognized by LaserGRBL) and this will load it as vector. Any other transition from vector to raster (.jpg, .bmp, .png) and then re-vectorized leads to a loss of precision.

If you need to convert a vector file to svg you can use the free inkscape software.

centerline vectorization? was not clear that it was vectorization, but something else. should be an option inside the vectorization, not its own option. simplify is better always.

These are two completely different algorithms, not an option of either one. They have different configuration parameters and different options: for this reason they deserve two different entries.

as a side note, pressing hold then stop will not completely stop the project from running.

The machine has communication buffers, a certain number of commands are sent to the machine and are already in the machine control board waiting to be executed. The "abort" button stops sending new commands, but there is nothing you can do about those already sent. The only way to stop immediately that I know of is the reset (lightning bolt) button. You may or may not like it but either way it depends on the firmware, so not on LaserGRBL.

and somehow the X-coordinate of all generated files is X0.1 and not X0, might be related issue.

Again... vectorizing a raster image produced from a vector file will never give back the original vector. If you need CAD quality you should not degrade your file rasterizing it. Just keep it as vector.

goofyseeker311 commented 1 year ago

I will change every G0 command to G1 slow movement command, so that the fast G0 movement will not misalign the laser engraver, yep S0 before every G1 when using those as movement only.

edit: you dont seem to support vector pdf data sources. lightburn does.

arkypita commented 1 year ago

I will change every G0 command to G1 slow movement command, so that the fast G0 movement will not misalign the laser engraver, yep S0 before every G1 when using those as movement only.

I think that you can do something better. Edit your machine configuration, via menu "grbl", "grbl configuration" and set lower acceleration. Do an export before change any values, so you can restore it in case of problems.

edit: setting lower acceleration allow your machine to change direction without misalign.

edit: you dont seem to support vector pdf data sources. lightburn does.

Lasergrbl is free, lightburn is not. Supporting .dxf, .dwg, .pdf require coding, that require times, that I don't have.

Hope you understand.

goofyseeker311 commented 1 year ago

dont worry, I have plenty, closing to infinity. free is better. feel free, just pointing to useful missing features.

seems like the image loading in the open file (centerline) places the image (-1,+1) delta offset, so that left/bottom side lines are out of detection range, not drawing a line. or the centerline detection algorithm discards lines too close to the edges of images.

edit: now during image opening, 1 shows as 100% and the proper 1000 shows as 100 000%.

edit: seems like you treat 0,0 lines left and bottom edges as start/end of material, so you dont even try to centerline a cut line there.