From 1ee6b6587a0a0db1ef91284e9f4c413101520ba6 Mon Sep 17 00:00:00 2001 From: jaseg Date: Sun, 7 Jul 2024 21:42:10 +0200 Subject: protoboard: Add permanent breadboard rendering --- gerbonara/cad/protoserve.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gerbonara/cad/protoserve.py') 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)) -- cgit