Torus Knot

Update June 5 2017. Revised script https://www.thingiverse.com/thing:2365162 is better
Generates torus knots based on the parametric formula in http://en.wikipedia.org/wiki/Torus_knot with the addition of scaling of the toroid width Twidth and height Theight. This allows braids (small Twidth) and centreless toriods (Twidth=0) to be created. Theight=0 generates planar patterns.
Resolution below step=2 will take a long time to preview and much longer to render to STL. At step=2, each 10-sided shape takes about 12 minutes on my laptop, while step=1 takes about 50 minutes.