artem-ogre / CDT

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

Port to C# [link in description] #152

Closed MWstudios closed 8 months ago

MWstudios commented 8 months 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.