From 363ddc2dd9336262f5d77ff165288d3a77585a9e Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Wed, 9 Feb 2022 14:34:41 +0100 Subject: [PATCH] Convert warning into assertion This is possible now, since handling of duplicate points in the approximation code has been fixed. --- src/kernel/topology/faces.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/kernel/topology/faces.rs b/src/kernel/topology/faces.rs index f348ac64c..e122acfd9 100644 --- a/src/kernel/topology/faces.rs +++ b/src/kernel/topology/faces.rs @@ -11,7 +11,6 @@ use parry3d_f64::{ query::Ray as Ray3, shape::{Segment as Segment3, Triangle}, }; -use tracing::warn; use crate::{ debug::{DebugInfo, TriangleEdgeCheck}, @@ -110,12 +109,7 @@ impl Face { match self { Self::Face { edges, surface } => { let approx = edges.approx(tolerance); - - // Can't make this a panic, as the current approximation code - // actually produces invalid approximations. - if let Err(err) = approx.validate() { - warn!("Invalid approximation: {:?}", err); - } + approx.validate().expect("Invalid approximation"); let points: Vec<_> = approx .points