Compare commits

...

2 commits

Author SHA1 Message Date
Correl Roush
f0e23b84e9 Add X-Pack 18 battery lid 2024-09-01 18:45:00 -04:00
Correl Roush
f252219170 Add desk control box 2024-09-01 18:44:50 -04:00
2 changed files with 104 additions and 0 deletions

52
desk-control.scad Normal file
View file

@ -0,0 +1,52 @@
$fn=50;
include <BOSL/constants.scad>
use <BOSL/math.scad>
use <BOSL/transforms.scad>
depth = 1;
faceplate_angle = 20;
keys = 4; // Number of key switches
key_width = 20; // With of a square keycap
key_gap = 2; // Expands the key cutout in each direction
key_distance = 5; // Spacing between keys
dial_diameter = 20; // Diameter of the dial, used for spacing
dial_post_diameter = 7; // Diameter of the post passing through the faceplate
dial_gap = 2; // Expands the dial cutout in each direction
dial_distance = 20; // Space between the dial and the keypad
faceplate_margin = 20;
key_cutout_width = key_width + (key_gap * 2);
keys_width = (key_cutout_width * keys) + (key_distance * (keys - 1));
faceplate_width = sum([faceplate_margin,
dial_diameter,
dial_distance,
keys_width,
faceplate_margin]);
faceplate_interfaceplate_height = max(key_width, dial_diameter);
faceplate_height = faceplate_interfaceplate_height + (faceplate_margin * 2);
module faceplate() {
difference() {
cube([faceplate_width, faceplate_height, depth]);
translate([faceplate_margin, faceplate_margin, -1]) {
translate([dial_diameter / 2,
dial_diameter / 2,
0]) {
cylinder(d=dial_post_diameter + dial_gap, h=depth + 2);
}
translate([dial_diameter + dial_distance, 0]) {
xspread(spacing=key_cutout_width + key_distance, n=keys, sp=[0,0,0]) {
cube([key_cutout_width, key_cutout_width, depth + 2]);
}
}
}
}
}
rotate([90 - faceplate_angle,0,0])
faceplate();

52
x-pack-18-battery.scad Normal file
View file

@ -0,0 +1,52 @@
$fn=50;
dims = [74, 24.5, 6.3];
module screwpost(h) {
// 2.7d, 3.5h over lip
difference() {
cylinder(d=2.7, h=h);
cylinder(d=1.7, h=h);
}
}
union() {
difference() {
union() {
cube(dims);
// outer lock
translate([0, -2.5, 1]) {
difference() {
cube([6, 29.5, 3]);
translate([1, 1.5, 1.01])
cube([6, 26.5, 2]);
}
}
// center fins
translate([39.7, -2.25, 1])
cube([6.8, 29, 1]);
}
// inside
translate([1,1,1])
cube(dims - [2,2,0]);
// lip
translate([0.5,0.5,dims.z - 1])
cube(dims - [1, 1, 0]);
// pcb slot
translate([dims.x - 3.7, 0.5, 1])
cube([2.7, dims.y - 1, dims.z]);
}
// battery connector lip
translate([dims.x - 1, dims.y - 10, 0])
cube([1,6.7,8]);
translate([3.35, 3.35, 0])
screwpost(10.25);
translate([3.35, dims.y - 3.35, 0])
screwpost(10.25);
translate([dims.x - 3.35 - 2.7, 3.35, 0])
screwpost(8);
translate([dims.x - 3.35 - 2.7, dims.y - 3.35, 0])
screwpost(8);
}