Skip to content

Commit

Permalink
Adding leg mounts
Browse files Browse the repository at this point in the history
  • Loading branch information
madhephaestus committed Dec 6, 2023
1 parent 7784ef9 commit f0a12f0
Show file tree
Hide file tree
Showing 2 changed files with 141 additions and 13 deletions.
116 changes: 109 additions & 7 deletions BaseBot.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -422,12 +422,45 @@ try {
CSG top = parts[1];
CSG bot = parts[0];


double legMountRadius = 10
double legMountPinLength = 10
double legPinRadius = 4
LengthParameter tailLength = new LengthParameter("Cable Cut Out Length",30,[500, 0.01])
tailLength.setMM(25)

CSG motor = Vitamins.get("hobbyServo", "fs90r")
CSG horn = Vitamins.get("hobbyServoHorn", "fs90r_1")
.movez(motor.getMaxZ())
CSG boltWheel = Vitamins.get("chamferedScrew", "M3x16")
.roty(180)
.toZMin()
.movez(motor.getMaxZ())
.movex(legMountRadius)
CSG bearingWheel = Vitamins.get("ballBearing", "695zz")
.movez(motor.getMaxZ()+legMountPinLength)
.movex(legMountRadius)
double legMountPinRadius = bearingWheel.getTotalX()/2+3

CSG legPin = new Cylinder(legPinRadius, legMountPinLength+1).toCSG()
.movez(motor.getMaxZ())
.movex(legMountRadius)
CSG legSquare = new Cube(legMountPinRadius+2,legMountPinRadius*2,bearingWheel.getTotalZ()+1).toCSG()
.toZMin()
.toXMin()
CSG legHole = new Cylinder(3.5/2.0, legMountPinRadius*2).toCSG()
.movez(-legMountPinRadius)
.rotx(90)
.movex(legMountPinRadius-1)
.movez((bearingWheel.getTotalZ()+1)/2.0)
CSG legMount = new Cylinder(legMountPinRadius, bearingWheel.getTotalZ()+1).toCSG()
.union(legSquare)
.difference(legHole)
.difference(new Cylinder(legPinRadius+1, legMountPinLength+1).toCSG())
.movez(motor.getMaxZ()+legMountPinLength-1)
.movex(legMountRadius)
.difference(bearingWheel.hull())


double hornDepth = horn.getTotalZ()
double halfServoDistance = motor.getTotalX()/2
double servoSplit=2
Expand Down Expand Up @@ -469,19 +502,57 @@ try {

CSG rightDrive = asmOfDrive.transformed(rightSide)
CSG leftDriveHorn = horn.transformed(leftSide)

CSG leftDriveBolt = boltWheel.transformed(leftSide)
CSG rightDriveBolt = boltWheel.transformed(rightSide)

CSG leftDriveBearing = bearingWheel.transformed(leftSide)
CSG rightDriveBearing = bearingWheel.transformed(rightSide)


CSG leftlegMount = legMount.transformed(leftSide)
CSG rightlegMount = legMount.transformed(rightSide)

CSG rightDriveHorn = horn.transformed(rightSide)



CSG rightLegPin= legPin.transformed(rightSide)
CSG leftLegPin= legPin.transformed(leftSide)


CSG bothDrive = leftDrive.union(rightDrive)



CSG leftWheel = wheepCore.transformed(leftSide).difference(leftDriveHorn)
CSG leftWheel = wheepCore.transformed(leftSide)
.difference(leftDriveHorn)
.union(leftLegPin)
.difference(leftDriveBolt)
.difference(leftDriveBearing)
CSG rightWheel = wheepCore.transformed(rightSide).difference(rightDriveHorn)
.union(rightLegPin)
.difference(rightDriveBolt)
.difference(rightDriveBearing)

leftDriveBearing.setColor(Color.SILVER)
.setManufacturing({ toMfg ->
return null
})
rightDriveBearing.setColor(Color.SILVER)
.setManufacturing({ toMfg ->
return null
})
leftDriveHorn.setColor(Color.BLACK)
.setManufacturing({ toMfg ->
return null
})
leftDriveBolt.setColor(Color.BLACK)
.setManufacturing({ toMfg ->
return null
})
rightDriveBolt.setColor(Color.BLACK)
.setManufacturing({ toMfg ->
return null
})
rightDriveHorn.setColor(Color.BLACK)
.setManufacturing({ toMfg ->
return null
Expand Down Expand Up @@ -679,7 +750,14 @@ try {
.setManufacturing({ toMfg ->
return toMfg.roty(-90).toZMin()
})

leftlegMount.setName("leftlegMount")
.setManufacturing({ toMfg ->
return toMfg.roty(-90).toZMin()
})
rightlegMount.setName("rightLegMount")
.setManufacturing({ toMfg ->
return toMfg.roty(90).toZMin()
})
rightWheel.setName("rightWheel")
.setManufacturing({ toMfg ->
return toMfg.roty(90).toZMin()
Expand Down Expand Up @@ -740,7 +818,25 @@ try {
tireMovedL.addAssemblyStep(9, new Transform().movex(-30))
tireMovedL.addAssemblyStep(8, new Transform().movex(-10))
leftDriveHorn.addAssemblyStep(10, new Transform().movex(-40))


leftDriveBolt.addAssemblyStep(9, new Transform().movex(-30))
leftDriveBolt.addAssemblyStep(8, new Transform().movex(20))

rightDriveBolt.addAssemblyStep(9, new Transform().movex(30))
rightDriveBolt.addAssemblyStep(8, new Transform().movex(-20))

leftDriveBearing.addAssemblyStep(9, new Transform().movex(-30))
rightDriveBearing.addAssemblyStep(9, new Transform().movex(30))

leftlegMount.addAssemblyStep(9, new Transform().movex(-30))
rightlegMount.addAssemblyStep(9, new Transform().movex(30))

leftlegMount.addAssemblyStep(8, new Transform().movex(-5))
rightlegMount.addAssemblyStep(8, new Transform().movex(5))

leftDriveBearing.addAssemblyStep(8, new Transform().movex(-20))
rightDriveBearing.addAssemblyStep(8, new Transform().movex(20))

rightWheel.addAssemblyStep(9, new Transform().movex(30))
tireMovedR.addAssemblyStep(9, new Transform().movex(30))
tireMovedR.addAssemblyStep(8, new Transform().movex(10))
Expand All @@ -765,7 +861,13 @@ try {
hingingPlate,
hingeThread,
closureThreads,
bottomThreads
bottomThreads,
leftDriveBolt,
rightDriveBolt,
leftDriveBearing,
rightDriveBearing,
leftlegMount,
rightlegMount

]
}catch(Throwable tr) {
Expand Down
38 changes: 32 additions & 6 deletions printbed.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
{
"locations": {
"rightLegMount": {
"x": 132.231663451747,
"y": 105.52705688973546,
"z": 0.0,
"rotation": {
"storage": {
"q0": 1.0,
"q1": 0.0,
"q2": 0.0,
"q3": 0.0
}
}
},
"leftlegMount": {
"x": 171.85973048064562,
"y": 126.62958809279016,
"z": 0.0,
"rotation": {
"storage": {
"q0": 1.0,
"q1": 0.0,
"q2": 0.0,
"q3": 0.0
}
}
},
"leftWheel": {
"x": 66.40487960816972,
"y": 158.18111914980125,
Expand All @@ -14,8 +40,8 @@
}
},
"hingingPlate": {
"x": 199.83256124958473,
"y": 19.95390226167468,
"x": 199.90088929188147,
"y": 21.90751893984761,
"z": 0.0,
"rotation": {
"storage": {
Expand All @@ -40,8 +66,8 @@
}
},
"CaseBottom": {
"x": 77.46238442169853,
"y": 111.26624312550217,
"x": 77.81852553511109,
"y": 110.69206740310229,
"z": 0.0,
"rotation": {
"storage": {
Expand All @@ -66,8 +92,8 @@
}
},
"servoCover": {
"x": 83.13858373690336,
"y": 8.60740351938459,
"x": 85.13344935264912,
"y": 9.5445536015829,
"z": 0.0,
"rotation": {
"storage": {
Expand Down

0 comments on commit f0a12f0

Please sign in to comment.