diff --git a/carlson_amp_enclosure.py b/carlson_amp_enclosure.py index c139869..0cc7252 100644 --- a/carlson_amp_enclosure.py +++ b/carlson_amp_enclosure.py @@ -35,19 +35,24 @@ hole_radius = hole_diameter / 2.0 box_width = 65.0 box_height = 30.0 -box_length = 100.0 +box_length = 120.0 wall_thickness = 2.0 battery_holder_width = 62.67 battery_holder_length = 57.36 battery_holder_height = 15.83 battery_holder_hole_dist = ( - 14.76 # distance between the centers of the countersunk holes + 15.57 # distance between the centers of the countersunk holes ) -battery_holer_hole_dist_from_side = ( - 8.39 # distance from side to middle of the first hole + +battery_holder_slot_dist_from_holes = ( + 25.4 # How far away the fitting slot is from the screw holes ) +battery_holder_slot_length = 52.0 +battery_holder_slot_width = 2.1 +battery_holder_screw_radius = 6.37 / 2.0 + result = ( Workplane() .box(box_length, box_width, box_height) @@ -88,19 +93,63 @@ bottom = bottom.workplane(offset=box_height + 5).box( ) bottom = ( - bottom.workplane(offset=(box_height / 2) - 10) + bottom.workplane(offset=(box_height / 2) - 9) .rect(box_length - 5.5, box_width - 5.5) .vertices() .cylinder(box_height - wall_thickness * 1.5, 2.5) ) bottom = ( - bottom.workplane(offset=(box_height / 2) + 3.0) + bottom.workplane(offset=(box_height / 2) + 4.0) .rect(box_length - 5.5, box_width - 5.5) .vertices() .threadedHole(top_screw, 10, simple=screw_simple, fit="Close", counterSunk=False) ) +bottom = ( + bottom.workplane(offset=-(box_height / 2.0) + 8.9) + .move(box_length / 2.0 - wall_thickness * 4, 0) + .box(battery_holder_slot_width, battery_holder_slot_length, 4.0) +) + +bottom = ( + bottom.workplane(offset=-(box_height / 2.0) + 9.0) + .move( + (box_length / 2.0 - wall_thickness * 4) - 24.0, + -(battery_holder_slot_length / 6.5), + ) + .vLine(battery_holder_hole_dist) + .vertices() + .cylinder(4, battery_holder_screw_radius) + .workplane(offset=-(box_height / 2.0) + 11.10) + .move( + (box_length / 2.0 - wall_thickness * 4) - 24.0, + -(battery_holder_slot_length / 6.5), + ) + .vLine(battery_holder_hole_dist) + .vertices() + .threadedHole(top_screw, 2.0, simple=screw_simple, fit="Close", counterSunk=False) +) +0 +bottom = ( + bottom.workplane(offset=-(box_height / 2.0) + 9.0) + .move( + (box_length / 2.0 - wall_thickness * 4) - 24.0, + (battery_holder_hole_dist * 2) - 8, + ) + .vLine(-(battery_holder_hole_dist * 3)) + .vertices() + .cylinder(4, battery_holder_screw_radius) + .workplane(offset=-(box_height / 2.0) + 11.10) + .move( + (box_length / 2.0 - wall_thickness * 4) - 24.0, + (battery_holder_hole_dist * 2) - 8, + ) + .vLine(-(battery_holder_hole_dist * 3)) + .vertices() + .threadedHole(top_screw, 2.0, simple=screw_simple, fit="Close", counterSunk=False) +) + cq.exporters.export(bottom, "/home/deck/model_files/carlon_probe_amp_enclosure_box.stl") cq.exporters.export(top, "/home/deck/model_files/carlon_probe_amp_enclosure_lid.stl")