discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

each each

P
Parkinbot
Tue, Nov 1, 2016 11:05 PM

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.

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.
R
Ronaldo
Wed, Nov 2, 2016 12:33 AM

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.

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.
MK
Marius Kintel
Wed, Nov 2, 2016 3:26 AM

On Nov 1, 2016, at 19:05, Parkinbot rudolf@parkinbot.com wrote:

Marius, a nice one for you:

Thanks for the report.
You can track it here: https://github.com/openscad/openscad/issues/1851

-Marius

> On Nov 1, 2016, at 19:05, Parkinbot <rudolf@parkinbot.com> wrote: > > Marius, a nice one for you: > Thanks for the report. You can track it here: https://github.com/openscad/openscad/issues/1851 -Marius
P
Parkinbot
Wed, Nov 2, 2016 11:44 AM

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.

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.