Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions pcbmode/utils/svgpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,9 @@ def _getDimensions(self, path):
"""
"""

last_point = Point()
abs_point = Point()

patho = Point()

bbox_top_left = Point()
bbox_bot_right = Point()

Expand Down Expand Up @@ -424,7 +424,9 @@ def _getDimensions(self, path):
bbox_top_left, bbox_bot_right = svg.boundary_box_check(bbox_top_left,
bbox_bot_right,
abs_point)

#store path origin for the time the (sub)path is closed ('z')
patho = abs_point

# cubic Bezier curve command
elif re.match('c', path[i][0]):

Expand Down Expand Up @@ -607,7 +609,7 @@ def _getDimensions(self, path):

# 'close shape' command
elif re.match('Z', path[i][0], re.I):
pass
abs_point = patho

else:
print("ERROR: found an unsupported SVG path command " + str(path[i][0]))
Expand Down