sshirokov/csgtool — pull request #38 by sshirokov (2013-08-23 09:08:00+00:00)
Title: Model Cleaning: Round 2

From the people that brought you ~~#36~~ (:crying_cat_face: :-1:) in response to #34 (:rage3:), again comes the **daring sequel:**

### Let's fix in in post! :sparkles: :trumpet: :cake:

This PR attempts to add support for cleaning models by removing polygons that do not have enough neighbors to make sense. If this approach proves promising, a round 2.5 would attempt to fit polygons trimmed from models that don't need them into models that may have holes in those same spaces, such as those produced in a set of related CSG operations.

### The Plan

* [x] De-duplicate vertices
* [ ] Improve de-dup sanity (e.g. remove hard-coded `EPSILON`)
* In a way that maintains identity
* [x] Index every vertex to a list of polygons
* [x] Index every polygon to a list of verticies
* [ ] Remove polygons that have fewer than two neighbors

### Bonus round

* [ ] Use a better data-structure than a binary tree for 3D coordinate data