Housing: Move some stuff around

Next up, we need to do the mount for the power regulator.
This commit is contained in:
Starbeamrainbowlabs 2019-06-17 12:57:55 +01:00
parent 589c1a81e5
commit 73bb4e267f

View file

@ -6,22 +6,16 @@
wall_thickness = 2; wall_thickness = 2;
// The dimensions of the box on the inside // The dimensions of the box on the inside
box_inside = [ box_inside = [ 130, 140, 110 ];
110, // X
135, // Y
110 // Z
];
screw_diameter = 3; screw_diameter = 3;
screw_length = 6.3; screw_length = 6.3;
bb_mount_height = 5;
battery = [19, 60, 70];
// ------------------------------------------- // -------------------------------------------
corner_piece_size = screw_diameter +
(wall_thickness * 2);
box_outside = [ box_outside = [
box_inside[0] + (wall_thickness * 2), box_inside[0] + (wall_thickness * 2),
box_inside[1] + (wall_thickness * 2), box_inside[1] + (wall_thickness * 2),
@ -30,6 +24,31 @@ box_outside = [
// ------------------------------------------- // -------------------------------------------
offset_arduino = [53.4+8, 40, wall_thickness];
breadboard = [ 46, 35+24+13, 49 ];
offset_breadboard = [70, 20, wall_thickness - 0.1];
bb_mount_height = 5;
battery = [ 60, 19, 70 ];
offset_battery = [
wall_thickness + corner_piece_size + 10,
box_inside[1] - battery[1],
0
];
power_reg = [ 54, 31, 12 ];
power_reg_underneath = 9;
offset_power_reg = [
offset_arduino[0] + 10,
85,
wall_thickness + power_reg_underneath
];
// -------------------------------------------
// Misc. Utility functions // Misc. Utility functions
// ------------------------------------------- // -------------------------------------------
@ -52,7 +71,6 @@ module screw_port() {
} }
// Corner generation // Corner generation
corner_piece_size = screw_diameter + (wall_thickness * 2);
module corner_piece() { module corner_piece() {
color("red") difference() { color("red") difference() {
cube([ cube([
@ -85,7 +103,7 @@ difference() {
// Arduino // Arduino
// ---------------------- // ----------------------
translate([53.4+8, 60, wall_thickness]) rotate([0, 0, 90]) { translate(offset_arduino) rotate([0, 0, 90]) {
screw_port(); // Top left screw_port(); // Top left
translate([50.8, 15.2]) screw_port(); translate([50.8, 15.2]) screw_port();
translate([50.8, 43.1]) screw_port(); translate([50.8, 43.1]) screw_port();
@ -96,34 +114,38 @@ translate([53.4+8, 60, wall_thickness]) rotate([0, 0, 90]) {
// Breadboard Mounting // Breadboard Mounting
// ---------------------- // ----------------------
translate([70, 10, wall_thickness - 0.1]) difference() {
% translate(offset_breadboard + [wall_thickness, -13, 0]) cube(breadboard);
translate(offset_breadboard) difference() {
union() { union() {
translate([wall_thickness*2, 0, 0]) cube([ translate([wall_thickness*2, 0, 0]) cube([
35 - (wall_thickness*2), 46 - (wall_thickness*2),
46 + wall_thickness*2, 35 + wall_thickness*2,
bb_mount_height bb_mount_height
]); ]);
translate([0, wall_thickness*2, 0]) cube([ translate([0, wall_thickness*2, 0]) cube([
35 + wall_thickness*2, 46 + wall_thickness*2,
46 - (wall_thickness*2), 35 - (wall_thickness*2),
bb_mount_height bb_mount_height
]); ]);
} }
translate([wall_thickness, wall_thickness, -1]) cube([ translate([wall_thickness, wall_thickness, -1]) cube([
35,
46, 46,
35,
bb_mount_height + 2 bb_mount_height + 2
]); ]);
} }
// Battery box // Battery box
// ---------------------- // ----------------------
% translate([ // NOTE: We'll be using velcro here to allow us to remove it easily. If we can't find any, then we'll probably have to make a 'proper' mount
box_inside[0] - battery[0] + wall_thickness, % translate(offset_battery) cube(battery);
box_inside[1] - battery[1] - corner_piece_size,
0 // Power Regulator
]) cube(battery); // ----------------------
% translate(offset_power_reg) cube(power_reg);
// Corners // Corners
// ------------------------------------------- // -------------------------------------------