Skip to content

Commit

Permalink
Return back KiCad 6 code with conditionals for v7 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Miceuz committed Sep 28, 2022
1 parent 1bfcc23 commit 45cb109
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ def generate_gerber(self, temp_dir):
plot_options.SetScale(1)
plot_options.SetMirror(False)
plot_options.SetUseGerberAttributes(True)
if hasattr(plot_options, "SetExcludeEdgeLayer"):
plot_options.SetExcludeEdgeLayer(True)
plot_options.SetUseGerberProtelExtensions(False)
plot_options.SetUseAuxOrigin(True)
plot_options.SetSubtractMaskFromSilk(False)
Expand Down Expand Up @@ -106,7 +108,7 @@ def generate_positions(self, temp_dir):
'Designator': "{}{}{}".format(footprint.GetReference(), "" if unique_id == "" else "_", unique_id),
'Mid X': (footprint.GetPosition()[0] - self.board.GetDesignSettings().GetAuxOrigin()[0]) / 1000000.0,
'Mid Y': (footprint.GetPosition()[1] - self.board.GetDesignSettings().GetAuxOrigin()[1]) * -1.0 / 1000000.0,
'Rotation': footprint.GetOrientation().AsDegrees(),
'Rotation': footprint.GetOrientation().AsDegrees() if hasattr(footprint.GetOrientation(), 'AsDegrees') else footprint.GetOrientation() / 10.0,
'Layer': layer,
})

Expand Down

0 comments on commit 45cb109

Please sign in to comment.