mirror of
https://github.com/hannobraun/Fornjot
synced 2025-09-30 04:58:17 +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(
|
errors.extend(
|
||||||
ShellValidationError::check_half_edge_pairs(self, geometry)
|
ShellValidationError::check_half_edge_pairs(self, geometry)
|
||||||
|
.map(ShellValidationError::HalfEdgeHasNoSibling)
|
||||||
.map(Into::into),
|
.map(Into::into),
|
||||||
);
|
);
|
||||||
ShellValidationError::check_half_edge_coincidence(
|
ShellValidationError::check_half_edge_coincidence(
|
||||||
@ -78,7 +79,7 @@ impl ShellValidationError {
|
|||||||
fn check_half_edge_pairs<'r>(
|
fn check_half_edge_pairs<'r>(
|
||||||
shell: &'r Shell,
|
shell: &'r Shell,
|
||||||
geometry: &'r Geometry,
|
geometry: &'r Geometry,
|
||||||
) -> impl Iterator<Item = ShellValidationError> + 'r {
|
) -> impl Iterator<Item = HalfEdgeHasNoSibling> + 'r {
|
||||||
let mut unmatched_half_edges = BTreeMap::new();
|
let mut unmatched_half_edges = BTreeMap::new();
|
||||||
|
|
||||||
for face in shell.faces() {
|
for face in shell.faces() {
|
||||||
@ -118,9 +119,7 @@ impl ShellValidationError {
|
|||||||
unmatched_half_edges
|
unmatched_half_edges
|
||||||
.into_values()
|
.into_values()
|
||||||
.cloned()
|
.cloned()
|
||||||
.map(|half_edge| {
|
.map(|half_edge| HalfEdgeHasNoSibling { half_edge })
|
||||||
Self::HalfEdgeHasNoSibling(HalfEdgeHasNoSibling { half_edge })
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Check that non-sibling half-edges are not coincident
|
/// Check that non-sibling half-edges are not coincident
|
||||||
|
Loading…
x
Reference in New Issue
Block a user