discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: [OpenSCAD] Rotate relative, or make spokes

P
Parkinbot
Wed, Dec 2, 2015 1:59 AM

You can use the argument

center = true

with cube and cylinder. This gives you the desired result (with an
additional translation)

 for (i=[1:NoArm])
 {
     rotate([0,0,DGrees*i]) 
     translate([0, ArmLong/2, 0])
       cube([ArmWide,ArmLong,ArmHigh], center = true);
 }
 cylinder(ArmHigh,CircSize,CircSize, center = true);

--
View this message in context: http://forum.openscad.org/Rotate-relative-or-make-spokes-tp14731p14886.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

You can use the argument > center = true with cube and cylinder. This gives you the desired result (with an additional translation) > for (i=[1:NoArm]) > { > rotate([0,0,DGrees*i]) > translate([0, ArmLong/2, 0]) > cube([ArmWide,ArmLong,ArmHigh], center = true); > } > cylinder(ArmHigh,CircSize,CircSize, center = true); -- View this message in context: http://forum.openscad.org/Rotate-relative-or-make-spokes-tp14731p14886.html Sent from the OpenSCAD mailing list archive at Nabble.com.