attmapper/case/openscad/attmapper_nobat.scad

59 lines
2.4 KiB
OpenSCAD

use <../lib/libRoundedcube.scad>;
use <../lib/gopro_mounts.scad>;
$boardw=30.4;
$boardh=37.3;
$oledw=27.62;
$oledh=27.80;
$gpsh=20.4;
$gpsw=6.25;
$walls=1.6;
$fn=100;
$oledside=($boardw-$oledw)/2;
module front() {
difference() {
union() {
roundedcube([$boardh+($walls*4)+10, $boardw+($walls*4), $walls+8], false, 2, "zmax", $fn=100);
difference() {
translate([$walls-1,$walls-1.05, -5]) roundedcube([$boardh+($walls*2)+12,$boardw+($walls*2)+2+0.1,5], false, 2, "zmin", $fn=100);
translate([$walls,$walls-0.125, -5.1]) cube([$boardh+($walls*2)+10,$boardw+($walls*2)+0.25,5.1]);
}
}
translate([$walls,$walls-0.125, -0.1]) cube([$boardh+($walls*2)+0.1,$boardw+($walls*2)+0.25,6]);
translate([$walls,$walls+2, -0.1]) cube([$boardh+($walls*2)+10,$boardw+($walls*2)-4,6]);
translate([($walls*2)+4.6,($walls*2)+$oledside,-0.1]) cube([$oledh-6,$oledw, 8]);
translate([($walls*2)+10.6,($walls*2)+$oledside,-0.1]) cube([$oledh-13.5,$oledw, 10]);
translate([($walls*2)+1.6,($walls*2)+$oledside+3,-0.1]) cube([$oledh,$oledw-6, 8]);
translate([-0.1,$walls+$boardw-9.2,-5.36]) cube([3,8.5,9.6]);
translate([-0.1,($walls*2)+9,-2.6]) rotate([0,90,0]) cylinder(5, 2.85, 2.85, $fn=100);
translate([-0.5,($walls*2)+9-2.85,-2.6]) rotate([0,90,0]) cube([6, 2.85*2, 5]);
}
translate([$boardh+25.65, ($boardw+($walls*4))/2, 2.3]) rotate([0,90,90]) gopro_connector("double");
}
module back() {
difference() {
union() {
roundedcube([$boardh+($walls*4)+10, $boardw+($walls*4), 11], false, 2, "zmin", $fn=100);
}
translate([$walls-0.95,$walls-1.1, 5.4]) roundedcube([$boardh+($walls*2)+11.9,$boardw+($walls*2)+2,7.7], false, 2, "zmax", $fn=100);
translate([$walls, ($walls*2)+1, 1.6]) cube([$boardh+($walls*3), $boardw-2, 9.4]);
translate([$boardh+($walls*3), $walls-0.125, 3.2]) cube([10, $boardw+($walls*2)+0.25, 9.4]);
translate([-0.5,($walls*2)+9,6.1]) rotate([0,90,0]) cylinder(5, 2.85, 2.85, $fn=100);
translate([-0.5,($walls*2)+9-2.85,12]) rotate([0,90,0]) cube([6, 2.85*2, 5]);
translate([-0.1,$walls+$boardw-9.3,6]) cube([3,9,9.6]);
translate([$boardh+16, ($boardw+($walls*4))/2, 11]) cube([10,15,11], center=true);
// translate([$boardh+11, ($boardw+($walls*4))/2, -1]) cylinder(10, 2, 2);
translate([$boardh+5.3, 0, $walls]) cube(size=[9.5,15,3.2]);
}
}
// translate([0, 5, -9.4]) front();
translate([0, -5, 0]) rotate([180,0,0]) back();