modularization of common rotatation

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

modularization of common rotatation

jdawgaz
I can't seem to figure out what is wrong here:

module rotate_item(a=[0,0,0]) {
   rotate(a) children();
}

module rotate_around(n=5,t=[0,0,0]) {
    for (i = [0:n]) {
        rotate([0,0,i*360/n])
            translate(t)
                rotate_item([0,0,i*360]) chldren();
  }
}

rotate_around(n=7, t=[25/2,0,0]) cube([10,5,2]);


If I do the same thing but not using children()
It works.

Can someone tell me what I am doing wrong?
Thanks,

Jerry
--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Openscad developer

The most exciting phrase to hear in science - the one that heralds new discoveries - is not "Eureka!" but "That's funny...".
- Isaac. Asimov


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
tp3
Reply | Threaded
Open this post in threaded view
|

Re: modularization of common rotatation

tp3
Seems to work fine after fixing the typo chldren() -> children().

ciao,
  Torsten.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
Reply | Threaded
Open this post in threaded view
|

Re: modularization of common rotatation

jdawgaz
thanks, Torsten.

I feel stupid ... you don't know HOW LONG I stared at that!

Ha!

Jerry


--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Openscad developer

The most exciting phrase to hear in science - the one that heralds new discoveries - is not "Eureka!" but "That's funny...".
- Isaac. Asimov


On Sat, Apr 8, 2017 at 3:35 PM, Torsten Paul <[hidden email]> wrote:
Seems to work fine after fixing the typo chldren() -> children().

ciao,
  Torsten.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: modularization of common rotatation

MichaelAtOz
Administrator
Happens to the best of us... [schadenfreude]
Admin - PM me if you need anything,
or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!