Skip to content

Commit ec342db

Browse files
committed
camera cutout for PS eye
1 parent 352e5e3 commit ec342db

File tree

2 files changed

+44
-15
lines changed

2 files changed

+44
-15
lines changed

makeBed.groovy

+8-2
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,23 @@ ArrayList<CSG> arrangeBed(MobileBase b ){
7373
}
7474
}
7575
HashMap<String,CSG> namedPart = []
76+
svgParts=[]
7677
for(CSG c:totalAssembly){
7778
tmp=c
7879
if(c.getName().contains("SVG")){
7980
tmp.addExportFormat("svg")
81+
svgParts.add(tmp)
8082
}else{
8183
tmp=c.toYMin().toXMin()
84+
tmp.setName(c.getName())
85+
namedPart.put(c.getName(),tmp)
8286
}
83-
tmp.setName(c.getName())
84-
namedPart.put(c.getName(),tmp)
87+
88+
8589

8690
}
91+
92+
return svgParts
8793
double delta=2
8894
int numLinks =3
8995

seaLinkGen.groovy

+36-13
Original file line numberDiff line numberDiff line change
@@ -1366,30 +1366,40 @@ ICadGenerator c= new ICadGenerator(){
13661366
private ArrayList<CSG> getCameraMount(){
13671367
//cameraLocationCSG
13681368

1369-
double cameraMountSize = 45+5+thickness.getMM()
1369+
double cameraMountSize = 85+5+thickness.getMM()
13701370
Log.enableSystemPrint(true)
13711371
println "Camera at "+cameraLocationNR
13721372
double cameraBolt = (workcellSize-cameraMountSize)/2
1373+
/*
13731374
CSG camera = (CSG) ScriptingEngine
13741375
.gitScriptRun(
13751376
"https://github.com/madhephaestus/SeriesElasticActuator.git", // git location of the library
13761377
"camera.groovy" , // file to load
13771378
null// create a keepaway version
13781379
)
1379-
camera = camera.union(camera.rotz(90))
1380+
*/
1381+
CSG cameraBase = new Cube(6.5,52,thickness.getMM()).toCSG()
1382+
.toZMax()
1383+
.movex(9+35/2)
1384+
CSG camera = new Cylinder(35/2,35/2, thickness.getMM() ,(int)30).toCSG()
1385+
.toZMax()
1386+
.union(cameraBase)
1387+
1388+
camera = camera
13801389
.transformed(cameraLocationCSG)
13811390
CSG camerMount = new Cube( cameraMountSize+5,
13821391
cameraMountSize+5,
13831392
thickness.getMM()).toCSG()
13841393
.toZMax()
13851394
.transformed(cameraLocationCSG)
13861395
.difference(camera)
1387-
CSG camerMountLug = new Cube( cameraMountSize,
1396+
CSG camerMountLug = new Cube( 45+5+thickness.getMM(),
13881397
thickness.getMM(),
1389-
30).toCSG()
1398+
45).toCSG()
13901399
.toYMax()
13911400
.movey(cameraMountSize/2)
13921401
.toZMin()
1402+
.movex(10)
13931403
CSG notch = new Cube( thickness.getMM()).toCSG()
13941404
.toZMax()
13951405
.toYMax()
@@ -1400,15 +1410,16 @@ ICadGenerator c= new ICadGenerator(){
14001410
.rotz(180)
14011411
.toXMax()
14021412
.movex(workcellSize/2)
1413+
.movex(-20)
14031414
CSG midLug = camerMountLug
14041415
.rotz(180)
14051416
.toXMin()
14061417
.movex(camerMount.getMaxX()+20)
14071418
.movez(cameraBolt)
14081419
CSG notches = notch
1409-
.movex(10)
1420+
.movex(15)
14101421
.union( notch
1411-
.movex(-10) )
1422+
.movex(-15) )
14121423
CSG bottomNotches = notches
14131424
.rotx(180)
14141425
.movex(cameraBolt)
@@ -1420,14 +1431,16 @@ ICadGenerator c= new ICadGenerator(){
14201431
//boltSizeParam
14211432
CSG boltCutout = new Cube(boltMeasurments.outerDiameter,
14221433
thickness.getMM(),
1423-
30-thickness.getMM()).toCSG()
1434+
45-thickness.getMM()).toCSG()
14241435
.toZMin()
14251436
.union(new Cylinder(boltMeasurments.outerDiameter/2,
14261437
boltMeasurments.outerDiameter/2,
14271438
thickness.getMM(),(int)30).toCSG()
1428-
.toZMax(),
1439+
.toZMax()
1440+
,
14291441
nut
14301442
)
1443+
.movez(-5)
14311444

14321445
boltCutout=boltCutout.movey( -(cameraMountSize-thickness.getMM())/2 )
14331446
.union(boltCutout.movey( (cameraMountSize-thickness.getMM())/2 ))
@@ -1440,13 +1453,15 @@ ICadGenerator c= new ICadGenerator(){
14401453
baseLug
14411454
.union(midLug)
14421455
.hull()
1443-
,bottomNotches,topNotches)
1456+
,bottomNotches)
14441457
.difference(bottomBolts,topBolts)
1445-
1458+
.difference(camerMount.hull())
1459+
.union(topNotches)
14461460
CSG bracketB = bracketA
14471461
.toYMax()
14481462
.movey(cameraMountSize/2)
14491463
camerMount=camerMount.difference(topBolts,bracketA,bracketB)
1464+
double cameraOffset = cameraMountSize+22
14501465
camerMount.setManufacturing({ toMfg ->
14511466
TransformNR step = cameraLocationNR.inverse()
14521467
Transform move = TransformFactory.nrToCSG(step)
@@ -1455,15 +1470,18 @@ ICadGenerator c= new ICadGenerator(){
14551470
.toXMin()
14561471
.toYMin()
14571472
.toZMin()
1473+
.movex(-cameraOffset*1)
14581474
p.addExportFormat("svg")
14591475
return p
14601476
})
1477+
14611478
bracketA.setManufacturing({ toMfg ->
14621479
p= toMfg
14631480
.rotx(90)
14641481
.toXMin()
14651482
.toYMin()
14661483
.toZMin()
1484+
.movex(-cameraOffset*2)
14671485
p.addExportFormat("svg")
14681486
return p
14691487
})
@@ -1473,7 +1491,8 @@ ICadGenerator c= new ICadGenerator(){
14731491
.toXMin()
14741492
.toYMin()
14751493
.toZMin()
1476-
1494+
.movex(-cameraOffset*3-10)
1495+
.movey(-35)
14771496
p.addExportFormat("svg")
14781497
return p
14791498
})
@@ -1482,7 +1501,11 @@ ICadGenerator c= new ICadGenerator(){
14821501
})
14831502

14841503
//return [bottomNotches]
1485-
return [camerMount,bracketA,bracketB,bottomBolts]
1504+
return [camerMount,bracketA,bracketB,bottomBolts].collect{
1505+
it.addExportFormat("svg")
1506+
return it.prepMfg()
1507+
}
1508+
14861509
}
14871510

14881511
private add(ArrayList<CSG> csg ,CSG object, Affine dh , String name){
@@ -1496,5 +1519,5 @@ ICadGenerator c= new ICadGenerator(){
14961519
}
14971520
}
14981521
}
1499-
return c//[c.springBlock(c.drivenLinkThickness), c.springBlockPin(c.gearBMeasurments.height).movey(60)]
1522+
return c. getCameraMount()//[c.springBlock(c.drivenLinkThickness), c.springBlockPin(c.gearBMeasurments.height).movey(60)]
15001523

0 commit comments

Comments
 (0)