artem-ogre / CDT

Constrained Delaunay Triangulation (C++)
https://artem-ogre.github.io/CDT/
Mozilla Public License 2.0
1.07k stars 133 forks source link

Port to C# [link in description] #152

Closed MWstudios closed 1 year ago

MWstudios commented 1 year ago

I finished the port to C#. Let me know in issues if there is a bug or a typo on my side: https://github.com/MWstudios/C-Sharp-DT I still have slight doubts about if some things were ported correctly. IIRC std::unordered::map::operator[] creates a new key if it doesn't exist, so I replicated the behavior with Dictionary<T>(). detail::selection_sort() is replaceable with List.Sort() (though that does a quick/heap sort) and predicates::Epsilon<T>() should be equal to 2^-52 (again, my assumption).

It also occasionally crashes/asserts on thin triangles when minDistToConstraintEdge is set to low values (below 10), though I'm unsure if it's a bug on my part.