spade
spade copied to clipboard
Delaunay refinement (#66)
See #66.
This is the initial implementation which works sufficiently well already.
To use this, create a CDT, insert some constraint edges and then call
my_cdt.refine(RefinementParameters::new().exclude_outer_faces())
which will refine the cdt inplace. Note that, in order for exclude_outer_faces
to work, the constraint edges should form a loop somewhere - otherwise, all faces will be considered to be outer faces and won't be refined.
Remaining TODOs (just mentioning for my own overview):
- [x] Documentation of
AngleLimit
- [x] Documentation of
RefinementParameters
- [x] Documentation of
fn refine
- [x] Internal documentation by adding a few comments at appropriate places
- [ ] At least some improved test coverage, e.g. for testing special cases
- [ ] Expand fuzz tests (those are more or less just stubs at the moment)
TODOs for some follow-up PRs:
- Try to enable refinement algorithm for regular triangulations (if easy)
- Investigate if the refinement quality can be increased (though it's not too bad already)
- Add some images detailing how
exclude_outer_faces
works