From f1caa773375ad277144da798261707d00a114735 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Wed, 27 Mar 2024 14:02:46 +0100 Subject: [PATCH 1/3] Update formatting in doc comment --- crates/fj-core/src/validation/checks/half_edge_connection.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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..ea372f81a 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 From f14f9fb187ac4026adbdb536cc8b7e0ffabb71ae Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Wed, 27 Mar 2024 14:09:07 +0100 Subject: [PATCH 2/3] Add implementation note --- .../validation/checks/half_edge_connection.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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 ea372f81a..554799b23 100644 --- a/crates/fj-core/src/validation/checks/half_edge_connection.rs +++ b/crates/fj-core/src/validation/checks/half_edge_connection.rs @@ -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\ From 10993f73ef1bb4efb802a92aaf1d7509a21d03d5 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Wed, 27 Mar 2024 14:14:30 +0100 Subject: [PATCH 3/3] Clean up imports --- crates/fj-core/src/validation/checks/face_winding.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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();