Skip to content

Commit 57c3209

Browse files
committed
Add svg, fix mirror plot
1 parent 6dfbaea commit 57c3209

File tree

4 files changed

+30
-3
lines changed

4 files changed

+30
-3
lines changed

docs/samples/generic_plot.kiplot.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,32 @@ outputs:
113113
sketch_plot: true
114114
use_aux_axis_as_origin: false
115115
polygon_mode: true
116+
layers:
117+
- layer: F.Cu
118+
suffix: F_Cu
119+
- layer: F.Fab
120+
suffix: F_Fab
121+
122+
- name: SVG
123+
comment: "SVG files"
124+
type: svg
125+
dir: gerberdir
126+
options:
127+
exclude_edge_layer: false
128+
exclude_pads_from_silkscreen: false
129+
use_aux_axis_as_origin: false
130+
plot_sheet_reference: false
131+
plot_footprint_refs: true
132+
plot_footprint_values: true
133+
force_plot_invisible_refs_vals: false
134+
tent_vias: true
135+
check_zone_fills: true
136+
137+
# PS options
138+
line_width: 0.25
139+
drill_marks: full
140+
mirror_plot: true
141+
negative_plot: true
116142
layers:
117143
- layer: F.Cu
118144
suffix: F_Cu

kiplot/config_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ def _parse_output(self, o_obj):
411411
except KeyError:
412412
raise YamlError("Output needs a type")
413413

414-
if otype not in ['gerber', 'ps', 'hpgl', 'dxf', 'pdf',
414+
if otype not in ['gerber', 'ps', 'hpgl', 'dxf', 'pdf', 'svg',
415415
'gerb_drill', 'excellon']:
416416
raise YamlError("Unknown output type: {}".format(otype))
417417

kiplot/kiplot.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ def _configure_plot_ctrl(self, plot_ctrl, output):
282282
po.SetAutoScale(opts.auto_scale)
283283
po.SetScale(opts.scaling)
284284

285+
print opts.mirror_plot
285286
po.SetMirror(opts.mirror_plot)
286287
po.SetNegative(opts.negative_plot)
287288

kiplot/plot_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ def mirror_plot(self, val):
114114

115115
@property
116116
def negative_plot(self):
117-
return self._mirror_plot
117+
return self._negative_plot
118118

119119
@negative_plot.setter
120120
def negative_plot(self, val):
121121

122122
if self._supports_mirror:
123-
self._mirror_plot = val
123+
self._negative_plot = val
124124
else:
125125
raise KiPlotConfigurationError(
126126
"This Layer output does not support negative plotting")

0 commit comments

Comments
 (0)