discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: [OpenSCAD] Re-assigning values to "variables"

T
Trygon
Fri, Oct 30, 2015 3:27 AM

Admittedly a rather late reply, but perhaps you could code like this:

t1=$t2-1;
triangle_wave=t1
sign(t1);
translate([triangle_wave*20,0,0]) cube(10);

--
View this message in context: http://forum.openscad.org/Re-assigning-values-to-variables-tp14099p14248.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Admittedly a rather late reply, but perhaps you could code like this: t1=$t*2-1; triangle_wave=t1*sign(t1); translate([triangle_wave*20,0,0]) cube(10); -- View this message in context: http://forum.openscad.org/Re-assigning-values-to-variables-tp14099p14248.html Sent from the OpenSCAD mailing list archive at Nabble.com.