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

Beginning case design :heart_eyes:

parent 5ffb4bd8
No related branches found
No related tags found
No related merge requests found
use <PCB.scad>;
use <../../WebWeaver/scad/Util.scad>; // TODO: needed?
$fs = 0.5;
$fa = 1.0;
// spam… eggs…
$str = 3;
$E = 0.001;
module CyanStripeCase() {
}
CyanStripeCase();
if ($preview) {
pcb3D();
}
use <../../WebWeaver/scad/Util.scad>;
$fs = 0.35;
$fa = 2 * $fs;
$str = 3;
$E = 0.01; // ε
pcb_t = 1.6;
pcb_w = 75.5;
pcb_h = 65.0;
pcb_edge_r = 3;
M3 = 3.2;
// x is all the same and y is +- 18.5 and 0 as there are three of them
terminals_x = 28.75;
terminals_y = 18.50;
// co = cut-out
co_w = 6.1;
co_h = 18.0;
co_x = -34.7;
co_y = -8.6;
module pcbScrewHoles(tz=0) {
for (tx=[-32.75, 5.75], ty=[-27.5, 27.5]) translate([tx, ty, tz]) children();
}
module pcbOutline() {
difference() {
roundRect(pcb_w, pcb_h, pcb_edge_r, center=true);
pcbScrewHoles() circle(d=M3);
translate([co_x, co_y, 0]) square([co_w + $E, co_h], center=true);
}
}
module pcb3D(pcb_t=pcb_t) {
color([170 /255, 0, 200 /255])
linear_extrude(pcb_t)
pcbOutline();
if ($preview)
pcbScrewHoles()
color("grey")
difference() {
translate([0, 0, -$E]) cylinder(d=M3*2, h=pcb_t+2*$E);
translate([0, 0, -$E*2]) cylinder(d=M3-$E, h=pcb_t+4*$E);
}
}
pcb3D();
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