0

Our team is working on a project in which we are using tetgen file for generation of 3D meshes and right now we are using you tetgen.exe file to get results.

Now what we want to do is to use direct tetgen.h and the functions to generate meshes without using tetgen.exe.

Remi Guan
  • 21,506
  • 17
  • 64
  • 87
Aditya
  • 121
  • 1
  • 5

2 Answers2

3

As an example of how to integrate and call tetgen's API from another program, you can take a look at my GEOGRAM library [1], in particular the following file:

src/lib/geogram/delaunay/delaunay_tetgen.cpp. 

There are a couple of gotchas, concerning the way constraints are represented, and the way memory should be released to avoid a memory leak. The file includes some comments.

[1] http://alice.loria.fr/software/geogram/doc/html/index.html

BrunoLevy
  • 2,495
  • 17
  • 30
1

You can uncomment:

#define TETLIBRARY

in tetgen.h and then you can use tetgen like any C++ library. For more information: refer.

Pranav
  • 475
  • 4
  • 25