This is based of of the "end cap for 3030 extrusion" thing by jag. I couldn't get his to work correctly, I think it was not adding clearance for the thickness of the aluminum for the slot which made it not fit, now matter how much "undersize" I used in is OpenSCAD file.
- I did some reorganizing of the .scad file to make it easier to follow for me
- I changed undersize ... instead of the overall undersize of a particular length/width, undersize is now the "margin / gap / clearance" around the inserts of the model. For example 0.2mm is the amount the width is reduced on each side of the insert, not the reduction in total. For 3030 use 0.2mm and for 2020 use 0.1mm for a good fit.
- I added explanations and created a customizer so you could edit yourself on Thingiverse
The default values for the customizer are based on Misumi HFS6-3030 extrusion (found at https://us.misumi-ec.com/vona2/detail/110302686450/). I uploaded the Misumi dimensions diagram and highlighted all the dimensions that need to be input as an example.
FYI, the T-Slot shape is created in 3 pieces (1) the outer slot, (2) the square part of the channel, if any, and (3) the trapezoid part of the channel. You can customize the shape by playing with these dimensions. Below is an example of the 3 shapes that make up the T-Slot insert:
Some extrusions don't have a square part of the channel. For example, the Misumi HFS5-2020 extrusion only has a trapezoid shape to it's channel. So by setting the cube/square portion height to 0, you will not get a square section, just the trapezoid shape.