N-sided Box Generator

Creates a box with a polygonal base of N sides.
The more sides you enter the closer you will get to a cylindrical box.
The looseness parameter defines how tightly the lid will fit and will depend how accurate your printer is, 5 to 10 seems about right for most cases.
I noticed after I wrote the code that there are several other similar things on thingiverse but mine has a lid and not a cap!!!
I did pinch the idea to have a parameter to print the box/lid/both from Synchron though.