kopia lustrzana https://gitlab.com/gerbolyze/gerbonara
Fix variable expression calculation
rodzic
b1e189eed2
commit
b5ff6a966b
|
@ -167,7 +167,7 @@ class VariableExpression(Expression):
|
|||
|
||||
def optimized(self, variable_binding={}):
|
||||
if self.number in variable_binding:
|
||||
return ConstantExpression(expr(variable_binding[self.number]).optimized(variable_binding))
|
||||
return expr(variable_binding[self.number]).optimized(variable_binding)
|
||||
return self
|
||||
|
||||
def __eq__(self, other):
|
||||
|
|
|
@ -715,14 +715,14 @@ def _demo():
|
|||
#pattern3 = EmptyProtoArea(copper_fill=True)
|
||||
#stack = TwoSideLayout(pattern2, pattern3)
|
||||
#pattern2 = PatternProtoArea(2.54, obj=PoweredProto(), margin=1)
|
||||
#pattern3 = PatternProtoArea(2.54, obj=RFGroundProto())
|
||||
pattern = PatternProtoArea(2.54, obj=RFGroundProto())
|
||||
#stack = PropLayout([pattern2, pattern3], 'h', [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*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())
|
||||
pattern = PatternProtoArea(2.54, obj=AlioCell(), margin=2)
|
||||
#pattern = PatternProtoArea(2.54, obj=AlioCell(), margin=2)
|
||||
pb = ProtoBoard(50, 47, pattern, mounting_hole_dia=3.2, mounting_hole_offset=5)
|
||||
#pb = ProtoBoard(10, 10, pattern1)
|
||||
print(pb.pretty_svg())
|
||||
|
|
Ładowanie…
Reference in New Issue