mirror of
https://github.com/hannobraun/Fornjot
synced 2025-01-29 11:29:22 +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"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Verify that the edges form a cycle
|
||||
if let Some(first) = half_edges.first() {
|
||||
if let Some(last) = half_edges.last() {
|
||||
let [first, _] = first.vertices();
|
||||
let [_, last] = last.vertices();
|
||||
// Verify that the edges form a cycle
|
||||
if let Some(first) = half_edges.first() {
|
||||
if let Some(last) = half_edges.last() {
|
||||
let [first, _] = first.vertices();
|
||||
let [_, last] = last.vertices();
|
||||
|
||||
assert_eq!(
|
||||
first.surface_form(),
|
||||
last.surface_form(),
|
||||
"Edges do not form a cycle"
|
||||
);
|
||||
}
|
||||
assert_eq!(
|
||||
first.surface_form(),
|
||||
last.surface_form(),
|
||||
"Edges do not form a cycle"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user