Python fp wizards: Add a text ("${REFERENCE}") on fab layer to a few wizards.

This commit is contained in:
jean-pierre charras
2023-11-11 11:19:21 +01:00
parent 3e58425671
commit 75e0bf0cba
5 changed files with 41 additions and 2 deletions
+8
View File
@@ -111,6 +111,14 @@ class RowedFootprint(FootprintWizardBase.FootprintWizard):
self.draw.Value(0, t_posy, text_size)
self.draw.Reference(0, -t_posy, text_size)
# Add a extra text (${REFERENCE}) on the F_Fab layer
extra_text = pcbnew.PCB_TEXT( self.module )
extra_text.SetLayer( pcbnew.F_Fab )
extra_text.SetPosition( pcbnew.VECTOR2I( 0, 0) )
extra_text.SetTextSize( pcbnew.VECTOR2I( text_size, text_size ) )
extra_text.SetText( "${REFERENCE}" )
self.module.Add( extra_text )
# set SMD attribute
if self.GetName() == "ZIP":
self.module.SetAttributes(pcbnew.FP_THROUGH_HOLE)