-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed selection columns for variants. #278
Comments
If I understand correctly you want to create a boolean derived extra field that will be true when value matches a regex. That has nothing to do with variants really. Variants feature is there to select what gets included in the bom or not. I don't think this is useful functionality to have in ibom, you can do this by adding another custom field in eeschema and use excel or anything else to do your preprocessing. Ibom can't and shouldn't try to do any processing on your fields, it will never have flexibility of software designed to do data processing. Going back to variants, I can see some value in having regex support in variant whitelist but I'm curious to hear of any practical example where you have so many variants that it's not just as easy to tick a few in the whitelist. |
Well, here are some real variant expressions, coping with MCU memory size, input connectors variants, analog circuit variants, voltage variants, input and output options, resistor dividor allowing to read the board variant, an option to choose one or the other rectifier:
Another one for a display board coping with different types of LCD_16x02 display modules, some having connector on the side, some on the top, within those some with negative backlight drive others with GND backlight drive, I2C or parallel screen interface, internal negative voltage or external negative voltage, different possibilities of connectors:
I understand that currently the "variant" fields selects what gets included in the interactive BOM, but another way of doing things is to include everything and have columns indicate what is selected for the BOM. This way all components are in the interactive BOM. |
Your examples are perfectly doable with variant whitelist as a list. Except the resulting BOM will not include components that are not on the list. That's the point of the BOM to not include things that are not on the board. Again, what you are asking for is derived fields, I don't think this should be in ibom. Add whatever fields you want with whatever logic in eeschema. That said, once template support is added you will be able to write a custom template with functionality to add derived fields dynamically in html. |
As you think that this should not be in If so, you can close this. |
Not in the current form. I will accept it as a custom template in the future. You can follow #234 for when that gets implemented. |
Hi @mdeweerd ! KiBot can apply KiCost style variants to ibom. You can use KiBoM, IBoM or KiCost variants for all the supported tools. |
@set-soft Thanks for the heads-up. I'll have a look into KiBot. Only, the tool chain for adding interactivebom is a few MB, and the toolchain for KiBOT is close to 10GB. I checked out 'kicost-tools" the other day ;-). The idea is not only adding KiCost style variants, but have all variants in a single HTML (with all the placements). It would be a single file to manage (not one file per variant) and help understand differences between variants, etc. |
why 10 GB @mdeweerd ? I guess you are counting a full Linux distro. In this case I could say you need 0 MB because you can run it on GitHub/GitLab CI/CD without even installing ;-) |
Also wsl is a thing. |
Not really belongs ehre, but @set-soft I am trying kicad_auto now - managed to run it on windows and even get a ui. 3D models were excluded and probably not ubuntu, so only 771MB . That's find and I can probably link to the 3D Models on the native system. We'll see - in the respective projects. |
@mdeweerd note that usual usage is to:
|
|
Hi @mdeweerd !
This is the feature I mentioned in INTI-CMNB/KiBot#279 ;-) |
It would be usefull to preload some columns with fixed selection values based on variants.
There is already
--variants-whitelist
and--variants-blacklist
but these do not create columns, and they are not regex.Context:
I use KiCAD with KiCost to manage variants.
KiCost allows use to specify a regex that helps filter all the variants. The dnp and variant fields determine together which components are ultimately present.
The contents of most other fields (description, value, ...) can also be changed through the variant expression.
So when I add
--variant '^(screen3v|button3)$'
, thescreen3v
andbutton3
variants are selected.Proposal
My proposal is that InteractiveHtmlBom also understand a variant option that is based on regex and allows the generation of named columns with tickboxes.
Example:
Repeat the same option multiple times
or
to be similar to the existing variant options, using space as a separator:
(when the equal sign is missing, this could be considered as a nameless field or only as a regex selector complementing the variants whitelist and blacklist options).
Regex is useful with buttons for example, use
button.*
to select all buttons.The suggested examples would add two columns '3btn3Vscreen' and '2btn5Vscreen' to the HTML file much like the default Sourced and Placed columns. They may be modifiable, but the modfications may/(should) be suppressed on reload (which could be an option).
Applying the other impacts of the variant selection (component value) would be nice, but only applicable when only one variant is added (simpliest case because this value is the only one in the HTML file) or selected (more complex case because this adds logic to the HTML file).
The text was updated successfully, but these errors were encountered: