Add hexnut heights
This commit is contained in:
parent
87250c4142
commit
8be860d2d3
42
boxes.py
42
boxes.py
|
@ -460,26 +460,26 @@ class FingerHoles:
|
||||||
|
|
||||||
class NutHole:
|
class NutHole:
|
||||||
sizes = {
|
sizes = {
|
||||||
"M1.6" : 3.2,
|
"M1.6" : (3.2, 1.3),
|
||||||
"M2" : 4,
|
"M2" : (4, 1.6),
|
||||||
"M2.5" : 5,
|
"M2.5" : (5, 2.0),
|
||||||
"M3" : 5.5,
|
"M3" : (5.5, 2.4),
|
||||||
"M4" : 7,
|
"M4" : (7, 3.2),
|
||||||
"M5" : 8,
|
"M5" : (8, 4.7),
|
||||||
"M6" : 10,
|
"M6" : (10, 5.2),
|
||||||
"M8" : 13,
|
"M8" : (13, 6.8),
|
||||||
"M10" : 16,
|
"M10" : (16, 8.4),
|
||||||
"M12" : 18,
|
"M12" : (18, 10.8),
|
||||||
"M14" : 21,
|
"M14" : (21, 12.8),
|
||||||
"M16" : 24,
|
"M16" : (24, 14.8),
|
||||||
"M20" : 30,
|
"M20" : (30, 18.0),
|
||||||
"M24" : 36,
|
"M24" : (36, 21.5),
|
||||||
"M30" : 46,
|
"M30" : (46, 25.6),
|
||||||
"M36" : 55,
|
"M36" : (55, 31),
|
||||||
"M42" : 65,
|
"M42" : (65, 34),
|
||||||
"M48" : 75,
|
"M48" : (75, 38),
|
||||||
"M56" : 85,
|
"M56" : (85, 45),
|
||||||
"M64" : 95,
|
"M64" : (95, 51),
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, boxes, settings):
|
def __init__(self, boxes, settings):
|
||||||
|
@ -489,7 +489,7 @@ class NutHole:
|
||||||
|
|
||||||
@restore
|
@restore
|
||||||
def __call__(self, size, x=0, y=0, angle=0):
|
def __call__(self, size, x=0, y=0, angle=0):
|
||||||
size = self.sizes.get(size, size)
|
size = self.sizes.get(size, (size,))[0]
|
||||||
side = size / 3**0.5
|
side = size / 3**0.5
|
||||||
self.boxes.moveTo(x, y, angle)
|
self.boxes.moveTo(x, y, angle)
|
||||||
self.boxes.moveTo(-0.5*side, 0.5*size, angle)
|
self.boxes.moveTo(-0.5*side, 0.5*size, angle)
|
||||||
|
|
Loading…
Reference in New Issue