summaryrefslogtreecommitdiff
path: root/src/linearextrude.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2013-04-18 22:34:14 (GMT)
committerMarius Kintel <marius@kintel.net>2013-04-18 22:34:14 (GMT)
commit58bd9c9e3f4454d055bf51d63463a9965a9dcbd7 (patch)
tree732cd423858685365a4115d44a52f85ae90866a1 /src/linearextrude.cc
parent73c2a45af6afca253159d2cf9c1ecf5747f0217e (diff)
Cleaned up argument list handling, related to #116
Diffstat (limited to 'src/linearextrude.cc')
-rw-r--r--src/linearextrude.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/linearextrude.cc b/src/linearextrude.cc
index de728f7..f4c1112 100644
--- a/src/linearextrude.cc
+++ b/src/linearextrude.cc
@@ -52,12 +52,11 @@ AbstractNode *LinearExtrudeModule::evaluate(const Context *ctx, const ModuleInst
{
LinearExtrudeNode *node = new LinearExtrudeNode(inst);
- std::vector<std::string> argnames;
- argnames += "file", "layer", "height", "origin", "scale", "center", "twist", "slices";
- std::vector<Expression*> argexpr;
+ AssignmentList args;
+ args += Assignment("file", NULL), Assignment("layer", NULL), Assignment("height", NULL), Assignment("origin", NULL), Assignment("scale", NULL), Assignment("center", NULL), Assignment("twist", NULL), Assignment("slices", NULL);
Context c(ctx);
- c.setVariables(argnames, argexpr, evalctx);
+ c.setVariables(args, evalctx);
node->fn = c.lookup_variable("$fn").toDouble();
node->fs = c.lookup_variable("$fs").toDouble();
contact: Jan Huwald // Impressum