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.
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.
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>
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)
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: