// OpenSCAD script // contactor cover $th=3; // wall thickness $thc=$th+3; // cube cover vs cylinder overlap $diasm=52.5; // inner diameter of smaller cylinder $lensm=20; // length of smaller cylinder $dialg=60; // inner diameter of larger cylinder (+2mm reserve) $lenlg=16; // length of larger cylinder (+3m reserve) $smlggap=2; // gap between small and large cylinder, to facilitate clamping $diasmclamp=2; // overlap of the clamp, on each side, keep large enough to not fall off and small enough to not crack when snapping on $coverw=65; // inner width of the cover cube $coverh=60; // inner height of the cover cube $coverl=45; // inner length of the cover cube $covertopw=50; // width of the top flat area over the clamp/cylinder $holedia=4; // diameter of hole in clamps $holeoffs=1; // offset of hole above the small cylinder $padlen=$holedia+$holeoffs+3; // length of clamp pads, in addition to small cylinder radius $fa=2;$fs=0.5; module contactorbody() { cylinder(r=$diasm/2,h=$lensm); translate([0,0,$lensm])cylinder(r=$dialg/2,h=$lenlg); translate([-$coverw/2,-$coverh/2,$lensm+$lenlg]) cube([$coverw,$coverh,$coverl]); translate([-$dialg/2,-$dialg/2-$th*2,$lensm]) cube([$dialg,$dialg/2+$th*2,$lenlg]); $padl=$diasm/2+$padlen+2+$th*5; translate([-$diasm/2+$diasmclamp,-$padl,0]) cube([$diasm-$diasmclamp*2,$padl,$lensm]); translate([-$diasm/2-$th,-($diasm/2+$holedia/2+$holeoffs),$lensm/2-$smlggap/2]) rotate([0,90,0]) cylinder(r=$holedia/2,h=$diasm+$th*2); } module contactorcover() { cylinder(r=$diasm/2+$th,h=$lensm-$smlggap); translate([0,0,$lensm])cylinder(r=$dialg/2+$th,h=$lenlg); translate([-$coverw/2-$th,-$coverh/2,$lensm+$lenlg-$thc]) cube([$coverw+2*$th,$coverh+$th,$coverl+$thc+$th]); translate([-$covertopw/2,0,0]) cube([$covertopw,$coverh/2+$th,$lensm+$lenlg]); $padl=$diasm/2+$padlen+2; translate([-$diasm/2+$diasmclamp-$th,-$padl,0]) cube([$diasm-$diasmclamp*2+$th*2,$padl,$lensm-$smlggap]); } //holder(); //translate([$lensm+$lenlg,-$cubew/2-$th,-$cubeh/2])cover(); module showcover(){ difference(){ contactorcover(); contactorbody(); // translate([-$coverw/2-$th*2,-$coverh/2-$th*2,0])cube([$coverw+4*$th,$coverh+4*$th,10]); translate([-$coverw/2-$th*2,-$coverh/2-$th*2,$lensm])cube([$coverw+4*$th,10,$coverh+4*$th]); } } //showcover(); translate([0,50,$coverh/2+$th])rotate([90,180,0])showcover(); // pads $pth=0.3;$pdia=25; translate([25,50,0])cylinder(d=$pdia,h=$pth); translate([-25,50,0])cylinder(d=$pdia,h=$pth); translate([35,-34,0])cylinder(d=$pdia,h=$pth); translate([-35,-34,0])cylinder(d=$pdia,h=$pth);