From 2558eac7fa4568dcb14ab7c7c27533d5e0bd16e6 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Tue, 28 Nov 2023 21:55:16 -0800 Subject: [PATCH] TODO: don't do this! --- src/face_crawler.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/face_crawler.rs b/src/face_crawler.rs index 3081eb5..74440e6 100644 --- a/src/face_crawler.rs +++ b/src/face_crawler.rs @@ -108,12 +108,14 @@ pub enum CrawlResult{ } pub fn crawl_fev(mut fev:FEV,mesh:&impl MeshQuery,relative_body:&Body,start_time:Time,time_limit:Time)->CrawlResult{ let mut time=start_time; - for _ in 0..10{ + for _ in 0..20{ match next_transition(&fev,time,mesh,relative_body,time_limit){ Transition::Miss=>return CrawlResult::Miss(fev), Transition::Next(next_fev,next_time)=>(fev,time)=(next_fev,next_time), Transition::Hit(face,time)=>return CrawlResult::Hit(face,time), } } - panic!("Too many iterations!"); + //TODO: fix all bugs + println!("Too many iterations! Using default behaviour instead of crashing..."); + CrawlResult::Miss(fev) }