As part of a project with the Plano Green Team (a Solar Car Designing Team), I created a simplistic custom cupholder designed to latch onto a 20-25mm (0.79-0.98 inches) wide tube and hold a cup. When testing out the cupholder, I found out that it also worked on holding cups on the edges of tables, a niche but beneficial use of the cupholder. I created both a "large" and "small" version of the cupholder depending on the desired cup diameter being used, being 4" and 2.5" respectively.
4" Diameter Cupholder Main Body for Large Cups
2.5" Diameter Cupholder Main Body for Small Cups
Screw compatible with Either Cupholder
Cupholder being used on Tabletop Edge