skidl icon indicating copy to clipboard operation
skidl copied to clipboard

Skidl part parameters not carried forward into netlists

Open rtpavlovsk21 opened this issue 3 years ago • 0 comments

Currently when defining a part one can supply additional kwargs:

from skidl import Part

cust_part = Part(main_lib, '0402_resistor,  description='0402_10v',footprint='main_lib:0402',value=10, manf_num="panasonicseriesX",datasheet='res_0402_pansonicseriesX')

However on the generation of netlists these additional keyword arguments are not passed to the kicad netlist_gen_comp netlist generator, only the cust_part.fields are passed (additionally if kwargs of similar names are passed ie datasheet they are not updated). Is this intentional?

Potentially when parts are created with updated kwargs they could

for k, v in list(kwargs.items()):
            setattr(self, k, v)
            if k.capitalize() in self.fields.keys():
                self.fields[k.capitalize()] = v

which replaces part information in the generated netlist. The parts loaded in kicad may not get these changes, since the parts in the library would need to update. The netlist would then store information about the parts as entered in skidl... which appear to be otherwise redundant with information loaded from kicad.

Some keywords, such as 'value' are passed to kicad, so potentially Kicad can also read these info from the netlist?

rtpavlovsk21 avatar Jan 12 '23 18:01 rtpavlovsk21