aboutsummaryrefslogtreecommitdiff
path: root/py/kicad_pcb_plot.py
diff options
context:
space:
mode:
Diffstat (limited to 'py/kicad_pcb_plot.py')
-rwxr-xr-xpy/kicad_pcb_plot.py33
1 files changed, 16 insertions, 17 deletions
diff --git a/py/kicad_pcb_plot.py b/py/kicad_pcb_plot.py
index ef62cb2..d6f123d 100755
--- a/py/kicad_pcb_plot.py
+++ b/py/kicad_pcb_plot.py
@@ -53,7 +53,8 @@ PLOT_FORMAT_GERBER
import sys
from pcbnew import *
-filename=sys.argv[1] #e.g left-main/left-main.kicad_pcb
+
+filename = sys.argv[1] # e.g left-main/left-main.kicad_pcb
board = LoadBoard(filename)
@@ -64,8 +65,6 @@ popt = pctl.GetPlotOptions()
# popt.SetOutputDirectory("plot/")
popt.SetOutputDirectory(sys.argv[2])
-
-
# Set some important plot options:
popt.SetPlotFrameRef(False)
popt.SetLineWidth(FromMM(0.35))
@@ -102,16 +101,16 @@ pctl.PlotLayer()
# 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" ),
- ( "B.Silk", B_SilkS, "Silk bottom" ),
- ( "F.Mask", F_Mask, "Mask front" ),
- ( "B.Mask", B_Mask, "Mask bottom" ),
- ( "Edge.Cuts", Edge_Cuts, "Edges" ),
- ( "Cmts.User", Cmts_User, "User comments" ),
+ ("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"),
+ ("B.Silk", B_SilkS, "Silk bottom"),
+ ("F.Mask", F_Mask, "Mask front"),
+ ("B.Mask", B_Mask, "Mask bottom"),
+ ("Edge.Cuts", Edge_Cuts, "Edges"),
+ ("Cmts.User", Cmts_User, "User comments"),
]
for layer_info in plot_plan:
@@ -180,7 +179,7 @@ pctl.SetLayer(Cmts_User)
pctl.PlotLayer()
# Bottom mask as lines only, in red
-#popt.SetMode(LINE)
+# popt.SetMode(LINE)
popt.SetColor(RED)
pctl.SetLayer(B_Mask)
pctl.PlotLayer()
@@ -192,7 +191,7 @@ pctl.PlotLayer()
# Top paste in light blue, filled
popt.SetColor(BLUE)
-#popt.SetMode(FILLED)
+# popt.SetMode(FILLED)
pctl.SetLayer(F_Paste)
pctl.PlotLayer()
@@ -229,7 +228,7 @@ popt.SetReferenceColor(19)
popt.SetValueColor(21)
popt.SetColor(0)
-#popt.SetMode(LINE)
+# popt.SetMode(LINE)
pctl.SetLayer(B_SilkS)
pctl.PlotLayer()
popt.SetColor(14)
@@ -258,7 +257,7 @@ pctl.PlotLayer()
# better anyway...
popt.SetColor(17)
-#popt.SetMode(FILLED)
+# popt.SetMode(FILLED)
popt.SetDrillMarksType(PCB_PLOT_PARAMS.FULL_DRILL_SHAPE)
pctl.SetLayer(B_Cu)
pctl.PlotLayer()