discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Fwd: Re: taking customizer input and using it in a pair of nested loops

MF
Michael Frey
Fri, Apr 27, 2018 5:19 AM

Opps - replied to the user to not the list, so I just forward it now
also to the list.

-------- Forwarded Message --------
Subject: Re: [OpenSCAD] taking customizer input and using it in a pair
of nested loops
Date: Fri, 27 Apr 2018 06:24:28 +0200
From: Michael Frey michael.frey@gmx.ch
To: khackbarth ken@volksswitch.org

On 26.04.2018 22:46, khackbarth wrote:

I'd like the user to be able to provide a comma separated string as input,
e.g., "2,4,11,8" and then use that information inside a nested For loop to
decide whether to perform an action.  For example, if the sum of the two
loop counters is one of the numbers in the string then don't do the action.

Hi Ken,

Silly question:
Why don't you use an array/vector like

Vector6=[12,34,44,43,23,23];

I mean, there are some limitations, like the default assigment having to
have more then 4 elements, but the user can use any Vector length for
his inputs.

With kind regards,
Michael Frey

Opps - replied to the user to not the list, so I just forward it now also to the list. -------- Forwarded Message -------- Subject: Re: [OpenSCAD] taking customizer input and using it in a pair of nested loops Date: Fri, 27 Apr 2018 06:24:28 +0200 From: Michael Frey <michael.frey@gmx.ch> To: khackbarth <ken@volksswitch.org> On 26.04.2018 22:46, khackbarth wrote: > I'd like the user to be able to provide a comma separated string as input, > e.g., "2,4,11,8" and then use that information inside a nested For loop to > decide whether to perform an action. For example, if the sum of the two > loop counters is one of the numbers in the string then don't do the action. Hi Ken, Silly question: Why don't you use an array/vector like Vector6=[12,34,44,43,23,23]; I mean, there are some limitations, like the default assigment having to have more then 4 elements, but the user can use any Vector length for his inputs. With kind regards, Michael Frey