baseHeight=2; airChannelHeight=2; restHeight=1; chamberHeight=2; clipHeight=2; wallThickness = 2; cameraPCBLength = 18.5; cameraConnectorLength = 2.4; cameraHeadLength = 5; mountHole1DistanceFromRear=3; mountHole2DistanceFromRear=13; mountLength = 17; pcbSlopeAngle = 10; cameraHeadAngle = 85; $fn = 100; precision = 2; function sideHeight() = baseHeight + airChannelHeight + restHeight + chamberHeight + clipHeight; function mountHeight() = baseHeight + tan(pcbSlopeAngle) * mountLength; function cameraHeadTowerHeight() = (sin(cameraHeadAngle)*cameraHeadLength)+mountHeight(); function cameraHeadTowerWidth() = (cos(cameraHeadAngle)*cameraHeadLength)+wallThickness; module precision(){ translate([-precision/2,0,0]){ children(); } } module sidePCB(side){ union(){ difference(){ cube([wallThickness,mountLength,mountHeight()]); translate([0,0,baseHeight]){ rotate([pcbSlopeAngle,0,0]){ precision(){ cube([2+precision,25,mountHeight()]); } } } } translate([side,2,baseHeight-0.5]){ rotate([pcbSlopeAngle,0,0]){ cube([0.5,15,2]); } } } } module sideCameraHead(){ difference(){ cube([wallThickness,cameraHeadTowerWidth(),cameraHeadTowerHeight()]); translate([0,0,mountHeight()+wallThickness]){ rotate([cameraHeadAngle,0,0]){ precision(){ cube([2+precision,5,5]); } } } } } module sideSection(side){ union(){ sidePCB(side); translate([0,mountLength,0]){ sideCameraHead(); } } } module basePlate(){ difference(){ translate([-wallThickness*2.5,0,0]){ cube([wallThickness*6,mountLength+cameraHeadTowerWidth(),wallThickness]); } /* translate([wallThickness/2,mountLength+cameraHeadTowerWidth()-mountHole1DistanceFromRear,-1]){ cylinder(6,1); } translate([wallThickness/2,mountLength+cameraHeadTowerWidth()-mountHole2DistanceFromRear,-1]){ cylinder(6,1); } */ translate([wallThickness*2.5-0.3,mountHole1DistanceFromRear,-1]){ cube([2.4,2.4,4]); } translate([wallThickness*2.5-0.3,mountHole2DistanceFromRear,-1]){ cube([2.4,2.4,4]); } translate([-wallThickness*2.5-0.3,mountHole1DistanceFromRear,-1]){ cube([2.4,2.4,4]); } /* translate([-wallThickness*2.5-0.1,mountHole2DistanceFromRear,-1]){ cube([2,2,4]); }*/ } } module installationPins(){ translate([wallThickness*6-2+0.1,mountHole1DistanceFromRear,18]){ cube([1.9,1.9,4]); } translate([wallThickness*6-2+0.1,mountHole2DistanceFromRear,18]){ cube([1.9,1.9,4]); } translate([0,mountHole1DistanceFromRear,18]){ cube([1.9,1.9,4]); } } module installationHelper(){ union(){ cube([wallThickness*6,mountLength+cameraHeadTowerWidth(),20]); installationPins(); /* translate([0,mountHole2DistanceFromRear,18]){ cube([2,2,4]); } */ } } module cameraHolderAssembly(){ difference(){ union(){ for (i=[-1.2,1.2]){ translate([i*wallThickness,0,0]){ sideSection(-0.25+(1+i*0.62)); } } basePlate(); } //I could put an indentation in for the camera head! translate([wallThickness,mountLength+1,mountHeight()+wallThickness+0.5]){ rotate([cameraHeadAngle,0,0]){ precision(){ cylinder(6,2.4,2.4); } } } } } module clip(direction){ rotate([90,0,direction]){ polygon([[0,0],[0.5,0],[0.5,6],[-0.5,4],[0,3.5]]); } } cameraHolderAssembly(); /* translate([-20,0,0]){ cameraHolderAssembly(); } */