Allow for adjustment to be made to the base

This commit is contained in:
Matt McWilliams 2023-05-10 20:01:38 -04:00
parent a6b7ba1a82
commit 3c6514e0e4
1 changed files with 10 additions and 11 deletions

View File

@ -102,7 +102,7 @@ module sprocketed_roller_sprocket_wheel (pos = [0, 0, 0], rot = [0, 0, 0], sproc
}
}
module sprocketed_roller_body (pos = [0, 0, 0], rot = [0, 0, 0], sprockets = 8, bevel = false, reinforced = false, bolts = false) {
module sprocketed_roller_body (pos = [0, 0, 0], rot = [0, 0, 0], sprockets = 8, bevel = false, reinforced = false, bolts = false, adjust_base = 0) {
D = (FrameC * sprockets) / PI;
LipD = (LipC * sprockets) / PI;
TopD = (TopC * sprockets) / PI;
@ -132,20 +132,20 @@ module sprocketed_roller_body (pos = [0, 0, 0], rot = [0, 0, 0], sprockets = 8,
cylinder(r = R(InnerD), h = InnerH, center = true);
}
//lip
//top lip
translate([0, 0, (TopBaseH / 2) + InnerH + (SprocketBaseH / 2) - (TopBaseH / 2) + (LipH / 2)]) {
cylinder(r = R(LipD), h = LipH, center = true);
}
//bottom
translate([0, 0, (TopH / 2) + (TopBaseH / 2) + InnerH + (SprocketBaseH / 2) + (TopBaseH / 2) - (LipH / 2)]) {
cylinder(r = R(TopD), h = TopH, center = true);
}
//bottom base
//bottom lip
translate([0, 0, (TopBaseH / 2) + InnerH + (SprocketBaseH / 2)]) {
cylinder(r = R(TopBaseD), h = TopBaseH, center = true);
}
//base
translate([0, 0, (TopH / 2) + (TopBaseH / 2) + InnerH + (SprocketBaseH / 2) + (TopBaseH / 2) - (LipH / 2)]) {
cylinder(r = R(TopD + adjust_base), h = TopH, center = true);
}
}
if (reinforced && bolts) {
m3_bolt_void([0, BoltsY/2, 0]);
@ -154,12 +154,11 @@ module sprocketed_roller_body (pos = [0, 0, 0], rot = [0, 0, 0], sprockets = 8,
}
}
module sprocketed_roller (pos = [0, 0, 0], rot = [0, 0, 0], sprockets = 8, bevel = false, reinforced = false, bolts = false, model = "", set_screw_side = true, set_screw_top = false) {
module sprocketed_roller (pos = [0, 0, 0], rot = [0, 0, 0], sprockets = 8, bevel = false, reinforced = false, bolts = false, model = "", set_screw_side = true, set_screw_top = false, adjust_base = 0) {
D = (FrameC * sprockets) / PI;
difference () {
union () {
sprocketed_roller_body(pos = pos, rot = rot, sprockets = sprockets, bevel = bevel, reinforced = reinforced, bolts = bolts);
//translate(pos) rotate(rot) addition();
sprocketed_roller_body(pos = pos, rot = rot, sprockets = sprockets, bevel = bevel, reinforced = reinforced, bolts = bolts, adjust_base = adjust_base);
}
if (model == "gearbox_motor") {
translate(pos) rotate(rot) translate([0, 0, 10]) gearbox_motor_shaft_void();