mirror of
https://github.com/hannobraun/Fornjot
synced 2025-01-30 20:05:55 +00:00
Fix validation check in Cycle
It didn't do the check, if the cycle had only one edge.
This commit is contained in:
parent
9279d78a4e
commit
a1e235f028
@ -53,19 +53,19 @@ impl Cycle {
|
|||||||
"Edges in cycle do not connect"
|
"Edges in cycle do not connect"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Verify that the edges form a cycle
|
// Verify that the edges form a cycle
|
||||||
if let Some(first) = half_edges.first() {
|
if let Some(first) = half_edges.first() {
|
||||||
if let Some(last) = half_edges.last() {
|
if let Some(last) = half_edges.last() {
|
||||||
let [first, _] = first.vertices();
|
let [first, _] = first.vertices();
|
||||||
let [_, last] = last.vertices();
|
let [_, last] = last.vertices();
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
first.surface_form(),
|
first.surface_form(),
|
||||||
last.surface_form(),
|
last.surface_form(),
|
||||||
"Edges do not form a cycle"
|
"Edges do not form a cycle"
|
||||||
);
|
);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user