//Disable $fn and $fa, do not change these $fn=0; $fa=0.01; $fs=0.5; d2=2.0; d3=3.0; t=2.0; overall_width=28.0; overall_height=70; prong_width=7.0; base_height=25; bearing_height=8.0; bearing_width=28; bearing_d=9.5; bearing_dpp=11; bearing_shift=10.1-t; bearing_t=bearing_d/2+bearing_shift+3*t; tie_t=2.0; tie_w=28.0; tie_h=7.0; wirex=9.7; wirey=2.5; d1=1.0; module whole(x,y,diameter) { translate([tie_w/2+x,tie_h/2+y,0])cylinder(d=diameter,h=tie_t); } module optie() { difference() { cube([tie_w,tie_h,tie_t]); whole(0,0,d2); whole(wirex/2,wirey/2,d1); whole(wirex/2,-wirey/2,d1); whole(-wirex/2,wirey/2,d1); whole(-wirex/2,-wirey/2,d1); } } blockd=25; blockt=8; blockw=18; blockh=5; // length of bolt hole block_tower=10; m3nh=3; m3nd=6.5; m3nw=6.5; module blockhole(x,y,z,x1,x2) { translate([x,y+blockh,z]) rotate([90,0,0]) { cylinder(d=d3,h=blockh); translate([-m3nw/2,-m3nd/2-x2,0])cube([m3nw,m3nd+x1,m3nh]); } } module blockslot(x,y,z,h) { translate([x-d3/2,y,z])cube([d3,blockh-m3nh,h]); } module block() { difference() { union() { cube([blockd,blockw,blockt]); translate([0,0,blockt])cube([blockd,blockw/2,block_tower]); } blockhole(blockd/3,0,blockt/2,20,0); blockhole(2*(blockd/3),0,blockt/2,20,0); blockhole(blockd/3,0,blockt/2+block_tower,20,0); blockhole(2*(blockd/3),0,blockt/2+block_tower,20,0); blockslot(blockd/3,0,blockt/2,block_tower); blockslot(2*(blockd/3),0,blockt/2,block_tower); translate([0,blockw,blockt])rotate([180,0,0])blockhole(blockd/3,0,blockt/2,20,20); translate([0,blockw,blockt])rotate([180,0,0])blockhole(2*(blockd/3),0,blockt/2,20,20); translate([blockd/2,block_shift,0])cylinder(d=bearing_dpp,h=20); } } pcbtie_d=6; pcbtie_w=46; pcbtie_h=66; pcbtie_margin=3; f3=5; ft=10; module pcbtie() { difference() { union() { cube([pcbtie_w+2*pcbtie_margin,pcbtie_d,t]); translate([pcbtie_margin,pcbtie_d/2,-ft])cylinder(h=ft,d=f3); translate([pcbtie_margin+pcbtie_w,pcbtie_d/2,-ft])cylinder(h=ft,d=f3); } translate([pcbtie_margin,pcbtie_d/2,-ft])cylinder(h=ft,d=d2); translate([pcbtie_margin+pcbtie_w,pcbtie_d/2,-ft])cylinder(h=ft,d=d2); } } solenoid_width=13; solenoid_x=(overall_width-solenoid_width)/2; solenoid_y=5.0; hole1_x=2.8; hole1_y=4; hole2_x=9.7; hole2_y=14; frame_hole1_x=3; frame_hole1_y=13; frame_hole2_x=3; frame_hole2_y=3; frame_hole3_x=overall_width-frame_hole1_x;; frame_hole3_y=13; frame_hole4_x=overall_width-frame_hole2_x; frame_hole4_y=3; frame_hole5_x=frame_hole1_x;; frame_hole5_y=30; frame_hole6_x=overall_width-frame_hole2_x; frame_hole6_y=30; frame_hole7_x=frame_hole1_x;; frame_hole7_y=40; frame_hole8_x=overall_width-frame_hole2_x; frame_hole8_y=40; frame_hole9_x=frame_hole1_x;; frame_hole9_y=70; frame_hole10_x=overall_width-frame_hole2_x; frame_hole10_y=70; module frame_hole(x,y,diameter) { translate([x,y,0])cylinder(h=t,d=diameter); } module frame() { union() { difference() { union() { difference() { cube([overall_width,overall_height,t]); translate([prong_width,base_height,0])cube([overall_width-2*prong_width,overall_height-base_height,t]); } translate([0,60,0]) cube([overall_width,10,t]); translate([-pcbtie_margin-d3,overall_height-pcbtie_h,0])pcbtie(); translate([-pcbtie_margin-d3,overall_height,0])pcbtie(); } frame_hole(solenoid_x+hole1_x,solenoid_y+hole1_y,d2); frame_hole(solenoid_x+hole2_x,solenoid_y+hole2_y,d2); frame_hole(frame_hole1_x,frame_hole1_y,d3); frame_hole(frame_hole2_x,frame_hole2_y,d3); frame_hole(frame_hole3_x,frame_hole3_y,d3); frame_hole(frame_hole4_x,frame_hole4_y,d3); frame_hole(frame_hole5_x,frame_hole5_y,d3); frame_hole(frame_hole6_x,frame_hole6_y,d3); frame_hole(frame_hole7_x,frame_hole7_y,d3); frame_hole(frame_hole8_x,frame_hole8_y,d3); frame_hole(frame_hole9_x,frame_hole9_y,d3); frame_hole(frame_hole10_x,frame_hole10_y,d3); } } translate([0,47.0,0])optie(); } module bearing() { difference() { union() { cube([overall_width,bearing_height,t]); translate([(overall_width-bearing_width)/2,0,0])cube([bearing_width,bearing_height,bearing_t]); } translate([(overall_width)/2,0,bearing_shift])rotate([-90,0,0])cylinder(h=bearing_t,d=bearing_d); translate([3,bearing_height/2,0])cylinder(h=bearing_t,d=d3); translate([overall_width-3,bearing_height/2,0])cylinder(h=bearing_t,d=d3); } } slot_width=overall_width; slot_t=t; slot_height=frame_hole10_y-frame_hole8_y+bearing_height; module slot_plate() { difference() { cube([slot_width,slot_height,slot_t]); translate([(slot_width-blockd)/2+blockd/3,bearing_height+d3/2,0])cylinder(d=d3,h=slot_t); translate([(slot_width-blockd)/2+(2*blockd)/3,bearing_height+d3/2,0])cylinder(d=d3,h=slot_t); translate([(slot_width-blockd)/2+blockd/3,slot_height-bearing_height-d3/2,0])cylinder(d=d3,h=slot_t); translate([(slot_width-blockd)/2+(2*blockd)/3,slot_height-bearing_height-d3/2,0])cylinder(d=d3,h=slot_t); translate([(slot_width-blockd)/2+blockd/3-d3/2,bearing_height+d3/2,0])cube([d3,slot_height-2*bearing_height-d3,slot_t]); translate([(slot_width-blockd)/2+(2*blockd)/3-d3/2,bearing_height+d3/2,0])cube([d3,slot_height-2*bearing_height-d3,slot_t]); translate([3,bearing_height/2,0])cylinder(d=d3,h=slot_t); translate([slot_width-3,bearing_height/2,0])cylinder(d=d3,h=slot_t); translate([3,slot_height-bearing_height/2,0])cylinder(d=d3,h=slot_t); translate([slot_width-3,slot_height-bearing_height/2,0])cylinder(d=d3,h=slot_t); } } //bearing(); frame(); translate([0,frame_hole8_y-bearing_height/2,25])slot_plate(); translate([0,frame_hole8_y-bearing_height/2,2]) bearing(); translate([0,frame_hole10_y-bearing_height/2,2]) bearing();