Skip to content

Commit

Permalink
Merge pull request #681 from petejohanson/outputs/svg-output-aux-origin
Browse files Browse the repository at this point in the history
[SVG Export][Added] Flag for using aux origin
  • Loading branch information
set-soft authored Oct 5, 2024
2 parents c495efb + b4aac13 commit 5db11c9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kibot/out_svg.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def __init__(self):
""" [0,6] Scale factor used to represent 1 mm in the SVG (KiCad 6).
The value is how much zeros has the multiplier (1 mm = 10 power `svg_precision` units).
Note that for an A4 paper Firefox 91 and Chrome 105 can't handle more than 5 """
self.use_aux_axis_as_origin = False
""" Use the auxiliary axis as origin for coordinates """
self.limit_viewbox = False
""" When enabled the view box is limited to a selected area.
This option can't be enabled when using a scale """
Expand All @@ -54,13 +56,15 @@ def _configure_plot_ctrl(self, po, output_dir):
po.SetMirror(self.mirror_plot)
if GS.ki5:
po.SetLineWidth(FromMM(self.line_width))
po.SetUseAuxOrigin(self.use_aux_axis_as_origin)
po.SetNegative(self.negative_plot)
GS.SetSvgPrecision(po, self.svg_precision)

def read_vals_from_po(self, po):
super().read_vals_from_po(po)
if GS.ki5:
self.line_width = ToMM(po.GetLineWidth())
self.use_aux_axis_as_origin = po.GetUseAuxOrigin()
self.negative_plot = po.GetNegative()
self.mirror_plot = po.GetMirror()

Expand Down

0 comments on commit 5db11c9

Please sign in to comment.