From d831b44474b4b3220d884306fd29aaf0cb5810fe Mon Sep 17 00:00:00 2001 From: don bright Date: Tue, 21 Aug 2012 03:10:06 +0200 Subject: [PATCH] clarify warning message --- src/CGALEvaluator.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/CGALEvaluator.cc b/src/CGALEvaluator.cc index 75b9097f..ac6190f2 100644 --- a/src/CGALEvaluator.cc +++ b/src/CGALEvaluator.cc @@ -241,12 +241,9 @@ Response CGALEvaluator::visit(State &state, const TransformNode &node) // First union all children N = applyToChildren(node, CGE_UNION); - if ( matrix_contains_infinity( node.matrix ) ) { - PRINT("Warning: Transformation matrix contains Infinity - removing object."); - N.reset(); - } - if ( matrix_contains_nan( node.matrix ) ) { - PRINT("Warning: Transformation matrix contains Not-a-Number - removing object"); + if ( matrix_contains_infinity( node.matrix ) || matrix_contains_nan( node.matrix ) ) { + // due to the way parse/eval works we can't currently distinguish between NaN and Inf + PRINT("Warning: Transformation matrix contains Not-a-Number and/or Infinity - removing object."); N.reset(); }