Skip to content

Commit

Permalink
Inherit layer names
Browse files Browse the repository at this point in the history
  • Loading branch information
yaqwsx committed Jan 31, 2024
1 parent 5fb8b33 commit 41f62d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kikit/panelize.py
Original file line number Diff line number Diff line change
Expand Up @@ -1815,6 +1815,10 @@ def buildFullTabs(self, cutoutDepth: KiLength, patchCorners: bool = True) \

return cuts

def inheritLayerNames(self, board):
for layer in pcbnew.LSET.AllLayersMask().Seq():
name = board.GetLayerName(layer)
self.board.SetLayerName(layer, name)

def inheritCopperLayers(self, board):
"""
Expand Down
2 changes: 2 additions & 0 deletions kikit/panelize_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ def doPanelization(input, output, preset, plugins=[]):
panel.inheritDesignSettings(board)
panel.inheritProperties(board)
panel.inheritTitleBlock(board)
panel.inheritLayerNames(board)

useHookPlugins(lambda x: x.afterPanelSetup(panel))

Expand Down Expand Up @@ -344,6 +345,7 @@ def separate(input, output, source, page, debug, keepannotations, preservearcs):
panel.inheritDesignSettings(board)
panel.inheritProperties(board)
panel.inheritTitleBlock(board)
panel.inheritLayerNames(board)

destination = VECTOR2I(150 * mm, 100 * mm)
panel.appendBoard(input, destination, sourceArea,
Expand Down

0 comments on commit 41f62d4

Please sign in to comment.