HingeSettings: Check axle for valid values

This commit is contained in:
Florian Festi 2020-02-28 17:46:20 +01:00
parent a7063011b5
commit ec6f784442
1 changed files with 5 additions and 1 deletions

View File

@ -1038,10 +1038,14 @@ Values:
relative_params = {
"hingestrength": 1, # 1.5-0.5*2**0.5,
"axle": 2,
"axle": 2.0,
"grip_length": 0,
}
def checkValues(self):
if self.axle / self.thickness < 0.1:
raise ValueError("HingeSettings: 'axle' need to be at least 0.1 strong")
def edgeObjects(self, boxes, chars="iIjJkK", add=True):
edges = [
Hinge(boxes, self, 1),