From 47d3600016f2d8bf7bd6ca932465a693d6c89f89 Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Mon, 9 Nov 2020 19:09:42 +0100 Subject: [PATCH] Add RoundedTriangleFingerHolesEdge (T) --- boxes/edges.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/boxes/edges.py b/boxes/edges.py index 35078fc..53bf78f 100644 --- a/boxes/edges.py +++ b/boxes/edges.py @@ -2123,7 +2123,8 @@ Values: } def edgeObjects(self, boxes, chars="t", add=True): - edges = [RoundedTriangleEdge(boxes, self)] + edges = [RoundedTriangleEdge(boxes, self), + RoundedTriangleFingerHolesEdge(boxes, self)] return self._edgeObjects(edges, boxes, chars, add) class RoundedTriangleEdge(Edge): @@ -2163,6 +2164,17 @@ class RoundedTriangleEdge(Edge): def margin(self): return self.settings.height + self.settings.radius +class RoundedTriangleFingerHolesEdge(RoundedTriangleEdge): + + char = "T" + + def start_width(self): + return self.settings.thickness + + def __call__(self, length, **kw): + self.fingerHolesAt(0, 0.5*self.settings.thickness, length, 0) + super().__call__(length, **kw) + ############################################################################# #### Slat wall #############################################################################