diff options
author | jaseg <git@jaseg.de> | 2024-07-07 21:42:10 +0200 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2024-07-07 21:42:10 +0200 |
commit | 1ee6b6587a0a0db1ef91284e9f4c413101520ba6 (patch) | |
tree | 189a60e1dc87446d32bbf62f9dfb2b79052ce444 /gerbonara/cad/protoserve.py | |
parent | e98f3f3ace38060aaf90afc5d071200b254426dd (diff) | |
download | gerbonara-1ee6b6587a0a0db1ef91284e9f4c413101520ba6.tar.gz gerbonara-1ee6b6587a0a0db1ef91284e9f4c413101520ba6.tar.bz2 gerbonara-1ee6b6587a0a0db1ef91284e9f4c413101520ba6.zip |
protoboard: Add permanent breadboard rendering
Diffstat (limited to 'gerbonara/cad/protoserve.py')
-rw-r--r-- | gerbonara/cad/protoserve.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gerbonara/cad/protoserve.py b/gerbonara/cad/protoserve.py index 68f401c..605f399 100644 --- a/gerbonara/cad/protoserve.py +++ b/gerbonara/cad/protoserve.py @@ -129,12 +129,19 @@ def deserialize(obj, unit): via_size=via_size ), margin=unit(1.5, MM), unit=unit) + case 'breadboard': + horizontal = obj.get('direction', 'v') == 'h' + drill = float(obj.get('hole_dia', 0.9)) + return pb.BreadboardArea(clearance=clearance, drill=drill, horizontal=horizontal, unit=unit) + case 'starburst': trace_width_x = float(obj.get('trace_width_x', 1.8)) trace_width_y = float(obj.get('trace_width_y', 1.8)) drill = float(obj.get('hole_dia', 0.9)) annular_ring = float(obj.get('annular', 1.2)) - return pb.PatternProtoArea(pitch_x, pitch_y, pb.StarburstPad(pitch_x, pitch_y, trace_width_x, trace_width_y, clearance, drill, annular_ring, unit=unit), unit=unit) + clearance = float(obj.get('clearance', 0.4)) + mask_width = float(obj.get('mask_width', 0.5)) + return pb.PatternProtoArea(pitch_x, pitch_y, pb.StarburstPad(pitch_x, pitch_y, trace_width_x, trace_width_y, clearance, mask_width, drill, annular_ring, unit=unit), unit=unit) case 'rf': pitch = float(obj.get('pitch', 2.54)) |