131 lines
5.1 KiB
OpenSCAD
131 lines
5.1 KiB
OpenSCAD
|
module rack_module(units) {
|
||
|
height = (44.45 * units) - 0.8;
|
||
|
width = 254.0;
|
||
|
inner_width = 222.25;
|
||
|
depth = 200;
|
||
|
wall_thickness = 1;
|
||
|
union() {
|
||
|
difference() {
|
||
|
cube([inner_width, depth, height], center=true);
|
||
|
translate([0, 0, wall_thickness])cube([
|
||
|
inner_width - 2 * wall_thickness,
|
||
|
depth + 2 * wall_thickness,
|
||
|
height
|
||
|
], center=true);
|
||
|
};
|
||
|
//translate([0, 0, height / 2])cube([inner_width, depth, 1], center=true);
|
||
|
translate([0, -(depth / 2), 0])cube([width, wall_thickness, height], center=true);
|
||
|
};
|
||
|
|
||
|
};
|
||
|
|
||
|
module battery(diameter, length) {
|
||
|
rotate([90, 0, 0])linear_extrude(length)circle(d = diameter);
|
||
|
}
|
||
|
|
||
|
module battery_pack_s5() {
|
||
|
battery_diameter = 21;
|
||
|
battery_length = 75;
|
||
|
battery_gap = 1.5;
|
||
|
height_2nd_row = battery_diameter - (1/battery_gap) * 1.666;
|
||
|
width_with_gap = battery_diameter + battery_gap;
|
||
|
color("#bbb")battery(battery_diameter, battery_length);
|
||
|
color("#bbb")translate([width_with_gap, 0, 0])
|
||
|
battery(battery_diameter, battery_length);
|
||
|
color("#eee")translate([width_with_gap / 2, 0, height_2nd_row])
|
||
|
battery(battery_diameter, battery_length);
|
||
|
color("#bbb")translate([-width_with_gap, 0, 0])
|
||
|
battery(battery_diameter, battery_length);
|
||
|
color("#eee")translate([-width_with_gap / 2, 0, height_2nd_row])
|
||
|
battery(battery_diameter, battery_length);
|
||
|
}
|
||
|
|
||
|
module battery_pack_s6() {
|
||
|
battery_diameter = 21;
|
||
|
battery_length = 75;
|
||
|
battery_gap = 1.5;
|
||
|
height_2nd_row = battery_diameter - (1/battery_gap) * 1.666;
|
||
|
width_with_gap = battery_diameter + battery_gap;
|
||
|
color("#bbb")battery(battery_diameter, battery_length);
|
||
|
translate([width_with_gap, 0, 0])
|
||
|
rotate([90, 0, 0])circle(d = battery_diameter + 1);
|
||
|
translate([width_with_gap / 2, 0, height_2nd_row])
|
||
|
rotate([90, 0, 0])circle(d = battery_diameter + 1);
|
||
|
translate([width_with_gap + width_with_gap / 2, 0, height_2nd_row])
|
||
|
rotate([90, 0, 0])circle(d = battery_diameter + 1);
|
||
|
color("#bbb")translate([2 * width_with_gap, 0, 0])
|
||
|
rotate([90, 0, 0])circle(d = battery_diameter + 1);
|
||
|
translate([width_with_gap + width_with_gap + width_with_gap / 2, 0, height_2nd_row])
|
||
|
rotate([90, 0, 0])circle(d = battery_diameter + 1);
|
||
|
}
|
||
|
|
||
|
module battery_pack_holder_s6() {
|
||
|
battery_diameter = 21;
|
||
|
battery_length = 75;
|
||
|
battery_gap = 1.5;
|
||
|
height_2nd_row = battery_diameter - (1/battery_gap) * 1.666;
|
||
|
width_with_gap = battery_diameter + battery_gap;
|
||
|
difference() {
|
||
|
translate([-width_with_gap / 2 - 6.7, -10, -width_with_gap / 2 - 1])
|
||
|
rotate([90, 0, 0])
|
||
|
linear_extrude(1)
|
||
|
polygon(points=[
|
||
|
[0, 0],
|
||
|
[width_with_gap * 3 + 6, 0],
|
||
|
[width_with_gap * 3 + width_with_gap / 2 + 9 + 6, width_with_gap * 2],
|
||
|
[width_with_gap / 2 + 9, width_with_gap * 2]
|
||
|
]);
|
||
|
battery(battery_diameter, battery_length);
|
||
|
translate([width_with_gap, 0, 0])
|
||
|
battery(battery_diameter, battery_length);
|
||
|
translate([width_with_gap / 2, 0, height_2nd_row])
|
||
|
battery(battery_diameter, battery_length);
|
||
|
translate([width_with_gap + width_with_gap / 2, 0, height_2nd_row])
|
||
|
battery(battery_diameter, battery_length);
|
||
|
translate([2 * width_with_gap, 0, 0])
|
||
|
battery(battery_diameter, battery_length);
|
||
|
translate([width_with_gap + width_with_gap + width_with_gap / 2, 0, height_2nd_row])
|
||
|
battery(battery_diameter, battery_length);
|
||
|
};
|
||
|
}
|
||
|
|
||
|
module battery_pack_holder_s5() {
|
||
|
battery_diameter = 21;
|
||
|
battery_length = 75;
|
||
|
battery_gap = 1.3;
|
||
|
height_2nd_row = battery_diameter - (1/battery_gap) * 1.6;
|
||
|
width_with_gap = battery_diameter + battery_gap;
|
||
|
translate([0, -1, 0])rotate([90, 0, 0])linear_extrude(4)hull() {
|
||
|
circle(d = battery_diameter + 2);
|
||
|
translate([width_with_gap, 0, 0])
|
||
|
circle(d = battery_diameter + 2);
|
||
|
translate([width_with_gap / 2, height_2nd_row, 0])
|
||
|
circle(d = battery_diameter + 2);
|
||
|
translate([-width_with_gap, 0, 0])
|
||
|
circle(d = battery_diameter + 2);
|
||
|
translate([-width_with_gap / 2, height_2nd_row, 0])
|
||
|
circle(d = battery_diameter + 2);
|
||
|
};
|
||
|
}
|
||
|
|
||
|
module battery_unit_s5() {
|
||
|
battery_pack_s5();
|
||
|
color("#ff7088")battery_pack_holder_s5();
|
||
|
translate([0, -69, 0])color("#ff7088")battery_pack_holder_s5();
|
||
|
};
|
||
|
|
||
|
color("#555")translate([0, 0, 0])rack_module(1);
|
||
|
|
||
|
//translate([300, 0, 0])rack_module(2);
|
||
|
translate([49, -14, -9])battery_unit_s5();
|
||
|
translate([-75, -14, -9])battery_unit_s5();
|
||
|
translate([-13, -14, 11])rotate([0, 180, 0])battery_unit_s5();
|
||
|
translate([49, 75, -9])battery_unit_s5();
|
||
|
translate([-75, 75, -9])battery_unit_s5();
|
||
|
translate([-13, 75, 11])rotate([0, 180, 0])battery_unit_s5();
|
||
|
//translate([-28, 0, -10])battery_pack_s6();
|
||
|
//translate([-98, 0, -10])battery_pack_s6();
|
||
|
//battery_pack_s6();
|
||
|
//battery_pack_s5();
|
||
|
//color("#ff7088")battery_pack_holder_s5();
|
||
|
//color("#ff7088")battery_pack_holder_s6();
|