148 lines
4.5 KiB
OpenSCAD
148 lines
4.5 KiB
OpenSCAD
// LEGO-like tire 81.6x50... Dunno where it's 81.6, it's 84 in fact...
|
|
// (c) Vitaliy Filippov 2014, license: CC-BY-SA 3.0
|
|
|
|
$fn=60;
|
|
R=42; // outer radius
|
|
R_I=26.5; // innermost radius
|
|
B=2.5; // width of edge for the rim
|
|
B_W=1.6; // thickness of edge for the rim
|
|
B_P=4; // position of edge for the rim
|
|
W=50; // tire width
|
|
N_L=4; // number of lateral protectors
|
|
N_A=10; // number of angular protectors
|
|
SPOKE_THICKNESS=10; // thickness of solid spoke part
|
|
N_SPOKE=9; // number of spokes
|
|
CUT_BASE=8;
|
|
CUT_ANGLE=12;
|
|
CUT_I_R=1.5;
|
|
CUT_O_R=2;
|
|
|
|
// 6-spoke variant
|
|
N_SPOKE=6;
|
|
CUT_ANGLE=21;
|
|
CUT_I_R=2.5;
|
|
CUT_O_R=2;
|
|
|
|
rim();
|
|
tire();
|
|
|
|
module rim() {
|
|
translate([0, 0, B_P-2-0.2]) color([0.5, 0.5, 1]) {
|
|
difference() {
|
|
union() {
|
|
cylinder(r=R_I-0.2, h=W-2*(B_P-2-0.2));
|
|
cylinder(r=R_I+B-0.5, h=2);
|
|
translate([0, 0, W-2*(B_P-2-0.2)-2]) cylinder(r=R_I+B-0.5, h=2);
|
|
hull() {
|
|
translate([0, 0, B_P]) cylinder(r=R_I+B+2, h=2);
|
|
translate([0, 0, B_P+B+2+0.2]) cylinder(r=R_I-0.2, h=2);
|
|
}
|
|
hull() {
|
|
translate([0, 0, W-2*(B_P-2-0.2)-6]) cylinder(r=R_I+B+2, h=2);
|
|
translate([0, 0, W-2*(B_P-2-0.2)-6-B-2-0.2]) cylinder(r=R_I-0.2, h=2);
|
|
}
|
|
}
|
|
for (i = [1 : N_SPOKE])
|
|
rotate([0, 0, i*360/N_SPOKE]) rim_cut();
|
|
translate([0, 0, SPOKE_THICKNESS+(R_I-2-CUT_BASE)/2])
|
|
rotate_extrude(convexity = 10)
|
|
translate([(R_I-2-CUT_BASE)/2+CUT_BASE, 0, 0]) circle(r = (R_I-2-CUT_BASE)/2);
|
|
translate([0, 0, SPOKE_THICKNESS+(R_I-2-CUT_BASE)/2]) cylinder(r=R_I-2, h=W);
|
|
translate([0, 0, -0.5]) linear_extrude(height=W+1) axle();
|
|
translate([0, 0, -1]) cylinder(r=CUT_BASE-3, h=5);
|
|
hull() {
|
|
translate([0, 0, -1]) cylinder(r=CUT_BASE-2, h=1);
|
|
translate([0, 0, -1]) cylinder(r=CUT_BASE-3, h=2);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
module rim_cut() {
|
|
in_angle = atan((R_I-2)*sin(CUT_ANGLE)/((R_I-2)*cos(CUT_ANGLE)-CUT_BASE-CUT_I_R));
|
|
translate([0, 0, -0.5]) linear_extrude(height=W+1) {
|
|
hull() {
|
|
translate([CUT_BASE+CUT_I_R, 0]) circle(r=CUT_I_R);
|
|
rotate([0, 0, CUT_ANGLE]) translate([R_I-2-CUT_O_R, 0, 0]) circle(r=CUT_O_R);
|
|
rotate([0, 0, -CUT_ANGLE]) translate([R_I-2-CUT_O_R, 0, 0]) circle(r=CUT_O_R);
|
|
}
|
|
difference() {
|
|
circle(r=R_I-2);
|
|
translate([CUT_BASE+CUT_I_R, 0]) rotate([0, 0, in_angle]) translate([-50, 0]) square(size=[100, 100]);
|
|
translate([CUT_BASE+CUT_I_R, 0]) rotate([0, 0, -in_angle]) translate([-50, -100]) square(size=[100, 100]);
|
|
}
|
|
}
|
|
}
|
|
|
|
module tire() {
|
|
difference() {
|
|
hull() {
|
|
translate([0, 0, 2]) cylinder(r=R, h=W-4);
|
|
cylinder(r=R-2, h=W);
|
|
}
|
|
// center hole through all piece
|
|
translate([0, 0, -0.5]) cylinder(r=R_I, h=W+1);
|
|
// top hole
|
|
translate([0, 0, W-B_P]) cylinder(r=R_I+B, h=B_P+1);
|
|
hull() {
|
|
translate([0, 0, W-1.5]) cylinder(r=R_I+B, h=1.5);
|
|
translate([0, 0, W]) cylinder(r=R_I+B+1.5, h=1);
|
|
}
|
|
// bottom hole
|
|
translate([0, 0, -1]) cylinder(r=R_I+B, h=B_P+1);
|
|
hull() {
|
|
translate([0, 0, 0]) cylinder(r=R_I+B, h=1.5);
|
|
translate([0, 0, -1]) cylinder(r=R_I+B+1.5, h=1);
|
|
}
|
|
// inside cut
|
|
translate([0, 0, B_P+B_W]) cylinder(r=R-3, h=W-(B_P+B_W)*2);
|
|
difference() {
|
|
translate([0, 0, 2.5]) cylinder(r=R-3, h=W-2.5*2);
|
|
cylinder(r=R_I+B+2, h=W);
|
|
}
|
|
// lateral protector
|
|
for (i = [1 : N_L])
|
|
translate([0, 0, -1+i*W/(N_L+1)]) difference() {
|
|
cylinder(r=R+1, h=2.5);
|
|
translate([0, 0, -0.1]) cylinder(r=R-1, h=2.5+0.2);
|
|
}
|
|
// angular protector
|
|
for (i = [1 : N_A])
|
|
rotate([0, 0, 360/N_A*i]) protector_single();
|
|
// to cut and look inside :)
|
|
//translate([0, 0, -0.1]) cube(size=[100, 100,100]);
|
|
}
|
|
}
|
|
|
|
module protector_single() {
|
|
difference() {
|
|
union() {
|
|
translate([(W/2)/2, 0, W/2]) rotate([0, -45, 0]) cube(size=[2, R+4, sqrt((W/2)*(W/2)*2)]);
|
|
translate([-(W/2+2)/2, 0, 0]) rotate([0, 45, 0]) cube(size=[2, R+4, sqrt((W/2+2)*(W/2+2)*2)]);
|
|
}
|
|
translate([0, 0, -0.5]) cylinder(r=R-1, h=W+1);
|
|
translate([0, 0, W]) cylinder(r=R+10, h=10);
|
|
translate([0, 0, -10]) cylinder(r=R+10, h=10);
|
|
}
|
|
}
|
|
|
|
module axle(height) {
|
|
axle_gap = 1.95;
|
|
HOLE_RADIUS = 2.55;
|
|
union() {
|
|
translate([-HOLE_RADIUS, -axle_gap/2, 0])
|
|
roundedRect(HOLE_RADIUS * 2, axle_gap, .2);
|
|
translate([-axle_gap/2, -HOLE_RADIUS, 0])
|
|
roundedRect(axle_gap, HOLE_RADIUS * 2, .2);
|
|
}
|
|
}
|
|
|
|
module roundedRect(x, y, radius) {
|
|
hull() {
|
|
translate([radius, radius, 0]) circle(r=radius);
|
|
translate([x - radius, radius, 0]) circle(r=radius);
|
|
translate([x - radius, y - radius, 0]) circle(r=radius);
|
|
translate([radius, y - radius, 0]) circle(r=radius);
|
|
}
|
|
}
|