From 5dace5449de9812d59c79a14aa27caa0fa0b5d9a Mon Sep 17 00:00:00 2001 From: AI Assistant Date: Thu, 27 Aug 2026 11:46:57 +1000 Subject: [PATCH] Use log::error! instead of log::warn! for the tessellate_sat diagnostics The web build's logger (sys.rs's BannerLogger) installs log::set_max_level(LevelFilter::Error) - warn! records never reach it (or even the browser console) at all, they're filtered at the macro call site. error! also gets a free on-page banner via show_banner(), not just a console line - the more useful behavior for a user hitting this without DevTools open. --- src/scene/convert/acis_kernel.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/scene/convert/acis_kernel.rs b/src/scene/convert/acis_kernel.rs index 06c41e2a..6ec12b7f 100644 --- a/src/scene/convert/acis_kernel.rs +++ b/src/scene/convert/acis_kernel.rs @@ -29,7 +29,7 @@ pub fn tessellate_sat( let (bodies, loss) = lift(document); let body_count = bodies.len(); if bodies.is_empty() { - log::warn!( + log::error!( "tessellate_sat({name}): lift() returned zero bodies - {} unsupported surface(s), {} unsupported curve(s), {} broken/malformed pointer(s) - nothing to draw", loss.surfaces.len(), loss.curves.len(), @@ -49,7 +49,7 @@ pub fn tessellate_sat( let mut placed_bodies = Vec::with_capacity(body_count); for (index, body) in bodies.into_iter().enumerate() { let Some(source) = body.provenance.source() else { - log::warn!( + log::error!( "tessellate_sat({name}): body {index}/{body_count} has no provenance source - aborting the whole document instead of just this body" ); return None; @@ -57,7 +57,7 @@ pub fn tessellate_sat( let transform = match body_transform(document, source.index() as usize) { Ok(t) => t, Err(err) => { - log::warn!( + log::error!( "tessellate_sat({name}): body {index}/{body_count} (source record {}) has no resolvable transform: {err:?} - aborting the whole document", source.index() ); @@ -73,7 +73,7 @@ pub fn tessellate_sat( origin: translation, }; let Some(placed) = brep::transform(&body, &placement) else { - log::warn!( + log::error!( "tessellate_sat({name}): body {index}/{body_count} failed brep::transform() - aborting the whole document" ); return None; @@ -196,7 +196,7 @@ pub fn tessellate_sat( } } if indices.is_empty() { - log::warn!( + log::error!( "tessellate_sat({name}): {body_count} placed bodies produced zero triangles ({undrawn} face(s) undrawn) - every face was either missing or unrepresentable in its surface's own parameters" ); return None;