summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CGALEvaluator.cc5
-rw-r--r--src/cgaladv.cc18
2 files changed, 14 insertions, 9 deletions
diff --git a/src/CGALEvaluator.cc b/src/CGALEvaluator.cc
index b8ed0fc..8e72fff 100644
--- a/src/CGALEvaluator.cc
+++ b/src/CGALEvaluator.cc
@@ -224,7 +224,10 @@ CGAL_Nef_polyhedron CGALEvaluator::applyResize(const CgaladvNode &node)
PRINT("WARNING: Cannot resize to a new size less than 0.");
return N;
}
- std::cout << autoscale << " ascale \n";
+ std::cout << autoscale << " autoscale\n";
+ std::cout << node.autosize[0] << ",";
+ std::cout << node.autosize[1] << ",";
+ std::cout << node.autosize[2] << " node autosize \n";
std::cout << scale[0] << ",";
std::cout << scale[1] << ",";
std::cout << scale[2] << " scalev \n";
diff --git a/src/cgaladv.cc b/src/cgaladv.cc
index 94f84fd..fb0bfaf 100644
--- a/src/cgaladv.cc
+++ b/src/cgaladv.cc
@@ -85,18 +85,20 @@ AbstractNode *CgaladvModule::evaluate(const Context *ctx, const ModuleInstantiat
Value ns = c.lookup_variable("newsize");
node->newsize << 0,0,0;
if ( ns.type() == Value::VECTOR ) {
- Value::VectorType v = ns.toVector();
- if ( v.size() >= 1 ) node->newsize[0] = v[0].toDouble();
- if ( v.size() >= 2 ) node->newsize[1] = v[1].toDouble();
- if ( v.size() >= 3 ) node->newsize[2] = v[2].toDouble();
+ Value::VectorType vs = ns.toVector();
+ if ( vs.size() >= 1 ) node->newsize[0] = vs[0].toDouble();
+ if ( vs.size() >= 2 ) node->newsize[1] = vs[1].toDouble();
+ if ( vs.size() >= 3 ) node->newsize[2] = vs[2].toDouble();
}
Value autosize = c.lookup_variable("auto");
node->autosize << false, false, false;
if ( autosize.type() == Value::VECTOR ) {
- Value::VectorType v = ns.toVector();
- if ( v.size() >= 1 ) node->autosize[0] = v[0].toBool();
- if ( v.size() >= 2 ) node->autosize[1] = v[1].toBool();
- if ( v.size() >= 3 ) node->autosize[2] = v[2].toBool();
+ Value::VectorType va = autosize.toVector();
+ if ( va.size() >= 1 ) node->autosize[0] = va[0].toBool();
+ if ( va.size() >= 2 ) node->autosize[1] = va[1].toBool();
+ if ( va.size() >= 3 ) node->autosize[2] = va[2].toBool();
+ std::cout << "adv.cc: " << va << "\n";
+ std::cout << "adv.cc as: " << node->autosize << "\n";
}
else if ( autosize.type() == Value::BOOL ) {
node->autosize << true, true, true;
contact: Jan Huwald // Impressum