Snapmaker LightBurn Host
Tool that allows you to use your Snapmaker 2.0 10W laser in LightBurn.
Using the method described by Slynold (https://forum.snapmaker.com/t/working-camera-capture-with-lightburn/28397).
Dependencies (included or NuGet)
- https://github.com/tshino/softcam: virtual DirectShow camera.
- https://github.com/nlohmann/json: JSON parser.
- https://github.com/nothings/stb:
stb_image.h
for simple JPEG loading (note: modified with RGB -> BGR swap). - libcurl, libssh, openssl, zlib
Note: Above libraries (static and dynamic) are included in this project for ease-of-use, but can be built separately if desired.
Usage
- Build project (or download binary release & extract).
- Run
3rdParty\installer\softcam\RegisterSoftcam.bat
to install softcam. - In your favorite terminal: run
SnapmakerLightburnHost.exe <your-snapmaker-ip>
.-
Or use (
config.json
), which can be used to set the base position as well as the IP address of your Snapmaker. Config file takes priority over the command line. If no config file is available, one will be generated in the directory of the.exe
. -
Note that the config file is only read on startup, so the tool needs to be restarted for the changes to take effect.
-
- In LightBurn settings, verify that
Default Capture System
is selected underCamera Capture System
. - In LightBurn, select
DirectShow Softcam
as your camera. - Press
ENTER
to request a new image from your Snapmaker 10W laser camera. - Press
SPACE
to perform a material thickness measurement with your Snapmaker 10W laser camera.
The coordinates where the laser will "park" to take a picture can be configured in config.json
. Suggested coordinates (thanks to Slynold & theevl):
Machine | Coordinates |
---|---|
Snapmaker 2.0 A350 | X: 232.0 Y: 178.0 Z: 290.0 |
Snapmaker 2.0 A250 | X: 160.0 Y: 120.0 Z: 175.0 |
Snapmaker 2.0 A150 | ??? |