diff options
Diffstat (limited to 'gerber/cam.py')
-rw-r--r-- | gerber/cam.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gerber/cam.py b/gerber/cam.py index c567055..8e31bf0 100644 --- a/gerber/cam.py +++ b/gerber/cam.py @@ -72,9 +72,10 @@ class FileSettings(object): elif zero_suppression is not None: if zero_suppression not in ['leading', 'trailing']: - raise ValueError('Zero suppression must be either leading or \ - trailling') - self.zero_suppression = zero_suppression + # This is a common problem in Eagle files, so just suppress it + self.zero_suppression = 'leading' + else: + self.zero_suppression = zero_suppression elif zeros is not None: if zeros not in ['leading', 'trailing']: @@ -165,6 +166,10 @@ class FileSettings(object): self.zero_suppression == other.zero_suppression and self.format == other.format and self.angle_units == other.angle_units) + + def __str__(self): + return ('<Settings: %s %s %s %s %s>' % + (self.units, self.notation, self.zero_suppression, self.format, self.angle_units)) class CamFile(object): @@ -254,6 +259,7 @@ class CamFile(object): filename : string <optional> If provided, save the rendered image to `filename` """ + ctx.set_bounds(self.bounds) ctx._paint_background() if ctx.invert: |