Marius, a nice one for you:
http://forum.openscad.org/file/n18863/each_each.png
--
View this message in context: http://forum.openscad.org/each-each-tp18863.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
The crash is an issue, no doubt. But flatten may be implemented by:
function flatten(L) = [for(a=L) each a ];
In fact, 'each' will virtually retire 'flatten'.
--
View this message in context: http://forum.openscad.org/each-each-tp18863p18864.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Thanks for the report.
You can track it here: https://github.com/openscad/openscad/issues/1851
-Marius
The assert violation seems to occur when a value instead of a list is
encoutered.
This code might help to track it down.
function flatten(l) = [ each each l ] ;
nested_list = [ [ 1, 2, 3 ], [ 4, 5, 6 ] ];
nested_list1 = [ [ 1, 2, 3 ], 2];
echo(flatten(nested_list)); // works!
echo(flatten(nested_list1)); // Assert violation
--
View this message in context: http://forum.openscad.org/each-each-tp18863p18867.html
Sent from the OpenSCAD mailing list archive at Nabble.com.