Skip to content

Commit

Permalink
fix: 🐛 Fix nonetype error throwing from pcbnew.ToMils (#7)
Browse files Browse the repository at this point in the history
* fix: 🐛 Fix nonetype error throwing from pcbnew.ToMils

Check if the param from design setting is None before converting it

* feat: Update the gif path in the README
  • Loading branch information
liangtie authored and SYSUeric66 committed Oct 27, 2023
1 parent 7a794c0 commit 6dc63eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ HQ NextPCB's Active manufacturing plugin will help you:
- Generate Gerber files and upload them to NextPCB along with your personal board settings

Once the upload is complete, you can use the HQDFM Gerber Viewer to double check your manufacturing files, adjust board parameters then add it to your NextPCB cart directly.
![NextPCB Plugin](https://github.com/HubertHQH/HQ-NextPCB/assets/125419974/b7002006-7fc4-4a02-be14-cd5ab3bb0774)
![NextPCB Plugin](https://github.com/SYSUeric66/kicad-amf-plugin/blob/8318782634b7f8237bd4a650c37e4031e876e3a0/docs/amf.gif)

## Features

Expand Down
6 changes: 6 additions & 0 deletions kicad_amf_plugin/pcb_fabrication/process/process_info_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,13 @@ def setup_trace_and_via(self):
continue
minHoleSize = min(minHoleSize, i.GetDrillValue())

if minTraceWidth is None:
minTraceWidth = 0
if minTraceClearance is None:
minTraceClearance = 0
self.set_min_trace(
pcbnew.ToMils(minTraceWidth), pcbnew.ToMils(minTraceClearance)
)
if minHoleSize is None:
minHoleSize = 0
self.set_min_hole(pcbnew.ToMM(minHoleSize))

0 comments on commit 6dc63eb

Please sign in to comment.