[OpenSCAD] Incrementing a variable doesn't work as expected.
nigel at nigeljohnson.net
Wed Apr 1 06:10:15 EDT 2015
And there's the answer - brackets :)
function cpos(s, n) = (n == 0) ? (0) : ( cpos(s,n-1) + ((s[n-1]==".") ? 2 :
Now works as expected.
View this message in context: http://forum.openscad.org/Incrementing-a-variable-doesn-t-work-as-expected-tp12271p12284.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
More information about the Discuss