diff --git a/crates/fj-core/src/validation/checks/face_winding.rs b/crates/fj-core/src/validation/checks/face_winding.rs index 96267061b..af8baf7a9 100644 --- a/crates/fj-core/src/validation/checks/face_winding.rs +++ b/crates/fj-core/src/validation/checks/face_winding.rs @@ -1,9 +1,10 @@ use fj_math::Winding; use crate::{ + geometry::Geometry, storage::Handle, topology::{Cycle, Face}, - validation::ValidationCheck, + validation::{ValidationCheck, ValidationConfig}, }; /// Interior [`Cycle`] of [`Face`] has invalid winding @@ -38,8 +39,8 @@ pub struct InteriorCycleHasInvalidWinding { impl ValidationCheck for InteriorCycleHasInvalidWinding { fn check( object: &Face, - geometry: &crate::geometry::Geometry, - _: &crate::validation::ValidationConfig, + geometry: &Geometry, + _: &ValidationConfig, ) -> impl Iterator { object.region().interiors().iter().filter_map(|interior| { let exterior = object.region().exterior(); diff --git a/crates/fj-core/src/validation/checks/half_edge_connection.rs b/crates/fj-core/src/validation/checks/half_edge_connection.rs index 679c45a8d..554799b23 100644 --- a/crates/fj-core/src/validation/checks/half_edge_connection.rs +++ b/crates/fj-core/src/validation/checks/half_edge_connection.rs @@ -7,7 +7,7 @@ use crate::{ validation::{validation_check::ValidationCheck, ValidationConfig}, }; -/// Adjacent [`HalfEdge`]s in [`Cycle`] are not connected +/// # Adjacent [`HalfEdge`]s in [`Cycle`] are not connected /// /// Each [`HalfEdge`] only references its start vertex. The end vertex is always /// assumed to be the start vertex of the next [`HalfEdge`] in the cycle. This @@ -16,6 +16,25 @@ use crate::{ /// /// However, the *position* of that shared vertex is redundantly defined in both /// [`HalfEdge`]s. This check verifies that both positions are the same. +/// +/// ## Implementation Note +/// +/// Having the vertex positions redundantly defined is not desirable, but +/// currently we lack the facilities to project a single definition (whether +/// local to a curve, local to a surface, or global in 3D space) into other +/// local contexts, where they are required for approximation/triangulation. +/// +/// As of this writing, there is no issue for creating these facilities and +/// consolidating these redundant definitions, but the following issue tracks a +/// prerequisite of that: +/// +/// +/// +/// If there was a single definition for each vertex position, we wouldn't need +/// this validation check in its current form, but we would still need another +/// one that fills a similar gap. Namely, we would still need to check whether a +/// half-edge's start and end vertices are actually located on that half-edge's +/// curve. #[derive(Clone, Debug, thiserror::Error)] #[error( "Adjacent `HalfEdge`s in `Cycle` are not connected\n\