Make play of ChestHinge a regular param
This commit is contained in:
parent
9dfa95f45b
commit
f0dc89c617
|
@ -1076,6 +1076,7 @@ Values:
|
||||||
relative_params = {
|
relative_params = {
|
||||||
"pin_height" : 2.0,
|
"pin_height" : 2.0,
|
||||||
"hinge_strength" : 1.0,
|
"hinge_strength" : 1.0,
|
||||||
|
"play" : 0.1,
|
||||||
}
|
}
|
||||||
|
|
||||||
def pinheight(self):
|
def pinheight(self):
|
||||||
|
@ -1155,30 +1156,27 @@ class ChestHingeTop(ChestHinge):
|
||||||
t = self.settings.thickness
|
t = self.settings.thickness
|
||||||
p = self.settings.pin_height
|
p = self.settings.pin_height
|
||||||
s = self.settings.hinge_strength
|
s = self.settings.hinge_strength
|
||||||
play = 0.1 * self.settings.thickness
|
play = self.settings.play
|
||||||
poly = (0, -180, t, -180, 0, (-90, p+s+play), 0, 90, l+t-p-s-play)
|
poly = (0, -180, t, -180, 0, (-90, p+s+play), 0, 90, l+t-p-s-play)
|
||||||
if self.reversed:
|
if self.reversed:
|
||||||
poly = reversed(poly)
|
poly = reversed(poly)
|
||||||
self.polyline(*poly)
|
self.polyline(*poly)
|
||||||
|
|
||||||
def startwidth(self):
|
def startwidth(self):
|
||||||
play = 0.1 * self.settings.thickness
|
|
||||||
if self.reversed:
|
if self.reversed:
|
||||||
return play+self.settings.pin_height+self.settings.hinge_strength
|
return self.settings.play+self.settings.pin_height+self.settings.hinge_strength
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def endwidth(self):
|
def endwidth(self):
|
||||||
play = 0.1 * self.settings.thickness
|
|
||||||
if self.reversed:
|
if self.reversed:
|
||||||
return 0
|
return 0
|
||||||
return play+self.settings.pin_height+self.settings.hinge_strength
|
return self.settings.play+self.settings.pin_height+self.settings.hinge_strength
|
||||||
|
|
||||||
def margin(self):
|
def margin(self):
|
||||||
if self.reversed:
|
if self.reversed:
|
||||||
return 0.
|
return 0.
|
||||||
else:
|
else:
|
||||||
play = 0.1 * self.settings.thickness
|
return 1*(self.settings.play+self.settings.pin_height+self.settings.hinge_strength)
|
||||||
return 1*(play+self.settings.pin_height+self.settings.hinge_strength)
|
|
||||||
|
|
||||||
class ChestHingePin(BaseEdge):
|
class ChestHingePin(BaseEdge):
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue