JSCAD is an open source set of modular, browser and command line tools for creating parametric 2D and 3D designs with JavaScript code. It provides a quick, precise and reproducible method for generating 3D models, and is especially useful for 3D printing applications.
Source: https://gist.github.com/hovissimo/ce5366a35834c3690488
Result: http://imgur.com/KRkJ9UI (light blue shows discontinuities)