Skip to content

Commit

Permalink
retract the bolt only as far as the chord keepaway length
Browse files Browse the repository at this point in the history
  • Loading branch information
madhephaestus committed Jul 18, 2017
1 parent af1730c commit aa03a23
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions servo.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,21 @@ CSG servoFactory(

CSG bolt = Vitamins.get( "capScrew",boltSizeParam.getStrValue())
double capHeight = bolt.getMaxZ()
int stepsOfBolt = tailLength.getMM()/ capHeight
int stepsOfBolt = tailLength.getMM()/ capHeight
println "Servo cable len = "+ tailLength.getMM()+" cap height = "+ capHeight +" steps = "+stepsOfBolt
CSG boltAccum = bolt
if( holesUp){
bolt=bolt.rotx(180)
capHeight=-capHeight
}else{
bolt=bolt.movez(flangeThickness)
}
for(int i=0;i<stepsOfBolt;i++){
bolt=bolt.union(bolt.movez(capHeight*i))
double z = capHeight*i
println "Z move of bolt = "+z
boltAccum=boltAccum.union(bolt.movez(z))
}

bolt=boltAccum
CSG bolts = bolt.movey(holeDiameter/2)
.union( bolt.movey(-holeDiameter/2) .movey(- holeEdgetoHoleEdgeLongDistance) )
.movey(shaftToHoleSide)
Expand Down

0 comments on commit aa03a23

Please sign in to comment.