-
Notifications
You must be signed in to change notification settings - Fork 188
Open
Description
The current code only checks for duplicate adjacent vertices:
Lines 251 to 260 in 6adc566
// Loops are not allowed to have any duplicate vertices or edge crossings. | |
// We split this check into two parts. First we check that no edge is | |
// degenerate (identical endpoints). Then we check that there are no | |
// intersections between non-adjacent edges (including at vertices). The | |
// second check needs the ShapeIndex, so it does not fall within the scope | |
// of this method. | |
for i, v := range l.vertices { | |
if v == l.Vertex(i+1) { | |
return fmt.Errorf("edge %d is degenerate (duplicate vertex)", i) | |
} |
While the comments say:
Loops are not allowed to have any duplicate vertices (whether adjacent or not)
Lines 34 to 35 in 6adc566
// Loops are not allowed to have any duplicate vertices (whether adjacent or | |
// not). Non-adjacent edges are not allowed to intersect, and furthermore edges |
Metadata
Metadata
Assignees
Labels
No labels