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

Removing badly shaped triangles in CDT #63

Closed
zinuok opened this issue Nov 29, 2021 · 2 comments
Closed

Removing badly shaped triangles in CDT #63

zinuok opened this issue Nov 29, 2021 · 2 comments
Labels
duplicate This issue or pull request already exists question Further information is requested

Comments

@zinuok
Copy link

zinuok commented Nov 29, 2021

Hello, I successfully created CDT using the following methods, but there are many bad triangles in result (flat triangle),
which cause an error " In initialize: Triangulation is invalid" when I use "LinearTriInterpolator" method from python matploblib library.

So, my question is, how can I remove the bad shape triangles in CDT?

cdt.insertVertices(vertices);
cdt.insertEdges(edges);
CDT::RemoveDuplicatesAndRemapEdges(vertices, edges); // remove duplicate
cdt.eraseSuperTriangle(); 

image

@artem-ogre artem-ogre added question Further information is requested duplicate This issue or pull request already exists labels Nov 29, 2021
@artem-ogre
Copy link
Owner

artem-ogre commented Nov 30, 2021

One way to improve such triangles is to perform re-meshing by inserting additional points (see Delaunay refinement or Steiner points).
CDT does not provide functionality to do this. So either you need to use another software for doing that, write your own re-meshing or even contribute Ruppert refinement algorithm to CDT :)
I hope this answers your question.

I am marking this issue as a duplicate of #7 .

@artem-ogre
Copy link
Owner

Duplicate of #7

@artem-ogre artem-ogre marked this as a duplicate of #7 Nov 30, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants