241 lines
5.6 KiB
OpenSCAD
241 lines
5.6 KiB
OpenSCAD
$fn=32*2;
|
|
thickness=1.6;
|
|
width=208.2;
|
|
depth=70.2;
|
|
height=8;
|
|
|
|
display_frame();
|
|
module display_frame(){
|
|
difference(){
|
|
// main frame
|
|
translate([0, 0, 0])
|
|
cube([width+(thickness*2), depth+(thickness*2), height+20]);
|
|
translate([thickness, thickness, 0])
|
|
cube([width, depth, height+20]);
|
|
|
|
// hdmi gap
|
|
translate([thickness+95, depth+thickness, height])
|
|
cube([25, 0.8, 17]);
|
|
|
|
// usb cutouts
|
|
translate([0, 47.5, height+thickness+8.5])
|
|
cube([thickness, 14, 6.5]);
|
|
|
|
translate([0.8, 46.5, height+thickness])
|
|
cube([thickness, 16, 8]);
|
|
|
|
// usb-c
|
|
translate([0, 35, height+thickness+8])
|
|
hull(){
|
|
translate([0, 0, 2])
|
|
rotate([0, 90, 0])
|
|
cylinder(h=thickness, d=4);
|
|
cube([thickness, 7, 4]);
|
|
translate([0, 7, 2])
|
|
rotate([0, 90, 0])
|
|
cylinder(h=thickness, d=4);
|
|
}
|
|
|
|
// micro usb
|
|
translate([0, 22.5, height+thickness+8])
|
|
cube([thickness, 8, 3.5]);
|
|
|
|
// data cables
|
|
translate([(width+(thickness*2))/2-25, 0, 19])
|
|
rotate([-90, 0, 0])
|
|
cylinder(h=thickness, d=3.5);
|
|
|
|
translate([(width+(thickness*2))/2+25, 0, 19])
|
|
rotate([-90, 0, 0])
|
|
cylinder(h=thickness, d=3.5);
|
|
|
|
// lid mounting holes
|
|
translate([thickness+30, 0, 23])
|
|
rotate([-90, 0, 0])
|
|
cylinder(h=depth+(thickness*2), d=2);
|
|
|
|
translate([width+thickness-30, 0, 23])
|
|
rotate([-90, 0, 0])
|
|
cylinder(h=depth+(thickness*2), d=2);
|
|
}
|
|
|
|
// 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]);
|
|
}
|
|
|
|
// hinge support
|
|
translate([5, -0.6, 0])
|
|
cube([width-10, thickness, 15]);
|
|
}
|
|
|
|
// usb compartment
|
|
translate([0, 0, 0])
|
|
usb_compartment();
|
|
|
|
// battery compartment
|
|
translate([146.6, 0, 0])
|
|
battery_compartment();
|
|
|
|
// display hinge
|
|
translate([(width+thickness*2)/2, -9, 6.57])
|
|
rotate([90, 270, 0])
|
|
male_hinge();
|
|
}
|
|
|
|
module usb_compartment(){
|
|
usb_width=41;
|
|
usb_height=4;
|
|
hole=6;
|
|
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([0, thickness, height+thickness])
|
|
cube([30, 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-0.5, depth+(thickness*2)-hole_y, height+usb_height])
|
|
cylinder(h=thickness, d=hole);
|
|
}
|
|
|
|
// pcb mount
|
|
translate([thickness+12, 12, height+thickness])
|
|
difference(){
|
|
cylinder(h=7, d=4);
|
|
cylinder(h=7, d=1.6);
|
|
}
|
|
|
|
translate([thickness+7, 30.8, height+thickness])
|
|
difference(){
|
|
cylinder(h=7, d=4);
|
|
cylinder(h=7, d=1.6);
|
|
}
|
|
|
|
translate([thickness+11.8, 42.8, height+thickness])
|
|
difference(){
|
|
cylinder(h=7, d=4);
|
|
cylinder(h=7, d=1.6);
|
|
}
|
|
|
|
translate([thickness+10.5, 7.1, height+thickness])
|
|
cube([3, thickness, 10]);
|
|
|
|
translate([thickness+11.25, 5.1, height+thickness])
|
|
cube([thickness, 3, 10]);
|
|
|
|
translate([thickness+10.5, 62.1, height+thickness])
|
|
cube([3, thickness, 10]);
|
|
|
|
translate([thickness+11.25, 62.6, height+thickness])
|
|
cube([thickness, 3, 10]);
|
|
|
|
// 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-0.5, 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;
|
|
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);
|
|
}
|
|
|
|
// battery stop
|
|
translate([-1.2, (depth+(thickness*2))/2-5, height+battery_height])
|
|
cube([thickness, 10, 16]);
|
|
|
|
// 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=20.94; //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 3 tabs with sp spacing
|
|
translate([0, -sp*2, 0])
|
|
tab(l, th);
|
|
translate([0, sp*2, 0])
|
|
tab(l, th);
|
|
translate([0, 0, 0])
|
|
tab(l, th);
|
|
} |