Skip to content

Commit 2f56b0f

Browse files
committed
makinf the spring keepaway offset by the spring diameter change
1 parent b1f0bae commit 2f56b0f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

torsionSpring.groovy

+7-4
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,19 @@ CSG getNut(){
2727
//println "Database loaded "+database
2828
HashMap<String,Object> config = Vitamins.getConfiguration( type,size.getStrValue())
2929
double height = config.wireDiameter * (config.numOfCoils+1)
30+
double coreDelta= config.od+(config.od - config.id - config.wireDiameter) +printerOffset.getMM()
3031

31-
CSG core =new Cylinder(config.od/2+printerOffset.getMM()/2,
32-
config.od/2+printerOffset.getMM()/2,
32+
CSG core =new Cylinder(coreDelta/2,
33+
coreDelta/2,
3334
height,(int)30).toCSG() // a one line Cylinder
3435
.difference(new Cylinder(config.id/2,config.id/2,height,(int)30).toCSG())
35-
CSG leg = new Cube(config.legLength, config.wireDiameter+printerOffset.getMM(),config.wireDiameter+printerOffset.getMM()).toCSG()
36+
CSG leg = new Cube( config.legLength+(printerOffset.getMM()*2),
37+
config.wireDiameter+printerOffset.getMM(),
38+
config.wireDiameter+printerOffset.getMM()).toCSG()
3639
.toZMin()
3740
.toXMin()
3841
.toYMin()
39-
.movey(-core.getMaxY())
42+
.movey(-config.od/2- printerOffset.getMM()/2)
4043

4144

4245
core = core.union(leg)

0 commit comments

Comments
 (0)