commit 97dadd4b7152e21154178ce3ea3455714c01a6e9
parent 476eb50714ac0ee4cc33613eca0959d0f6c69887
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Fri, 27 Sep 2024 14:34:48 +0200
Add a warning if get normal fails
Diffstat:
1 file changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/scad_geometry.c b/src/scad_geometry.c
@@ -2455,6 +2455,17 @@ scad_geometry_normal
coord = pcoord = NULL;
}
if(!out) { /* Could not find a matching surface */
+ if(str_is_empty(&geom->name)) {
+ log_warning(get_device(),
+ "Could not get normal at vertex %g %g %g "
+ "as unamed geometry %p is not close enough.\n",
+ SPLIT3(p), (void*)geom);
+ } else {
+ log_warning(get_device(),
+ "Could not get normal at vertex %g %g %g "
+ "as geometry %s is not close enough.\n",
+ SPLIT3(p), str_cget(&geom->name));
+ }
res = RES_BAD_ARG;
goto error;
}