discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Copy cylinder around Z then twist it up

S
Snörre
Sun, Apr 19, 2020 1:43 PM

Hello all,
I'm a newbe on openscad.
I want to copy a cylinder around Z then copy it upwards. That's working but
I cannot get a twist in.

The first cylinder is:

module Zylinder ()
{ rotate ([90,0,0]) cylinder (h = 30, r=3 , $fn=6); }

Then I copy it around Z:

module FirstLayer()
{ for(a=[0 : 90 : 270])  rotate(a) Zylinder(); }

Until here it is working. I have 4 Cylinders like a cross.
But how can I copy the whole cross up let's say 20mm and twist it let's say
30° so I have the copied one 30° "twisted"?

Greets

--
Sent from: http://forum.openscad.org/

Hello all, I'm a newbe on openscad. I want to copy a cylinder around Z then copy it upwards. That's working but I cannot get a twist in. The first cylinder is: module Zylinder () { rotate ([90,0,0]) cylinder (h = 30, r=3 , $fn=6); } Then I copy it around Z: module FirstLayer() { for(a=[0 : 90 : 270]) rotate(a) Zylinder(); } Until here it is working. I have 4 Cylinders like a cross. But how can I copy the whole cross up let's say 20mm and twist it let's say 30° so I have the copied one 30° "twisted"? Greets -- Sent from: http://forum.openscad.org/
RW
Ron Wheeler
Sun, Apr 19, 2020 2:02 PM

Translate the second up (+z) 20mm   translate(0,0,20);

On 2020-04-19 9:43 a.m., Snörre wrote:

Hello all,
I'm a newbe on openscad.
I want to copy a cylinder around Z then copy it upwards. That's working but
I cannot get a twist in.

The first cylinder is:

module Zylinder ()
{ rotate ([90,0,0]) cylinder (h = 30, r=3 , $fn=6); }

Then I copy it around Z:

module FirstLayer()
{ for(a=[0 : 90 : 270])  rotate(a) Zylinder(); }

Until here it is working. I have 4 Cylinders like a cross.
But how can I copy the whole cross up let's say 20mm and twist it let's say
30° so I have the copied one 30° "twisted"?

Greets

--
Sent from: http://forum.openscad.org/


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

--
Ron Wheeler
Artifact Software
438-345-3369
rwheeler@artifact-software.com

Translate the second up (+z) 20mm   translate(0,0,20); On 2020-04-19 9:43 a.m., Snörre wrote: > Hello all, > I'm a newbe on openscad. > I want to copy a cylinder around Z then copy it upwards. That's working but > I cannot get a twist in. > > The first cylinder is: > > module Zylinder () > { rotate ([90,0,0]) cylinder (h = 30, r=3 , $fn=6); } > > Then I copy it around Z: > > module FirstLayer() > { for(a=[0 : 90 : 270]) rotate(a) Zylinder(); } > > Until here it is working. I have 4 Cylinders like a cross. > But how can I copy the whole cross up let's say 20mm and twist it let's say > 30° so I have the copied one 30° "twisted"? > > Greets > > > > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org -- Ron Wheeler Artifact Software 438-345-3369 rwheeler@artifact-software.com
SS
Sören Schneider
Sun, Apr 19, 2020 2:39 PM

Sorry, I forgot to add this.

for(z=[ 0 : 10 : 10 ])
translate([0,0,z])
for(a=[0 : 90 : 270 ])
rotate(a)
rotate ([90,0,0]) cylinder (h = 30, r=3, $fn=6);

But on the "translated" I would like to have an additional rotation around "Z"

Something like an additional "rotate(b)" but then the lowest cross is also getting this copy.

Am Sonntag, 19. April 2020, 16:02:26 CEST schrieb Ron Wheeler via Discuss:

Translate the second up (+z) 20mm  translate(0,0,20);

On 2020-04-19 9:43 a.m., Snörre wrote:

Hello all,
I'm a newbe on openscad.
I want to copy a cylinder around Z then copy it upwards. That's working but
I cannot get a twist in.

The first cylinder is:

module Zylinder ()
{ rotate ([90,0,0]) cylinder (h = 30, r=3 , $fn=6); }

Then I copy it around Z:

module FirstLayer()
{ for(a=[0 : 90 : 270])  rotate(a) Zylinder(); }

Until here it is working. I have 4 Cylinders like a cross.
But how can I copy the whole cross up let's say 20mm and twist it let's say
30° so I have the copied one 30° "twisted"?

Greets

--
Sent from: http://forum.openscad.org/


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

--

Mit freundlichen Grüßen

Sören Schneider

