I rewrote and cleaned up this code and made it fully customizable.
This default size is a very good compromise between amount of filament, print time, and accommodating a wide variety of dice (including Dungeons and Dragons dice).
This is a fantastic dice tower for any game with an attack-defense mechanic (Imperial Assault, Star Wars X-Wing, Risk, etc).
WARNING: I've never printed this in-place with both the tower and trays together since I print using ABS.
In theory you could print it as one unit, but I mostly just lay out a tower and 2 trays and use supports on the trays.
The tower does not require any supports.
The primary variables to customize are:
ramp_width: This defines everything. The overall size of the dice tower is derived from this, and this directly represents the width of the dice channels.
level_spacer: When using small ramp_widths (below 30mm), this adds a vertical offset between ramp layers (a drop-off of sorts) so that dice do not get stuck when changing direction.
funnel_height: This is the height of the drop funnel.
slope: If you want the tower to be taller.
number_turns: This lets you add more turns to the tower.
Additionally, you can add tray logos. I forget the exact instructions of how I created them, but basically you need a SVG file (there are JPG to SVG vector converters online). Then you can import the SVG file into Autodesk 123D or OpenSCAD and extrude it into an STL. Then save it.
There are two variables:
l_stl = "";
r_stl = "";
Set these to the name of the logo files.
You can adjust the size of these with (use l_ for left):
r_stl_scale = [0.5, 0.5, 0.5]; //Adjust the ratio scale of the STL (0.5=half)
r_stl_offset = [1, 1, 1]; // Move the STL around
r_stl_rotation = [0,0,90]; // Rotate the STL if needed