diff options
Diffstat (limited to 'gerbonara/cad/protoboard.py')
-rw-r--r-- | gerbonara/cad/protoboard.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/gerbonara/cad/protoboard.py b/gerbonara/cad/protoboard.py index 41276e2..a3d616f 100644 --- a/gerbonara/cad/protoboard.py +++ b/gerbonara/cad/protoboard.py @@ -57,9 +57,9 @@ class PropLayout: first = bool(i == 0) last = bool(i == len(self.content)-1) yield from child.generate(bbox, ( - border_text[0] and (first or self.direction == 'h'), + border_text[0] and (last or self.direction == 'h'), border_text[1] and (last or self.direction == 'v'), - border_text[2] and (last or self.direction == 'h'), + border_text[2] and (first or self.direction == 'h'), border_text[3] and (first or self.direction == 'v'), ), unit) @@ -493,19 +493,20 @@ def eval_value(value, total_length=None): def _demo(): - #pattern1 = PatternProtoArea(2.54, obj=THTPad.circle(0, 0, 0.9, 1.8, paste=False)) + pattern1 = PatternProtoArea(2.54, obj=THTPad.circle(0, 0, 0.9, 1.8, paste=False)) pattern2 = PatternProtoArea(1.2, 2.0, obj=SMDPad.rect(0, 0, 1.0, 1.8, paste=False)) - #pattern3 = PatternProtoArea(2.54, 1.27, obj=SMDPad.rect(0, 0, 2.3, 1.0, paste=False)) - pattern3 = EmptyProtoArea(copper_fill=True) - stack = TwoSideLayout(pattern2, pattern3) - #pattern = PropLayout([pattern1, stack], 'h', [0.5, 0.5]) + pattern3 = PatternProtoArea(2.54, 1.27, obj=SMDPad.rect(0, 0, 2.3, 1.0, paste=False)) + #pattern3 = EmptyProtoArea(copper_fill=True) + #stack = TwoSideLayout(pattern2, pattern3) + stack = PropLayout([pattern2, pattern3], 'v', [0.5, 0.5]) + pattern = PropLayout([pattern1, stack], 'h', [0.5, 0.5]) #pattern = PatternProtoArea(2.54, obj=ManhattanPads(2.54)) #pattern = PatternProtoArea(2.54, obj=PoweredProto()) #pattern = PatternProtoArea(2.54, obj=RFGroundProto()) #pattern = PatternProtoArea(2.54*1.5, obj=THTFlowerProto()) #pattern = PatternProtoArea(2.54, obj=THTPad.circle(0, 0, 0.9, 1.8, paste=False)) #pattern = PatternProtoArea(2.54, obj=PoweredProto()) - pb = ProtoBoard(100, 80, stack, mounting_hole_dia=3.2, mounting_hole_offset=5) + pb = ProtoBoard(100, 80, pattern, mounting_hole_dia=3.2, mounting_hole_offset=5) print(pb.pretty_svg()) pb.layer_stack().save_to_directory('/tmp/testdir') |