Skip to content

Commit fb4e947

Browse files
committed
Make the new planarize not crash. Seems to work everywhere now.
1 parent d754b64 commit fb4e947

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

backend/src/lib.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,10 @@ impl LTN {
155155
.line_split_many(&fractions)
156156
.unwrap()
157157
{
158-
let split_ls = split_ls.unwrap();
158+
let Some(split_ls) = split_ls else {
159+
// Sometimes the split points are too close together
160+
continue;
161+
};
159162
// Make a new edge
160163
edges.push(Edge {
161164
node1: pt_to_node_id[&hashify_point(split_ls.0[0])],

0 commit comments

Comments
 (0)