Add comments

This commit is contained in:
Hanno Braun 2022-11-08 11:46:30 +01:00
parent 1e8c8eeaa4
commit 39f700374e
2 changed files with 10 additions and 0 deletions

View File

@ -15,6 +15,11 @@ impl Validate2 for Cycle {
_: &ValidationConfig,
) -> Result<(), Self::Error> {
CycleValidationError::check_half_edge_connections(self)?;
// We don't need to check that all half-edges are defined in the same
// surface. We already check that they are connected by identical
// surface vertices, so that would be redundant.
Ok(())
}
}

View File

@ -24,6 +24,11 @@ impl Validate2 for HalfEdge {
HalfEdgeValidationError::check_global_curve_identity(self)?;
HalfEdgeValidationError::check_global_vertex_identity(self)?;
HalfEdgeValidationError::check_vertex_positions(self, config)?;
// We don't need to check anything about surfaces here. We already check
// curves, which makes sure the vertices are consistent with each other,
// and the validation of those vertices checks the surfaces.
Ok(())
}
}