From dd861fbbd40af05aad4699c161769927d99cb437 Mon Sep 17 00:00:00 2001 From: Savanni D'Gerinel Date: Tue, 15 Oct 2024 13:11:06 -0400 Subject: [PATCH] Adjust the clearances based on real board fit --- bike-lights/case/common.scad | 5 +++++ bike-lights/case/control_panel.scad | 19 ++++++++++++++----- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/bike-lights/case/common.scad b/bike-lights/case/common.scad index 766e159..9597f9d 100644 --- a/bike-lights/case/common.scad +++ b/bike-lights/case/common.scad @@ -1,3 +1,8 @@ + +module hexagon(r, h) { + cylinder(r = r, h = h, $fn = 6); +} + module pill(length, bevel) { hull() { translate([0, 0, (-length / 2) + bevel]) sphere(r = bevel); diff --git a/bike-lights/case/control_panel.scad b/bike-lights/case/control_panel.scad index acc7731..7061394 100644 --- a/bike-lights/case/control_panel.scad +++ b/bike-lights/case/control_panel.scad @@ -56,13 +56,21 @@ module base_case(length, width, height, bevel = 0) { rotate([0, 90, 0]) box_face([width, height, wall_thickness], bevel); + // These are the sleds at the bottom of the case that should hold the lower of the two boards down color("blue") translate([0, wall_thickness - 2, wall_thickness + 4]) cube([length - 8, 4, wall_thickness / 2]); color("blue") translate([wall_thickness - 2, wall_thickness - 4, wall_thickness + 4]) cube([4, width, wall_thickness / 2]); - color("blue") translate([length - 25, width - wall_thickness * 3 / 2, wall_thickness + 4]) cube([16, wall_thickness, wall_thickness / 2]); + color("blue") translate([length - 25, width - wall_thickness * 3 / 2, wall_thickness + 6]) cube([16, wall_thickness, wall_thickness / 2]); } - color("red") translate([length, wall_thickness - 2, 4]) cube([1, 2, height]); - color("red") translate([length, width - wall_thickness, 4]) cube([1, 2, height]); + // This makes an indent at the bottom to accomodate solder joins + translate([wall_thickness + 2, wall_thickness + 2, wall_thickness / 2]) cube([length, width - wall_thickness * 2 - 4, wall_thickness / 2 + threshold]); + + // This creates a cutout that lets the power plug slide in better. + translate([wall_thickness, width - wall_thickness, wall_thickness]) cube([length, 2, 6]); + + // These two put in the slots that should allow the fourth wall to be slotted into place. + color("red") translate([length - 1, wall_thickness - 2, 4]) cube([2, 2, height]); + color("red") translate([length - 1, width - wall_thickness, 4]) cube([2, 2, height]); } } @@ -110,10 +118,11 @@ module main_case() { rotate([0, 180, 0]) linear_extrude(1) text("right", size = 3); - - translate([case_length / 2, case_width / 2, -20]) rotate([0, 90, 0]) top_clasp(); + // translate([case_length / 2, case_width / 2, -20]) rotate([0, 90, 0]) top_clasp(); } + translate([case_length / 2, case_width / 2, -threshold]) hexagon(4.5, 6); + color("green", 1) translate([8.5 + wall_thickness, case_width - wall_thickness - threshold, wall_thickness]) cube([60, wall_thickness * 2, 7]); }