I just ran into the problem that I think most everyone learning
scad run into at some point.
I though to variables as assignable, and nothing worked right
until I read:
���
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/General#Variables
and now I know why. But given that's a totally new paradigm for
me (and many) but one I'd like to master all the same, I have a
problem I can solve with an imperative language and wonder how
it's done with a functional language like scad.
Given two sets:
��� [0,L], [[a1,b1], [a2,b2], ...., [an,bn]]
where the second set is of unknown length, I would like translate
this to:
��� [ [0,a1], [b1,a2], [b2, a3],....[bn,L] ]
Having trouble getting my head around for constructs and how they
might be used to do that if indeed that's the approach, or how to
write a function that works on arbitrary length of the second set
and output.
If it's any use, which I doubt, in my use case, L > bn
and bn>an and an>an-1.
I have a gut feel of course that such translations must be
possible, in fact possibly trivial once the mindset is right, but
I'm lacking the insight.
Kind regards,
Bernd.
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org