-
Notifications
You must be signed in to change notification settings - Fork 137
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
Ruppert's Refinement Algorithm. #133
base: master
Are you sure you want to change the base?
Ruppert's Refinement Algorithm. #133
Conversation
Great, thank you for the PR, @Islam0mar! |
Hi @Islam0mar, I did some code refactoring and fixing. You can check it out here.
I did not yet have time to look at the core parts of the algorithm, so this is still a work in progress. |
Hi @artem-ogre, I have merged your branch and did these changes:
|
@artem-ogre sorry, I didn't notice your recent refactor. let me know your opinion about collecting erased triangles. |
Hi @Islam0mar, Sorry that I could not find time to continue working on it yet. But I remember about this PR all the time :) Yes, I think we should implement skipping the 'to-be-erased-later' triangles and I have some ideas of how this could be done. However, I think it is best to first focus on the core of the algorithm and get it right. Skipping triangles is an improvement that can always be implemented on top. Another feature that's really nice to have is not to attempt refining triangles where both edges of the sharp angle are constrained (because it is futile and leads to infinite loop in the refinement). |
@artem-ogre @Islam0mar I'm interested in this work as a possibly-more-robust-than-poly2tri CDT for triangle generation from trimmed NURBS surfaces... if there's a potential infinite loop case with constrained edges on sharp angles, would you advise avoiding testing such an application for now? |
@starseeker |
@starseeker |
@artem-ogre My specific interest is triangulating a data set with bounding polygons, holes and "interior" points not on polygons - the latter serving to force the generated mesh to more closely conform to a NURBS surface from which we're generating the input data. In poly2tri the latter are Steiner points - I wasn't sure if this work was also adding that capability, or whether the inserted points are only generated algorithmically for refinement purposes. This report has some visual examples of the sort of thing we're trying to do: https://apps.dtic.mil/sti/pdfs/AD1094344.pdf (Figures 12, 13 and 17 for example) Apologies if I'm a little off topic for this particular pull request. |
@starseeker |
Hello @artem-ogre, I have found the error in
Reading through triangle. I used his condition on equidistant to avoid aggressive splitting and it seems to work. Let me know your opinion about these updates, so we can move forward with this PR. |
Hi, Islam. Thanks for continuing working on it. I came to similar conclusions earlier and was thinking about skipping triangles when, e.g. acute angle is formed by constraint edges. Regarding inserting duplicates I recently updated CDT to throw an exception when this happens. I will check out your changes. Are you available for a call or messaging so we can efficiently discuss how this can be finalized? My email is [email protected]. |
Sure. I available for a call or messaging, [email protected] |
How's this going? Anything I can do to help? Having this feature would be huge. |
@sampotter The status is that I can’t yet find the time and energy to integrate this PR. I work on CDT in my spare time, and I’m on parental leave with two small kids (almost no spare time). Integrating this feature is very high on my TODO. I think that Islam’s fork is in quite a good state and can be used at one’s own risk for CDT refinement “here and now”. I will try to do it this July but no promises. |
@artem-ogre Ah, I hope you're enjoying your parental leave. :-) I just forked both CDT and PythonCDT and hooked Islam's changes up for myself and it seems to work well so far. At least, for the simple example I'm working with, I didn't notice any issues, and tried a reasonable spread of parameters while refining. Is there anything I can do to help with integration? Or should I just wait until you have more time? |
hello! FWIW I would also like to use the work in this branch. I'd like to use |
@LukeMinnich @artem-ogre I'm actually in a pretty similar situation. We need a Delaunay mesher with refinement that has a more permissive license and haven't been able to reach Shewchuk to work out some kind of deal to use Triangle. I'm not sure to what extent we'll be able to share data, but if we're able to get CDT integrated into our usual workflow, we'll be stress testing it on a continuous stream of examples coming from real CAD geometry and should be able to provide useful fuzzing. |
CDT exists because we were not able to reach Shewchuk. And we tried hard. |
Current status --
20°
threshold--:Issues:
TODO:
addVertex
.Ref.s: