Skip to content

Commit 6dd943c

Browse files
committed
Update readme
1 parent 88b9dc6 commit 6dd943c

File tree

1 file changed

+6
-198
lines changed

1 file changed

+6
-198
lines changed

README.md

Lines changed: 6 additions & 198 deletions
Original file line numberDiff line numberDiff line change
@@ -1,210 +1,18 @@
11
# Interactive HTML BOM generation plugin for KiCad EDA
22

3-
This plugin was born from necessity of generating convenient BOM listing
4-
with ability to easily search for components and their placements on the
5-
pcb.
3+
This plugin was born from necessity of generating convenient BOM listing with ability to easily search for components and their placements on the pcb.
64

7-
This is really useful when hand soldering your prototype and you have
8-
to find the 50 places where that 0.1uF cap should be or which of these
9-
SOP8 footprints are for the same micro.
5+
This is really useful when hand soldering your prototype and you have to find the 50 places where that 0.1uF cap should be or which of these SOP8 footprints are for the same micro. Dynamically highlighting all components in the same group on the rendering of the pcb makes manually populating the board so much easier.
106

11-
This plugin utilizes Pcbnew python bindings to read pcb data and
12-
render silkscreen, footprint pads, text and drawings. Most of the pcbnew
13-
features are supported but there are some rarely used things that will not
14-
be rendered. For example curve type segments in drawings are not supported.
7+
This plugin utilizes Pcbnew python bindings to read pcb data and render silkscreen, footprint pads, text and drawings. Additionally it can pull data from schematic if you export it through netlist file or through xml file that Eeschema can generate from it's internal bom tool. That extra data can be added as additional columns in the BOM table (for example manufacturer id) or it can be used to indicate which components should be omitted altogether (dnp field). For full description of functionality see usage page.
158

16-
## So what does it do?
9+
Generated html page is fully self contained, doesn't need internet connection to work and can be packaged with documentation of your project or hosted anywhere on the web.
1710

