Commit fbebbfc7 by Ben

Minor changes

parent 37c30e5a
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();
}
*/
//import("/Users/bensenior/Downloads/wwgc_manufacturers_kit_v2.2/Google Cardboard IO 2015 Technical Drawings/Viewer - Body.dxf");
use<CameraHolder.scad>;
//TODO : Animation exposes a "denk fehler" with centering the objects. Don't do this. May require a rethink! Try setting $t=0!
//We shouldn't have started on the face, but on the furthest tip... perhaps not have used center either... use same transitions for folding as for not folding, but try to figure out how to fold around the pivot. Basically, the recursive nature of the system should mean that everything beyond each fold is also moved as a sheet, and it continually curls up one fold at a time (unless we have multiple at a level, e.g. to start folding the camera cable chamber early).
//What will come out of this will be an instructional video,
//...where I just have to put a voice over onto it, and perhaps, some camera zoom positions.
//cardboard depth
cDepth=1;
unitWidth=135; //Change me to make the headset wider
unitHeight=75;
unitDepth=30; //Change me to win more room for camera length/hub width
topHollowDepth=10; //Change me for more height to house usb hub and connectors
perforationWidth=3;
perforationHeight=0.3;
bottomHollowDepth=12; //Change me to make room for more cable bend
pd=64;
cableHoleRadius=4;
cameraSlitWidth=1;
cameraSlitLength=8;
cableChannelWidth=15;
noseFactor=7;
IRledHoleRadius=1.5;
cableOutHoleRadius=5;
folded = false;
$t = 1 ;
$fn = 100;
mountHole1DistanceFromRear=3;
mountHole2DistanceFromRear=13;
/*
colour1="red";
colour2="green";
colour3="yellow";
colour4="pink";
*/
colour1="cyan";
colour2="cyan";
colour3="cyan";
colour4="cyan";
module perforation(){
square([perforationWidth,0.3]);
}
module perforatedLine(adjust){
//Interleave perforations
n = floor(unitWidth/perforationWidth)-2;
translate([(-unitWidth/2)+adjust[0]+perforationWidth,0+adjust[1],0+adjust[2]]){
for (i = [0:2:n-1]){
translate([perforationWidth*i,0]){
perforation();
}
}
}
}
module f1(){
color(colour1){
difference(){
square([unitWidth,unitHeight],center=true);
for (i=[-1,1]){
translate([i*unitHeight/3,0,0]){
circle(unitHeight/2.6);
}
}
mark("f1",-1);
}
}
}
module t1(){
color(colour2){
difference(){
square([unitWidth,unitDepth],center=true);
translate([unitWidth/2-unitDepth/2-5,0,0]){
circle(cableOutHoleRadius);
}
rotate([0,180,0]){
translate([-30,0,0]){
mark("t1 - EyeSkills.org",side=1);
}
}
}
}
}
module t2(){
color(colour3){
difference(){
square([unitWidth,topHollowDepth],center=true);
mark("t2");
}
}
}
module t3(){
color(colour1){
difference(){
square([unitWidth,unitDepth-cDepth*2],center=true);
//cable channel
translate([unitWidth/2+cDepth-cableChannelWidth,topHollowDepth/2-cableChannelWidth/2+cDepth+cDepth,0]){
square([cableChannelWidth,cableChannelWidth]);
}
circle(IRledHoleRadius);
mark("t3",-1);
}
}
}
module t4(){
color(colour2){
difference(){
square([unitWidth,topHollowDepth],center=true);
mark("t4");
}
}
}
module b1(){
color(colour3){
difference(){
square([unitWidth,unitDepth],center=true);
polygon([
[10,unitDepth/2-10],
[unitWidth/noseFactor,-unitDepth/2-cDepth],
[-unitWidth/noseFactor,-unitDepth/2-cDepth],
[-10,unitDepth/2-10]
]);
mark("b1");
}
}
}
module b2(){
color(colour4){
difference(){
square([unitWidth,bottomHollowDepth],center=true);
polygon([ [unitWidth/noseFactor,-bottomHollowDepth],
[-unitWidth/noseFactor,-bottomHollowDepth],
[-unitWidth/noseFactor,bottomHollowDepth],
[unitWidth/noseFactor,bottomHollowDepth]
]);
mark("b2");
}
}
}
module b3(){
color(colour1){
difference(){
square([unitWidth,unitDepth-cDepth*2],center=true);
for (i=[-1,1]){
translate([i*pd/2,+unitDepth/2-cableHoleRadius,0]){
circle(cableHoleRadius);
}
//TODO: load the mountHoldDistance values from the actual mount holder file
/*
translate([i*pd/2,-unitDepth/2+cDepth+mountHole2DistanceFromRear,0]){
circle(cameraSlitWidth);
}
translate([i*pd/2,-unitDepth/2+cDepth+mountHole1DistanceFromRear,0]){
circle(cameraSlitWidth);
}
*/
}
//Nose
polygon([
[10,-unitDepth/2+10],
[unitWidth/noseFactor,unitDepth/2],
[-unitWidth/noseFactor,unitDepth/2],
[-10,-unitDepth/2+10]
]);
//cable channel
translate([unitWidth/2+cDepth-cableChannelWidth,-bottomHollowDepth/2-cableChannelWidth/2-cDepth,0]){
square([cableChannelWidth,cableChannelWidth]);
}
projection(){
translate([pd/2+6,(unitDepth/2)-9,-20]){
rotate([0,0,180]){
installationPins();
}
}
translate([-1*pd/2+6,(unitDepth/2)-9,-20]){
rotate([0,0,180]){
installationPins();
}
}
}
mark("b3",-1);
}
}
}
module b4(){
color(colour2){
difference(){
square([unitWidth,bottomHollowDepth-cDepth],center=true);
mark("b4");
}
}
}
module s1(){
color(colour3){
square([unitHeight-topHollowDepth-bottomHollowDepth,cableChannelWidth]);
}
}
module nf(){
//Nose fold 1
color(colour4){
translate([-unitWidth/noseFactor/2,0,0]){
square([unitWidth/noseFactor,10]);
}
}
//Nose fold 2
//translate([-unitWidth/noseFactor/2,0,0]){
// square([unitWidth/noseFactor,10]);
//}
}
module mark(t,side=-1){
translate([side*unitWidth/2.2,0]) {
text(t,unitDepth/10);
}
}
module reposition(folded=false,translate1,translate2,direction){
let (fold=(!folded)?[0,+translate1+translate2,0]:[0,translate1,direction*translate2],
r=(!folded)?[0,0,0]:[direction*90*$t,0,0]){
translate(fold){
rotate(r){
//Only want the difference of the perforation with the first child
for ( i = [0:1:$children-1] ){
if (i==0){
difference(){
children(i);
perforatedLine([0,direction*-translate2,0]);
}
} else {
children(i);
}
}
}
}
}
}
//The flattened view
module foldIt(folded){
difference(){
f1();
perforatedLine([0,-unitHeight/2,0]);
}
//Need to add perforation (1mm)
reposition(folded,unitHeight/2,unitDepth/2,1){
t1();
reposition(folded,unitDepth/2,topHollowDepth/2,1){
t2();
reposition(folded,topHollowDepth/2,(unitDepth-cDepth*2)/2,1){
t3();
reposition(folded,unitDepth/2-cDepth,topHollowDepth/2,1){
t4();
}
}
}
}
reposition(folded,-unitHeight/2,-unitDepth/2,-1){
b1();
reposition(folded,-unitDepth/2,-bottomHollowDepth/2,-1){
b2();
reposition(folded,-bottomHollowDepth/2,-(unitDepth-cDepth*2)/2,-1){
b3();
reposition(folded,-unitDepth/2+10,0,1){
nf();
reposition(folded,perforationHeight+(unitWidth/noseFactor)/2,0,1){
nf();
reposition(folded,perforationHeight+(unitWidth/noseFactor)/2,0,1){
nf();
}
}
}
reposition(folded,-(unitDepth-cDepth*3)/2,-bottomHollowDepth/2,-1){ b4();
}
}
}
}
translate([unitWidth/2,unitHeight/2-bottomHollowDepth+cDepth*2,0]){
rotate([0,0,270]){
reposition(folded,0,0,1){
s1();
reposition(folded,cableChannelWidth,0,1){
s1();
reposition(folded,cableChannelWidth,0,1){
s1();
reposition(folded,cableChannelWidth,0,1){
s1();
}
}
}
}
}
}
}
//The folded view
/*
foldIt(true);
translate([-250,0,0]){
foldIt(false);
}
*/
use<CameraHolder.scad>;
use<CardboardCore.scad>;
use<lensRemovalTool.scad>;
use<InstallationHelper.scad>;
//These are the mounting units for holding the camera in place to look back at the eyes
translate ([-26,0,0]) cameraHolderAssembly();
translate ([26,0,0]) cameraHolderAssembly();
//This is a simple tool you can poke through the cardboard, which helps align the mounting units perfectly and reliably for glueing. It can be screwed down to a desk.
translate ([-8,40,0]) cameraHolder();
//This is a simple tool to help you screw the lens off tiny endoscopic cameras. Modify to fit your lens size.
translate ([0,70,0]) lensRemovalTool();
//This is the cardboard core which you can laser cut and fold
translate([-140,120,0]){
foldIt(false);
}
//If you want to see how it looks when folded, just uncomment this line
translate([140,50,0]){
foldIt(true);
}
include <CameraHolder.scad>;
module cameraHolder(){
difference(){
union(){
translate([wallThickness*3.5,-mountLength/3,0]){
cube([86,20,3],center=true);
}
translate([-32,-15,-18.5]){
installationPins();
}
translate([32,-15,-18.5]){
installationPins();
}
}
translate([-wallThickness*4.5,-6,0]){
cylinder(3.2,1,3,center=true);
}
translate([+wallThickness*4.5*2,-6,0]){
cylinder(3.2,1,3,center=true);
}
}
}
cameraHolder();
\ No newline at end of file
module lensRemovalTool(){
difference(){
cube([40,20,2],true);
cube([4.2,4.2,4],true);
}
}
\ No newline at end of file
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</ul> </ul>
</header> </header>
<div class="content"> <div class="content">
<span class="image fill" data-position="center"><img src="images/pic01.png" alt="" /></span> <span class="image fill" data-position="center"><img src="images/electronics/SAM_1990.JPG" alt="" /></span>
</div> </div>
</section> </section>
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</ul> </ul>
</header> </header>
<div class="content"> <div class="content">
<span class="image fill" data-position="center"><img src="images/pic01.png" alt="" /></span> <span class="image fill" data-position="center"><img src="images/ergonomics/IMG_9729.JPG" alt="" /></span>
</div> </div>
</section> </section>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment