andrewseidl/node-quick-hull-2d — pull request #2 by tmpvar (2014-08-02 21:32:58+00:00)
Title: Add broken basic cube test as seen in the wild

I've been working on a 3d printer auto-plating app that for display purposes takes a 3d mesh, removes the z coord and runs it though this library. Most cases work very well, nice work on that!

However some simple cases, like the one included in this test, fail. Here's what the model looks like in 3d space:

![screen shot 2014-08-02 at 2 26 04 pm](https://cloud.githubusercontent.com/assets/46673/3789097/a2166a88-1a8b-11e4-8ea1-0d24049f3c43.png)

And here's what it looks like after it goes through this library:

![screen shot 2014-08-02 at 2 26 48 pm](https://cloud.githubusercontent.com/assets/46673/3789099/bebbf75c-1a8b-11e4-8050-2d9072ee526c.png)

After messing around a bit I was able to come up with the following strategy:

```javascript
var quickHull = require('quick-hull-2d');
var createParentStream = require('workerstream/parent');
var lr = require('robust-orientation');

var s = createParentStream();

function ok(p, ps) {
if (ps.length >= 2) {
var l = ps.length;
for (var i=0; i