While there are quite a few different designs for bunk-bed mounted cup holders, every single model seems to have been designed for one specific bunk bed.
After figuring out how to split and add connection pins/points in PrusaSlicer, the issue I ran into was that a simple pin structure did not have the required strength when using superglue and clamping. Despite being quite strong, the torque exerted on the joint would cause a failure of the glue point.
Yes, alternative adhesives like 3D Gloop exist, but not everyone is willing to buy such a specialized glue JUST for one type of filament, I figured using a modified dovetail would add strength to the joint regardless of the glue used.
A design like this also allows you to modify the cup-holder, itself with the included step file, if you would prefer a different pattern. As the connector is “generic”, the rail and down arms are compatible as long the dove-tail is not modified on the cup section.
The prints pictured are of the “v3” version of the cup, where tolerances are a little too tight, as well as the rail arm being a little too thin. The v4 design increases the size of all of these to enable better fitment.
Parameters of note are:
railWidth - which defines how wide of a rail the cup holder will be able to fit
cupWidth - diameter of the inside of the cup holder. The wall thickness of the holder will always be 10mm, unless you want to update that, as well. (I realize I did not name this one correctly, it's been a long week)
The author marked this model as their own original creation.