summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CGALEvaluator.cc10
-rw-r--r--src/func.cc8
2 files changed, 10 insertions, 8 deletions
diff --git a/src/CGALEvaluator.cc b/src/CGALEvaluator.cc
index 7c483cb..6ad9e4d 100644
--- a/src/CGALEvaluator.cc
+++ b/src/CGALEvaluator.cc
@@ -206,9 +206,11 @@ CGAL_Nef_polyhedron CGALEvaluator::applyResize(const CgaladvNode &node)
bb = bounding_box( *N.p3 );
}
- Eigen::Matrix<NT,3,1> scale, bbox_size;
- scale << 1,1,1;
- bbox_size << bb.xmax()-bb.xmin(), bb.ymax()-bb.ymin(), bb.zmax()-bb.zmin();
+ std::vector<NT> scale, bbox_size;
+ for (int i=0;i<3;i++) scale.push_back( NT(1) );
+ bbox_size.push_back( bb.xmax()-bb.xmin() );
+ bbox_size.push_back( bb.ymax()-bb.ymin() );
+ bbox_size.push_back( bb.zmax()-bb.zmin() );
for (int i=0;i<3;i++) {
if (node.newsize[i]) {
if (bbox_size[i]==NT(0)) {
@@ -220,7 +222,7 @@ CGAL_Nef_polyhedron CGALEvaluator::applyResize(const CgaladvNode &node)
}
}
}
- NT autoscale = scale.maxCoeff();
+ NT autoscale = std::max( scale[0], std::max( scale[1], scale[2] ));
for (int i=0;i<3;i++) {
if (node.autosize[i]) scale[i] = autoscale;
}
diff --git a/src/func.cc b/src/func.cc
index f2c9835..88bf3c8 100644
--- a/src/func.cc
+++ b/src/func.cc
@@ -449,7 +449,7 @@ Value builtin_search(const Context *, const EvalContext *evalctx)
if (num_returns_per_match > 1 && matchCount >= num_returns_per_match) break;
}
}
- if (matchCount == 0) PRINTB(" search term not found: \"%s\"", findThis.toString()[i]);
+ if (matchCount == 0) PRINTB(" WARNING: search term not found: \"%s\"", findThis.toString()[i]);
if (num_returns_per_match == 0 || num_returns_per_match > 1) {
returnvec.push_back(Value(resultvec));
}
@@ -478,10 +478,10 @@ Value builtin_search(const Context *, const EvalContext *evalctx)
}
if (num_returns_per_match == 1 && matchCount == 0) {
if (findThis.toVector()[i].type() == Value::NUMBER) {
- PRINTB(" search term not found: %s",findThis.toVector()[i].toDouble());
+ PRINTB(" WARNING: search term not found: %s",findThis.toVector()[i].toDouble());
}
else if (findThis.toVector()[i].type() == Value::STRING) {
- PRINTB(" search term not found: \"%s\"",findThis.toVector()[i].toString());
+ PRINTB(" WARNING: search term not found: \"%s\"",findThis.toVector()[i].toString());
}
returnvec.push_back(Value(resultvec));
}
@@ -490,7 +490,7 @@ Value builtin_search(const Context *, const EvalContext *evalctx)
}
}
} else {
- PRINTB(" search: none performed on input %s", findThis);
+ PRINTB(" WARNING: search: none performed on input %s", findThis);
return Value();
}
return Value(returnvec);
contact: Jan Huwald // Impressum