fix rim, more params
parent
30a44d4eb3
commit
c883d901cf
|
@ -10,6 +10,18 @@ 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();
|
||||
|
@ -21,26 +33,43 @@ module rim() {
|
|||
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);
|
||||
translate([0, 0, B_P]) cylinder(r=R_I+B+2, h=2);
|
||||
translate([0, 0, W-2*(B_P-2-0.2)-6]) cylinder(r=R_I+B+2, 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);
|
||||
}
|
||||
for (i = [1 : 8]) rotate([0, 0, i*45]) rim_cut();
|
||||
translate([0, 0, -0.5]) cylinder(r=2.5, h=W+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module rim_cut() {
|
||||
translate([5, 0, -0.5]) linear_extrude(height=W+1) {
|
||||
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() {
|
||||
circle(r=1);
|
||||
rotate([0, 0, 15]) translate([R_I-2-5-3, 0, 0]) circle(r=3);
|
||||
rotate([0, 0, -15]) translate([R_I-2-5-3, 0, 0]) circle(r=3);
|
||||
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-5);
|
||||
rotate([0, 0, 15]) translate([-50, 0]) square(size=[100, 30]);
|
||||
rotate([0, 0, -15]) translate([-50, -30]) square(size=[100, 30]);
|
||||
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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -96,3 +125,23 @@ module protector_single() {
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue