Gimly / DoublyConnectedEdgeList

Implements a doubly connected edge list (DCEL) in C#
MIT License
6 stars 3 forks source link

Fix the edge comparer in the unit tests #7

Closed thomashilke closed 1 year ago

thomashilke commented 1 year ago

The edge comparer implemented for the unit testing purpose fails to check which extremities of the two edges it compares are coincident. In particular, given a comparer comparer and two edges edge1 and edge2,

comparer.Compare(edge1, edge2)

and

comparer.Compare(edge1.Reverse(), edge2.Reverse())

or any combination should return the same result.

The unit tests must be adapted, since the ordering of the edges is modified. Using the figure 'complex_shape.svg', it is now trivial (but tedious...) to determine consistently the previous and next half edge of a given half edge by following the boundary of the associated face, keeping the face on the left side of the half edges.

Gimly commented 1 year ago

@thomashilke oops, j'ai l'impression que ce PR a été oublié... c'est toujours d'actualité?