From dc265cd867dbb7de486d05f54122dcac7515a885 Mon Sep 17 00:00:00 2001 From: jan Date: Sun, 15 Oct 2023 11:18:02 -0700 Subject: [PATCH] Add missing final vertex when the path ends in a bend --- masque/builder/tools.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/masque/builder/tools.py b/masque/builder/tools.py index f51b675..b0a71db 100644 --- a/masque/builder/tools.py +++ b/masque/builder/tools.py @@ -539,6 +539,10 @@ class PathTool(Tool, metaclass=ABCMeta): else: raise BuildError(f'Unrecognized opcode "{step.opcode}"') + if (path_vertices[-1] != batch[-1].end_port.offset).any(): + # If the path ends in a bend, we need to add the final vertex + path_vertices.append(batch[-1].end_port.offset) + tree, pat = Library.mktree('_path') pat.path(layer=self.layer, width=self.width, vertices=path_vertices) pat.ports = {