CMake project for Jonathan Shewchuk's Triangle mesh generator.
From http://www.cs.cmu.edu/~quake/triangle.html:
Triangle generates exact Delaunay triangulations, constrained Delaunay triangulations, conforming Delaunay triangulations, Voronoi diagrams, and high-quality triangular meshes. The latter can be generated with no small or large angles, and are thus suitable for finite element analysis.
The original Triangle code is intended to be compiled as a standalone application. Though it is possible to compile the code as a library by using the TRILIBRARY
symbol, there are a couple of problems with the approach (for example printing error messages to console and the use of exit(1)
).
The main goal of this project is to turn Triangle into a re-usable library and the introduction of a simplified C API.
The Triangle repository contains the following directory structure:
src/Triangle Original Triangle and aCute code and new Triangle C API
src/examples/triangle-cli Command-line interface
src/examples/triangle-test Simple test program
The static library code is based on the following sources:
If you don't want to use the aCute extension, add NO_ACUTE
to preprocessor definitions.
A brief porting guide for the new API is available in the wiki.
Changes to Triangle:
ANSI_DECLARATORS
symbol no longer used)TRILIBRARY
symbol no longer used)triangulate
function (NO_TIMER
symbol no longer used)triangle.h
header#define
constants) to triangle_config.h
headertriangle_internal.h
header containing function prototypesexit(1)
calls and return error codes insteadmesh
and behavior
structsChanges to aCute:
Please refer to the commit history if you need a complete changelog.
Please note that although both Triangle and aCute are freely available to researchers, they may not be sold or included in commercial products without a license. Make sure to take a look at the original README included in the Triangle source dir.