diff options
author | jaseg <git@jaseg.de> | 2023-04-30 01:58:30 +0200 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2023-04-30 01:58:30 +0200 |
commit | 73a48f1dcb8bbe25221a5df952a36aec301b9f37 (patch) | |
tree | ff3fc34a44b71d1d2b33d331e5f93b1443f1a288 /gerbonara/cad | |
parent | 9ffc96cbe53eb0335f8a379252fb8124acaf5346 (diff) | |
download | gerbonara-73a48f1dcb8bbe25221a5df952a36aec301b9f37.tar.gz gerbonara-73a48f1dcb8bbe25221a5df952a36aec301b9f37.tar.bz2 gerbonara-73a48f1dcb8bbe25221a5df952a36aec301b9f37.zip |
protoserve: Add ALio layout
Diffstat (limited to 'gerbonara/cad')
-rw-r--r-- | gerbonara/cad/protoserve.py | 18 | ||||
-rw-r--r-- | gerbonara/cad/protoserve_data/protoserve.html | 56 |
2 files changed, 69 insertions, 5 deletions
diff --git a/gerbonara/cad/protoserve.py b/gerbonara/cad/protoserve.py index 4a10acc..bcd48ce 100644 --- a/gerbonara/cad/protoserve.py +++ b/gerbonara/cad/protoserve.py @@ -100,7 +100,7 @@ def deserialize(obj, unit): via_dia = mil(float(obj['via_dia'])) trace_width = mil(float(obj['trace_width'])) # Force 1mm margin to avoid shorts when adjacent to planes such as that one in the RF THT proto. - return pb.PatternProtoArea(pitch, pitch, pb.PoweredProto(pitch, hole_dia, clearance, via_size=via_drill, power_pad_dia=via_dia, trace_width=trace_width, unit=unit), margin=1.0, unit=unit) + return pb.PatternProtoArea(pitch, pitch, pb.PoweredProto(pitch, hole_dia, clearance, via_size=via_drill, power_pad_dia=via_dia, trace_width=trace_width, unit=unit), margin=unit(1.0, MM), unit=unit) case 'flower': pitch = mil(float(obj.get('pitch', 2.54))) @@ -111,6 +111,22 @@ def deserialize(obj, unit): case 'spiky': return pb.PatternProtoArea(2.54, 2.54, pb.SpikyProto(), unit=unit) + case 'alio': + pitch = mil(float(obj.get('pitch', 2.54))) + drill = mil(float(obj.get('hole_dia', 0.9))) + clearance = mil(float(obj.get('clearance', 0.3))) + link_pad_width = mil(float(obj.get('link_pad_width', 1.1))) + link_trace_width = mil(float(obj.get('link_trace_width', 0.5))) + via_size = mil(float(obj.get('via_hole_dia', 0.4))) + return pb.PatternProtoArea(pitch, pitch, pb.AlioCell( + pitch=pitch, + drill=drill, + clearance=clearance, + link_pad_width=link_pad_width, + link_trace_width=link_trace_width, + via_size=via_size + ), margin=unit(1.5, MM), 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 9568718..00b038e 100644 --- a/gerbonara/cad/protoserve_data/protoserve.html +++ b/gerbonara/cad/protoserve_data/protoserve.html @@ -360,10 +360,11 @@ input { <a href="#" data-placeholder="smd">SMD area</a> <a href="#" data-placeholder="tht" class="double-sided-only">THT area</a> <a href="#" data-placeholder="manhattan">Manhattan area</a> - <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> + <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> + <a href="#" data-placeholder="alio" class="double-sided-only">ALio hybrid area</a> </div> </div> </template> @@ -615,6 +616,53 @@ input { This area has a fixed 100 mil / 2.54 mm pitch. </div> </template> + + <template id="tpl-g-alio"> + <div data-type="alio" class="group alio"> + <h4>ALio hybrid area</h4> + <div> + Layout by arief ibrahim adha (<a href="https://hackaday.io/project/28570-alio-new-hardware-prototyping-platform">hackaday.io</a>). + Top and bottom have opposed orientation of the SMD pads. + </div> + <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> + <label>Pitch + <input type="text" name="pitch" placeholder="length" value="2.54"> + <span class="unit metric">mm</span> + <span class="unit us">mil</span> + </label> + <label>Hole diameter + <input type="text" name="hole_dia" placeholder="length" value="0.9"> + <span class="unit metric">mm</span> + <span class="unit us">mil</span> + </label> + <label>Link trace width + <input type="text" name="link_trace_width" placeholder="length" value="0.5"> + <span class="unit metric">mm</span> + <span class="unit us">mil</span> + </label> + <label>Via pad width + <input type="text" name="link_pad_width" placeholder="length" value="0.8"> + <span class="unit metric">mm</span> + <span class="unit us">mil</span> + </label> + <label>Via drill + <input type="text" name="via_hole_dia" placeholder="length" value="0.4"> + <span class="unit metric">mm</span> + <span class="unit us">mil</span> + </label> + <label>Clearance + <input type="text" name="clearance" placeholder="length" value="0.3"> + <span class="unit metric">mm</span> + <span class="unit us">mil</span> + </label> + </div> + </template> + <script> document.querySelectorAll('.expand').forEach((elem) => { const checkbox = elem.querySelector(':first-child > input'); |