Solids of constant width maintain the same distance from top to bottom no matter the orientation. This allows them to roll smoothly like spheres.
A few sample solids are provided. Additional shapes can be generated in the OpenSCAD file by modifying the following lines of code. Parameter descriptions are listed next to the module definitions:
The parameters entered into twist_solid() are the number of sides, width of the solid, and number of twist offsets between the two halves of the solid. If 0 twists are desired, the simple_solid() function achieves the same thing with a faster computation.
Half-shapes are for if you want to physically play around with the rotations after printing. They come with a single hole for a dowel pin in the middle. Parameters are number of sides, width of solid, diameter of pinhole and half-depth of pinhole.
Entering “simple_solid(5,30);” or "twist_solid(5,30,0);" Yields the following shape:
Entering "twist_solid(5,30,2);" yields the following rotated variation of the shape. Notice the top half is in the same orientation, but the bottom half has been rotated by 72x2 degrees:
The program automatically rotates the part to make it easy to cut it down the middle. It is recommended to print the part in halves, with a few pins for alignment and strength.
Updates:
6/24/23 - Original Upload
6/25/23 - Fixed some minor bugs in OpenSCAD program, added half shapes
The author marked this model as their own original creation.