Files
whipsaw/cw.scad

173 lines
3.8 KiB
OpenSCAD
Raw Normal View History

2023-12-28 12:51:55 -05:00
include <BOSL/constants.scad>
use <BOSL/masks.scad>
use <BOSL/transforms.scad>
use <BOSL/shapes.scad>
use <BOSL/joiners.scad>
use <inserts/inserts.scad>
use <./bobbin.scad>
/* [Options] */
Height = 90;
Gap = 47;
/* [Design] */
N = 2;
Epk = 3769.91;
F = 21750;
2023-12-31 20:22:30 -05:00
Cpf = 82.5;
2023-12-28 12:51:55 -05:00
Vf = 6*3.5;
Io = .0001;
/* [Mount Stands] */
Mount_Hole_D = 4.36;
Mount_X = 74.38;
Mount_Y = 89.24;
BOX_WALL = 1.5;
/* [Bolt Lengths] */
Bolt_Length = 16;
Bolt_Offset = 0;
/* [Render Options] */
render_fs=.3;
render_fn=0;
render_fa=.3;
// Set Render Options
$fs= ($preview) ? $fs : render_fs;
$fn= ($preview) ? $fn : render_fn;
$fa= ($preview) ? $fa : render_fa;
zclear=2;
bolthead=7;
module print_specs() {
2023-12-31 20:22:30 -05:00
C = Cpf * 10^-12;
2023-12-28 12:51:55 -05:00
ENL = 2*N*Epk - 2*N*Vf;
VSLOPE = (4*N^3 + 3*N^2 - N) / (2 * PI * F * C);
2023-12-28 17:52:01 -05:00
cwvol = 54*PI*(45/2)^2;
gvol = 54*((9/2)^2 * PI + 10 * 9);
fvol = 40*38*7;
tvol = (2*cwvol + gvol + fvol)/1000;
2023-12-28 12:51:55 -05:00
echo("Eout = ", ENL);
echo("VSLOPE = ", VSLOPE);
echo("VDrop = ", VSLOPE * Io);
2023-12-31 20:22:30 -05:00
echo("Vout = ", ENL - VSLOPE * Io);
2023-12-28 17:52:01 -05:00
echo("Inner Volume: ", tvol, "mL");
2023-12-28 12:51:55 -05:00
}
module terminal(bl=Bolt_Length, bz=Bolt_Offset-Bolt_Length, align=V_BOTTOM, orient=ORIENT_Z) {
orient_and_align([5,5,5.56], orig_align=V_BOTTOM, align=align, orient=orient) {
thread_insertM3(bl=bl, bz=bz);
}
}
//
print_specs();
module terminal_mount(bl=Bolt_Length, bz=Bolt_Offset, be=2) {
basez=8;
difference() {
union() {
hull() xspread(n=3, l=Gap+bolthead) {
cyl(l=.4+bl+be, d=16,align=V_TOP);
}
cuboid([(Gap+bolthead+18),18,1],align=V_TOP);
}
up(bl+7+be) rotate([45,0,0]) fillet_mask_x(l=50,r=16,align=V_CENTER);
xspread(n=2, l=Gap+bolthead) {
up(basez) cyl(l=bl, d=18,align=V_TOP);
terminal(bl=bl, align=V_TOP, orient=ORIENT_ZNEG, $die=true);
}
terminal(bl=bl, align=V_TOP, orient=ORIENT_ZNEG, $die=true);
up(basez)cuboid([18,18,bl],align=V_TOP);
}
xspread(n=3, l=Gap+bolthead) {
%terminal(bl=bl, align=V_TOP, orient=ORIENT_ZNEG);
}
}
module terminal_mount_input(bl=Bolt_Length, bz=Bolt_Offset, be=2) {
basez=8;
difference() {
union() {
hull() xspread(n=2, l=(Gap+bolthead)/2) {
cyl(l=.4+bl+be, d=16,align=V_TOP);
}
cuboid([18+(Gap+bolthead)/2,18,1],align=V_TOP);
}
up(bl+7+be) rotate([45,0,0]) fillet_mask_x(l=50,r=16,align=V_CENTER);
xspread(n=2, l=(Gap+bolthead)/2) {
up(basez) cyl(l=bl, d=18,align=V_TOP);
terminal(bl=bl, align=V_TOP, orient=ORIENT_ZNEG, $die=true);
}
}
xspread(n=2, l=(Gap+bolthead)/2) {
%terminal(bl=bl, align=V_TOP, orient=ORIENT_ZNEG);
}
}
module cap_bottom() {
difference() {
union() {
hull() xspread(n=2,l=54) cyl(d=49,l=4, align=V_TOP);
fwd(30.4)cuboid([22+(Gap+bolthead)/2,22,4],align=V_TOP);
}
up(2)difference() {
hull() xspread(n=2,l=54) cyl(d=47,l=2, align=V_TOP);
xspread(n=2, l=54)
cyl(d=41,l=2,align=V_TOP);
}
up(4)xspread(n=2, l=54) cyl(d=35, l=4);
up(2)fwd(30.4)cuboid([18.2+(Gap+bolthead)/2,18.2,7],align=V_TOP);
}
}
module cap_top() {
difference() {
hull() xspread(n=2,l=54) cyl(d=49,l=4, align=V_TOP);
difference() {
hull() xspread(n=2,l=54) cyl(d=47,l=2, align=V_TOP);
xspread(n=2, l=54)
cyl(d=41,l=2,align=V_TOP);
}
xspread(n=2, l=54) cyl(d=35, l=4);
up(2) cuboid([60,15,2],align=V_TOP);
}
up(2)terminal_mount();
}
%up(Height)terminal_mount();
up(7) fwd(30.4) {
terminal_mount_input();
difference() {
back(0)cuboid([18+(Gap+bolthead)/2,18,7],align=V_BOTTOM);
back(1)cuboid([16+(Gap+bolthead)/2,16,7],align=V_BOTTOM);
}
}
up(90)color("red") cap_top();
down(2)color("red") cap_bottom();
difference() {
union() {
hull() xspread(n=2,l=54) cyl(d=45,l=Height, align=V_TOP);
}
up(6)rotate_extrude(angle=360) left(10) {
circle(r=7);
left(5)fwd(15)square(15);
}
down(1) fwd(5) hull() yspread(n=2, l=10) cyl(d=9,l=Height+2,align=V_TOP);
down(1)xspread(n=2, l=54)
cyl(d=42,l=Height+2,align=V_TOP);
fwd(19) cuboid([40,38,7],align=V_TOP);
}