diff --git a/pcb/10W/TransportProtection.scad b/pcb/10W/TransportProtection.scad index d1696517963d177d130728af25b2f8ad8f019793..3de154f8580e13890149641adba0092be79a2f48 100644 --- a/pcb/10W/TransportProtection.scad +++ b/pcb/10W/TransportProtection.scad @@ -1,5 +1,6 @@ -use <../WebWeaver/scad/Util.scad>; +use <../../WebWeaver/scad/Util.scad>; + $fs = 0.5; @@ -12,6 +13,7 @@ pcb_h = 67.5; pcb_r = 5; // edge radius pcb_off = 0.4; pcb_t = 5; // thickness including LED and inductor +pcb_sc_off = 5; // offset of screw holes from edge pcb_conn_w = 20; pcb_conn_h = 3; @@ -32,11 +34,13 @@ module pcb(w=pcb_w, h=pcb_h, r=pcb_r, off=pcb_off) { } } + module pcbBox(wi, hi, ri, _str) { linear_extrude(hi) pcb(); } + module body(wi, hi, ri, _str) { difference() { pcbBox(wi, hi, ri, _str); @@ -44,4 +48,25 @@ module body(wi, hi, ri, _str) { } } -body(pcb_w, pcb_h, pcb_r, pcb_off); + +module PCBMockUp(w=pcb_w, h=pcb_h, r=pcb_r, off_xy=pcb_sc_off) { + + w2 = w / 2; + h2 = h / 2; + + color([0.1, 0.1, 0.1], 1.0) difference() { + roundRect(w, h, r, true, true); + + for (tx=[-w2 + off_xy, w2 - off_xy], ty=[-h2 + off_xy, h2 - off_xy]) translate([tx, ty, 0]) circle(d=3.2); + } +} + + + +// body(pcb_w, pcb_h, pcb_r, pcb_off); + +PCBMockUp(); + + + +