updated example to demonstrate angle parameter. a half yin-yang/paisley sort of shape
This commit is contained in:
parent
331c4fb63d
commit
5460351510
1 changed files with 23 additions and 3 deletions
|
|
@ -1,8 +1,8 @@
|
|||
echo(version=version());
|
||||
|
||||
// rotate_extrude() always rotates the 2D shape 360 degrees
|
||||
// around the Z axis. Note that the 2D shape must be either
|
||||
// completely on the positive or negative side of the X axis.
|
||||
// rotate_extrude() rotates a 2D shape around the Z axis.
|
||||
// Note that the 2D shape must be either completely on the
|
||||
// positive or negative side of the X axis.
|
||||
color("red")
|
||||
rotate_extrude()
|
||||
translate([10, 0])
|
||||
|
|
@ -23,6 +23,26 @@ color("green")
|
|||
polygon( points=[[0,0],[8,4],[4,8],[4,12],[12,16],[0,20]] );
|
||||
|
||||
|
||||
// By default rotate_extrude forms a full 360 degree circle,
|
||||
// but a partial rotation can be performed by using the angle parameter.
|
||||
// Positive angles create an arc starting from the X axis, going counter-clockwise.
|
||||
// Negative angles generate an arc in the clockwise direction.
|
||||
color("magenta")
|
||||
translate([-40,0]){
|
||||
rotate_extrude(angle=180)
|
||||
translate([12.5,0])
|
||||
square(5);
|
||||
translate([7.5,0])
|
||||
rotate_extrude(angle=180)
|
||||
translate([5,0])
|
||||
square(5);
|
||||
translate([-7.5,0])
|
||||
rotate_extrude(angle=-180)
|
||||
translate([5,0])
|
||||
square(5);
|
||||
}
|
||||
|
||||
|
||||
// Written in 2015 by Torsten Paul <Torsten.Paul@gmx.de>
|
||||
//
|
||||
// To the extent possible under law, the author(s) have dedicated all
|
||||
|
|
|
|||
Loading…
Reference in a new issue