Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

Extratexts generate a line in the footprint even if the string is empty #512

Open
cnieves1 opened this issue Mar 16, 2020 · 0 comments
Open

Comments

@cnieves1
Copy link
Contributor

This was raised by: KiCad/kicad-footprints#2143

In short, an extratexts line like:

L_Bourns_SRP5030T:
  description: "Inductor, Bourns, SRP5030T, 5.7mmx5.2mm"
  datasheet: "https://www.bourns.com/data/global/pdfs/SRP5030T.pdf"
  tags: "Inductor Bourns_SRP5030T"
  extratexts: [[-49.0, -0.05, "", "F.SilkS", 3.0, 3.0]]
  at: [-2.85, 2.60]
  size: [5.70, 5.20]
  smd_tht: "smd"
  pins: [["smd", "1", -2.25, 0, 2.0, 1.8, 0.0], ["smd", "2", 2.25, 0, 2.0, 1.8, 0.0]]

Generate a line in the footprint like:
(fp_text user "" (at -49 0.05) (layer F.SilkS)

Commenting out the extratexts line makes the generator fail:

KicadModTree/ModArgparser.py", line 134, in run self._parse_and_execute_yml(filepath)
    self._parse_and_execute_yml(filepath)
KicadModTree/ModArgparser.py", line 162, in _parse_and_execute_yml
   self._execute_script(**kwargs)  # now we can execute the script
KicadModTree/ModArgparser.py", line 255, in _execute_script
    parsed_args[k] = type(v.get('default'))

This adds nothing to the footprint, so can the script remove this line if the string is empty?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant