From 5ce88e4d1b06dcc846c94ec614fb00f64e85c125 Mon Sep 17 00:00:00 2001 From: jaseg Date: Thu, 20 Apr 2023 00:46:30 +0200 Subject: Fix a bunch of bugs on the way to electroniceel's protoboard layout --- gerbonara/aperture_macros/primitive.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gerbonara/aperture_macros/primitive.py') diff --git a/gerbonara/aperture_macros/primitive.py b/gerbonara/aperture_macros/primitive.py index 5b93971..4a991f1 100644 --- a/gerbonara/aperture_macros/primitive.py +++ b/gerbonara/aperture_macros/primitive.py @@ -113,7 +113,7 @@ class VectorLine(Primitive): start_y : UnitExpression end_x : UnitExpression end_y : UnitExpression - rotation : Expression + rotation : Expression = None def to_graphic_primitives(self, offset, rotation, variable_binding={}, unit=None, polarity_dark=True): with self.Calculator(self, variable_binding, unit) as calc: @@ -243,7 +243,7 @@ class Outline(Primitive): if len(args) > 5004: raise ValueError(f'Invalid aperture macro outline primitive, too many points ({len(args)//2-2}).') - self.exposure = args.pop(0) + self.exposure = expr(args.pop(0)) # length arg must not contain variables (that would not make sense) length_arg = (args.pop(0) * ConstantExpression(1)).calculate() @@ -252,7 +252,7 @@ class Outline(Primitive): raise ValueError(f'Invalid aperture macro outline primitive, given size {length_arg} does not match length of coordinate list({len(args)//2-1}).') if len(args) % 2 == 1: - self.rotation = args.pop() + self.rotation = expr(args.pop()) else: self.rotation = ConstantExpression(0.0) -- cgit