screw_tolerance=0.1; slide_tolerance=.3; play_tolerance=.8; draft=true; use ; assembly_height = 49.5; // the height of e3d chimera assembly in e3dchimera.scad hs_nozzles_from_back = 6; // the distance from nozzles from the back of the heatsink hs_size = [30,18,30]; // the heatsink size mounting_holes_from_top = [ // the offsets of mounting holes on the back [0, 20], [-4.5,10], [4.5,10] ]; mounting_holes_on_top = [ // the offsets of mounting holes on the top [0,-3], [-17/2,9], [17/2,9] ]; feeds_apart = 18; // the distance between nozzles (and, therefore filament feeds) feed_shell_d = 17; // the shell diameter around filament feed, pushfit's diameter screw_shell_d = 8; // the shell diameter around screws thread_h = 10.5; // the height of the pushfit's thread hinge_s = 6; // hinges thickness screwhead_d = 5.5; // the diameter of the screw head screwhead_h = 3; // the height of the screw head ms_size = [19.8,6,10]; // microswitch dimensions ms_screws_apart = 9.5; // distance between microswitch mounting screws ms_switch_offset = 2.5; // the offset of the switch from the center ms_bump = ms_size[1]; // how far from hinge microswitch is mounted lower_by = 15; // lower hotend from the original intention by this long gap = 5; // gap between microswitch and heatsink ps_offset = 3+3; // pushscrew offset from the hinge back_thickness = 8; // thickness of the part behind the hinge nut_thickness = 2.5; // intelligent guess should suffice nut_width = 5.5; // intelligent guess should suffice link_thickness=3; // thickness of link holder protrusion link_or=3.5; // link outer diameter link_ir=1.5; // link inner diameter use ; /* the internal thread for e3d bowden coupling: http://e3d-online.com/E3D-v6/Spares/Threaded-Bowden-Coupling-1.75mm-Filament */ module pushfit_thread(h=thread_h) { thr = 3/8 + .5/25.4; slit = 25.4*thr/2 + 0.4; translate([0,0,-1]) if(draft) cylinder(d=thr*25.4,h=h+2); else english_thread(diameter=thr,threads_per_inch=28,length=(h+2)/25.4,internal=true); translate([-2,-slit,-1]) cube([4,slit,h+2]); } sff = hs_nozzles_from_back+gap; // switch from feeds hff = sff+ms_size[1]+ms_bump+thread_h/2; // hinges from feeds module holder() { translate([0,0,0]) difference() { union() { hull() { rs = 3; drs = screw_shell_d/2-rs; rf = 6; drf = feed_shell_d/2-rf; for(sx=[-1,1]) translate([sx*feeds_apart/2,0,0]) { translate([0,0,drf]) cylinder(d=feed_shell_d,h=thread_h-drf,$fn=60); cylinder(r=rf,h=thread_h,$fn=30); } for(mhot = mounting_holes_on_top) translate([mhot[0],mhot[1],0]) { translate([0,0,drs]) cylinder(d=screw_shell_d,h=thread_h-drs,$fn=30); cylinder(r=rs,h=thread_h,$fn=30); } } difference() { hx0 = max(mounting_holes_on_top[1][1],mounting_holes_on_top[2][1])+screw_shell_d/2; hull() { for(ls=[-1,1]) translate([0,hx0+ls*link_or,thread_h+ls*link_or]) rotate([0,90,0]) cylinder(r=link_or,h=link_thickness,center=true,$fn=30); } translate([0,hx0+link_or,thread_h+link_or]) rotate([0,90,0]) cylinder(r=link_ir,h=link_thickness+2,center=true,$fn=30); } // difference hull() { translate([0,0,thread_h/2]) cube(size=[hs_size[0]-2*hinge_s-2*slide_tolerance,feed_shell_d,thread_h],center=true); translate([0,-hff,thread_h/2]) rotate([0,90,0]) cylinder(d=thread_h,h=hs_size[0]-2*hinge_s-2*slide_tolerance,center=true,$fn=60); } }//union for(sx=[-1,1]) translate([sx*feeds_apart/2,0,0]) pushfit_thread(); for(mhot = mounting_holes_on_top) translate([mhot[0],mhot[1],0]) { translate([0,0,-1]) cylinder(d=3,h=thread_h+2,$fn=12); // TODO: sink heads translate([0,0,thread_h/2]) cylinder(d=screwhead_d+slide_tolerance,h=thread_h/2+1,$fn=30); } // hinge translate([0,-hff,thread_h/2]) rotate([0,90,0]) cylinder(d=3+slide_tolerance,h=hs_size[0],center=true,$fn=12); // push screw hull() for(oy=[-1,1]) translate([0,-hff+ps_offset+oy,-1]) cylinder(d=3+play_tolerance,h=thread_h+2,$fn=30); // tune screw translate([0,-sff-ms_size[1]/2,-1]) cylinder(d=3,h=thread_h+2); }//difference } module base() { us = ms_size[2]+screw_shell_d/2; translate([0,-hff,0]) difference() { union() { for(sx=[-1,1]) translate([sx*(hs_size[0]-hinge_s)/2,0,0]) hull() { translate([0,0,thread_h/2]) rotate([0,90,0]) cylinder(d=thread_h,h=hinge_s,center=true,$fn=60); cube(size=[hinge_s,thread_h,thread_h],center=true); translate([-hinge_s/2,0,-1]) mirror([0,1,0]) cube(size=[hinge_s,thread_h/2+back_thickness,thread_h+1]); } // hull for hull() { translate([0,0,-us/2-slide_tolerance]) cube(size=[hs_size[0],thread_h+1,us],center=true); for(sx=[-1,1]) translate([sx*(hs_size[0]/2-ms_bump),thread_h/2,-us-slide_tolerance]) cylinder(r=ms_bump,h=us+slide_tolerance,$fn=30); } translate([-hs_size[0]/2,-thread_h/2-slide_tolerance,-us-slide_tolerance]) mirror([0,1,0]) cube(size=[hs_size[0],back_thickness,us+slide_tolerance+thread_h]); } // union translate([0,0,thread_h/2]) rotate([0,90,0]) cylinder(d=3+screw_tolerance,h=hs_size[0]+2,center=true,$fn=12); for(smx=[0,1]) mirror([smx,0,0]) translate([hs_size[0]/2+1,0,thread_h/2]) rotate([0,-90,0]) cylinder(d=screwhead_d+slide_tolerance,h=screwhead_h+1,$fn=30); /* changed my mind; for(srx=[-1,1]) rotate([srx*15,0,0]) translate([0,0,thread_h/2-slide_tolerance]) cube(size=[hs_size[0]-2*hinge_s,thread_h*sqrt(2)+2,thread_h],center=true); */ // switch mount for(sx=[-1,1]) translate([sx*ms_screws_apart/2+ms_switch_offset,thread_h/2,-ms_size[2]]) rotate([90,0,0]) cylinder(d=2.5,h=ms_size[1]*2,center=true,$fn=12); // thing mount translate([0,-thread_h/2-back_thickness,lower_by]) for(mhft = mounting_holes_from_top) translate([mhft[0],0,-mhft[1]]) { rotate([-90,0,0]) translate([0,0,-1]) cylinder(d=3,h=back_thickness+1); translate([0,back_thickness/2,0]) cube(size=[2*hs_size[0],nut_thickness+slide_tolerance,nut_width+slide_tolerance],center=true); } // translate for mirror([0,0,1]) translate([0,ps_offset,-1]) cylinder(d=3,h=hs_size[2]+1); mirror([0,0,1]) translate([0,-thread_h/2+3/2,-1]) cylinder(d=3,h=us+2); } // difference } view="*"; if(view=="holder") { holder(); }else if(view=="base") { base(); }else { % translate([0,0,-assembly_height]) chimera_assembly(); color("lightgreen",0.7) holder(); color("darkgreen",0.7) base(); }