[QR Lib] Better attributes

- Footprints: now they are flagged with exclude from BoM and Pos, also
  with no court yard requirements for KiCad 7
- Symbols: Excluded from simulation for KiCad 7
This commit is contained in:
Salvador E. Tropea 2023-12-04 13:30:04 -03:00
parent 20dd4f25d5
commit 2f432abc38
2 changed files with 17 additions and 1 deletions

View File

@ -80,6 +80,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- With a navigation side bar
- Variants and filters:
- Components only in the PCB are now processed
- QR Lib:
- Footprints: now they are flagged with exclude from BoM and Pos, also
with no court yard requirements for KiCad 7
- Symbol: Excluded from simulation for KiCad 7
### Fixed
- Schematics: problems with deep nested and recycled sheets (#520)

View File

@ -227,7 +227,16 @@ class QR_LibOptions(BaseOptions):
mod.append([Symbol('layer'), Symbol(qr.layer)])
mod.append([Symbol('tedit'), 0])
mod.append(Sep())
mod.append([Symbol('attr'), Symbol('virtual')])
attrs = [Symbol('attr')]
if not GS.ki6:
# KiCad 5
attrs.append(Symbol('virtual'))
else:
attrs.append(Symbol('exclude_from_pos_files'))
attrs.append(Symbol('exclude_from_bom'))
if GS.ki7:
attrs.append(Symbol('allow_missing_courtyard'))
mod.append(attrs)
mod.append(Sep())
mod.append(self.fp_field(center, 'reference', self.reference+'***', qr.layer, 0))
mod.append(Sep())
@ -309,6 +318,9 @@ class QR_LibOptions(BaseOptions):
sym.append(Sep())
sym.append(self.sym_field(center, 'qr_text', qr._text_sch, 8))
sym.append(Sep())
if GS.ki7:
sym.append(self.sym_field(center, 'Sim.Enable', "0", 9))
sym.append(Sep())
sym.extend(self.qr_draw_sym(size, size_rect, center, qrc))
lib.append(sym)
lib.append(Sep())