From 0d3bf125fdef1c3f570cbc02a8d8f3f947f22125 Mon Sep 17 00:00:00 2001 From: Andrew Hunter Date: Sun, 26 Feb 2023 22:49:42 +0000 Subject: [PATCH] Remove the fine-tuning on the 'y compare' routine and just always avoid re-using edges (This leaves the tests passing but can result in unused edges in the right circumstances) --- src/bezier/path/graph_path/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bezier/path/graph_path/mod.rs b/src/bezier/path/graph_path/mod.rs index fdc50af6..c022f17b 100644 --- a/src/bezier/path/graph_path/mod.rs +++ b/src/bezier/path/graph_path/mod.rs @@ -936,6 +936,8 @@ impl GraphPath { // Check the 'already used' list only if there are no alternative edges from this point let avoid_already_used = if following_connections.len() > 1 { + true + /* // Use the 'used' array to exclude edges unless it would exclude all edges // TODO: only do this if no loop is found that does not re-use edges (this is slightly too eager to re-use an edge) following_connections.iter() @@ -943,6 +945,7 @@ impl GraphPath { visited_edges[following_edge.start_idx]&(1< GraphPath { let y_a = self.points[*point_a].position.y(); let y_b = self.points[*point_b].position.y(); - y_b.partial_cmp(&y_a).unwrap_or(Ordering::Equal) + y_a.partial_cmp(&y_b).unwrap_or(Ordering::Equal) } else if x_a < x_b { Ordering::Less } else {