On Fri, 31 Jul 2015 19:27:31 -0700 (MST) Steve wrote:
I have written an Instructable with some more advanced topics. I think it
will have more value to members of this forum than my introductory one.
I noticed the following text in your instructable:
"One should not expect to do many things one would do with most programming languages. Unfortunately, it was a little too limited, the
recent addition of list comprehensions has been a huge addition to OpenSCAD."
I beg to differ. It just takes a bit of brain twisting to get the hang of functional languages and recursive list structures:
http://www.thingiverse.com/thing:942566/
Check out ellerscad_v4.scad, where I have various [recursive] functions involving dynamic arrays without involving list comprehensions. You
just have to store your variables as the arguments of the function.
2015.03 didn't just add list comprehensions, it also added 'concat'. With
concat, a function can now return a list whose length is determined at run
time. Before these additions, I agree that OpenSCAD was "a little too
limited".
On 2 August 2015 at 00:48, David Eccles (gringer) <
bioinformatics@gringene.org> wrote:
On Fri, 31 Jul 2015 19:27:31 -0700 (MST) Steve wrote:
I have written an Instructable with some more advanced topics. I think
it
will have more value to members of this forum than my introductory one.
I noticed the following text in your instructable:
"One should not expect to do many things one would do with most
programming languages. Unfortunately, it was a little too limited, the
recent addition of list comprehensions has been a huge addition to
OpenSCAD."
I beg to differ. It just takes a bit of brain twisting to get the hang of
functional languages and recursive list structures:
http://www.thingiverse.com/thing:942566/
Check out ellerscad_v4.scad, where I have various [recursive] functions
involving dynamic arrays without involving list comprehensions. You
just have to store your variables as the arguments of the function.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Going through the digest, I came across this message. If it had been made in
the original topic I would have responded sooner.
gear_trains.scad http://forum.openscad.org/file/n13421/gear_trains.scad
The uploaded file is from a series of files I am working on. There is a
file for describing gears and another file with gear mounting options. But
I think you will see in this file that I understand the power of OpenSCAD
and how to write very powerful functions.
But the point I was trying to make was that OpenSCAD is not procedural
language and nor should it be. I am trying very hard to impress on people
that it doesn't necessarily make sense for it to have run time variables.
Someday someone might come up with a method to shoe horn OpenSCAD into a run
time environment. I don't think it is a very fruitful endeavor however.
OpenSCAD does what it is supposed to do very well. In fact, better than any
other language. The way I see it, the developers are making great choices
about the which areas to work on next.
And list comprehensions is a huge step. It has given us many things that
make it possible to make almost anything. I once read somewhere that
OpenSCAD is not good for organic shapes. Well that is no longer true. I am
hard pressed to come up with something it can't do now.
The thing I am using a lot is sweeps. It is replacing the unioned hulls.
In my gears.scad file I was creating gears using the cutting gears concept.
I was able to create spiral gears with unioned hulls. But there was a big
problem doing them. With bevel gears I could hull the trapezoidal shapes
and ultimately I was able to speed things up greatly with a scaled
linear_extrude of the trapezoidal shape. But the spiral gears resist any
simple solution like that. The sweep solves those problems. In fact I am
looking at using the sweep to directly generate the spiral gear teeth and
skipping the cutting gear. I expect it to be orders of magnitude faster
than my present approach.
Steve
--
View this message in context: http://forum.openscad.org/Re-Discuss-Digest-Vol-9-Issue-1-tp13395p13421.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
I haven't worked on the gear stuff for a few months. But I think the
animation at the link below is of the example gear train found at the bottom
of the file.
http://www.highergraphics.com/pub/gear_train.avi
http://www.highergraphics.com/pub/gear_train.avi
Steve
--
View this message in context: http://forum.openscad.org/Re-Discuss-Digest-Vol-9-Issue-1-tp13395p13422.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
BTW, the maze creation is very clever. And I get that you understand how to
use OpenSCAD functions.
Steve
David Eccles (gringer) wrote
On Fri, 31 Jul 2015 19:27:31 -0700 (MST) Steve wrote:
I have written an Instructable with some more advanced topics. I think
it
will have more value to members of this forum than my introductory one.
I noticed the following text in your instructable:
"One should not expect to do many things one would do with most
programming languages. Unfortunately, it was a little too limited, the
recent addition of list comprehensions has been a huge addition to
OpenSCAD."
I beg to differ. It just takes a bit of brain twisting to get the hang of
functional languages and recursive list structures:
http://www.thingiverse.com/thing:942566/
Check out ellerscad_v4.scad, where I have various [recursive] functions
involving dynamic arrays without involving list comprehensions. You
just have to store your variables as the arguments of the function.
OpenSCAD mailing list
Discuss@.openscad
--
View this message in context: http://forum.openscad.org/Re-Discuss-Digest-Vol-9-Issue-1-tp13395p13423.html
Sent from the OpenSCAD mailing list archive at Nabble.com.