Use R() module in daylight_spool_mount

This commit is contained in:
mmcwilliams 2023-04-07 11:02:05 -04:00
parent 6c2a640489
commit 8f606f3517
1 changed files with 6 additions and 4 deletions

View File

@ -1,3 +1,5 @@
include <common/common.scad>;
SQUARE_INNER = 7.8; SQUARE_INNER = 7.8;
time = 0; time = 0;
@ -15,18 +17,18 @@ module daylight_spool_mount (top = true, base = true, height = 18.5) {
if (top) { if (top) {
difference () { difference () {
union() { union() {
translate([0, 0, (height / 2) + (topHeight / 2)]) cylinder(r = SQUARE_INNER / 2, h = topHeight, center = true); translate([0, 0, (height / 2) + (topHeight / 2)]) cylinder(r = R(SQUARE_INNER), h = topHeight, center = true);
translate([0, 0, (height / 2) + (7.5 / 2)]) sphere(SQUARE_INNER / 2); translate([0, 0, (height / 2) + (7.5 / 2)]) sphere(R(SQUARE_INNER));
} }
translate ([0, 0, (height / 2) + 7.5]) cube([10, 10, 2], center = true); translate ([0, 0, (height / 2) + 7.5]) cube([10, 10, 2], center = true);
} }
} }
if (base) { if (base) {
difference () { difference () {
translate([0, 0, -(height / 2) - (3 / 2) - 3]) cylinder(r = 16 /2, h = 3, center = true); translate([0, 0, -(height / 2) - (3 / 2) - 3]) cylinder(r = R(16), h = 3, center = true);
//translate([0, 0, -14.3]) cube([4, 4, 2], center = true); //notch //translate([0, 0, -14.3]) cube([4, 4, 2], center = true); //notch
difference() { difference() {
translate([0, 0, -14.3]) cylinder(r = 8 / 2, h = 2, center = true); translate([0, 0, -14.3]) cylinder(r = R(8), h = 2, center = true);
translate([0, 6, -14.3]) cube([8, 8, 2], center = true); translate([0, 6, -14.3]) cube([8, 8, 2], center = true);
} }
} }