Non-Planar Laser Engraving

I’d be interested in that g code too

No such gcode for measuring. Can do it over wifi, see Initial Z setup and therefore Material Depth - #7 by tyeth - Snapmaker - LightBurn Software Forum

Thanks for pointing that API out to me, now I have something to spend today playing with. :stuck_out_tongue:
I’ve already found out my red dot is offset 73mm in X, so wherever I want to measure I add that to my X, then Y at wherever, and I increased the speed of travel, no sense in it being so slow, I used 6000mm/m.

1 Like

Oneday someone will make a good mapping application, but for now it’s something to play with or allow remote working of the laser.

Makes it tempting to buy another rPi if they weren’t so expensive currently… I already had the method idea to pre-measure my material and add that to the laser distance to get my height (or set Z work origin as the laser height and use initial Z movement as material height, which would then be focus + material). Then just plunk a G0 Z# into any gcode I made (I already always add G53 to use machine coords for X/Y movement). So now since I can move the toolhead around for the auto-measuring, that’s one of my problems solved.

Since Luban’s connection always seems flaky, unless it’s a really short project, I always send it to the machine. Now I could simply use an rpi connected via USB for octoprint for reliability and just before upload, measure and put in the thickness. Then all the interaction with the machine is just loading the material.

EDIT: Snapmaker needs to add an API so Luban can view/manage/start files locally stored on the machine, that would cut out the middle-man. Just a way to bypass the “start” process and send raw code.

I was of the flaky connection opinion until I did some network traffic snooping. Turns out it uploads the full gcode before then asking machine to begin and then luban gets status every few seconds, but its always a bit off reporting status (finishes after is says it has)

Huh… I guess something must have changed recently-ish then. I know it used to just up and stop if it disconnected, but this was back when I first got the machine. Now the snapmaker will be all “connection lost stop?” or something like that, but I had noticed in Luban if it disconnects, I could just click connect again and it continues. I also know that recently my ‘live’ view, never works. I just get the black preview, but the ‘toolhead’ doesn’t move, nor turn lines blue. Though, that might just be from using Lightburn vs Luban to generate. I’ll have to generate a large file, start it, close Luban, and see if it actually finishes.

Edit: Doing a test and it does now say “will continue until you hit stop” so that’s nice, and reconnecting with Luban after a full close actually reloaded the preview entirely and all, so that’s become a lot better as well.

Now my workflow has changed! Thanks @tyeth :stuck_out_tongue:
After fixating my object to the table and closing the enclosure.
1: Generate my project in Lightburn and export
2: Run the measuring API
3: Add G53 above the initial move + add Z(laser height+thickness from API) to the initial move line
4: Save and load into Luban
5: Start on Luban and when it asks thickness, just put an arbitrary high number (like 290) since I put the focal height in the gcode itself.
6: Close Luban if I don’t need to monitor/change things.

This along with the start/stop sections I have (to ensure the fan is on and blink the LEDs when the project is finished and turn the fan off after 5 minutes) fairly automated now.

1 Like

Regarding the 73mm offset that sounds similar if not the same as what I measured on the toolhead, but when looking at the red dot on various height objects (near or over the recommended 50mm) it looked like the red dot took a non-vertical path, so the actual position of the red dot varies with height.

Good shout on the fans off after x, I sometimes forget to turn them on too so that start/end gcode reminder is a useful one.

The snapmaker moves X70 Y-8 when it does the auto measure from the machine.

Measuring location:

Blue diode for work origin after measure:

But yes, it’s not straight, it’s an angled beam and the deflection is how it measures the thickness.