From 38f766dc42e3bec72236cc34c6b74fc4dab37c4e Mon Sep 17 00:00:00 2001 From: jaseg Date: Wed, 26 Apr 2023 22:57:14 +0200 Subject: Add spiky layout to protoserve --- gerbonara/cad/protoboard.py | 2 +- gerbonara/cad/protoserve.py | 3 +++ gerbonara/cad/protoserve_data/protoserve.html | 14 ++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) (limited to 'gerbonara/cad') diff --git a/gerbonara/cad/protoboard.py b/gerbonara/cad/protoboard.py index f08fb32..2acc0f2 100644 --- a/gerbonara/cad/protoboard.py +++ b/gerbonara/cad/protoboard.py @@ -473,7 +473,7 @@ class PoweredProto(ObjectGroup): class SpikyProto(ObjectGroup): def __init__(self, pitch=None, drill=None, clearance=None, power_pad_dia=None, via_size=None, trace_width=None, unit=MM): - super().__init__(0, 0) + super().__init__(0, 0, unit=unit) res = importlib.resources.files(package_data) self.fp_center = kfp.Footprint.load(res.joinpath('center-pad-spikes.kicad_mod').read_text(encoding='utf-8')) diff --git a/gerbonara/cad/protoserve.py b/gerbonara/cad/protoserve.py index a210e91..c425af7 100644 --- a/gerbonara/cad/protoserve.py +++ b/gerbonara/cad/protoserve.py @@ -106,6 +106,9 @@ def deserialize(obj, unit): pattern_dia = mil(float(obj['pattern_dia'])) return pb.PatternProtoArea(2*pitch, 2*pitch, pb.THTFlowerProto(pitch, hole_dia, pattern_dia, unit=unit), unit=unit) + case 'spiky': + return pb.PatternProtoArea(2.54, 2.54, pb.SpikyProto(), unit=unit) + case 'rf': pitch = float(obj.get('pitch', 2.54)) hole_dia = float(obj['hole_dia']) diff --git a/gerbonara/cad/protoserve_data/protoserve.html b/gerbonara/cad/protoserve_data/protoserve.html index 215513c..98a2192 100644 --- a/gerbonara/cad/protoserve_data/protoserve.html +++ b/gerbonara/cad/protoserve_data/protoserve.html @@ -363,6 +363,7 @@ input { THT Flower area Powered THT area RF THT area + Spiky hybrid area @@ -594,6 +595,19 @@ input { +