Added native Lightburn output to Boxes.py

I don’t know if this is the right category for this post, but I created a native Lightburn output feature for Florian Festis boxes.py software.

Now I am happy to anounce that yesterday he accepted my contribution and the function was added to his code.

So if anyone is in the need of creating a box (there are several different designs availble), he can do it now directly from Florians web page (Boxes.py) to Lightburn without the limitations of creating and importing an .svg file.

Just select “lbrn2” as format of the output file and press Generate. Your browser then will download the generated file and which directly opens in Lightburn.

I hope this is usefull for someone…

Regards,
Klaus

19 Likes

Wow, thanks Klaus👍🏻
Charlie

You are welcome - I apprechiate any feedback. Especially if someone finds a bug or has a suggestion for an improvement…

Cheers,
Klaus

1 Like

Really cool that you built this. Seems the assumed origin is front-left. Any other base assumptions?

I created a Double Flex Door Box just to experiment. I see 2 layers in LightBurn. I notice that the .lbrn2 file itself does not define layers so LightBurn must be inferring these. One of the layers translates to C02. However, when examining that layer I do not see anything there. If I export all the selected components of this layer to SVG and open in Inkscape I see 4 paths but made of zero nodes. Nothing is truly selectable.

Not sure what’s going on there. Take a look.


DoubleFlexDoorBox.lbrn2 (77.7 KB)
C02.svg

OK, only 5 hours until the first bug report - this escallated quickly :wink:

Unfortunately this is not a bug, it is a feature. Unfortunately one which was not used by the author of the Double Flex Door Box.
In boxes.py the creator of a box design can add a label for each part which is drawn. But per default this label is an empty string, which is what you encountered here.

But you are right, this demands a fix so that empty text output is supressed.

Thanks a lot for your feedback. I will forward the fix to Florian.

Until the change is transferred to Florians server, please simply either ignore the empty text fields, or delete them.

Regards
Klaus

:astonished::astonished::astonished::astonished::astonished:
This is AMAZING!!! Oh my gosh, how wonderful!! :heart_eyes:

Update: my submission triggered Florian to remove empty labels at all, which in succession broke my fix :frowning:
I am working on it…

Really excited to have this as a resource, thanks! – Not sure this is the fix you are talking about above, but I got a 500 error trying to generate this box in LightBurn format.

https://www.festi.info/boxes.py/FlexBox2?FingerJoint_angle=90.0&FingerJoint_style=rectangular&FingerJoint_surroundingspaces=2.0&FingerJoint_edge_width=1.0&FingerJoint_extra_length=0.0&FingerJoint_finger=2.0&FingerJoint_play=0.0&FingerJoint_space=2.0&FingerJoint_width=1.0&Flex_stretch=1.05&Flex_connection=1.0&Flex_distance=0.5&Flex_width=5.0&x=100.0&y=100.0&h=100.0&outside=0&outside=1&radius=15&latchsize=8&thickness=3.0&format=lbrn2&tabs=0.0&debug=0&labels=0&labels=1&reference=100&inner_corners=loop&burn=0.1&render=0

Update: I found out that the reference rectangle is killing the lbrn2 export.

As a temporary workaround until I can address the problem in a proper way - which will probably be not be before next weekend:

set the “reference” value to 0.

Then the lbrn2 output is generated…

1 Like

Problem with most of his boxes output:
The inside corners are a little loop, quite some work to get these all removed.

Generate a box and zoom in to the inside corners

Nice catch. That’s bizarre. Seems as if the lines that make up the inside corners are being treated as curves rather than lines. Surprised this hasn’t been already caught and addressed.

I guess this is intentional, so that
a - you get sharp edges (don’t know the technical term, but in case of a mill it would look like shown here: https://www.cnc-wiki.de/uploads/Glossar/F/Freifraesen.png)
b - the laser head does not need to slow down to a full stop as it would have to in case of a 90° corner

I had considered the possibility of a relief like that but the shape of it is internal to the material with basically no exposed relief. Or the assumption is that the kerf provides enough clearance for the relief?

For what it is worth, I have created many, many boxes using Boxes.py and I noticed those strange loops, which at the beginning I meticulously removed, then I decided not to spend the time, the end result for me was exactly the same.

To be fair, the whole covered area doesn’t even measure .05x.05 mm so much smaller than the kerf of any common laser that would be cutting these.

The weird loops are small and could be ignored… but they bugged me at one time as well. I posted this some time ago… use “Offset Shapes” to get rid of them

https://forum.lightburnsoftware.com/t/tabbed-box-generation-using-boxes-py/19673/8?u=dkj4linux

Update: latest fix is online…

1 Like

The link doesn’t work (for me) :smiley:

If you desperately want to remove the loops in the corners, you can also use the “inner_corners” parameter. Press the associated info symbol to get an explanation…

Edit: I guess this is a new feature and it can be used to create output without these loops…

3 Likes

Sorry 'bout that… not sure how to fix. But here is what it says:

===============
Found that I could generate a box SVG using Boxes.py… complete with weird loops.

Import into LB and select all shapes. The number of selected objects should be the same as the number of pieces to be cut and they should all be closed shapes. “Burn Test” shapes/pieces weren’t closed but I think that is because adjacent edges are adjusted from each other by some tiny amount… all other boxes I generated, the shapes/pieces were closed.

Use “Offset Shapes” by some tiny amount (just so the shapes don’t connect to each other… 0.1mm works for me) “Outward” and “Corner” and then delete the original objects. Select all shapes again and use “Offset Shapes” to move back “Inward” by the same tiny amount as before and the weird loops are gone.

===============

– David