mirror of
https://github.com/hannobraun/Fornjot
synced 2025-07-24 02:46:08 +00:00
Refactor to prepare for follow-on change
This commit is contained in:
parent
8c2a1eea69
commit
0aef67f9ce
@ -30,6 +30,7 @@ impl Validate for Shell {
|
||||
);
|
||||
errors.extend(
|
||||
ShellValidationError::check_half_edge_pairs(self, geometry)
|
||||
.map(ShellValidationError::HalfEdgeHasNoSibling)
|
||||
.map(Into::into),
|
||||
);
|
||||
ShellValidationError::check_half_edge_coincidence(
|
||||
@ -78,7 +79,7 @@ impl ShellValidationError {
|
||||
fn check_half_edge_pairs<'r>(
|
||||
shell: &'r Shell,
|
||||
geometry: &'r Geometry,
|
||||
) -> impl Iterator<Item = ShellValidationError> + 'r {
|
||||
) -> impl Iterator<Item = HalfEdgeHasNoSibling> + 'r {
|
||||
let mut unmatched_half_edges = BTreeMap::new();
|
||||
|
||||
for face in shell.faces() {
|
||||
@ -118,9 +119,7 @@ impl ShellValidationError {
|
||||
unmatched_half_edges
|
||||
.into_values()
|
||||
.cloned()
|
||||
.map(|half_edge| {
|
||||
Self::HalfEdgeHasNoSibling(HalfEdgeHasNoSibling { half_edge })
|
||||
})
|
||||
.map(|half_edge| HalfEdgeHasNoSibling { half_edge })
|
||||
}
|
||||
|
||||
/// Check that non-sibling half-edges are not coincident
|
||||
|
Loading…
x
Reference in New Issue
Block a user