From cb188ac593b6f39b93d26224e9b16faa22babf8d Mon Sep 17 00:00:00 2001 From: jaseg Date: Wed, 5 Jul 2023 13:42:37 +0200 Subject: kicad: various pcb re-serialization fixes --- gerbonara/cad/kicad/pcb.py | 4 ++-- gerbonara/cad/kicad/primitives.py | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'gerbonara') 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) -- cgit