Spent two days trying to get a half-decent boolean polygon library working in Ruby. Ended up using the SWIG bindings to the PostGIS geos library, which are amazingly buggy. In this photo, you see two stumps, the one on the left is made of 7 or so paths, the one on the right, a single path.
My goal was to allow objects on the visual layer to have physical geometry, but the constraints of the geometry layer are lifted, as objects tend to be drawn as to look good, not have a low poly count. The algorithm here does a boolean union on graphical polys before generating a physics poly, so the left and right stumps have an identical wireframe.
This fix took two days, including a set of FFI bindings to GEOS, which were abandoned because GEOS has an amazingly crazy API. Moving on…