Files
whipsaw/electrodes.scad

88 lines
1.9 KiB
OpenSCAD
Raw Normal View History

include <BOSL/constants.scad>
use <BOSL/transforms.scad>
use <BOSL/shapes.scad>
use <BOSL/joiners.scad>
use <inserts/inserts.scad>
/* [Options] */
LegLength=30.40;
LegDiameter=16;
BoltDiameter=7.06;
CoreGap=0;
YokeHeight = 12.14;
YokeLen=20.00;
ConThick = 12;
ConWidth = 15;
SlideClear=.2;
/* [Render Options] */
render_fs=.1;
render_fn=0;
render_fa=.1;
// Set Render Options
$fs= ($preview) ? $fs : render_fs;
$fn= ($preview) ? $fn : render_fn;
$fa= ($preview) ? $fa : render_fa;
// Channel
ChanWidth = LegDiameter+2*SlideClear;
ChanHeight = YokeHeight + SlideClear;
ChanLen = LegDiameter/2;
echo("ChanWidth:", ChanWidth);
BobbinLen = 2*ConThick + 2*(LegLength-YokeHeight);
module snaps(ld=LegDiameter, ll=LegLength, lb=12.14, tg=CoreGap, lc=.15, t=.4, sn=NumberCoils+1, st=.6, sd=50) {
bl=2*(ll-lb) + tg;
inner=ld+2*lc;
outer=inner+2;
//conNeck = 5;
//conHead = 5;
conThick = 12;
conWidth = 15;
pinLen = 2* conThick + bl;
// connector
// left(inner/2+(conNeck+conHead)/2)
yflip_copy() back((pinLen-conThick)/2) {
half_joiner2(h=conWidth,
w=conThick,l=conThick/2,orient=ORIENT_X);
left(10)cube([conThick,conThick,conWidth], center=true);
right(10)cube([conThick,conThick,conWidth], center=true);
}
}
module channel(l=ChanLen,w=ChanHeight, h=ChanWidth) {
half_joiner_clear(h=ConWidth,w=ConThick,l=ConThick/2,orient=ORIENT_XNEG);
fwd(.5)leftcube([l+8+.2,w+2+14,h]);
}
module slide(cl=ChanLen, cw=ChanWidth, ch=ConWidth, frontLen=25, w=2) {
bl=ChanLen + frontLen;
difference() {
union() {
fwd(w+.2+2) left(cl+8) rightcube([bl+8, cw+4, cw+2*w]);
}
channel();
fwd(4+ConThick/2) right(frontLen/2) rotate([0,-90,0]) {
thread_insertM25(bl=30, bz=-30, $die=true);
up(3)cylinder(d=7, h=10);
}
}
half_joiner2(h=ConWidth,w=ConThick,l=ConThick/2,orient=ORIENT_XNEG);
}
//yflip_copy() fwd(7) zflip_copy() down(10)
//yflip_copy() fwd((ConWidth+BobbinLen)/2+2)
yflip_copy() fwd(7) rotate([0,90,0])
slide();