Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding triangulation and tetrahedralization functions #118

Closed
wants to merge 3 commits into from

Conversation

odedstein
Copy link
Collaborator

This PR adds triangulation and tetrahedralization capacity.

For triangulation, this uses CDT. This is, in my opinion, better than Shewchuck's classic Triangle for 3 reasons:

  • It has MPL2 licensing, like libigl, and unlike Triangle, which has a custom license that is very restrictive.
  • It auto-detects holes, which you need to specify seed points to Triangle for.
  • It is very robust.

For tetrahedralization, this uses TetGen through its libigl wrapper.

It's still not quite ready to merge before we discuss 2 important points:

  • CDT does not yet support refinement (needed for min angle and max volume options). They seem to be actively working on it, and the library is so nice that I suggest we stick with it anyways. This is the active PR. I tried it, and it works fine, but I do not want to use a non-merged PR for our library.
  • TetGen is not just GPL (our normal copyleft), but AGPL, which adds an additional, more restrictive license to our copyleft module. I would have liked to used the new paper CDT (this has the same name as the 2D triangulation library...) for this, which seems to be a more modern TetGen, but their code does not support refinement of tet meshes, which is needed for quality and maximum volume options.

@odedstein odedstein added the enhancement New feature or request label Apr 18, 2024
@odedstein odedstein requested a review from sgsellan April 18, 2024 16:54
@sgsellan sgsellan assigned odedstein and unassigned sgsellan Apr 25, 2024
@sgsellan sgsellan removed their request for review April 25, 2024 22:13
@sgsellan
Copy link
Owner

There seems to already exist a great python wrapper for tetgen, with a good API that is similar to ours. So I personally do not think the damage of polluting the license is offset by any gain of having it wrapped in our library, at least right now. So I propose we excise the tetrahedralization from this PR.

On triangulation, I am happy to learn about this library! Seems to do what I use triangle for, but better. Happy to both merge now, and merge once their refinement PR is merged. Up to you.

@odedstein
Copy link
Collaborator Author

Your point makes sense to me. Let's leave off this pull request for now, and revisit it when the triangulation library is more mature.

@odedstein odedstein closed this Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants