Skip to content
Snippets Groups Projects
Commit f482acaf authored by fxk8y's avatar fxk8y :spider:
Browse files

Adding PCB mockup…

parent 715f0557
No related branches found
No related tags found
No related merge requests found
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();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment