Add rim thickness parameter
parent
2dd2ff10a7
commit
547fe52ee4
|
@ -20,6 +20,7 @@ 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
|
||||
RIM_THICKNESS=2;
|
||||
N_SPOKE=9; // number of spokes
|
||||
CUT_BASE=8;
|
||||
CUT_ANGLE=12;
|
||||
|
@ -32,7 +33,6 @@ N_SPOKE=6;
|
|||
CUT_ANGLE=21;
|
||||
CUT_I_R=2.5;
|
||||
CUT_O_R=2;
|
||||
N_L=2;
|
||||
|
||||
// small
|
||||
R=22;
|
||||
|
@ -46,6 +46,7 @@ B=1;
|
|||
R_I=15;
|
||||
CUT_O_R=1;
|
||||
CUT_BASE=5;
|
||||
N_L=2;
|
||||
W=20;
|
||||
|
||||
difference() {
|
||||
|
@ -53,7 +54,7 @@ difference() {
|
|||
translate([0, 0, W]) rotate([180, 0, 0]) {
|
||||
rim();
|
||||
// Support ...
|
||||
translate([0, 0, SPOKE_THICKNESS+(R_I-2-CUT_BASE)/2+SPACING]) cylinder(r=CUT_BASE, h=W-(SPOKE_THICKNESS+(R_I-2-CUT_BASE)/2+SPACING));
|
||||
translate([0, 0, SPOKE_THICKNESS+(R_I-SPACING-RIM_THICKNESS-CUT_BASE)/2+SPACING]) cylinder(r=CUT_BASE, h=W-(SPOKE_THICKNESS+(R_I-SPACING-RIM_THICKNESS-CUT_BASE)/2+SPACING));
|
||||
translate([0, 0, W-(B_P-FIX_WIDTH-SPACING)+SPACING]) cylinder(r=R_I+B-SPACING, h=(B_P-FIX_WIDTH-SPACING)-SPACING);
|
||||
/*
|
||||
translate([0, 0, W-(B_P-FIX_WIDTH-SPACING)-2-B+SPACING]) difference() {
|
||||
|
@ -90,11 +91,13 @@ module rim() {
|
|||
for (i = [1 : N_SPOKE])
|
||||
rotate([0, 0, i*360/N_SPOKE]) rim_cut();
|
||||
// cut spokes toroidally inside the rim
|
||||
translate([0, 0, SPOKE_THICKNESS+(R_I-2-CUT_BASE)/2])
|
||||
translate([0, 0, SPOKE_THICKNESS+(R_I-SPACING-RIM_THICKNESS-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([(R_I-SPACING-RIM_THICKNESS-CUT_BASE)/2+CUT_BASE, 0, 0])
|
||||
circle(r = (R_I-SPACING-RIM_THICKNESS-CUT_BASE)/2);
|
||||
// remove the rest of spokes
|
||||
translate([0, 0, SPOKE_THICKNESS+(R_I-2-CUT_BASE)/2]) cylinder(r=R_I-2, h=W);
|
||||
translate([0, 0, SPOKE_THICKNESS+(R_I-SPACING-RIM_THICKNESS-CUT_BASE)/2])
|
||||
cylinder(r=R_I-SPACING-RIM_THICKNESS, h=W);
|
||||
// add axle hole at the center
|
||||
translate([0, 0, -0.5]) linear_extrude(height=W+1) axle();
|
||||
// add center cut around axle hole
|
||||
|
@ -103,24 +106,24 @@ module rim() {
|
|||
difference() {
|
||||
translate([0, 0, -1]) cylinder(r=1+R_I+B-0.5/*R_I-2*/, h=1+(B_P-FIX_WIDTH-SPACING));
|
||||
translate([0, 0, (B_P-FIX_WIDTH-SPACING)])
|
||||
scale([1, 1, (B_P-FIX_WIDTH-SPACING)/((R_I-2-CUT_BASE+2)/2)])
|
||||
scale([1, 1, (B_P-FIX_WIDTH-SPACING)/((R_I-SPACING-RIM_THICKNESS-CUT_BASE+2)/2)])
|
||||
rotate_extrude(convexity = 10)
|
||||
translate([(R_I-2-CUT_BASE+2)/2+CUT_BASE-2, 0, 0]) circle(r = (R_I-2-CUT_BASE+2)/2);
|
||||
translate([(R_I-SPACING-CUT_BASE)/2+CUT_BASE-RIM_THICKNESS, 0, 0]) circle(r = (R_I-SPACING-CUT_BASE)/2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module rim_cut() {
|
||||
in_angle = atan((R_I-2)*sin(CUT_ANGLE)/((R_I-2)*cos(CUT_ANGLE)-CUT_BASE-CUT_I_R));
|
||||
in_angle = atan((R_I-SPACING-RIM_THICKNESS)*sin(CUT_ANGLE)/((R_I-SPACING-RIM_THICKNESS)*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);
|
||||
rotate([0, 0, CUT_ANGLE]) translate([R_I-SPACING-RIM_THICKNESS-CUT_O_R, 0, 0]) circle(r=CUT_O_R);
|
||||
rotate([0, 0, -CUT_ANGLE]) translate([R_I-SPACING-RIM_THICKNESS-CUT_O_R, 0, 0]) circle(r=CUT_O_R);
|
||||
}
|
||||
difference() {
|
||||
circle(r=R_I-2);
|
||||
circle(r=R_I-SPACING-RIM_THICKNESS);
|
||||
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]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue