diff options
-rw-r--r-- | gerbonara/cad/protoboard.py | 2 | ||||
-rw-r--r-- | gerbonara/cad/protoserve.py | 3 | ||||
-rw-r--r-- | gerbonara/cad/protoserve_data/protoserve.html | 14 |
3 files changed, 18 insertions, 1 deletions
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 { <a href="#" data-placeholder="flower"class="double-sided-only">THT Flower area</a> <a href="#" data-placeholder="powered"class="double-sided-only">Powered THT area</a> <a href="#" data-placeholder="rf"class="double-sided-only">RF THT area</a> + <a href="#" data-placeholder="spiky"class="double-sided-only">Spiky hybrid area</a> </div> </div> </template> @@ -594,6 +595,19 @@ input { </div> </template> + <template id="tpl-g-spiky"> + <div data-type="spiky" class="group spiky"> + <h4>Spiky hybrid area</h4> + Layout by <a href="https://social.treehouse.systems/@electronic_eel">electroniceel</a> (<a href="https://github.com/electroniceel/protoboard">github</a>) + <span class="content area-controls">(<a href="#" class="area-remove">Remove</a><a href="#" class="area-move">Move</a>)</span> + <label class="proportion">Proportion + <input type="text" name="layout_prop" value="1"> + </label> + + <h5>Area Settings</h5> + This area has a fixed 100 mil / 2.54 mm pitch. + </div> + </template> <script> document.querySelectorAll('.expand').forEach((elem) => { const checkbox = elem.querySelector(':first-child > input'); |