1811
[Demo is worth a thousand words.](https://openscopeproject.org/InteractiveHtmlBomDemo/)
1912

20-
## Installation
13+
## Installation and Usage
2114

22-
### Where to install
23-
KiCad's Pcbnew plugins can be placed in following places, depending on
24-
platform.
25-
26-
- Windows
27-
- `{KICAD_INSTALL_PATH}/share/kicad/scripting/plugins`
28-
- `%KICAD_PATH%/scripting/plugins`
29-
- `%APPDATA%/Roaming/kicad/scripting/plugins`
30-
31-
- Linux
32-
- `~/.kicad/scripting/plugins`
33-
- `~/.kicad_plugins`
34-
35-
- MacOS
36-
- `/Applications/Kicad/kicad.app/Contents/SharedSupport/scripting/plugins`
37-
- `~/Library/Application Support/kicad/scripting/plugins` or on newer versions
38-
`~Library/Preferences/kicad/scripting/plugins`
39-
40-
If a folder does not exist you can create one. Above list may be out of date or
41-
inaccurate for your OS version/distribution. You can get full list of directories
42-
that pcbnew is scanning for plugins by running this in scripting console:
43-
```python
44-
import pcbnew
45-
print pcbnew.PLUGIN_DIRECTORIES_SEARCH
46-
```
47-
48-
### How to install
49-
50-
I recommend downloading
51-
[latest release](http://github.com/openscopeproject/InteractiveHtmlBom/releases)
52-
or cloning this repo in a directory of your choice and creating a symlink in
53-
one of KiCad's plugin directories to `InteractiveHtmlBom` folder. MacOS and Linux
54-
users can do it with `ln -s <target> <link>`, in windows
55-
`cmd /c mklink /D <link> <target>` does the job. If you don't want to bother
56-
with symlinks just copy InteractiveHtmlBom folder into one of plugin
57-
directories.
58-
59-
If you want this plugin to work in all KiCad versions you install, it's
60-
best to put it in user folder (`%APPDATA%` for Windows, `~/` for Linux/MacOS).
61-
62-
Some newer linux distributions have wxpython option in KiCad disabled because of
63-
wxPython/GTK3 mess. In that case you have to try to compile KiCad yourself with
64-
scripting enabled or you can use this plugin from command line.
65-
66-
## Usage
67-
68-
You can use this plugin as installed Pcbnew Action Plugin or as a standalone
69-
script.
70-
71-
### Installed plugin
72-
73-
Open Pcbnew. Draw your board, make sure it has edges drawn on Edge.Cuts layer.
74-
75-
Save the file and press the
76-
![iBOM](https://raw.githubusercontent.com/openscopeproject/InteractiveHtmlBom/master/InteractiveHtmlBom/icon.png)
77-
button on the top toolbar.
78-
79-
If the button is not on the toolbar
80-
`Tools -> External Plugins... -> Generate Interactive HTML BOM` also works.
81-
Note that this menu is only present on builds that have KICAD_SCRIPTING_ACTION_MENU
82-
option turned on. In recent nightly builds you can choose to hide the plugin button in
83-
pcbnew preferences.
84-
85-
`bom` folder with generated html bom will be created where the board
86-
file is saved. Html bom page will be automatically opened in default
87-
browser.
88-
89-
### Standalone script
90-
91-
On Linux simply run this in terminal:
92-
93-
```shell
94-
python2 path/to/InteractiveHtmlBom/generate_interactive_bom.py path/to/board.kicad_pcb
95-
```
96-
97-
On windows the trick is to use python that is bundled with KiCad so the command
98-
will look like this:
99-
100-
```shell
101-
path/to/kicad/bin/python.exe .../generate_interactive_bom.py .../board.kicad_pcb
102-
```
103-
104-
### BOM mouse actions
105-
106-
You can pan the pcb drawings by dragging with left mouse button, zoom using
107-
mouse wheel and reset view by right click.
108-
109-
Left click on a component drawing will highlight corresponding component group,
110-
unless it is currently filtered out by filter or reference lookup fields.
111-
If there are multiple components under mouse cursor, subsequent clicks
112-
will cycle through possible interpretations.
113-
114-
### BOM keyboard shortcuts
115-
116-
Html page supports keyboard shortcuts to perform most tasks:
117-
118-
* `ArrowUp` / `ArrowDown` scroll through the bom table
119-
* `Alt-R` focuses reference lookup field
120-
* `Alt-F` focuses filter field
121-
* `Alt-Z` switches to bom only view
122-
* `Alt-X` switches to bom left, drawings right view
123-
* `Alt-C` switches to bom top, drawings bot view
124-
* `Alt-V` switches to front only view
125-
* `Alt-B` switches to front and back view
126-
* `Alt-N` switches to back only view
127-
* `Alt-1` through `Alt-9` toggle corresponding checkbox for highlighted bom row
128-
(if it exists)
129-
130-
131-
## Supported versions
132-
133-
KiCad 5.0 is the only fully supported version. Pcbnew python interface is not very
134-
stable and tends to have backwards incompatible changes. I will try to support
135-
future versions but generally you can expect my plugin to be tested only on
136-
the latest stable build.
137-
138-
Plugin is reported to work with KiCad 4 when used from command line but it can
139-
break any time. If you encounter issues file a bug report and I will try to fix
140-
them if possible but no promises.
141-
142-
## Known issues
143-
144-
- Description and Part columns are not supported/tested yet.
145-
- Custom shape pads and copper zone drawings in footprints are supported but
146-
you need patched version of KiCad python bindings.
147-
My patch was integrated in KiCad dev branch, if you install a recent nightly
148-
build custom pads and copper/silkscreen graphics will be rendered.
149-
150-
You can also get prebuilt patched bindings for windows x64 KiCad 5.0
151-
[here](http://github.com/openscopeproject/InteractiveHtmlBom/releases).
152-
153-
Overwrite corresponding files:
154-
155-
- `{KICAD_INSTALL_PATH}/bin/_pcbnew.kiface`
156-
- `{KICAD_INSTALL_PATH}/lib/python2.7/site-packages/pcbnew.py`
157-
- `{KICAD_INSTALL_PATH}/lib/python2.7/site-packages/_pcbnew.pyd`
158-
159-
160-
- Design is complete and utter shite.
161-
162-
Sorry about that, not my strong suite. You are welcome to improve it and
163-
send a PR.
164-
165-
## How to report issues
166-
167-
General software bug reporting rules apply, make sure to describe in most
168-
clear terms the following:
169-
170-
1. Platform and KiCad version used.
171-
2. What are the steps to reproduce the issue.
172-
3. What is the observed behavior.
173-
4. What is expected behavior.
174-
175-
In most cases I imagine issues will be of 2 types: 1) plugin crashes and nothing
176-
is created and 2) board or parts of it are not rendered correctly.
177-
178-
For the first case you should include stack trace in your bug report. You can
179-
get it by running plugin manually from scripting console.
180-
181-
- Open pcbnew, go to `Tools -> Scripting Console` or click corresponding
182-
button.
183-
- Type following into the console:
184-
185-
```python
186-
from InteractiveHtmlBom import plugin
187-
plugin.Run()
188-
```
189-
190-
Copy full output into pastebin and add a link to it in your bug report.
191-
You can skip pastebin if output is small enough (20 lines or less).
192-
193-
For the second case best way to report it is by sharing your kicad_pcb file.
194-
Remove everything that is not relevant to the bug, leave only the part that
195-
is not rendering correctly. That will make it easier for me to debug and
196-
also you won't have to share what is possibly proprietary information.
197-
198-
_Note: don't remove edge cut drawings. You can replace them with a simple box around
199-
problem area._
200-
201-
## Browser support
202-
203-
Generated html page is tested in Chrome and Firefox. IE will not be
204-
supported, patches for other browsers are welcome.
205-
206-
Edge works but saving settings/checkboxes is currently broken because of
207-
https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8816771/
15+
See [project wiki](https://github.com/openscopeproject/InteractiveHtmlBom/wiki) for instructions.
20816

20917
# License and credits
21018

0 commit comments

Comments
 (0)