Skip to content

Commit

Permalink
Fixes #21
Browse files Browse the repository at this point in the history
  • Loading branch information
JarrettR committed Mar 15, 2024
1 parent 4de9a23 commit 6daf480
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
1 change: 0 additions & 1 deletion Stretch/kiplug/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ def To_SVG(self):
else:
svg = base.encode()

print(self.metadata)
return svg


Expand Down
13 changes: 10 additions & 3 deletions Stretch/kiplug/via.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,16 @@ def __init__(self):


def From_SVG(self, tag):
x = tag['x']
y = tag['y']
self.at = [str(float(x) / pxToMM), str(float(y) / pxToMM)]
x = float(tag['x'])
y = float(tag['y'])
if tag.has_attr('transform'):
transform = tag['transform']
translate = transform[transform.find('translate(') + 10:-1]
translate = translate[0:translate.find(')')]
xt, yt = translate.split(',')
x = (float(xt) + x)
y = (float(yt) + y)
self.at = [str(x / pxToMM), str(y / pxToMM)]

self.size = str(float(tag['size']) / pxToMM)
self.drill = str(float(tag['drill']) / pxToMM)
Expand Down

0 comments on commit 6daf480

Please sign in to comment.