Skip to content

Commit 4b214b2

Browse files
committed
adding cutout and mfg scripts for camera mounts
1 parent 6e8fd3a commit 4b214b2

File tree

2 files changed

+43
-9
lines changed

2 files changed

+43
-9
lines changed

camera.groovy

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1-
//Your code here
2-
CSG pcb =new Cube( 32.16,// X dimention
3-
32.16,// Y dimention
4-
1.7// Z dimention
5-
).toCSG()
6-
.toZMin()
71
double boltHolePattern = (25.5+2.5)/2
82
double keepawayZ = 27*2
93
double keepawayX = 22.85
104
double keepawayY = 32.16
5+
double holeRadius = 2.5/2.0
6+
7+
CSG pcb =new Cube( 32.16,// X dimention
8+
32.16,// Y dimention
9+
keepawayZ/2// Z dimention
10+
).toCSG()
11+
.toZMin()
12+
1113
//Your code here
1214
CSG keepaway =new Cube( keepawayX,// X dimention
1315
keepawayY,// Y dimention
1416
keepawayZ// Z dimention
1517
).toCSG()
16-
double holeRadius = 2.5/2.0
18+
1719

1820
CSG hole =new Cylinder(holeRadius,holeRadius,keepawayZ,(int)8).toCSG() // a one line Cylinder
1921
.movex(boltHolePattern)

seaLinkGen.groovy

+34-2
Original file line numberDiff line numberDiff line change
@@ -1043,15 +1043,24 @@ return new ICadGenerator(){
10431043
private ArrayList<CSG> getCameraMount(){
10441044
//cameraLocationCSG
10451045

1046-
double cameraMountSize = 38+5+thickness.getMM()
1046+
double cameraMountSize = 45+5+thickness.getMM()
10471047
Log.enableSystemPrint(true)
10481048
println "Camera at "+cameraLocationNR
10491049
double cameraBolt = (workcellSize-cameraMountSize)/2
1050+
CSG camera = (CSG) ScriptingEngine
1051+
.gitScriptRun(
1052+
"https://github.com/madhephaestus/SeriesElasticActuator.git", // git location of the library
1053+
"camera.groovy" , // file to load
1054+
null// create a keepaway version
1055+
)
1056+
camera = camera.union(camera.rotz(90))
1057+
.transformed(cameraLocationCSG)
10501058
CSG camerMount = new Cube( cameraMountSize+5,
10511059
cameraMountSize+5,
10521060
thickness.getMM()).toCSG()
10531061
.toZMax()
10541062
.transformed(cameraLocationCSG)
1063+
.difference(camera)
10551064
CSG camerMountLug = new Cube( cameraMountSize,
10561065
thickness.getMM(),
10571066
30).toCSG()
@@ -1117,8 +1126,31 @@ return new ICadGenerator(){
11171126
.toYMax()
11181127
.movey(cameraMountSize/2)
11191128
camerMount=camerMount.difference(topBolts,bracketA,bracketB)
1129+
camerMount.setManufacturing({ toMfg ->
1130+
TransformNR step = cameraLocationNR.inverse()
1131+
Transform move = TransformFactory.nrToCSG(step)
1132+
return toMfg
1133+
.transformed(move)
1134+
.toXMin()
1135+
.toYMin()
1136+
.toZMin()
1137+
})
1138+
bracketA.setManufacturing({ toMfg ->
1139+
return toMfg
1140+
.rotx(90)
1141+
.toXMin()
1142+
.toYMin()
1143+
.toZMin()
1144+
})
1145+
bracketB.setManufacturing({ toMfg ->
1146+
return toMfg
1147+
.rotx(90)
1148+
.toXMin()
1149+
.toYMin()
1150+
.toZMin()
1151+
})
11201152
//return [bottomNotches]
1121-
return [camerMount,bracketA,bracketB,bottomBolts]
1153+
return [camerMount,bracketA,bracketB,bottomBolts,camera]
11221154
}
11231155

11241156
private add(ArrayList<CSG> csg ,CSG object, Affine dh ){

0 commit comments

Comments
 (0)