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

Merge branch 'master' of git.services.c3pb.de:fxk8y/CyanLight

parents bc977b66 68fc2ab0
No related branches found
No related tags found
No related merge requests found
use <PCB.scad>;
use <Material.scad>;
use <../../WebWeaver/scad/Util.scad>; // TODO: needed?
......@@ -15,9 +16,22 @@ plexi = 3;
c_sx = pcb_w() + 0;
c_sy = pcb_h() + 0;
c_sz = 20;
c_fs = 15; // frontSpace = pcb to upper plexi
module frontPlexiOutline() {
}
module frontPlexi() {
Plexiglass()
linear_extrude(plexi, convexity=20)
frontPlexiOutline();
}
module CyanStripeCase() {
......
module Plexiglass(alpha=0.1) {
color([0 /255, 0/255, 0/255], alpha=alpha) children();
}
module FR4(alpha=1.0) {
color([170 /255, 0, 200 /255], alpha=alpha) children();
}
module Solder(alpha=1.0) {
color("grey", alpha=alpha) children();
}
use <Material.scad>;
use <../../WebWeaver/scad/Util.scad>;
$fs = 0.35;
......@@ -53,20 +54,20 @@ module pcbOutline() {
}
module pcb3D(pcb_t=pcb_t()) {
color([170 /255, 0, 200 /255])
FR4()
linear_extrude(pcb_t())
pcbOutline();
if ($preview) {
pcbScrewHoles()
color("grey")
Solder()
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);
}
color("grey")
Solder()
translate([tpow_x(), tpow_y(), pcb_t() - $E])
cube([tpow_sx(), tpow_sy(), tpow_sz()], center=true);
}
......
$fs = 0.5;
$fa = 1.0;
pcb_w = 40.5;
pcb_h = 67.5;
pcb_r = 5; // edge radius
pcb_off = 0.4;
pcb_t = 5; // thickness including LED and inductor
_str = 2;
module pcb(w=pcb_w, h=pcb_h, r=pcb_r, off=pcb_off) {
_w = w + 2*off;
_h = h + 2*off;
_r = r + off;
hull() for (tx=[_r, _w-_r], ty=[_r, _h-_r]) translate([tx, ty, 0]) circle(r=r);
}
module pcb3D(w=pcb_w, h=pcb_h, r=pcb_r, off=pcb_off, _str=1.6) {
linear_extrude(_str, convexity=4) pcb(w, h, r, off);
}
module pcbBox(w=pcb_w, h=pcb_h, r=pcb_r, off=pcb_off, h=pcb_t, _str=_str) {
difference() {
pcb3D(w=w, h=h, r=r, off=off, _str=h);
translate([_str, _str, _str]) pcb3D(w=w-2*_str, h=h-2*_str, r=r, off=off, _str=h);
}
}
pcbBox();
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