You need to specify -D for each parameter:
$ openscad -o test.stl -D 'x=[0,1,2,3,0]' -D 'y=[0,1,2,3,4]' test.scad
--
View this message in context: http://forum.openscad.org/Commandline-array-tp12113p12155.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
I've also tried this (note: I'm using a Mac, so OSX no Windows), but then got
a strange 'input cursor' in my Terminal screen (and no output..)
See screenshot at:
https://www.dropbox.com/s/iazlowaro5xw11c/openscad_commandline.png?dl=0
Barry
--
View this message in context: http://forum.openscad.org/Commandline-array-tp12113p12160.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
New test on Windows 7 machine:
It results in a syntax error.. Strange...
OpenSCAD testscript:
translate ([7x[0],0,0]) { cylinder(h=5,r=5);
}
translate ([7x[1],0,0]) {
cylinder(h=5,r=5);
}
translate ([7*x[2],0,0]) {
cylinder(h=5,r=5);
}
Command prompt and result:
C:\Program Files\OpenSCAD>OpenSCAD.com -o c:\temp\test.stl -D 'x=[123]'
c:\temp
test1.scad
ERROR: Parser error in line 8: syntax error
Can't parse file 'c:\temp\test1.scad'!
--
View this message in context: http://forum.openscad.org/Commandline-array-tp12113p12161.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Seems like you try to access 3 elements of a array with only 1
element (123)...?
2015-03-23 21:47 GMT+01:00 barryp barry.peet@gmail.com:
New test on Windows 7 machine:
It results in a syntax error.. Strange...
OpenSCAD testscript:
translate ([7x[0],0,0]) { cylinder(h=5,r=5);
}
translate ([7x[1],0,0]) {
cylinder(h=5,r=5);
}
translate ([7*x[2],0,0]) {
cylinder(h=5,r=5);
}
Command prompt and result:
C:\Program Files\OpenSCAD>OpenSCAD.com -o c:\temp\test.stl -D 'x=[123]'
c:\temp
test1.scad
ERROR: Parser error in line 8: syntax error
Can't parse file 'c:\temp\test1.scad'!
--
View this message in context: http://forum.openscad.org/Commandline-array-tp12113p12161.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
In your screenshot it looks like you're using "curly quotes" for the first
three of those single-quotes. The fourth one looks like a
straight-single-quote (ie: straight apostrophe). Since bash doesn't
recognize curly quotes as special characters, only the fourth quote is
treated as a quotation mark, and hence the end of your line is still
"inside quotes" from its point of view. That's why you get the weird
prompt: it wants you to close the string.
In short, avoid using curly-quotes in the shell/terminal.
On Mar 23, 2015 1:09 PM, "barryp" barry.peet@gmail.com wrote:
I've also tried this (note: I'm using a Mac, so OSX no Windows), but then
got
a strange 'input cursor' in my Terminal screen (and no output..)
See screenshot at:
https://www.dropbox.com/s/iazlowaro5xw11c/openscad_commandline.png?dl=0
Barry
--
View this message in context:
http://forum.openscad.org/Commandline-array-tp12113p12160.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org