small update for the wheel, just cosmetics.
parent
9606e7364b
commit
dc8ef1eb80
19
wheel.scad
19
wheel.scad
|
@ -1,12 +1,13 @@
|
|||
$fn=100;
|
||||
|
||||
module wheel(radius, width, thickness, spokes) {
|
||||
echo("axle width:", (radius-thickness)/(spokes));
|
||||
union() {
|
||||
difference() {
|
||||
// basis for our wheel - a sphere
|
||||
sphere(radius);
|
||||
// upper cut-out
|
||||
translate([0,0,width/2])
|
||||
translate([0,0,(width/2)])
|
||||
cylinder(radius-(width/2) +1, radius, radius, 0);
|
||||
// lower cut-out
|
||||
translate([0,0,-radius -1])
|
||||
|
@ -16,14 +17,16 @@ module wheel(radius, width, thickness, spokes) {
|
|||
removing 1 from z on translate and making the cylinder
|
||||
higher by two to generate slightly more valid objects
|
||||
*/
|
||||
translate([0,0,-width/2 -1])
|
||||
cylinder(width+2, radius-thickness, radius-thickness, 0);
|
||||
translate([0,0,-(width/2) -1])
|
||||
cylinder(width +2, radius-thickness, radius-thickness, 0);
|
||||
}
|
||||
// spokes
|
||||
for (i = [0:(360/spokes):360]) {
|
||||
rotate([0,0,i])
|
||||
translate([-(radius-thickness),-(radius-thickness)/(spokes*2), -(width/2)])
|
||||
cube([(radius-thickness), (radius-thickness)/(spokes), width]);
|
||||
union() {
|
||||
for (i = [0:(360/spokes):360]) {
|
||||
rotate([0,0,i])
|
||||
translate([-(radius-thickness),-(radius-thickness)/(spokes*2), -(width/2)])
|
||||
cube([(radius-thickness), (radius-thickness)/(spokes), width]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue