Outsource 2020 profile module into lib file

This commit is contained in:
maride 2018-01-03 15:21:18 +01:00
parent 9d980b7957
commit 659d348762
2 changed files with 24 additions and 13 deletions

View File

@ -1,5 +1,7 @@
// Helpful to look into this pdf: https://www.raspberrypi.org/documentation/hardware/raspberrypi/mechanical/Raspberry-Pi-3B-V1.2-Mechanical.pdf
include <lib2020.scad>
RPI_HOLE_DIST=49;
RPI_HOLE_SPACING=0.5;
RPI_HOLE_POS=6;
@ -18,17 +20,5 @@ difference() {
}
translate([(RPI_HOLE_DIST + HEIGHT)/2-16, 0, 0]) {
difference() {
cube([32, 32, HEIGHT]);
translate([6, 6, 0])
cube([21, 21, HEIGHT]);
}
translate([16.5, 16.5, 0])
for(i = [0:90:270]) {
rotate([0, 0, i])
translate([-3, -1.5, 0])
translate([0, 11, 0])
cube([5.5, 3, HEIGHT]);
}
__2020(HEIGHT, 11/2);
}

21
lib2020.scad Normal file
View File

@ -0,0 +1,21 @@
// example: __2020(2, 3);
module __2020(height, thickness) {
// these values are measured off of a 2020 frame including tolerance (!!)
inner_size = 21;
inner_pin_width=5.5;
inner_pin_height=1.5;
difference() {
cube([inner_size + thickness*2, inner_size + thickness*2, height]);
translate([thickness, thickness, 0])
cube([inner_size, inner_size, height]);
}
translate([inner_size/2 + thickness, inner_size/2 + thickness, 0])
for(i = [0:90:270]) {
rotate([0, 0, i])
translate([-inner_pin_width/2, inner_size/2 - inner_pin_height, 0])
cube([inner_pin_width, inner_pin_height, height]);
}
}