Investigate libraries such as [verb](http://verbnurbs.com/), or [SISL](https://github.com/SINTEF-Geometry/SISL) to expand functionality.