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.
The next piece of code will fail with "Not convex" exception:
It looks that it is failing whenever the polygon's normal vector is changing it's sign relatively to the original plane. But I am not sure.