add esp models
confusedbread confuseddbread@gmail.com
Sat, 16 May 2026 15:52:22 +0200
3 files changed,
210 insertions(+),
0 deletions(-)
A
models/3m_bayonet.scad
@@ -0,0 +1,47 @@
+$fn = $preview ? 12 : 180; +tollerance=0.5; + +attachment_od=30; +attachment_height=5.89; +bayonet_od=21.5+tollerance; +bayonet_extra=2; //radius +bayonet_height=3.5+tollerance; +bayonet_under=2; +bayonet_width=7; + + +module 3m_attachment() { + difference(){ + cylinder(r=attachment_od/2, h=attachment_height-0.15); + translate([0,0,-0.1]) + cylinder(r=bayonet_od/2, h=attachment_height+2); + for(i=[0:2]){ + rotate([0,0,120*i]){ + translate([0,0,-0.1]){ + intersection(){ + cylinder(r=bayonet_od/2+bayonet_extra, h=bayonet_height+bayonet_under); + translate([-bayonet_width/2, 0,0]) + cube([bayonet_width, attachment_od, attachment_height]); + } + intersection(){ + cylinder(r=bayonet_od/2+bayonet_extra, h=attachment_height); + translate([0,0,bayonet_under]) + union(){ + translate([-bayonet_width/2, 0,0]) + cube([bayonet_width*4, attachment_od, bayonet_height]); + translate([bayonet_width/2, 0,-1.2]) + rotate([0,-10,0]) + cube([bayonet_width,attachment_od,bayonet_height]); + } + } + } + } + } + } +} + + +//To use: +// Put in same folder as 3m_bayonet.scad and in your file: +//use <3m_bayonet.scad> +3m_attachment();
A
models/esp_case.scad
@@ -0,0 +1,110 @@
+$fn = $preview ? 12 : 180; + +include <BOSL/constants.scad> +use <BOSL/threading.scad> +// https://www.thingiverse.com/thing:4246959/files by james_lan +use <3m_bayonet.scad> + +// dimensions of the esp +esp_w = 23; +esp_d = 19+4; +esp_h = 4; +// horizontal spacing between the case and the esp +esp_s = 3; +// vertical spacing between the lid and the esp +lid_s = 0.2; +// vertical spacing between the case and the esp for cable management +cable_s = 4; +// wall thickness of the case +wall_t = 2; +// screw cylinder wall thickness +screw_wall_t = 2; +inner_screw_t = 5; +screw_h = 16; +screw_p = 1.5; +//make sure that this is thicker then the diameter of a wall edge +//assert(screw_wall_t > sqrt(2*pow(wall_t,2)), "screw wall too thin, screw may intersect with the interiour of the case"); + +module esp_space(offset) { + cube([ + esp_w + esp_s + offset*2, + esp_d + esp_s + offset*2, + esp_h + lid_s + cable_s + offset + 0.001 + ]); +} + +module case() { + difference() { + esp_space(wall_t); + translate([wall_t,wall_t,wall_t + 0.001]) + esp_space(0); + translate([ + -0.001, + (esp_d + esp_s + wall_t*2)/2 - 5, + wall_t + cable_s + esp_h - 3 + ]) + cube([ + wall_t+0.002, 10, 3.5 + ]); + } +} + +a = (sqrt(2)*(screw_wall_t*2 + inner_screw_t)*0.25)-wall_t; +module threads(offset_x, offset_y){ + translate([offset_x,offset_y,-screw_h/2+esp_h + lid_s + cable_s + wall_t + 0.01]) + threaded_rod( + d=inner_screw_t, + l=screw_h, + pitch=screw_p, + left_handed=false, + internal=true + ); +} + +module screw_cylinder(offset_x, offset_y) { + translate([offset_x,offset_y,0]) + cylinder( + esp_h + lid_s + cable_s+wall_t, + d = screw_wall_t*2 + inner_screw_t + ); +} + +module 3m_bayonet(lid, offset){ + translate([ + (esp_w + esp_s + wall_t*2)/2, + (esp_d + esp_s + wall_t*2)/2, + offset//-7.9 + ]) + 3m_attachment(); +} + +difference() { + union() { + case(); + screw_cylinder(-a, -a); + //screw_cylinder(a+esp_w+esp_s+wall_t*2, -a); + //screw_cylinder(-a, a+esp_d+esp_s+wall_t*2); + screw_cylinder(a+esp_w+esp_s+wall_t*2, a+esp_d+esp_s+wall_t*2); + } + threads(-a, -a); + //threads(a+esp_w+esp_s+wall_t*2, -a); + //threads(-a, a+esp_d+esp_s+wall_t*2); + threads(a+esp_w+esp_s+wall_t*2, a+esp_d+esp_s+wall_t*2); + translate([ + (esp_w + esp_s + wall_t*2)/2, + (esp_d + esp_s + wall_t*2)/2, + -0.001//-7.9 + ]) + cylinder( + esp_h + lid_s + cable_s+wall_t, + d = 26 + ); +} + +translate([0,0,5]) +difference() { + 3m_bayonet(0,-5); + esp_space(wall_t); + +} +
A
models/esp_lid.scad
@@ -0,0 +1,53 @@
+$fn = $preview ? 18 : 360; + +include <BOSL/constants.scad> +use <BOSL/threading.scad> + +// dimensions of the esp +esp_w = 23; +esp_d = 19+4; +lid_h = 0.75 +; +// horizontal spacing between the case and the esp +esp_s = 3; +// wall thickness of the case +wall_t = 2; +// screw alignment wall thickness +screw_wall_t = 2; +inner_screw_t = 5; +//make sure that this is thicker then the diameter of a wall edge +//assert(screw_wall_t > sqrt(2*pow(wall_t,2)), "screw wall too thin, screw may intersect with the interiour of the case"); + +module case() { + module esp_space(offset) { + cube([ + esp_w + esp_s + offset*2, + esp_d + esp_s + offset*2, + lid_h + offset + 0.001 + ]); + } + esp_space(wall_t); +} + +a = (sqrt(2)*(screw_wall_t*2 + inner_screw_t)*0.25)-wall_t; +module screw_cylinder(d, h_diff, offset_x, offset_y) { + translate([offset_x,offset_y,-h_diff/2]) + cylinder( + lid_h + wall_t+h_diff, + d = d + ); +} + +difference() { + union() { + case(); + screw_cylinder(screw_wall_t*2 + inner_screw_t, 0, -a, -a); + //screw_cylinder(screw_wall_t*2 + inner_screw_t, 0, a+esp_w+esp_s+wall_t*2, -a); + //screw_cylinder(screw_wall_t*2 + inner_screw_t, 0, -a, a+esp_d+esp_s+wall_t*2); + screw_cylinder(screw_wall_t*2 + inner_screw_t, 0, a+esp_w+esp_s+wall_t*2, a+esp_d+esp_s+wall_t*2); + } + screw_cylinder(inner_screw_t, 0.01, -a, -a); + //screw_cylinder(inner_screw_t, 0.01, a+esp_w+esp_s+wall_t*2, -a); + //screw_cylinder(inner_screw_t, 0.01, -a, a+esp_d+esp_s+wall_t*2); + screw_cylinder(inner_screw_t, 0.01, a+esp_w+esp_s+wall_t*2, a+esp_d+esp_s+wall_t*2); +}