|
99 | 99 | pcbnew.B_Fab: 'B.Fab', |
100 | 100 | } |
101 | 101 | SCHEMATIC_SVG_BASE_NAME = 'Schematic_root' |
| 102 | +if hasattr(pcbnew, 'DRILL_MARKS_NO_DRILL_SHAPE'): |
| 103 | + NO_DRILL_SHAPE = pcbnew.DRILL_MARKS_NO_DRILL_SHAPE |
| 104 | + SMALL_DRILL_SHAPE = pcbnew.DRILL_MARKS_SMALL_DRILL_SHAPE |
| 105 | + FULL_DRILL_SHAPE = pcbnew.DRILL_MARKS_FULL_DRILL_SHAPE |
| 106 | +elif hasattr(pcbnew, 'PCB_PLOT_PARAMS'): |
| 107 | + NO_DRILL_SHAPE = pcbnew.PCB_PLOT_PARAMS.NO_DRILL_SHAPE |
| 108 | + SMALL_DRILL_SHAPE = pcbnew.PCB_PLOT_PARAMS.SMALL_DRILL_SHAPE |
| 109 | + FULL_DRILL_SHAPE = pcbnew.PCB_PLOT_PARAMS.FULL_DRILL_SHAPE |
102 | 110 |
|
103 | 111 |
|
104 | 112 | def SetExcludeEdgeLayer(po, exclude_edge_layer, layer): |
@@ -225,10 +233,16 @@ def GenPCBImages(file, file_hash, hash_dir, file_no_ext, layer_names, wanted_lay |
225 | 233 | # Create the PDF, or use a cached version |
226 | 234 | if not CheckOptions(name_pdf, cur_pcb_ops) or not isfile(name_pdf): |
227 | 235 | logger.info('Plotting %s layer' % layer) |
228 | | - pctl.SetLayer(i) |
| 236 | + # Plot the edge before, no drill marks (8.0.4 added them) |
| 237 | + pctl.SetLayer(Edge_Cuts) |
| 238 | + popt.SetDrillMarksType(NO_DRILL_SHAPE) |
229 | 239 | pctl.OpenPlotfile(layer, plot_format, layer) |
230 | 240 | pctl.PlotLayer() |
231 | | - pctl.SetLayer(Edge_Cuts) |
| 241 | + # Plot the real layer, disable drill marks in silk screen (8.0.4 added them) |
| 242 | + pctl.SetLayer(i) |
| 243 | + logging.error(i) |
| 244 | + logging.error(i > pcbnew.B_Cu) |
| 245 | + popt.SetDrillMarksType(NO_DRILL_SHAPE if i > pcbnew.B_Cu else SMALL_DRILL_SHAPE) |
232 | 246 | pctl.PlotLayer() |
233 | 247 | pctl.ClosePlot() |
234 | 248 | if not isfile(name_pdf_kicad): |
|
0 commit comments