Lightburn Gcode output is incorrect. Steps for curves in some places

Hi

I imported a DXF file which displayed correctly. I did a preview which also looked correct. I then sent it to the laser cutter which while most of the cuts were correct would often replace smooth curves with staircase interpolations. I assumed that it was my laser-cutter and carried out several tests which all completed correctly.
I then exported the gcode from Lightburn and brought it into UGS to verify the code and found that the gcode itself was incorrect and did actually have the staircase paths.
I had hoped to send the files but there doesn’t appear to be the ability to attach files in the forum. I have included the support data below, and here is a link to the item that I was printing.

AAERNnic7V1tc9s2Ev4rGn26u3EdkqIoyZ9OlmPHHbv2WE5qt9fxQCQkoaYIFSRtq5n891u88EWSlUSpZTHReiY1uYuXxWKfBwC7CT7WBykLg/rBx3pAElo/qB8LVnMsx/rJav3UsGv/rVnWgWvV9+oPVMSMR1DE2u/s21790149ZD6NYiqrm8e7gMzi+oG1V48TkqTw2NirJ2QED7//UWrEhdpTQYexrNsN2Sh6p2qpxw/1AwceI3/MhRGr50yeMBIyErNoVD9IREpBlia8N6b+/TEX76dyKHFZ1ScPtE99HgUgth1o8HA2JXHcn8UJnRxBc1xaOCRhDDV6ZEIFueIwANqxCjEM8b5Pw2segjryqRpbj4dc6BofGH3Meu3xKBE8POcP9DTyBZ3QKIGuQZEmZyyG598/1i8vT2FEFphDolFI1UgJmHsY8kcq8o4HLGAia3igdP0ppcEFeFOwgBYFC90lFb7uUjbv0zCMQQSmjOsHTSkRPI7fkUS+m9oBv0iTaZpkPQU8Oeel1uG9PyW+8rqlXq/ZRBtNIzIIKQzteix4Ohq/jYK82qKunxCRLGjPSEyFnXVckjkLBZXHcklwREMyUxYMQ86DYxaGuXoo6F8pjfyZcrH0wpiEw4RHtKud7Tj7TRCWHciigD6p9liUUPFAoDlr37b0j+12LNv2bIjBeyqGqtyERCkJr8kgj7cJebrU06dcn7060gx4ZZHRlt+MMiLSn/WeJfEWpZNLCFEZyBA2EEfCl3Nj6Wc578fFCI39UhP7JFoS5OGgxjwF689otGJsUtu/Z9PPqLlQZGE6mQrGBUv0RAgymULbo2Scv0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tsL2MdVpBvanvXqs9hfy6zUR8iBef2p7d578O3GDlIXB3aL0nsJZTX7+DIh4ZFEuuZO7cf2V2G7vt/bVv9qjv7lPiH/Rr9nWvrpagMflokZo/kcHj5/qnz79H7GFqZM=

There is the ability to attach files in the forum, but you’ve just joined - it’s restricted for new users to prevent spam.

What gets shown in the preview is almost identical to what is sent to the laser, though the GCode is rounded to the nearest 100th of a mm.

In general, no need to include the support data unless we request it. I’ve bumped your level in the forum so you can attach the GCode and the LBRN file you made it with.

Understood, we all hate Spam, including the tinned variety.

OK so I just ran the same batch of tests on my mac as well with the same result.
I was trying to upload the DXF file but it gets rejected but I put a link to it in my original post.

I have included screen caps of the display in LB, the viewer, and what UGS thinks the gcode is describing. The actual burn is exactly like the display in UGS.

I hope this will be of assistance but if you need anything else please let me nkow.

message.

!
2020-10-16_20-38-35|641x499

dragon_gcode.txt (838.5 KB)

I went to try to upload the Lightburn file but it is 105Mb and too large.

Here is a link to the LB file in DropBox -

Let me know if there is aproblem downloading it.

Chris

There is no universe in which that file should be 105mb. That’s crazy. Downloading to have a look at it…

Ok, so this is half a bug on our side (that has already been fixed for the next release) and half the fault of the file, triggering the bug.

This file is likely exported in microns or something, as it’s importing huge, and there are tons of nodes. If you simply shrank it, the node count would still be massive, and that’s what will be sent to the machine. 268,000 nodes in this design because you used the DXF, not the SVG, and DXFs are kind of crap for artistic stuff. If you import the SVG instead, it’ll behave better and be the correct size.

LightBurn will automatically do arc recovery from DXFs, but since this file imports so huge, all the error tolerances are set for normal scale art, so it doesn’t optimize nearly as much as it should. If you imported the DXF and sized it, select it, go to Edit > Optimize Selected Shapes, then then drag the Arc and Line Fit tolerances up a touch.

Doing that took it from 268,000 down to about 2500 nodes, and this will, in turn, not trigger the rounding error bug in the GCode generator.

Makes sense. Would you recommend always using SVG as input for LB? From a simplicity point of view? Is there any software that you are aware of that can do a ‘Sanity Check’ on DXF files?

Oh, and thanks for jumping on this so quickly. Pretty outstanding support.

Chris

SVG, AI, and PDF are better as “artistic formats”, and the way they represent curves is identical to how LightBurn stores them internally. We use cubic Bezier splines, which is pretty much standard for art.

DXF files, because they’re made to be for CAD, store curves in a form called NURBS (non-uniform rational b-spline). They’re very flexible, but the math is crazy, and there’s no way to directly convert from NURBS to Bezier splines, so most non-CAD software (us included) converts them to lots of points, and will occasionally then re-fit the result back to Beziers. You lose a little in the translation, but not much.

In this case the real problem is that DXFs are also stupid about storing what unit of measure they were made in, so if you save a file in mm, but someone else imports that as inches, you’ll end up with it 25x bigger than it should be. Our re-fit code works in “real” units, making sure that no part of the point-converted spline is farther than 0.05mm from the original, so when you import it 25x bigger than normal, you get about 25x more points than you expect. :slight_smile:

SVG / AI / PDF don’t have these problems, because they work in a single unit (always in “points”, which is 72 units per inch), and they store splines in the way we do internally, so there’s no translation required.

2 Likes

Just imported the file in SVG format and it cut it like a charm! Top notch support indeed. I shall be buying LB when my trial runs out (I’m a skinflint aren’t I :slight_smile: ) as it seems to be everything I need in a laser burning software. I am using the VigoTec VK-7x which is not compatible with any third party software so I have ditched the controller and replaced it with a home built Arduino UNO/3D shield and it now runs a treat.
Thanks for the info.
Chris

Excellent explanation, Oz.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.