mvnmgrx / kiutils

Simple and SCM-friendly KiCad file parser based on Python dataclasses for KiCad 6.0 and up.
GNU General Public License v3.0
81 stars 27 forks source link

Footprint attributes is None when no "Manufacturing Attributes" are selected in layout #20

Closed mvnmgrx closed 2 years ago

mvnmgrx commented 2 years ago

Problem:

When adding a footprint to the layout that has all its manufacturing attributes all unset / set to "other", the parser will not create the corresponding footprint.attributes token.

Manufacturing attributes set: image

Expected behavior:

footprint.attributes token created with its members all set accordingly.

Observed behavior:

In this case, the footprint.attributes token will be None, as the S-Expression may not be created from KiCad when selecting the manufacturing attributes as shown above. image

Setting at least the footprint type to something other than "Other", the parser will parse the footprint.attributes token correctly: image

Possbible fix:

Always create footprint.attributes token, but check that this does not create redundant S-Expression when creating a footprint like described above.