mirror of https://github.com/vitalif/openscad
Fixes remaining dxfdim() issue from #217
parent
ba20c0e800
commit
886bc85eec
|
@ -54,7 +54,7 @@ Value builtin_dxf_dim(const Context *ctx, const EvalContext *evalctx)
|
||||||
// See issue #217
|
// See issue #217
|
||||||
for (size_t i = 0; i < evalctx->numArgs(); i++) {
|
for (size_t i = 0; i < evalctx->numArgs(); i++) {
|
||||||
if (evalctx->getArgName(i) == "file")
|
if (evalctx->getArgName(i) == "file")
|
||||||
filename = ctx->getAbsolutePath(evalctx->getArgValue(i).toString());
|
filename = evalctx->getAbsolutePath(evalctx->getArgValue(i).toString());
|
||||||
if (evalctx->getArgName(i) == "layer")
|
if (evalctx->getArgName(i) == "layer")
|
||||||
layername = evalctx->getArgValue(i).toString();
|
layername = evalctx->getArgValue(i).toString();
|
||||||
if (evalctx->getArgName(i) == "origin")
|
if (evalctx->getArgName(i) == "origin")
|
||||||
|
|
|
@ -142,12 +142,6 @@ Value Expression::evaluate(const Context *context) const
|
||||||
}
|
}
|
||||||
if (this->type == "F") {
|
if (this->type == "F") {
|
||||||
EvalContext c(context, this->call_arguments);
|
EvalContext c(context, this->call_arguments);
|
||||||
// Value::VectorType argvalues;
|
|
||||||
// std::transform(this->children.begin(), this->children.end(),
|
|
||||||
// std::back_inserter(argvalues),
|
|
||||||
// boost::bind(&Expression::evaluate, _1, context));
|
|
||||||
// for (size_t i=0; i < this->children.size(); i++)
|
|
||||||
// argvalues.push_back(this->children[i]->evaluate(context));
|
|
||||||
return context->evaluate_function(this->call_funcname, &c);
|
return context->evaluate_function(this->call_funcname, &c);
|
||||||
}
|
}
|
||||||
abort();
|
abort();
|
||||||
|
|
|
@ -5,6 +5,5 @@ module localfiles_module()
|
||||||
translate([0,350,0]) rotate_extrude(file="localfile.dxf");
|
translate([0,350,0]) rotate_extrude(file="localfile.dxf");
|
||||||
translate([250,0,0]) scale([200,200,50]) surface("localfile.dat");
|
translate([250,0,0]) scale([200,200,50]) surface("localfile.dat");
|
||||||
|
|
||||||
// This is not supported:
|
translate([0,-200,0]) sphere(r=dxf_dim(file="localfile.dxf", name="localfile")/2);
|
||||||
// echo(dxf_dim(file="localfile.dxf", name="localfile"));
|
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 12 KiB |
|
@ -13,5 +13,8 @@
|
||||||
surface(file = "localfiles_dir/localfile.dat", center = false);
|
surface(file = "localfiles_dir/localfile.dat", center = false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
multmatrix([[1, 0, 0, 0], [0, 1, 0, -200], [0, 0, 1, 0], [0, 0, 0, 1]]) {
|
||||||
|
sphere($fn = 0, $fa = 12, $fs = 2, r = 100);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 12 KiB |
Binary file not shown.
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 12 KiB |
Loading…
Reference in New Issue