discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

each - Assertion failed on flat list

P
Parkinbot
Sun, Apr 29, 2018 1:25 PM

It is a question of semantics.

The avoid-runtime-errors-rule would be (in pseudo code):

if (isscalar(value)) value;
else flatten(value);

and it would flatten down scalars and non-nested lists to the same level. Is
this desired?

Implementing the runtime-errors-rule would be more strict:

assert(!isscalar(value)) flatten(value);

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

It is a question of semantics. The avoid-runtime-errors-rule would be (in pseudo code): if (isscalar(value)) value; else flatten(value); and it would flatten down scalars and non-nested lists to the same level. Is this desired? Implementing the runtime-errors-rule would be more strict: assert(!isscalar(value)) flatten(value); -- Sent from: http://forum.openscad.org/