From 98694f763b64e97266c9aec984d34c8f6f4ba356 Mon Sep 17 00:00:00 2001 From: Savanni D'Gerinel Date: Sat, 14 Sep 2024 00:45:20 -0400 Subject: [PATCH] add the slot to hold the power converter --- bike-lights/case/battery_enclosure.scad | 47 ++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/bike-lights/case/battery_enclosure.scad b/bike-lights/case/battery_enclosure.scad index 9e9131d..565f3cd 100644 --- a/bike-lights/case/battery_enclosure.scad +++ b/bike-lights/case/battery_enclosure.scad @@ -24,7 +24,7 @@ battery_contact_flange_height = 1.9; converter_width = 11.25; converter_length = 22.25; -converter_height = 4.25; +converter_height = 5; module pill(length, bevel) { @@ -121,7 +121,7 @@ module contact_box() { -(wall_thickness + contact_thickness + threshold) / 2 - wire_radius, 0]) rotate([0, 90, 0]) - cylinder(h = cell_holder_width, r = wire_radius / 2, center = true); + cylinder(h = cell_holder_width, r = wire_radius, center = true); } } @@ -134,8 +134,41 @@ module battery_slot() { rotate([0, 0, 180]) contact_box(); } - translate([cell_holder_width / 2, 1, 0]) rotate([90, 0, 0]) cylinder(h = cell_holder_length + wall_thickness * 4 + battery_contact_flange_height * 2, r = wire_radius / 2, center = true); - translate([-cell_holder_width / 2, 1, 0]) rotate([90, 0, 0]) cylinder(h = cell_holder_length + wall_thickness * 4 + battery_contact_flange_height * 2, r = wire_radius / 2, center = true); + translate([cell_holder_width / 2, 1, 0]) rotate([90, 0, 0]) cylinder(h = cell_holder_length + wall_thickness * 4 + battery_contact_flange_height * 2, r = wire_radius, center = true); + translate([-cell_holder_width / 2, 1, 0]) rotate([90, 0, 0]) cylinder(h = cell_holder_length + wall_thickness * 4 + battery_contact_flange_height * 2, r = wire_radius, center = true); + } +} + +module converter_box() { + box_width = wall_thickness * 2 + converter_height; + difference() { + box(box_width, cell_holder_width * 2 - wall_thickness, cell_holder_height); + + translate([cell_holder_width - wire_radius, 0, 0]) + rotate([90, 0, 0]) + cylinder(h = box_width, r = wire_radius, center = true); + translate([cell_holder_width - wire_radius * 2, 0, 0]) + rotate([0, 90, 0]) + cylinder(h = wall_thickness + threshold, r = wire_radius, center = true); + + translate([-cell_holder_width + wire_radius, 0, 0]) + rotate([90, 0, 0]) + cylinder(h = box_width, r = wire_radius, center = true); + translate([-cell_holder_width + wire_radius * 2, 0, 0]) + rotate([0, 90, 0]) + cylinder(h = wall_thickness + threshold, r = wire_radius, center = true); + + translate([0, -box_width / 2, 0]) + rotate([0, 90, 0]) + cylinder(h = cell_holder_width * 2 + wall_thickness, r = wire_radius, center = true); + + translate([-cell_holder_width * .75, (-box_width + wall_thickness) / 2, 0]) + rotate([90, 0, 0]) + cylinder(h = wall_thickness * 2, r = wire_radius, center = true); + + translate([cell_holder_width * .75, (-box_width + wall_thickness) / 2, 0]) + rotate([90, 0, 0]) + cylinder(h = wall_thickness * 2, r = wire_radius, center = true); } } @@ -143,8 +176,14 @@ module battery_case() { union() { translate([-cell_holder_width / 2, 0, 0]) battery_slot(); translate([cell_holder_width / 2 - wall_thickness, 0, 0]) battery_slot(); + color("blue", 1) + translate([-wall_thickness / 2, + cell_holder_length / 2 + wall_thickness * 2 + battery_contact_flange_height + wall_thickness * 2 + wall_thickness / 2, + 0]) + converter_box(); } } + battery_case();