// allviews holder holdfan conduct elecfan washer // testviews test-elecfan test-conduct include include <../cadlib.h> len=70; height=15; thick=3; holex=12.5; holey=9; fanh=52; sensor_r=9.5; sensor_w=31; module conduct(off){ len=31; dep=-4.5; width_in=10.5+off; pathout=[[0,0],[len,dep],[len,0],[0,20],[0,0]]; pathin=[[0,0.5],[len,dep+0.5],[len,-0.5],[0,19.5],[0,0.5]]; translate([2,-10-off,0]) rotate([90,0,180]) difference(){ union(){ linear_extrude(width_in+1){ polygon(pathout); } // Poteau translate([8,-0.5,10+off]) rotate([0,-20,0]) difference(){ cube([3,10+height,8]); translate([-2,10+4+height/2,4]) rotate([0,90,0])cylinder(r=2,h=10+1,$fn=40); } // Plaque avant pour bloquer l'air translate([8,0,0]) cube([0.5,31,width_in+1]); } union(){ translate([0,0,0.5]) linear_extrude(width_in){ polygon(pathin); } translate([-1,-1,1/2]) cube([8+1,21,width_in]); } } // Coté gauche angle=asin(5/35); translate([0,-10-off,0]) rotate([0,-angle,0]) cube([30,0.5,15]); } module holdfan(){ difference(){ ray=35/2; cube([40,3,fanh]); union(){ translate([ray+2,0,fanh-4-ray]) rotate([-90,0,0]) cylinder(r=ray,h=5); *translate([-5,5,10+ray*2+2]) rotate([90,0,0]) cube([30,40,3*thick]); translate([30,0,2]) rotate([-90,0,0]) cylinder(r=1,h=100); translate([4,0,fanh-2]) rotate([-90,0,0]) cylinder(r=1,h=100); } } translate([-4,0,30]) cube([4,3,fanh-30]); translate([-3,1.5,0]) cylinder(r=1.8,h=fanh); } module holder(){ difference(){ union(){ translate([5,0,0]) cube([len+15-5,thick,height]); translate([-4,1.5,0]) 3darc (17.85/2+thick,thick,height,120,360); *translate([0,-sensor_w,height-3]) difference(){ cube([sensor_w,sensor_w,3]); translate([sensor_w/2,sensor_w/2-3+9,0]) cylinder(r=sensor_r,h=3); } *translate([len-8,-2,0]) difference(){ cylinder(r=3,h=height); cylinder(r=2,h=height); //cube([thick,thick,fanh-22]); //rotate([0,0,-60]) holdfan(); } } union(){ translate([len/2-holex/2,0,3]) cube([holex,4,holey]); translate([len/2+20,0,height/2]) rotate([-90,0,0]) cylinder(r=2,h=4); translate([len/2-20,0,height/2]) rotate([-90,0,0]) cylinder(r=2,h=4); } } } // Fan to cool down the electronic on EG-SRIB printer module elecfan(){ width1=12; width2=40; height1=92; height2=60; thick=3; holer=2.2; difference(){ cube([width1,height1,thick]); union(){ translate([5.5,5.5,-1]) cylinder(r=holer,h=thick+2,$fn=20); translate([5.5,height1-5.5,-1]) cylinder(r=holer,h=thick+2,$fn=20); translate([5.5,height1-5.5-38,-1]) cylinder(r=holer,h=thick+2,$fn=20); translate([5.5,height1-5.5-50,-1]) cylinder(r=holer,h=thick+2,$fn=20); translate([-10,height1-23,0]) cylinder(r=18,h=thick+2,$fn=20); } } translate([width1,0,0]){ difference(){ cube([width2,height2,thick]); translate([30,38,-1]) cylinder(r=holer,h=thick+2,$fn=20); translate([12,38,-1]) cylinder(r=3,h=thick+2,$fn=20); translate([12,6.5,-1]) cylinder(r=3,h=thick+2,$fn=20); } } } module main_view(view){ if (view=="washer"){ difference(){ cube([12,12,3]); translate([6,6,0]) union(){ translate([0,0,1]) cylinder(r=3.5,h=3,$fn=20); cylinder(r=2.2,h=3,$fn=20); } } }else if (view=="elecfan"){ elecfan(); }else if (view=="test-elecfan"){ intersection(){ cube([100,100,0.35]); elecfan(); } }else if (view=="holder"){ translate([0,0,height]) rotate([0,180,0]) holder(); }else if (view=="holdfan"){ translate([0,0,0]) rotate([90,0,0]) holdfan(); }else if (view=="conduct"){ angle=asin(5/35); off=0.1; difference(){ union(){ translate([0,0,0.25]) rotate([0,angle,0]) conduct(off); // Support sous poteau attache translate([-9,1,0]) cube([6,8,1]); // Plancher translate([-46,-10-off,0]){ cube([76,0.5,1]); cube([70,11.5+off,1]); } // Plancher translate([25,-10-off,0]) cube([15,11.5+off,1]); // Coté droit translate([-6,1,0]) cube([36,0.5,15]); } translate([36-14,2,5]) rotate([90,0,0]) cylinder(r=2,h=13+off,$fn=40); } }else if (view=="test-conduct"){ translate([0,0,0]) conduct(0); translate([0,25,0]) conduct(1); } }