I'd like to input a vector of the type [[a,b],[c,d]] via the Customizer
pane.
I am able to input a simple vector with a line that looks like this:
Variable = [];
Then I can paste the value [a,b,c,d,e] into the Customizer pane and process
that vector within the code.
For a vector of vectors, I've tried:
Variable = [[],[]];
But I can't change the displayed value by pasting [[a,b],[c,d]].
I'd be OK with using a string input variable and then using some conversion
function to take the string "[[a,b],[c,d]]" and turn it into a vector, but I
don't see that functionality in vanilla OpenSCAD.
Any ideas?
Thanks,
Ken
how about
--
Sent from: http://forum.openscad.org/
Yes, though that creates two inputs in the customizer rather than one.
From: Parkinbot rudolf@digitaldocument.de
Sent: Wednesday, February 17, 2021 3:46 AM
To: discuss@lists.openscad.org
Subject: Re: [OpenSCAD] input a vector of vectors via the customizer pane
how about
ab=[5, 10];//[[-100:100], [-100:100]]
cd=[5, 10];//[[-100:100], [-100:100]]
abcd = [ab, cd];
echo(abcd);
Sent from the OpenSCAD mailing list archive http://forum.openscad.org/ at
Nabble.com.
To get a single input line, you obviously can write:
abcd=[5, 10, 5, 10];//[[-100:100], [-100:100], [-100:100], [-100:100]]
variable= [[abcd[0],abcd[1]], [abcd[2], abcd[3]]];
echo(variable);
However, you are right, this is just a work around, as the customizer isn't
as structure sensitive as it could/should be.
--
Sent from: http://forum.openscad.org/