I understand but it is unfortunate...

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

I understand but it is unfortunate...

Dan Zuras 3D


        Folks,

        I just came across a limitation that may
        already be well known to many of you.

        Here is a simplification of the code I
        attempted to write:

        module Xform1() union() {
                rotate([0,0,30]) child(0);
                rotate([0,0,-30]) child(0);
        }

        module Xform2() union() {
                rotate([0,45,0]) child(0);
                rotate([0,-45,0]) child(0);
        }

        module Xform3() union() {
                rotate([0,45,0]) Xform1() child(0);
                rotate([0,-45,0]) Xform1() child(0);
        }

        At which point I tried both of:

        Xform2() Xform1() object();
        Xform3() object();

        And I was informed that I was trying to use
        a recursive form of child().

        Now, from a linguistic standpoint, I don't
        think of this as recursive so much as
        independent instances of a meta element.

        But I understand that, as an interpreted
        language, you may not be able to tolerate
        more than one instance of child() at a time.

        Still, it is an unfortunate limitation.

        If you can find a way to implement it such
        that it works in a more conventional way,
        that would help a great deal.

        If not, I understand the limitations that
        you have to deal with in your approach.

        Thanks,

                           Dan

Reply | Threaded
Open this post in threaded view
|

Re: I understand but it is unfortunate...

Giles Bathgate-2
On 6 April 2011 02:33, Dan Zuras 3D <[hidden email]> wrote:
>        Now, from a linguistic standpoint, I don't
>        think of this as recursive so much as
>        independent instances of a meta element.

I think this is a duplicate of what I described here:

http://rocklinux.net/pipermail/openscad/2011-March/000903.html

Regards

Giles