From 24c856b00deeba4c88d05bd8525f069ebc11599c Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Tue, 9 Jul 2024 21:11:16 +0200 Subject: [PATCH 1/2] Remove superfluous info from validation check --- .../coincident_half_edges_are_not_siblings.rs | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/crates/fj-core/src/validation/checks/coincident_half_edges_are_not_siblings.rs b/crates/fj-core/src/validation/checks/coincident_half_edges_are_not_siblings.rs index 80ffdedb0..e81e3bc33 100644 --- a/crates/fj-core/src/validation/checks/coincident_half_edges_are_not_siblings.rs +++ b/crates/fj-core/src/validation/checks/coincident_half_edges_are_not_siblings.rs @@ -19,9 +19,6 @@ use crate::{ /// which is important to handle the shell geometry in a robust way. #[derive(Clone, Debug, thiserror::Error)] pub struct CoincidentHalfEdgesAreNotSiblings { - /// The boundaries of the half-edges - pub boundaries: [CurveBoundary>; 2], - /// The curves of the half-edges pub curves: [Handle; 2], @@ -43,20 +40,6 @@ impl fmt::Display for CoincidentHalfEdgesAreNotSiblings { siblings", )?; - { - let [a, b] = &self.boundaries; - - if a != &b.reverse() { - writeln!( - f, - "Boundaries don't match.\n\ - \tHalf-edge 1 has boundary `{a:?}`\n\ - \tHalf-edge 2 has boundary `{b:?}`\n\ - \t(expecting same boundary, but reversed)" - )?; - } - } - { let [a, b] = &self.curves; @@ -139,10 +122,6 @@ impl ValidationCheck for CoincidentHalfEdgesAreNotSiblings { // If all points on distinct curves are within // `distinct_min_distance`, that's a problem. if distances.all(|d| d < config.distinct_min_distance) { - let boundaries = - [half_edge_a, half_edge_b].map(|half_edge| { - geometry.of_half_edge(half_edge).boundary - }); let curves = [half_edge_a, half_edge_b] .map(|half_edge| half_edge.curve().clone()); let vertices = @@ -155,7 +134,6 @@ impl ValidationCheck for CoincidentHalfEdgesAreNotSiblings { }); errors.push(CoincidentHalfEdgesAreNotSiblings { - boundaries, curves, vertices, half_edge_a: half_edge_a.clone(), From 9b90543bd3be14887476d123f229364bda4627e2 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Tue, 9 Jul 2024 21:12:51 +0200 Subject: [PATCH 2/2] Update doc comment --- .../checks/coincident_half_edges_are_not_siblings.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/fj-core/src/validation/checks/coincident_half_edges_are_not_siblings.rs b/crates/fj-core/src/validation/checks/coincident_half_edges_are_not_siblings.rs index e81e3bc33..cb1529dfe 100644 --- a/crates/fj-core/src/validation/checks/coincident_half_edges_are_not_siblings.rs +++ b/crates/fj-core/src/validation/checks/coincident_half_edges_are_not_siblings.rs @@ -14,9 +14,9 @@ use crate::{ /// A [`Shell`] contains two [`HalfEdge`]s that are coincident but not siblings /// -/// Coincident half-edges must reference the same curve, and have the same -/// boundaries on that curve. This provides clear, topological information, -/// which is important to handle the shell geometry in a robust way. +/// Coincident half-edges must reference the same curve, and must have opposite +/// start and end vertices (i.e. the start vertex of one must be the end vertex +/// of the other, respectively). #[derive(Clone, Debug, thiserror::Error)] pub struct CoincidentHalfEdgesAreNotSiblings { /// The curves of the half-edges