Skip to content

Commit

Permalink
Lower poly count drive gear
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Harrington committed Dec 14, 2023
1 parent 01fb31b commit 6dd7db0
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 3 deletions.
Binary file modified DriveGear.stl
Binary file not shown.
Binary file added DriveGearHorn.stl
Binary file not shown.
43 changes: 40 additions & 3 deletions MarcosCad.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,42 @@ class cadGenMarcos implements ICadGenerator{
return lug
}

def getGearLink() {
// generate the link
/*
double ServoHornRad=(hornDiam+numbers.ServoHornHoleTolerance/2)/2.0
double smallChamfer = numbers.Chamfer1/1.5
CSG stl = Vitamins.get(ScriptingEngine.fileFromGit(
"https://github.com/OperationSmallKat/Marcos.git",
"DriveGear.stl")).moveToCenterX()
.moveToCenterY()
.rotz(180)
double setScrewLen = stl.getTotalX()/2;
double lowerSectionHeight =Math.abs(stl.getMinZ())
CSG fill = new Cylinder(7, lowerSectionHeight).toCSG()
.toZMax()
CSG setScrew = new Cylinder(3.3/2.0, setScrewLen).toCSG()
.roty(-90)
.movez(-lowerSectionHeight/2+0.15)
CSG ServoHornCutoutChamfer = ChamferedCylinder(ServoHornRad+smallChamfer,lowerSectionHeight+smallChamfer,smallChamfer)
.toZMax()
.movez(smallChamfer)
// Idle pin cutout
CSG ServoHornCutout = ChamferedCylinder(ServoHornRad,lowerSectionHeight,smallChamfer)
.union(ServoHornCutoutChamfer)
.movez(-lowerSectionHeight)
fill= fill.difference(setScrew)
.difference(setScrew.rotz(-90))
.difference(ServoHornCutout)
stl=stl.union(fill)
return stl
*/
return Vitamins.get(ScriptingEngine.fileFromGit(
"https://github.com/OperationSmallKat/Marcos.git",
"DriveGearHorn.stl"))
}
@Override
public ArrayList<CSG> generateCad(DHParameterKinematics d, int linkIndex) {
if(d.getScriptingName().startsWith("Head")||d.getScriptingName().startsWith("Tail")) {
Expand Down Expand Up @@ -713,9 +749,7 @@ class cadGenMarcos implements ICadGenerator{
motor.addAssemblyStep(3, new Transform().movez(front?60:-60))
myServoHorn.addAssemblyStep(3, new Transform().movey(front?-50:50))

CSG tmp =Vitamins.get(ScriptingEngine.fileFromGit(
"https://github.com/OperationSmallKat/Marcos.git",
"DriveGear.stl"))
CSG tmp = getGearLink()
.roty(front?180:0)
if(front)
tmp=tmp.toZMax()
Expand Down Expand Up @@ -1548,6 +1582,9 @@ class cadGenMarcos implements ICadGenerator{

}
def gen= new cadGenMarcos(resinPrintServoMount,numbers,hornDiam)

return gen.getGearLink()

//MobileBase mb = (MobileBase)DeviceManager.getSpecificDevice("Marcos");
//gen.setMobileBase(mb)
//DHParameterKinematics limb = gen.getByName(mb,"RightFront")
Expand Down

0 comments on commit 6dd7db0

Please sign in to comment.