Comments (9)
Is this patch (named as 3.0.12) that you did to some workaround of some issue in pcbnew.py?
Yes. But I only precompiled patched binaries for windows 64bit, you can't install them on linux.
Good news is my patch was accepted in KiCad mainstream so tomorrow's nightly will contain it and you can install one for your distribution.
from interactivehtmlbom.
# sort table by reference prefix and quantity
def sort_func(row):
qty, _, _, rf = row
ref_ord = {
"R": 3, "C": 3, "L": 1, "D": 1,
"J": -1, "P": -1
}.get(rf[0][0], 0)
return -ref_ord, -qty
It sorts by component prefix and within that by quantity. Every component type is divided in groups in order of decreasing priority:
Caps and resistors
Inductors, diodes
Others
Connectors, jumpers, test points
Within that components are sorted in decreasing order of quantity.
I never really paid attention to this, but looks like not mixing together caps and resistors, inductors and diodes would be better.
I will probably make default sorting configurable post v1.
Not sure about clicking column headers, I'll look into it.
from interactivehtmlbom.
Connector "CNN" are being order by "C".
The order (of natural assembly) would be "R", "C", "L", "U", "Q" (strict, one letter before the number), others..., "CNN", "J", "P".
from interactivehtmlbom.
CNN order fixed in d72816e
from interactivehtmlbom.
In this new version:
Traceback (most recent call last):
File "/usr/share/kicad/scripting/plugins/InteractiveHtmlBom/generate_interactive_bom.py", line 442, in Run
main(pcbnew.GetBoard())
File "/usr/share/kicad/scripting/plugins/InteractiveHtmlBom/generate_interactive_bom.py", line 412, in main
pcbdata["bom"]["both"] = generate_bom(pcb)
File "/usr/share/kicad/scripting/plugins/InteractiveHtmlBom/generate_interactive_bom.py", line 93, in generate_bom
bom_table = sorted(bom_table, key=sort_func)
File "/usr/share/kicad/scripting/plugins/InteractiveHtmlBom/generate_interactive_bom.py", line 75, in sort_func
prefix = re.findall('^[A-Z]+', rf[0])[0]
IndexError: list index out of range
Starting pcbnew by terminal and using the plugin I got some
No PointCount method on outline object. Unpatched kicad version?
from interactivehtmlbom.
Will be nice to add to the order:
C, R, L, D, Q, U,
"SW" -> swithces
Y, X, F, S
"A" -> Some modules os KiCad
CNN
"HS" -> heat sink
"MH" -> to really the end, it is used as mounting hole
J, P
"NT" -> net tie, usually a component to join different nets and completely ignored on the assembly
from interactivehtmlbom.
prefix = re.findall('^[A-Z]+', rf[0])[0]
IndexError: list index out of range
Fixed in d88f82e
Unpatched kicad version
Read about custom shape pads in readme. If you install tomorrows nightly that will go away and you will see custom shape pads and copper/silkscreen graphics in html render.
from interactivehtmlbom.
I got some error like 'not possible to load _pcbnew.kiface' (after replace it).
Maybe because I am using Linux + KiCad Nightly. Which use pcbnew.py
named as 3.0.8.
Is this patch (named as 3.0.12) that you did to some workaround of some issue in pcbnew.py
?
from interactivehtmlbom.
This is implemented now with config dialog and command line options. No single commit to link here, it was a bunch of work since v1.1 tag.
Arbitrary custom default component sorting is available with command line options and config dialog.
from interactivehtmlbom.
Related Issues (20)
- Support of KiCAD v7 Symbol attribute Do not populate HOT 1
- Strange Silkscreen Behavior HOT 10
- Component Sort Order ("Characters other than A-Z will be ignored") HOT 1
- Improve zone handling in Eagle/Fusion parser HOT 5
- Render holes in vias HOT 7
- Saved settings not remembering empty 'Whitelisted' board variant HOT 4
- Type Error: GetEffectiveTextShape() got an unexpected keyword argument 'aTriangulate' HOT 2
- Feature Request: Highlight the placed components. HOT 2
- Make the top bar collapsible HOT 2
- one small request. Please implement the same script for Altium designer. HOT 1
- Feature request: Quiet / no-dialog mode HOT 2
- Support for FreeCAD HOT 1
- Is there a tutorial on allegro? I'm looking forward to it! HOT 1
- How to use custom fields with Allegro HOT 3
- Problem with parsing full arc board cutouts (allegro) HOT 2
- EAGLE 9.6.2: Bottom side component incorrect orientation. HOT 3
- User Header Misalignment HOT 3
- Adding "kicad_dnp" for --show-fields creates exception in ibom.py line 166
- CLI Execution for Eagle Board Files HOT 3
- Add setup.cfg/.py and post to PyPi HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from interactivehtmlbom.