// OpenSCAD script // Lightbulb Limiter, plug for 6mm holes in the chassis // 0.5mm first layer, 0.25mm layers $holedia=6.6; // outer plug diameter $holeindia=4.8; // inner plug diameter $holeinh=4; // depth of inner plug hole $outdia=10; // top diameter $outh=1; // top thickness $holeh=4; // plug length (in addition to top thickness) $gapth=0.5; // width of pad gap $clampw=2; // width of pad, spacing between pad gaps $wallth=2; // thickness of the wall (height of tooth bottom above top of top circle) $clamptooth=0.5; // length of the tooth $toothw=2; // width of the tooth $toothh=0.5; // height of the tooth $fa=2;$fs=0.5; module plug(){ cylinder(d=$outdia,h=$outh); difference(){ cylinder(d=$holedia,h=$outh+$holeh); translate([0,0,$outh+$holeh-$holeinh])cylinder(d=$holeindia,h=$holeinh+1); } } module plugclamp() { // left side tooth, bottom and top half translate([-$holedia/2-$clamptooth,-$toothw/2,$outh+$wallth]) cube([1,$toothw,$toothh]); translate([-$holedia/2-$clamptooth+$clamptooth/2,-$toothw/2,$outh+$wallth+$toothh]) cube([0.5,$toothw,$toothh]); // right side tooth, bottom and top half translate([$holedia/2-0.5,-$toothw/2,$outh+$wallth]) cube([0.5+$clamptooth,$toothw,$toothh]); translate([$holedia/2-0.5,-$toothw/2,$outh+$wallth+$toothh]) cube([0.5+$clamptooth/2,$toothw,$toothh]); difference(){ plug(); translate([-$outdia/2,$clampw/2,$outh])cube([$outdia,$gapth,$holeh+1]); translate([-$outdia/2,-$clampw/2-$gapth,$outh])cube([$outdia,$gapth,$holeh+1]); } } plugclamp();