From db1da4ec12d108f156242c337dba0378f2c6d366 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Fri, 5 Jul 2019 19:35:10 +0200 Subject: [PATCH] Fix hole positions offset by burn in FingerHoleEdge When rendering the FingerHoleEdge, the current position would be corrected for burn (e.g. it would be on the center of the laser path, rather than the actual edge of the final part). However, the FingerHoles class (or actually the rectangularHole method called by it) that draws the actual holes already corrects for burn, which caused the hole position to be offset by the burn value. This offset was particularly problematic when making a sliding lid, since the holes would not align perfectly with the lid, making it hard to close the lid. With this change, the sliding slots in the side walls and the holes in the back wall align perfectly (though only when the lid settings have zero play, which is a separate problem). This commit fixes FingerHoleEdge (and its subclass LidHoleEdge), but there might be other users of the FingerHole class (usually indirectly through boxes.fingerHolesAt) that still have the same problem. --- boxes/edges.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boxes/edges.py b/boxes/edges.py index dbc6945..923dc5f 100644 --- a/boxes/edges.py +++ b/boxes/edges.py @@ -716,7 +716,7 @@ class FingerHoleEdge(BaseEdge): dist = self.fingerHoles.settings.edge_width with self.saved_context(): self.fingerHoles( - 0, dist + self.settings.thickness / 2, length, 0, + 0, self.burn + dist + self.settings.thickness / 2, length, 0, bedBolts=bedBolts, bedBoltSettings=bedBoltSettings) self.edge(length, tabs=2)