Open dpellegr opened 5 years ago
I have a similar issue (but in my own scad file). Using the old SCAD does not croak. Too bad since the "compiler warnings" are not really present in the old version compared to the new one.
@thomaskilian Please note that this is not the OpenSCAD repository, but the one of library scad-utils. If you have issues in your own scad file, than the right place to ask is the OpenSCAD forum showing your own code.
Oops. I got here by Google and it just looked as being the right place. Anyhow, seems to be a general issue with the new OpenSCAD.
@thomaskilian Plenty of times it can easily be resolved. In this specific case of scad-utils it is not so obvious (at least to me) how to adjust the code.
Well, it might give me the kick to go on with my "Python-SCAD-Pre-Compiler" where I can overcome the many limits of OpenSCAD. From a compiler construction view this language is sub-optimal. Well, it's free so no one to blame :-)
Did anyone find a workaround for this yet? This makes some projects out there unable to render :(
Looking at the examples from https://en.wikibooks.org/w/index.php?title=OpenSCAD_User_Manual/Mathematical_Functions&stable=0#len the len(str(x)) workaround isn't good:
a=6; len_a=len(a);
echo(a,len_a);
x=6; len_x=len(str(x));
echo(x,len_x);
y=66; len_y=len(str(y));
echo(y,len_y);
WARNING: len() parameter could not be converted in file , line 1
ECHO: 6, undef
ECHO: 6, 1
ECHO: 66, 2
Hi, the latest OpenSCAD version produces the warning above, for example when running the list-comprehension-demos/toothed-belt.scad
I thought that to be be trivially fixable, but I have found the following behavior hard to grasp:
What is the rationale behind that? Do we actually need it?