summaryrefslogtreecommitdiff
path: root/gerberex/am_primitive.py
diff options
context:
space:
mode:
authorMarin Mikaƫl <41113988+MarinMikael@users.noreply.github.com>2019-07-24 01:20:15 +0900
committerGitHub <noreply@github.com>2019-07-24 01:20:15 +0900
commit415bdbc2e4339d370afcd779344ea66e39ba6b0a (patch)
tree6299a8ed04aacfa78d5d468933a54d37c1865793 /gerberex/am_primitive.py
parent89b5b714c9d2e00ebcf849783fc30bada956dd59 (diff)
downloadgerbonara-415bdbc2e4339d370afcd779344ea66e39ba6b0a.tar.gz
gerbonara-415bdbc2e4339d370afcd779344ea66e39ba6b0a.tar.bz2
gerbonara-415bdbc2e4339d370afcd779344ea66e39ba6b0a.zip
Update am_primitive.py
Fix bug when circle doesn't have any rotation by adding a default 0 degree rotation.
Diffstat (limited to 'gerberex/am_primitive.py')
-rw-r--r--gerberex/am_primitive.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gerberex/am_primitive.py b/gerberex/am_primitive.py
index df55573..a3ad824 100644
--- a/gerberex/am_primitive.py
+++ b/gerberex/am_primitive.py
@@ -56,7 +56,7 @@ class AMCirclePrimitiveDef(AMPrimitiveDef):
diameter = modifiers[1]
center_x = modifiers[2]
center_y = modifiers[3]
- rotation = modifiers[4]
+ rotation = modifiers[4] if len(modifiers)>4 else AMConstantExpression(float(0))
return cls(code, exposure, diameter, center_x, center_y, rotation)
def __init__(self, code, exposure, diameter, center_x, center_y, rotation):