Boolean Operations on Co-planar Polygons in Three Dimensions

A facade for the jts library with good unit test coverage written in Kotlin.

JTS, through its interface, implicitly appears to support these 3D boolean operations, but in fact it does not work at all in 3D and throws exceptions or returns wrong values. However, it seems to work well in 2D, which is why I'm relying on it to build the 3D funcionality.

The way it works internally is by rotating co-planar polygons to the XY cartesian plane, using jts to perform operations such as intersection or difference and rotates and translates them back to the original plane if needed (area calculations do not need a rotation back to the original plane).

https://bitbucket.org/jubbat/threedpolygon

Comments