GithubHelp home page GithubHelp logo

cdt's Introduction

CDT - Constrained Delaunay Tetrahedrization made robust and practical

This code implements an algorithm to calculate a Constrained Delaunay Tetrahedrization (CDT) of an input PLC represented by on OFF file. Steiner points are possibly added to make the input admit a CDT. Details of the algorithm are described in "Constrained Delaunay Tetrahedrization: A robust and practical approach" by L. Diazzi, D. Panozzo, A. Vaxman and M. Attene (ACM Trans Graphics Vol 42, N. 6, Procs of SIGGRAPH Asia 2023). You may download a copy here: http://arxiv.org/abs/2309.09805

Usage

Clone this repository with:

git clone https://github.com/MarcoAttene/CDT

Once done, you may build the executable as follows:

cmake -B build -S .

This will produce an appropriate building configuration for your system. On Windows MSVC, this will produce a cdt.sln file. On Linux/MacOS, this will produce a Makefile. Use it as usual to compile cdt. Alternatively, you can use the command line:

cmake --build build --config Release

When compiled, the code generates an executable called cdt. Launch it with no command line parameters to have a list of supported options.

Example:

cdt input_file.off

creates a file called input_file.off.tet representing the constrained tetrahedrization.

We tested our code on Linux (GCC-11), MacOS (GCC-11 and CLANG) and Windows (MSVC 2022 with both CL and CLANG).

License

This program is distributed under the terms of either the GNU GPL or the GNU LGPL license. The code can be compiled in two ways, depending on how CMake is invoked. If you build using CMake -DLGPL=ON .., you may choose between GPL and LGPL at your option. If you build using CMake -DLGPL=OFF .. or just CMake .., the code makes use of modified parts of a third-party code which requires you to accept the terms of the GPL license. See src/delaunay.h for details.

In either case, the program is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

cdt's People

Contributors

marcoattene avatar danielepanozzo avatar lrineau avatar

Stargazers

Luxko avatar antonio vergari avatar  avatar Daniel Shapero avatar Martin Heistermann avatar Jean-Marie Couteyen avatar Guo Jia-Peng avatar Zemeng Han avatar Jeff Carpenter avatar Zhouyuan Chen avatar  avatar Alan Leo Wong avatar Daniel Pak avatar Chen Siyuan avatar Nobuyuki Umetani avatar Francis Williams avatar  avatar Jiahui Huang avatar Matt Morse avatar  avatar Zachary Ferguson avatar Qingnan Zhou avatar Xu Cheng avatar Ci_ys avatar pengyu avatar  avatar ahmed avatar  avatar Mia avatar Siwei He avatar ElonKou avatar David Reeves avatar Tuan Kuranes avatar Romain Janvier avatar  avatar Marco Livesu avatar Kaizheng Liu avatar Chitalu avatar  avatar

Watchers

swq0553 avatar  avatar  avatar  avatar

cdt's Issues

Recovering original vertex indexes

I'm using CDT as a library inside a larger C++ program where I'm using it to build a tetrahedron mesh on the interior of a triangle mesh.

It would be very helpful if there were a convenient way to relate the original boundary triangle mesh to the tetrahedron mesh. To use CDT, I've basically just copied over what's done in the main executable, stripping out the extra options that I don't need. It does appear that CDT scrambles the vertices on the way in, and the permutation sending the final tetrahedron mesh vertices back to the original triangle mesh vertices isn't available, although I haven't studied the code very closely. Maybe it's hiding somewhere.

As an addendum, I will say that CDT is quite difficult to use as a library currently. No documentation, no examples, very little commenting, terse variable names...

Symbolic perturbation failed

When I use this mesh as input, I get errors below:

$./cdt roy.off
Symbolic perturbation failed! Should not happen.

The format of the original mesh is .stl, I imported it in MeshLab and exported it as a .off file.

How can I make it more robust

Thanks for your great work!

I wan to test CDT and want to use it in physics games scenario.

But when I try

 .\cdt.exe .\tempin.off
Assertion failed: tetIntersectsFace(t, f), file D:\Janice_Research\CDT\src\PLC.cpp, line 1195

Then I use to VolumeMesher to make Robust Solid mesh as below

But it still fail to use the CDT

 .\cdt.exe -mbfr .\black_faces.off
Non-triangular faces not supported

CDT.zip

Can you help with this?
Many thanks!

Calling code in parallel seems to bring conflicts

Thank you very much for your code, it has quite high stability and robustness! But in my use, calling code in parallel seems to bring conflicts, which may be caused by static variables in the code.

For example:

void TetMesh::VT(uint32_t v, std::vector<uint64_t> &vt) const
{
static std::vector<uint64_t> vt_queue; // Static to avoid reallocation at each call
uint64_t t = inc_tet[v];

vt_queue.push_back(tetCornerAtVertex(t << 2, v));
mark_Tet_31(t);

How to get a better result?

Thanks for your great work!

I was trying to generate by

.\cdt.exe -m .\boeing_part.off

image

But the output tetrahedral mesh looks far away from the original mesh appearance
How can i generate better result in .mesh formats then? Many thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.