summaryrefslogtreecommitdiff
path: root/gerbonara
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-06-29 22:45:15 +0200
committerjaseg <git@jaseg.de>2023-06-29 22:45:47 +0200
commit88642a18037923a351f406435dc0d2c50c10d1ed (patch)
tree1657254c23aa807bde44f3f3a623d61fb84c8147 /gerbonara
parent56d55fda5d5424644e5914c73cfee392f8739bbb (diff)
downloadgerbonara-88642a18037923a351f406435dc0d2c50c10d1ed.tar.gz
gerbonara-88642a18037923a351f406435dc0d2c50c10d1ed.tar.bz2
gerbonara-88642a18037923a351f406435dc0d2c50c10d1ed.zip
Fix some failing unit tests
Diffstat (limited to 'gerbonara')
-rw-r--r--gerbonara/cad/kicad/footprints.py10
-rw-r--r--gerbonara/cad/kicad/graphical_primitives.py2
2 files changed, 8 insertions, 4 deletions
diff --git a/gerbonara/cad/kicad/footprints.py b/gerbonara/cad/kicad/footprints.py
index 29c947e..24488f4 100644
--- a/gerbonara/cad/kicad/footprints.py
+++ b/gerbonara/cad/kicad/footprints.py
@@ -11,7 +11,7 @@ import time
import fnmatch
from itertools import chain
from pathlib import Path
-from dataclasses import field
+from dataclasses import field, replace
from .sexp import *
from .base_types import *
@@ -37,8 +37,11 @@ class _MISSING:
class Attribute:
type: AtomChoice(Atom.smd, Atom.through_hole) = None
board_only: Flag() = False
+ virtual: Flag() = False # prior to 20208026
exclude_from_pos_files: Flag() = False
exclude_from_bom: Flag() = False
+ allow_missing_courtyard: Flag() = False
+ allow_soldermask_bridges: Flag() = False
dnp: Flag() = False
@@ -365,6 +368,7 @@ class Pad:
rect_delta: Rename(XYCoord) = None
roundrect_rratio: Named(float) = None
thermal_bridge_angle: Named(int) = 45
+ thermal_bridge_width: Named(float) = 0.5
chamfer_ratio: Named(float) = None
chamfer: Chamfer = None
net: NetDef = None
@@ -481,7 +485,7 @@ class Pad:
for obj in self.primitives.all():
for gn_obj in obj.render():
if margin and isinstance(gn_obj, (go.Line, go.Arc)):
- gn_obj = gn_obj.dilated(margin)
+ gn_obj = replace(gn_obj, aperture=gn_obj.aperture.dilated(margin))
if isinstance(gn_obj, go.Region) and margin > 0:
for line in gn_obj.outline_objects(ap.CircleAperture(2*margin, unit=MM)):
@@ -587,7 +591,7 @@ class Footprint:
thermal_gap: Named(float) = None
attributes: List(Attribute) = field(default_factory=list)
private_layers: Named(str) = None
- net_tie_pad_groups: Named(str) = None
+ net_tie_pad_groups: Named(Array(str)) = None
texts: List(Text) = field(default_factory=list)
text_boxes: List(TextBox) = field(default_factory=list)
lines: List(Line) = field(default_factory=list)
diff --git a/gerbonara/cad/kicad/graphical_primitives.py b/gerbonara/cad/kicad/graphical_primitives.py
index 752c9bc..9e3e913 100644
--- a/gerbonara/cad/kicad/graphical_primitives.py
+++ b/gerbonara/cad/kicad/graphical_primitives.py
@@ -198,7 +198,7 @@ class Arc:
if not self.width:
return
- aperture = ap.CircleAperture(self.width, unit=MM),
+ aperture = ap.CircleAperture(self.width, unit=MM)
cx, cy = self.mid.x, self.mid.y
x1, y1 = self.start.x, self.start.y
x2, y2 = self.end.x, self.end.y