GTS Plugins Removed

From K-3D

Jump to: navigation, search


K-3D has used the GNU Triangulated Surface (GTS) library for a number of years now ... it was an integral part of the implementation for the GTSBoolean, CoarsenPolyhedra, and GTSPolySphere plugins, among others.

Unfortunately, the GTS API makes it impossible to retrieve geometry from GTS in any deterministic order. That is to say that, if you created a cube using GTS, then iterated over the cube's vertices, edges, and faces, there is no guarantee that the iteration will occur in any particular order. Even though the cube is visually indistinguishable to the casual observer, face 1 today might become face 6 tomorrow. This behavior is fundamentally incompatible with the K-3D pipeline, where the ordering of mesh components (points, edges, faces, etc) must be consistent so that downstream operations produce consistent results.

The problem is that GTS stores collections of objects (such as faces) using either hash tables or binary trees, keyed using the address of the object. Because the addresses of the objects will vary at runtime, so will their retrieval order. See the GTS mailing list thread at

for a discussion of these issues. In the meantime, the above plugins have been removed from K-3D to prevent problems. Unfortunately, existing documents that use these plugins are fundamentally broken and cannot be fixed.

There are two GTS plugins - GTSMeshArea and GTSMeshVolume that are still available. Since they merely use GTS to compute metrics over a K-3D mesh, ordering isn't important and these plugins can be used safely.

Personal tools