StackableSettings: check angle for invalid values

This commit is contained in:
Florian Festi 2020-02-01 14:16:26 +01:00
parent 9706816fe4
commit 0f3eb5b21a
1 changed files with 6 additions and 0 deletions

View File

@ -793,6 +793,12 @@ Values:
"holedistance": 1.0,
}
def checkValues(self):
if self.angle < 20:
raise ValueError("StackableSettings: 'angle' is too small. Use value >= 20")
if self.angle > 260:
raise ValueError("StackableSettings: 'angle' is too big. Use value < 260")
def edgeObjects(self, boxes, chars="sS", add=True, fingersettings=None):
fingersettings = fingersettings or boxes.edges["f"].settings
edges = [StackableEdge(boxes, self, fingersettings),