1
0
Fork 0
3d/bike trainer dial mount.scad
2024-04-13 12:48:55 -04:00

88 lines
3.3 KiB
OpenSCAD

// Tube mount for bike trainer control dial
// length units are millimeters
// built on its side, so depth is x-axis, height is y-axiz, width is z-axis
mountWidth = 25.83;
mountDepth = 36.7;
mountHeight = 6.69;
rubberHoleWidth = 5.20;
rubberHoleSunkWidth = 8.20;
rubberHoleDepth = 8.92;
rubberHoleSunkDepth = rubberHoleDepth;
rubberHoleSunkHeight = 1.5;
screwHoleRadius = 3.50/2;
screwHoleDepthOffset = 4.67 + screwHoleRadius;
screwSpikeWidthOffset = 7.10;
screwSpikeWidth = 2.30;
screwSpikeDepthOffset = 2.00;
screwSpikeDepth = 5.5;
ledgeGapHeightOffset = 2.80;
ledgeGapHeight = mountHeight + 0.01 - ledgeGapHeightOffset;//3.18;
ledgeGapDepth = 5.41;
ledgeGapWidth = 9.02;
handlebarStemRadius = 33.45 / 2;
handlebarRadius = 32.07 / 2;
clampRadius = handlebarRadius + 1.5;
clampInnerRadius = handlebarRadius;
clampHeightOffset = 3.75;
clampEndHeightOffset = clampRadius * 1.85;
circleResolution=360*2; // faces per rotation
difference() {
union() {
// mount base
cube([mountDepth, mountHeight, mountWidth]);
// circular clamp
translate([mountDepth/2, clampRadius + clampHeightOffset, mountWidth/2]) {
rotate([0, 0, 0]) {
difference() {
cylinder(h = mountWidth, r = clampRadius, center=true, $fn=circleResolution);
union() {
cylinder(h = mountWidth * 1.1, r = clampInnerRadius, center=true, $fn=circleResolution);
translate([-(clampRadius + 0.01), clampEndHeightOffset - clampRadius, -(mountWidth/2 + 0.01)]) {
cube([(clampRadius * 2) + 0.02, clampRadius * 2.02, mountWidth + 0.02]);
}
}
}
}
}
}
union() {
// hole for rubber grip to clip in
translate([(mountDepth/2)-(rubberHoleDepth/2), -0.01, (mountWidth/2) - (rubberHoleWidth/2)]) {
cube([rubberHoleDepth, 10, rubberHoleWidth]);
}
// slightly larger hole so rubber grip clip can clip
translate([(mountDepth/2)-(rubberHoleSunkDepth/2), -0.01, (mountWidth/2) - (rubberHoleSunkWidth/2)]) {
cube([rubberHoleSunkDepth, mountHeight- rubberHoleSunkHeight, rubberHoleSunkWidth]);
}
// screw hole
translate([screwHoleDepthOffset, -0.01, (mountWidth/2)]) {
rotate([-90,0,0]) {
cylinder(h = mountHeight + 0.02, r = screwHoleRadius, $fn=circleResolution);
}
}
// lower hole for spikes on each side of screw
translate([screwSpikeDepthOffset, -0.01, screwSpikeWidthOffset]) {
cube([screwSpikeDepth, 5, screwSpikeWidth]);
}
// higher hole for spikes on each side of screw
translate([screwSpikeDepthOffset, -0.01, mountWidth - (screwSpikeWidth + screwSpikeWidthOffset)]) {
cube([screwSpikeDepth, 5, screwSpikeWidth]);
}
// lower ledge at x-axis high end for dial's clip
translate([mountDepth - ledgeGapDepth, ledgeGapHeightOffset, -0.01]) {
cube([ledgeGapDepth + 0.01, ledgeGapHeight, ledgeGapWidth + 0.01]);
}
// higher ledge at x-axis high end for dial's clip
translate([mountDepth - ledgeGapDepth, ledgeGapHeightOffset, mountWidth + 0.01 -ledgeGapWidth]) {
cube([ledgeGapDepth + 0.01, ledgeGapHeight, ledgeGapWidth + 0.01]);
}
}
}