simplify to one frame and cover
This commit is contained in:
172
cad/display-frame.scad
Normal file
172
cad/display-frame.scad
Normal file
@@ -0,0 +1,172 @@
|
||||
$fn=32*2;
|
||||
thickness=1.6;
|
||||
width=208.2;
|
||||
depth=70.2;
|
||||
height=8;
|
||||
|
||||
display();
|
||||
module display(){
|
||||
// outer display frame
|
||||
difference(){
|
||||
translate([0, 0, 0])
|
||||
cube([width+(thickness*2), depth+(thickness*2), height]);
|
||||
translate([thickness, thickness, 0])
|
||||
cube([width, depth, height]);
|
||||
}
|
||||
|
||||
// inner display catch
|
||||
translate([thickness, thickness, 1.5]){
|
||||
padding=5;
|
||||
ledge=0.8;
|
||||
difference(){
|
||||
translate([padding, 0, 0])
|
||||
cube([width-(padding*2), depth, thickness]);
|
||||
translate([0, ledge, 0])
|
||||
cube([width, depth-(ledge*2), thickness]);
|
||||
}
|
||||
}
|
||||
|
||||
// usb compartment
|
||||
translate([0, 0, 0])
|
||||
usb_compartment();
|
||||
|
||||
// battery compartment
|
||||
translate([146.6, 0, 0])
|
||||
battery_compartment();
|
||||
|
||||
// raspberry pi 4 cover
|
||||
rpi4_cover();
|
||||
|
||||
// display hinge
|
||||
translate([(width+thickness*2)/2, -9, 6.57])
|
||||
rotate([90, 270, 0])
|
||||
male_hinge();
|
||||
}
|
||||
|
||||
module rpi4_cover(){
|
||||
pi_height=22;
|
||||
|
||||
difference(){
|
||||
translate([0, 0, height])
|
||||
cube([width+(thickness*2), depth+(thickness*2), pi_height]);
|
||||
translate([thickness, thickness, height])
|
||||
cube([width, depth, pi_height]);
|
||||
|
||||
// hdmi gap
|
||||
translate([thickness+95, depth+thickness, height])
|
||||
cube([25, 0.8, 17]);
|
||||
}
|
||||
}
|
||||
|
||||
module usb_compartment(){
|
||||
usb_width=41;
|
||||
usb_height=4;
|
||||
hole=6.5;
|
||||
hole_x=36+thickness;
|
||||
hole_y=5.6+thickness;
|
||||
|
||||
difference(){
|
||||
translate([0, 0, height])
|
||||
cube([usb_width+thickness, depth+(thickness*2), usb_height+thickness]);
|
||||
|
||||
translate([thickness, thickness, height+thickness])
|
||||
cube([30-thickness, depth, usb_height]);
|
||||
|
||||
translate([30+thickness, thickness, height])
|
||||
cube([11, depth, usb_height]);
|
||||
|
||||
translate([hole_x, hole_y-0.5, height+usb_height])
|
||||
cylinder(h=thickness, d=hole);
|
||||
|
||||
translate([hole_x, depth+(thickness*2)-hole_y, height+usb_height])
|
||||
cylinder(h=thickness, d=hole);
|
||||
}
|
||||
|
||||
// screw mount
|
||||
translate([hole_x, hole_y-0.5, height+4+thickness]){
|
||||
difference(){
|
||||
cylinder(h=1.6, d=10);
|
||||
cylinder(h=1.6, d=2.5);
|
||||
}
|
||||
}
|
||||
|
||||
translate([hole_x, depth+(thickness*2)-hole_y, height+4+thickness]){
|
||||
difference(){
|
||||
cylinder(h=1.6, d=10);
|
||||
cylinder(h=1.6, d=2.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module battery_compartment(){
|
||||
battery_width=63.2;
|
||||
battery_height=4;
|
||||
hole=6.5;
|
||||
hole_x=5;
|
||||
hole_y=5.6+thickness;
|
||||
|
||||
difference(){
|
||||
translate([0, 0, height])
|
||||
cube([battery_width+thickness, depth+(thickness*2), battery_height+thickness]);
|
||||
|
||||
translate([0, thickness, height])
|
||||
cube([battery_width, depth, battery_height]);
|
||||
|
||||
translate([hole_x, hole_y-0.5, height+4])
|
||||
cylinder(h=thickness, d=hole);
|
||||
|
||||
translate([hole_x, depth+(thickness*2)-hole_y, height+battery_height])
|
||||
cylinder(h=thickness, d=hole);
|
||||
}
|
||||
|
||||
// screw mount
|
||||
translate([hole_x, hole_y-0.5, height+4+thickness]){
|
||||
difference(){
|
||||
cylinder(h=1.6, d=10);
|
||||
cylinder(h=1.6, d=2.5);
|
||||
}
|
||||
}
|
||||
|
||||
translate([hole_x, depth+(thickness*2)-hole_y, height+4+thickness]){
|
||||
difference(){
|
||||
cylinder(h=1.6, d=10);
|
||||
cylinder(h=1.6, d=2.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module tab(length, thickness){
|
||||
difference(){
|
||||
union(){
|
||||
translate([0,0,-5])
|
||||
cube([length, thickness, 10], center=true);
|
||||
|
||||
rotate([90,0,0])
|
||||
cylinder(h=thickness, d=length, center=true);
|
||||
}
|
||||
|
||||
rotate([90,0,0])
|
||||
cylinder(h=20, d=5, center=true);
|
||||
}
|
||||
}
|
||||
|
||||
module male_hinge(){
|
||||
th=2.90; //Thickness of solid tabs
|
||||
sp=3.10; //Width of seperation gap
|
||||
w=15.14; //Width of base
|
||||
l=13.14; //length of base
|
||||
|
||||
translate([0, 0, -10+th/2])
|
||||
hull(){
|
||||
cube([l, w, th], center=true);
|
||||
|
||||
translate([-l/2, -w/2-4, -2])
|
||||
cube([l+4, w+8, 0.1]);
|
||||
}
|
||||
|
||||
//generating 2 tabs with sp spacing
|
||||
translate([0, -sp, 0])
|
||||
tab(l, th);
|
||||
translate([0, sp, 0])
|
||||
tab(l, th);
|
||||
}
|
||||
Reference in New Issue
Block a user