aboutsummaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
Diffstat (limited to 'py')
-rwxr-xr-xpy/kicad_pcb_plot.py28
1 files changed, 6 insertions, 22 deletions
diff --git a/py/kicad_pcb_plot.py b/py/kicad_pcb_plot.py
index d6f123d..cb0bc94 100755
--- a/py/kicad_pcb_plot.py
+++ b/py/kicad_pcb_plot.py
@@ -80,29 +80,7 @@ popt.SetUseAuxOrigin(True)
# This by gerbers only (also the name is truly horrid!)
popt.SetSubtractMaskFromSilk(False)
-pctl.SetLayer(F_SilkS)
-pctl.OpenPlotfile("Silk", PLOT_FORMAT_PDF, "Assembly guide")
-pctl.PlotLayer()
-
-#########################
-#### CuBottom.gbr ####
-#### CuTop.gbr ####
-#### EdgeCuts.gbr ####
-#### MaskBottom.gbr ####
-#### MaskTop.gbr ####
-#### PasteBottom.gbr ####
-#### PasteTop.gbr ####
-#### SilkBottom.gbr ####
-#### SilkTop.gbr ####
-#########################
-
-# Once the defaults are set it become pretty easy...
-# I have a Turing-complete programming language here: I'll use it...
-# param 0 is a string added to the file base name to identify the drawing
-# param 1 is the layer ID
plot_plan = [
- ("F.Cu", F_Cu, "Front layer"),
- ("B.Cu", B_Cu, "Bottom layer"),
("F.Paste", F_Paste, "Paste front"),
("B.Paste", B_Paste, "Paste bottom"),
("F.Silk", F_SilkS, "Silk front"),
@@ -113,6 +91,12 @@ plot_plan = [
("Cmts.User", Cmts_User, "User comments"),
]
+layers = board.GetEnabledLayers()
+for layerNum in layers.CuStack():
+ layerName = board.GetLayerName(layerNum)
+ description = "Copper Layer " + layerName
+ plot_plan.append((layerName, layerNum, description))
+
for layer_info in plot_plan:
pctl.SetLayer(layer_info[1])
pctl.OpenPlotfile(layer_info[0], PLOT_FORMAT_PDF, layer_info[2])