From a2526bf5bd004952ea01a75708e3ffb960fff557 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Tue, 12 Apr 2022 14:23:24 -0300 Subject: [PATCH] Fixed the pcb_print get_targets for SVGs (pages, not single) --- kibot/out_pcb_print.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kibot/out_pcb_print.py b/kibot/out_pcb_print.py index c8d68c3f..c4b6f2e1 100644 --- a/kibot/out_pcb_print.py +++ b/kibot/out_pcb_print.py @@ -29,13 +29,13 @@ logger = log.get_logger() SVG2PDF = 'rsvg-convert' -# - Fix get_targets (multiple files) # - Implement other rsvg-convert formats # - Use PyPDF2 for pdfunite # - Implement pad, vias, etc colors # - Allow hole color config # - move(1,1)? Really needed? 0,0? # - Analyze KiCad 6 long delay +# - Manually draw the frame def _run_command(cmd): @@ -319,6 +319,12 @@ class PCB_PrintOptions(VariantOptions): self.restore_fab(GS.board, comps_hash) def get_targets(self, out_dir): + if self.format == 'SVG': + files = [] + for n in range(len(self.pages)): + id = self._expand_id+('_page_%02d' % (n+1)) + files.append(self.expand_filename(out_dir, self.output, id, self._expand_ext)) + return files return [self._parent.expand_filename(out_dir, self.output)] def clear_layer(self, layer):