Compare commits

..

2 Commits

Author SHA1 Message Date
8ac85fb99f Simplified cover for centered logo 2023-08-26 23:19:59 +02:00
cf1be92010 Redesign for lid and mounting of charging board 2023-08-26 23:18:33 +02:00
2 changed files with 127 additions and 60 deletions

View File

@@ -1,37 +1,26 @@
module rpi4_cover(){
pi_height=28;
pi_width=104;
$fn=32*2;
thickness=1.6;
width=208.2;
depth=70.2;
height=10;
// cover
difference(){
translate([31+thickness+10, 0, height])
chamferCube(pi_width, depth+(thickness*2), pi_height+thickness, 8, [0, 0, 1, 1], [0, 0, 0, 0], [0, 0, 0, 0]);
translate([0, 0, 0])
chamferCube(width+(thickness*2), depth+(thickness*2), height+thickness, 8, [0, 0, 1, 1], [0, 1, 1, 0], [0, 0, 0, 0]);
translate([31+thickness+10, thickness, height])
chamferCube(pi_width, depth, pi_height, 8, [0, 0, 1, 1], [0, 0, 0, 0], [0, 0, 0, 0]);
translate([thickness, thickness, 0])
chamferCube(width, depth, height, 8, [0, 0, 1, 1], [0, 1, 1, 0], [0, 0, 0, 0]);
translate([31+thickness+62, (depth+(thickness*2))/2, height+pi_height])
translate([(width+(thickness*2))/2, (depth+(thickness*2))/2, height])
cylinder(h=thickness, d=41.5);
// hdmi gap
translate([thickness+95, depth+thickness, height])
cube([25, 0.8, 17]);
// keyboard cabel hole
translate([width/2+thickness-6, thickness+1, 20])
rotate([90, 0, 0])
#cylinder(h=thickness+1, d=3);
translate([width/2+thickness+6, thickness+1, 20])
rotate([90, 0, 0])
#cylinder(h=thickness+1, d=3);
}
// logo
translate([31+thickness+62, (depth+(thickness*2))/2, height+pi_height])
translate([(width+(thickness*2))/2, (depth+(thickness*2))/2, height])
linear_extrude(height=1.6)
resize([42, 42, 0])
import(file="mk-logo.svg", center=true);
}
module chamferCube(sizeX, sizeY, sizeZ, chamferHeight, chamferX, chamferY, chamferZ) {
chamferX = (chamferX == undef) ? [1, 1, 1, 1] : chamferX;

View File

@@ -3,19 +3,60 @@ thickness=1.6;
width=208.2;
depth=70.2;
height=8;
//22
display_frame();
module display_frame(){
difference(){
// main frame
translate([0, 0, 0])
cube([width+(thickness*2), depth+(thickness*2), height+9]);
cube([width+(thickness*2), depth+(thickness*2), height+20]);
translate([thickness, thickness, 0])
cube([width, depth, height+9]);
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
@@ -51,7 +92,7 @@ translate([(width+thickness*2)/2, -9, 6.57])
module usb_compartment(){
usb_width=41;
usb_height=4;
hole=6.5;
hole=6;
hole_x=36+thickness;
hole_y=5.6+thickness;
@@ -59,8 +100,8 @@ module usb_compartment(){
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([0, thickness, height+thickness])
cube([30, depth, usb_height]);
translate([30+thickness, thickness, height])
cube([11, depth, usb_height]);
@@ -68,10 +109,41 @@ module usb_compartment(){
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])
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(){
@@ -80,7 +152,7 @@ module usb_compartment(){
}
}
translate([hole_x, depth+(thickness*2)-hole_y, height+4+thickness]){
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);
@@ -91,7 +163,7 @@ module usb_compartment(){
module battery_compartment(){
battery_width=63.2;
battery_height=4;
hole=6.5;
hole=6;
hole_x=5;
hole_y=5.6+thickness;
@@ -109,6 +181,10 @@ module battery_compartment(){
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(){
@@ -143,7 +219,7 @@ module tab(length, thickness){
module male_hinge(){
th=2.90; //Thickness of solid tabs
sp=3.10; //Width of seperation gap
w=15.14; //Width of base
w=20.94; //Width of base
l=13.14; //length of base
translate([0, 0, -10+th/2]){
@@ -155,9 +231,11 @@ module male_hinge(){
}
}
//generating 2 tabs with sp spacing
translate([0, -sp, 0])
//generating 3 tabs with sp spacing
translate([0, -sp*2, 0])
tab(l, th);
translate([0, sp, 0])
translate([0, sp*2, 0])
tab(l, th);
translate([0, 0, 0])
tab(l, th);
}