diff --git a/cad/display-cover.scad b/cad/display-cover.scad index 286c893..a9c7541 100644 --- a/cad/display-cover.scad +++ b/cad/display-cover.scad @@ -1,38 +1,27 @@ -module rpi4_cover(){ - pi_height=28; - pi_width=104; - - 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([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([31+thickness+62, (depth+(thickness*2))/2, height+pi_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); - } +$fn=32*2; +thickness=1.6; +width=208.2; +depth=70.2; +height=10; - // logo - translate([31+thickness+62, (depth+(thickness*2))/2, height+pi_height]) - linear_extrude(height=1.6) - resize([42, 42, 0]) - import(file="mk-logo.svg", center=true); +// cover +difference(){ + 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([thickness, thickness, 0]) + chamferCube(width, depth, height, 8, [0, 0, 1, 1], [0, 1, 1, 0], [0, 0, 0, 0]); + + translate([(width+(thickness*2))/2, (depth+(thickness*2))/2, height]) + cylinder(h=thickness, d=41.5); } +// logo +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; chamferY = (chamferY == undef) ? [1, 1, 1, 1] : chamferY;