This is part of my Baby-Huey large format 3D printer project.
nerdipedia.com/tiki-index.php?page=huey
A fixing system similar to a rawlplug for plugging into the end of a square tube. It is a filleted square plug with a tapered hexagonal hole to hold a nut. The design file is parametric so nutsize, tubesize and taper can all be changed with a simple parameter edit.
It is my first freeCAD project so maybe not the most elegant design but it is a start.
This isn't going to be super strong but should work OK for something like a 3D printer frame.