Skip to content

Commit

Permalink
Convert warning into assertion
Browse files Browse the repository at this point in the history
This is possible now, since handling of duplicate points in the
approximation code has been fixed.
  • Loading branch information
hannobraun committed Feb 9, 2022
1 parent d42527d commit 363ddc2
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/kernel/topology/faces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use parry3d_f64::{
query::Ray as Ray3,
shape::{Segment as Segment3, Triangle},
};
use tracing::warn;

use crate::{
debug::{DebugInfo, TriangleEdgeCheck},
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 363ddc2

Please sign in to comment.