@@ -1366,30 +1366,40 @@ ICadGenerator c= new ICadGenerator(){
1366
1366
private ArrayList<CSG> getCameraMount (){
1367
1367
// cameraLocationCSG
1368
1368
1369
- double cameraMountSize = 45 +5+ thickness. getMM()
1369
+ double cameraMountSize = 85 +5+ thickness. getMM()
1370
1370
Log . enableSystemPrint(true )
1371
1371
println " Camera at " + cameraLocationNR
1372
1372
double cameraBolt = (workcellSize- cameraMountSize)/ 2
1373
+ /*
1373
1374
CSG camera = (CSG) ScriptingEngine
1374
1375
.gitScriptRun(
1375
1376
"https://github.com/madhephaestus/SeriesElasticActuator.git", // git location of the library
1376
1377
"camera.groovy" , // file to load
1377
1378
null// create a keepaway version
1378
1379
)
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
1380
1389
.transformed(cameraLocationCSG)
1381
1390
CSG camerMount = new Cube ( cameraMountSize+5 ,
1382
1391
cameraMountSize+5 ,
1383
1392
thickness. getMM()). toCSG()
1384
1393
.toZMax()
1385
1394
.transformed(cameraLocationCSG)
1386
1395
.difference(camera)
1387
- CSG camerMountLug = new Cube ( cameraMountSize ,
1396
+ CSG camerMountLug = new Cube ( 45+5 + thickness . getMM() ,
1388
1397
thickness. getMM(),
1389
- 30 ). toCSG()
1398
+ 45 ). toCSG()
1390
1399
.toYMax()
1391
1400
.movey(cameraMountSize/ 2 )
1392
1401
.toZMin()
1402
+ .movex(10 )
1393
1403
CSG notch = new Cube ( thickness. getMM()). toCSG()
1394
1404
.toZMax()
1395
1405
.toYMax()
@@ -1400,15 +1410,16 @@ ICadGenerator c= new ICadGenerator(){
1400
1410
.rotz(180 )
1401
1411
.toXMax()
1402
1412
.movex(workcellSize/ 2 )
1413
+ .movex(-20 )
1403
1414
CSG midLug = camerMountLug
1404
1415
.rotz(180 )
1405
1416
.toXMin()
1406
1417
.movex(camerMount. getMaxX()+20 )
1407
1418
.movez(cameraBolt)
1408
1419
CSG notches = notch
1409
- .movex(10 )
1420
+ .movex(15 )
1410
1421
.union( notch
1411
- .movex(-10 ) )
1422
+ .movex(-15 ) )
1412
1423
CSG bottomNotches = notches
1413
1424
.rotx(180 )
1414
1425
.movex(cameraBolt)
@@ -1420,14 +1431,16 @@ ICadGenerator c= new ICadGenerator(){
1420
1431
// boltSizeParam
1421
1432
CSG boltCutout = new Cube (boltMeasurments. outerDiameter,
1422
1433
thickness. getMM(),
1423
- 30 - thickness. getMM()). toCSG()
1434
+ 45 - thickness. getMM()). toCSG()
1424
1435
.toZMin()
1425
1436
.union(new Cylinder (boltMeasurments. outerDiameter/ 2 ,
1426
1437
boltMeasurments. outerDiameter/ 2 ,
1427
1438
thickness. getMM(),(int )30 ). toCSG()
1428
- .toZMax(),
1439
+ .toZMax()
1440
+ ,
1429
1441
nut
1430
1442
)
1443
+ .movez(-5 )
1431
1444
1432
1445
boltCutout= boltCutout. movey( - (cameraMountSize- thickness. getMM())/ 2 )
1433
1446
.union(boltCutout. movey( (cameraMountSize- thickness. getMM())/ 2 ))
@@ -1440,13 +1453,15 @@ ICadGenerator c= new ICadGenerator(){
1440
1453
baseLug
1441
1454
.union(midLug)
1442
1455
.hull()
1443
- ,bottomNotches,topNotches )
1456
+ ,bottomNotches)
1444
1457
.difference(bottomBolts,topBolts)
1445
-
1458
+ .difference(camerMount. hull())
1459
+ .union(topNotches)
1446
1460
CSG bracketB = bracketA
1447
1461
.toYMax()
1448
1462
.movey(cameraMountSize/ 2 )
1449
1463
camerMount= camerMount. difference(topBolts,bracketA,bracketB)
1464
+ double cameraOffset = cameraMountSize+22
1450
1465
camerMount. setManufacturing({ toMfg ->
1451
1466
TransformNR step = cameraLocationNR. inverse()
1452
1467
Transform move = TransformFactory . nrToCSG(step)
@@ -1455,15 +1470,18 @@ ICadGenerator c= new ICadGenerator(){
1455
1470
.toXMin()
1456
1471
.toYMin()
1457
1472
.toZMin()
1473
+ .movex(- cameraOffset* 1 )
1458
1474
p. addExportFormat(" svg" )
1459
1475
return p
1460
1476
})
1477
+
1461
1478
bracketA. setManufacturing({ toMfg ->
1462
1479
p= toMfg
1463
1480
.rotx(90 )
1464
1481
.toXMin()
1465
1482
.toYMin()
1466
1483
.toZMin()
1484
+ .movex(- cameraOffset* 2 )
1467
1485
p. addExportFormat(" svg" )
1468
1486
return p
1469
1487
})
@@ -1473,7 +1491,8 @@ ICadGenerator c= new ICadGenerator(){
1473
1491
.toXMin()
1474
1492
.toYMin()
1475
1493
.toZMin()
1476
-
1494
+ .movex(- cameraOffset* 3-10 )
1495
+ .movey(-35 )
1477
1496
p. addExportFormat(" svg" )
1478
1497
return p
1479
1498
})
@@ -1482,7 +1501,11 @@ ICadGenerator c= new ICadGenerator(){
1482
1501
})
1483
1502
1484
1503
// 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
+
1486
1509
}
1487
1510
1488
1511
private add (ArrayList<CSG> csg ,CSG object , Affine dh , String name ){
@@ -1496,5 +1519,5 @@ ICadGenerator c= new ICadGenerator(){
1496
1519
}
1497
1520
}
1498
1521
}
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)]
1500
1523
0 commit comments