Add missing final vertex when the path ends in a bend
This commit is contained in:
parent
1c7b0ce5e1
commit
5f5c78455b
@ -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 = {
|
||||
|
Loading…
Reference in New Issue
Block a user