New tool to adjust tab and slot assembly dimensions based on actual material thickness

This weekend I have cutting and building several items from other peoples published designs (thanks to everyone that provides plans!)

But in the process I have been spending most of my time adjusting the plans to fit the material thickness I am using (most are tab and slot assemblies).

So I created a feature request that would do most of the resizing work automatically.

If this is something that interests you please read the request and let me know if you have any suggestions for how the feature could work better (or if you even think it is possible and useful). Thanks.

Hello Ralph, thanks for your input. You are very correct it would be extremely difficult or even impossible for LightBurn to be able just “fix” a file to make it work correctly. That is not what I am proposing.

I may have not explained my request very well. Perhaps a better way to see what I am requesting is as a simple “find and replace” function.

The user would basically be requesting that any rectangle with width or height of “X” be changed so that the matching width or height be changed to “Y” Just as you can search and replace a specific word or character string in a document.

For my request I would simply select a set of objects on the screen and request that all rectangles with a length or width of .125 change to .25 for example. I know this would not “Fix” the drawing, a lot of work might still remain to align everything correctly, but that would be done manually. The new function I am requesting would only perform the search and replace. Plus it might also move the rectangles it changed to a new layer so the changed values can be easily seen.

I hope that helps clarify what I am requesting.

Yes the tabs will be an issue, I just assumed I would need to edit them by hand, but that is not as difficult now since LightBurn allows you to select multiple nodes and move them all at once.

So right now just the simple find and replace functionality would reduce the amount of work a good bit.

Maybe not fixing existing files, but what about parametric designs like you see in CAD programs? It would be super cool to assign a parameter to a tab and resize it based on the material thickness right within Lightburn.

Or is that a bridge too far ?

Parametric design is a very powerful CAD tool, but it is orders of magnitude beyond what I am asking for.

For now just the slightly smart search and replace would be a huge help and it seems to me it would be versatile enough to offer other benefits that I have not thought of yet.

Here is a really horrible mock up of what I am thinking

1 Like

Yes, the angled slots will still need to be changed manually, but at least the vertical and horizontal slots will be taken care of. When I look at the tab and slot files I have be using, the vast majority have slots oriented at 90 degrees (vertical/horizontal). So the proposed tool is still very useful in my opinion.

By having the tool change the layer of the slots it does adjust you will be able to quickly tell which ones still need manual adjustment.

Maybe a latter iteration of the tool would be able to recognize slots at odd angles and fix them also, but for now a simple tool would be a nice thing to have.

I can actually build this functionality into a simple Python script that just edits the LBRN file!

I just saw a comment that reminded me the LBRN files are just text, so I created a simple file with just two rectangles in it and looked at the LBRN file in a text editor

Each rectangle has a block of XML like this

   <Shape Type="Rect" CutIndex="2" W="25.399969" H="3.1749907" Cr="0">
        <XForm>1 0 0 1 292.1 230.187</XForm>
    </Shape>"

The width and height are easy to find (they are always in mm units) so the Python code just looks for a shape type "Rect" and then looks at the Height and Width values.  If one of them matches (within .0001) of the value I am looking for then just replace it with the value I want (i.e. find .125 inches and replace with .25 inches).  

Here is were it gets even better!  The height and width values stay the same no matter what angle the rectangle is rotated through.  So in the example where the slots are not horizontal or vertical it will still find them.  

So make the change to height <H> or width <W> value
change the <CutIndex> value to a new value that is not used in the file (this is the layer)

copy the old <Cutsetting> block and paste it back in with the new <Index Value>
change the <NameValue> to "Changed"
also update the <doOutput> Value to 0 "so the changed layer will not output till it has been checked.

See if there any other matching rectangles and save them the same way 

When all matching shapes have been found
Save the file back with the same name (or save it with the new material thickness appended to the name)

Done!

This is ironic because as I was just staring off into space thinking to myself “could a script do this” I scrolled and your post popped up.

1 Like

The LightBurn developers have really made it easy to work with the data in the file.

Omg… do you know what this means… (evil laughter fading in)

Wait for it… let me see if I have a moment to try something.

…ok. I just realized that I am too lazy to script a box generator plug-in, but that was the idea. I see it’s completely possible, but in fact there are things that I will claim to be lazy about.

That is a really good idea! It should not be crazy difficult to build a script that would create boxes. But it is beyond what I would have time to do.

What we really need now is a way for LightBurn to be able to include and execute scripts from inside the program.

FWIW, I use the free version of Onshape CAD software to design tab and slot boxes and frames. Someone designed a macro (called Featurescript in the Onshape community that lets you automatically insert the tabs and slots and automatically size each. I use a variable dimension for the material thickness to adjust the slot/tab dimensions so that the parts fit together. It can take a little trial and error to get the values adjusted just so but that’s easily done with small test parts.

Here’s the entry for the Laser Joint Featurescript:

https://cad.onshape.com/documents/578830e4e4b0e65410f9c34e/v/abb2deb457b5b97f8d3eeebf/e/7af109b2f1cead90850525ae

Hopefully that is visible to those without an account. I tried to upload the PDF that describes the feature in detail but the forum software doesn’t allow PDF uploads apparently.

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