Simplify validation error

This commit is contained in:
Hanno Braun 2024-06-28 19:53:53 +02:00
parent 7c7bfe5c0b
commit 82a9e03a86

View File

@ -5,7 +5,7 @@ use crate::{
geometry::Geometry, geometry::Geometry,
queries::{AllHalfEdgesWithSurface, CycleOfHalfEdge}, queries::{AllHalfEdgesWithSurface, CycleOfHalfEdge},
storage::Handle, storage::Handle,
topology::{HalfEdge, Shell}, topology::{Curve, Shell},
validation::{ValidationCheck, ValidationConfig}, validation::{ValidationCheck, ValidationConfig},
}; };
@ -38,11 +38,8 @@ use crate::{
#[derive(Clone, Debug, thiserror::Error)] #[derive(Clone, Debug, thiserror::Error)]
#[error("Curve coordinate system mismatch: {:#?}", self)] #[error("Curve coordinate system mismatch: {:#?}", self)]
pub struct CurveGeometryMismatch { pub struct CurveGeometryMismatch {
/// One of the half-edges, whose curves have mismatching geometry /// The curve for which mismatching geometry has been defined
pub half_edge_a: Handle<HalfEdge>, pub curve: Handle<Curve>,
/// The other of the half-edges, whose curves have mismatching geometry
pub half_edge_b: Handle<HalfEdge>,
/// The point on the curves, where they don't match /// The point on the curves, where they don't match
pub point_curve: Point<1>, pub point_curve: Point<1>,
@ -174,8 +171,7 @@ impl ValidationCheck<Shell> for CurveGeometryMismatch {
if distance > config.identical_max_distance { if distance > config.identical_max_distance {
errors.push(Self { errors.push(Self {
half_edge_a: half_edge_a.clone(), curve: half_edge_a.curve().clone(),
half_edge_b: half_edge_b.clone(),
point_curve, point_curve,
point_a: a_global, point_a: a_global,
point_b: b_global, point_b: b_global,