From 39f700374e22a44ed92bf3769dd3f7a1007b9f92 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Tue, 8 Nov 2022 11:46:30 +0100 Subject: [PATCH] Add comments --- crates/fj-kernel/src/validate/cycle.rs | 5 +++++ crates/fj-kernel/src/validate/edge.rs | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/crates/fj-kernel/src/validate/cycle.rs b/crates/fj-kernel/src/validate/cycle.rs index 3e528b68c..22603cd9f 100644 --- a/crates/fj-kernel/src/validate/cycle.rs +++ b/crates/fj-kernel/src/validate/cycle.rs @@ -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(()) } } diff --git a/crates/fj-kernel/src/validate/edge.rs b/crates/fj-kernel/src/validate/edge.rs index 2babcdf94..6db571ebd 100644 --- a/crates/fj-kernel/src/validate/edge.rs +++ b/crates/fj-kernel/src/validate/edge.rs @@ -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(()) } }