Sorry, I forgot to add this. for(z=[ 0 : 10 : 10 ]) translate([0,0,z]) for(a=[0 : 90 : 270 ]) rotate(a) rotate ([90,0,0]) cylinder (h = 30, r=3, $fn=6); But on the "translated" I would like to have an additional rotation around "Z" Something like an additional "rotate(b)" but then the lowest cross is also getting this copy. Am Sonntag, 19. April 2020, 16:02:26 CEST schrieb Ron Wheeler via Discuss: > Translate the second up (+z) 20mm translate(0,0,20); > > > On 2020-04-19 9:43 a.m., Snörre wrote: > > Hello all, > > I'm a newbe on openscad. > > I want to copy a cylinder around Z then copy it upwards. That's working but > > I cannot get a twist in. > > > > The first cylinder is: > > > > module Zylinder () > > { rotate ([90,0,0]) cylinder (h = 30, r=3 , $fn=6); } > > > > Then I copy it around Z: > > > > module FirstLayer() > > { for(a=[0 : 90 : 270]) rotate(a) Zylinder(); } > > > > Until here it is working. I have 4 Cylinders like a cross. > > But how can I copy the whole cross up let's say 20mm and twist it let's say > > 30° so I have the copied one 30° "twisted"? > > > > Greets > > > > > > > > -- > > Sent from: http://forum.openscad.org/ > > > > _______________________________________________ > > OpenSCAD mailing list > > Discuss@lists.openscad.org > > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > -- Mit freundlichen Grüßen Sören Schneider
IN
Ian Nichols
Sun, Apr 19, 2020 3:00 PM

On Sun, 19 Apr 2020 at 15:40, Sören Schneider prolaser@t-online.de wrote:

Sorry, I forgot to add this.

for(z=[ 0 : 10 : 10 ])
translate([0,0,z])
for(a=[0 : 90 : 270 ])
rotate(a)
rotate ([90,0,0]) cylinder (h = 30, r=3, $fn=6);

But on the "translated" I would like to have an additional rotation around
"Z"

Something like an additional "rotate(b)" but then the lowest cross is also
getting this copy.

replace rotate(a) with rotate(a+z*3)

Ian

--
Stand firm for what you believe in, until and unless logic and experience
prove you wrong.  Remember: when the emperor looks naked, the emperor is
naked, the truth and a lie are not "sort-of the same thing" and there is
no aspect, no facet, no moment of life that can't be improved with pizza.

-Daria Morgendorffer

On Sun, 19 Apr 2020 at 15:40, Sören Schneider <prolaser@t-online.de> wrote: > Sorry, I forgot to add this. > > for(z=[ 0 : 10 : 10 ]) > translate([0,0,z]) > for(a=[0 : 90 : 270 ]) > rotate(a) > rotate ([90,0,0]) cylinder (h = 30, r=3, $fn=6); > > > But on the "translated" I would like to have an additional rotation around > "Z" > > Something like an additional "rotate(b)" but then the lowest cross is also > getting this copy. > replace rotate(a) with rotate(a+z*3) Ian -- Stand firm for what you believe in, until and unless logic and experience prove you wrong. Remember: when the emperor looks naked, the emperor *is* naked, the truth and a lie are not "sort-of the same thing" and there is no aspect, no facet, no moment of life that can't be improved with pizza. -Daria Morgendorffer
SS
Sören Schneider
Sun, Apr 19, 2020 3:53 PM

YESSSSSSS !!!!!!!

for(z=[ 0 : 10 : 60 ])
translate([0,0,z])
for(a=[0 : 90 : 270 ])
rotate(a+z)
rotate ([90,0,0]) cylinder (h = 30, r=3, $fn=6);

Now it looks like this:

Am Sonntag, 19. April 2020, 17:00:24 CEST schrieb Ian Nichols:

On Sun, 19 Apr 2020 at 15:40, Sören Schneider prolaser@t-online.de wrote:

Sorry, I forgot to add this.

for(z=[ 0 : 10 : 10 ])
translate([0,0,z])
for(a=[0 : 90 : 270 ])
rotate(a)
rotate ([90,0,0]) cylinder (h = 30, r=3, $fn=6);

But on the "translated" I would like to have an additional rotation around
"Z"

Something like an additional "rotate(b)" but then the lowest cross is also
getting this copy.

replace rotate(a) with rotate(a+z*3)

Ian

--

Mit freundlichen Grüßen

Sören Schneider

YESSSSSSS !!!!!!! for(z=[ 0 : 10 : 60 ]) translate([0,0,z]) for(a=[0 : 90 : 270 ]) rotate(a+z) rotate ([90,0,0]) cylinder (h = 30, r=3, $fn=6); Now it looks like this: Am Sonntag, 19. April 2020, 17:00:24 CEST schrieb Ian Nichols: > On Sun, 19 Apr 2020 at 15:40, Sören Schneider <prolaser@t-online.de> wrote: > > > Sorry, I forgot to add this. > > > > for(z=[ 0 : 10 : 10 ]) > > translate([0,0,z]) > > for(a=[0 : 90 : 270 ]) > > rotate(a) > > rotate ([90,0,0]) cylinder (h = 30, r=3, $fn=6); > > > > > > But on the "translated" I would like to have an additional rotation around > > "Z" > > > > Something like an additional "rotate(b)" but then the lowest cross is also > > getting this copy. > > > > replace rotate(a) with rotate(a+z*3) > > Ian > > -- Mit freundlichen Grüßen Sören Schneider