summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-07-05 13:42:37 +0200
committerjaseg <git@jaseg.de>2023-07-05 13:42:37 +0200
commitcb188ac593b6f39b93d26224e9b16faa22babf8d (patch)
treeeca61f82a7df05334aa691469707334afca46cbc
parenta5087636ab20f0a2f4a1746a845b95d143397287 (diff)
downloadgerbonara-cb188ac593b6f39b93d26224e9b16faa22babf8d.tar.gz
gerbonara-cb188ac593b6f39b93d26224e9b16faa22babf8d.tar.bz2
gerbonara-cb188ac593b6f39b93d26224e9b16faa22babf8d.zip
kicad: various pcb re-serialization fixes
-rw-r--r--gerbonara/cad/kicad/pcb.py4
-rw-r--r--gerbonara/cad/kicad/primitives.py9
2 files changed, 9 insertions, 4 deletions
diff --git a/gerbonara/cad/kicad/pcb.py b/gerbonara/cad/kicad/pcb.py
index 3d668d2..2b28655 100644
--- a/gerbonara/cad/kicad/pcb.py
+++ b/gerbonara/cad/kicad/pcb.py
@@ -70,8 +70,8 @@ class StackupSettings:
copper_finish: Named(str) = None
dielectric_constraints: Named(YesNoAtom()) = None
edge_connector: Named(AtomChoice(Atom.yes, Atom.bevelled)) = None
- castellated_pads: Named(bool) = None
- edge_plating: Named(bool) = None
+ castellated_pads: Named(YesNoAtom()) = None
+ edge_plating: Named(YesNoAtom()) = None
TFBool = YesNoAtom(yes=Atom.true, no=Atom.false)
diff --git a/gerbonara/cad/kicad/primitives.py b/gerbonara/cad/kicad/primitives.py
index 3e78467..f066e15 100644
--- a/gerbonara/cad/kicad/primitives.py
+++ b/gerbonara/cad/kicad/primitives.py
@@ -63,6 +63,11 @@ class FillSegment:
pts: PointList = field(default_factory=PointList)
+@sexp_type('polygon')
+class ZonePolygon:
+ pts: PointList = field(default_factory=PointList)
+
+
@sexp_type('zone')
class Zone:
net: Named(int) = 0
@@ -75,10 +80,10 @@ class Zone:
priority: OmitDefault(Named(int)) = 0
connect_pads: PadConnection = field(default_factory=PadConnection)
min_thickness: Named(float) = 0.254
- filled_areas_thickness: Flag() = True
+ filled_areas_thickness: Named(YesNoAtom()) = True
keepouts: List(ZoneKeepout) = field(default_factory=list)
fill: ZoneFill = field(default_factory=ZoneFill)
- polygon: Named(PointList) = field(default_factory=PointList)
+ polygon: ZonePolygon = field(default_factory=ZonePolygon)
fill_polygons: List(FillPolygon) = field(default_factory=list)
fill_segments: List(FillSegment) = field(default_factory=list)