[OpenSCAD] each - Assertion failed on flat list

Parkinbot rudolf at parkinbot.com
Sat Apr 28 18:40:36 EDT 2018


I wanted to say, I'd rather expect a runtime error instead of a failure! But
you are right, "each" can be implemented to not fail in this situation. Thus 

a = [each for(i=[1:10]) i]; 

should be equivalent to

a = [for(i=[1:10]) i]; 

Why is this important? Because I want to write e.g.  
a = [each for(i=[1:10]) myfunc(i)]; 

and there is no guarantee that e.g. myfunc() will return only list elements.

Sent from: http://forum.openscad.org/

More information about the Discuss mailing list