openscad/esp8266.scad
2020-01-21 11:44:49 +01:00

77 lines
1.7 KiB
OpenSCAD

Lidnodge=2;
D1W=26;
D1L=34.5;
D1H=8+Lidnodge;
Wall=1.67;
Clearance=0.2;
GPIOW=2.8;
GPIOL=22;
//translate([-Wall,0,-Wall]){
// difference(){
// cube([D1W+Wall*4,D1L+Wall*2,D1H+Wall*5]);
// translate([0,0,0]) cube([D1W+Wall*4,D1L/1.2,D1H+Wall]);
// }
//}
module drawCase()
{
translate([0,0,0]){
difference(){
cube([D1W+(Wall*2),D1L+(Wall*2),D1H+Wall-0.1]);
translate([Wall,Wall,Wall]){
difference(){
cube([D1W,D1L,D1H]);
//PCB Spacer
translate([0,D1L-4.5,0]){
cube([D1W,4.5,2.4]);
}
}
}
//usb port
translate([((D1W/2)-(7.5/2))+Wall,0,Wall]){
cube([7.5,Wall+0.1,3.0]);
}
//reset button
translate([-0.1,Wall+2,Wall]){
cube([Wall+0.1+1,4,2]);
}
}
}
}
module drawLid(){
//lid
translate([0,0,5]){
difference(){
union(){
//lid
translate([0,0,D1H+Wall]){
cube([D1W+(Wall*2),D1L+(Wall*2),Wall-0.1]);
//fit
translate([0+Wall,0+Wall,-Lidnodge]){
cube([D1W-Clearance,D1L-Clearance,Lidnodge]);
}
}
}
//GPIO ports
//Left
translate([Wall,6.2+Wall,(D1H+Wall)-Lidnodge]){
cube([GPIOW,GPIOL,Wall+Lidnodge]);
}
//Right
translate([D1W+Wall-GPIOW,6.2+Wall,(D1H+Wall)-Lidnodge]){
cube([GPIOW,GPIOL,Wall+Lidnodge]);
}
}
}
}
minkowski(){
drawCase();
sphere(.2);
}
minkowski(){
drawLid();
sphere(.2);
}