Skip to content

Commit

Permalink
fix: Fixed exception caused by finding direction of zero-length pins …
Browse files Browse the repository at this point in the history
…such as for GND symbol.
  • Loading branch information
devbisme committed Jul 8, 2024
1 parent 7c2f213 commit 13ec5c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/skidl/tools/kicad6/gen_svg.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ def text_bbox(text, start, dir, char_wid, char_hgt):
text = shape["misc"][1]
svg = text_to_svg(text, side, start, char_wid, class_, attr)
bbox = text_bbox(text, start, (end-start).norm, char_wid, char_hgt)
# svg += bbox_to_svg(bbox, 0.1)

elif shape_type == "pin":
num_char_wid, num_char_hgt = shape["number"]["effects"]["font"]["size"][:]
Expand Down Expand Up @@ -338,7 +337,7 @@ def text_bbox(text, start, dir, char_wid, char_hgt):
start -= dir * extension
end *= tx
start *= tx
side = pin_side(end-start)
side = pin_side(dir * tx)

# Bounding box for the pin.
bbox = BBox(start, end)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/setup_teardown.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def setup_function(f):
skidl.config.query_backup_lib = True

# Set the default tool for the test suite.
tool = KICAD8
tool = KICAD6
set_default_tool(tool)


Expand Down

0 comments on commit 13ec5c5

Please sign in to comment.