Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion gerber_drill.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ def GenGerberDrill(board = None, split_G85 = 0.2, plotDir = "plot/", plotReferen
popt.SetMirror(False)
popt.SetUseGerberAttributes(True)
popt.SetUseGerberProtelExtensions(False)
popt.SetExcludeEdgeLayer(True)
if hasattr(popt, "SetExcludeEdgeLayer"):
popt.SetExcludeEdgeLayer(True)
popt.SetScale(1)
popt.SetUseAuxOrigin(True)
popt.SetPlotReference(plotReference)
Expand Down
5 changes: 4 additions & 1 deletion loadnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ def loadNet(brd = None):
return {}
def parseFootprint(fp):
r = {}
prop = fp.GetProperties()
if hasattr(fp, "GetFields"):
prop = fp.GetFields()
else:
prop = fp.GetProperties()
r['value'] = fp.GetValue()
r['footprint'] = str(fp.GetFPID().GetLibItemName())
if "Datasheet" in prop:
Expand Down
6 changes: 5 additions & 1 deletion mf_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,10 @@ def __init__(self, mod, offx = 0, offy = 0):
print('Pad1 not found for mod')
self.PadX = self.MidX
self.PadY = self.MidY
self.rot = int(mod.GetOrientation()/10)
if hasattr(mod, "GetOrientationDegrees"):
self.rot = int(mod.GetOrientationDegrees())
else:
self.rot = int(mod.GetOrientation()/10)
self.ref = mod.GetReference()
self.val = mod.GetValue()
self.layer = layerName(mod.GetLayer())
Expand Down Expand Up @@ -618,6 +621,7 @@ def GenMFDoc(SplitTopAndBottom = False, ExcludeRef = [], ExcludeValue = [], brd
return
bound = GetBoardBound(brd)
org_pt = pcbnew.wxPoint( bound.GetLeft(), bound.GetBottom())
org_pt = pcbnew.VECTOR2I(org_pt.x, org_pt.y)
logger("set board aux origin to left bottom point, at", org_pt)
if hasattr(brd, 'SetAuxOrigin'):
brd.SetAuxOrigin(org_pt)
Expand Down