Skip to content
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

Add support for "Do Not Populate" #37

Closed
Shackmeister opened this issue Feb 20, 2023 · 33 comments
Closed

Add support for "Do Not Populate" #37

Shackmeister opened this issue Feb 20, 2023 · 33 comments
Labels
enhancement New feature or request

Comments

@Shackmeister
Copy link

In Version 7, there is now a field to indiate a component is "Do Not Populate".
It would be great if this plugin would use this to leave it out of the BOM or perhaps add it but with DNP as value but remove LCSC.

@bennymeg bennymeg added the enhancement New feature or request label Feb 22, 2023
@bennymeg
Copy link
Owner

Sounds good,
Do you know by any chance where is the DNP variable is located in the API?

@Shackmeister
Copy link
Author

I asked one of the lead devs in a private chat and got the following answer: "It is in the attributes structure. If it is set, the attribute 'DNP' will exist"

@bennymeg
Copy link
Owner

It seems that KiCad 7 uses both exclude from BOM and DNP:
DNP
I am not sure that is the right way to go now.
Maybe it's a good idea to open to discussion with the community if DNP also means exclude from BOM.

@Shackmeister
Copy link
Author

"Exclude from BOM" is the replacement of "Virtual Attribute"
Hence meant for logos, mounting holes, fiducials etc. Also typically set in the symbol, and not per case basis.

@Shackmeister
Copy link
Author

@bennymeg
Copy link
Owner

It seems that the DNP attribute is only accessible from eeschema.
I do not see any reference for it in the pcbnew API.
Can you ask at the thread you opened in the KiCad forum if that is possible? I can find it.

@Shackmeister
Copy link
Author

I'll see if I can get someone more knowledgeable than me to chime in.

@zapta
Copy link

zapta commented Mar 23, 2023

Those Kicad masking flags are still complicated but it seems that Kicad 7.0.1 added a specific flag to exclude from the position file. Does this JLC plugin support it? I need to upgrade 7.0.0 to 7.0.1 to try it.

https://gitlab.com/kicad/code/kicad/-/issues/14332#note_1317963024

@bennymeg
Copy link
Owner

I don't think its new, only the check box was added, it should work.
I wish they would propagate the DNP flag as well.

@bennymeg
Copy link
Owner

After some investigation, it seems that checking the DNP flag will set exclude from position file automatically.
Which means that this feature is supported.

@Shackmeister
Copy link
Author

Will it still be added to the BOM file?

@bennymeg
Copy link
Owner

Yes

@Shackmeister
Copy link
Author

Isn't that just creating an error with JLC? 🤔
When component's are in the BOM but not in the CPL file

@zapta
Copy link

zapta commented Mar 23, 2023 via email

@bennymeg
Copy link
Owner

Isn't that just creating an error with JLC? 🤔
When component's are in the BOM but not in the CPL file

It might, but that is how KiCad design to work right now (I have read couple of post about it), I will let them decide how to address it.

@Shackmeister
Copy link
Author

Added an issue for exposing DNP support in Python
Feel free to fill in any blanks
https://gitlab.com/kicad/code/kicad/-/issues/14406

@zapta
Copy link

zapta commented Mar 24, 2023 via email

@Shackmeister
Copy link
Author

Indeed it seems so :)
I think people and vendors like this handled in different fashions.

Lot of vendors just wants the DNP parts in the BOM but marked as DNP. Hence why it's not left out from Kicad side.
For JLC it should definitely be left out of both BOM and CPL file.

@zapta
Copy link

zapta commented Mar 24, 2023 via email

@Shackmeister
Copy link
Author

I understand the concern, that's the main reason I'm trying to get people to support the DNP field.
Currently (as far as I can tell) the DNP marking doesn't do anything when exporting to JLC. this mean I need to manually remove them from the Exported files

@zapta
Copy link

zapta commented Mar 25, 2023 via email

@Shackmeister
Copy link
Author

Sounds awesome :D thanks for your work!

@bennymeg
Copy link
Owner

bennymeg commented Mar 25, 2023

So, if I will set the LCSC Part # as DNP for all the part in the BOM that satisfies:

    'dnp' in footprint.GetProperties().keys()

will be a better practice?

@bennymeg bennymeg reopened this Mar 25, 2023
bennymeg added a commit that referenced this issue Mar 25, 2023
@zapta
Copy link

zapta commented Mar 25, 2023 via email

@bennymeg
Copy link
Owner

Done.
But in my testing that property was not present.

@Shackmeister
Copy link
Author

@bennymeg Thanks for adding, How can I use the "Nightly" version of your plugin for testing.

@bennymeg
Copy link
Owner

Published locally as 2.3.0.
Install it from zip (see readme for instructions).

@Shackmeister
Copy link
Author

Tested, and it works great :)

@Shackmeister
Copy link
Author

Seems like JLC is getting "smarter".
Now it will just assign the LCSC number if Value and footprint matches.
I think we might have to change Value to DNP or completely leave it out

@Shackmeister
Copy link
Author

They even assign random Partnumbers now if the LCSC partnumber is missing.
@bennymeg Would it be possible to make an option to just leave the component out of the BOM?
Currently I Manually rework my BOM files after export to remove it

@bennymeg
Copy link
Owner

I'll try to think of a fix

@zapta
Copy link

zapta commented Jul 27, 2023 via email

@Shackmeister
Copy link
Author

@zapta

If you refer to the field called "Exclude from bill of materials", you are correct.
Unfortunately this is not the intended use of the field.
I have described this earlier in this thread.
You can find the developer discussion here:
https://gitlab.com/kicad/code/kicad/-/issues/8908

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants