summaryrefslogtreecommitdiff
path: root/gerbonara/rs274x.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-02-21 00:44:09 +0100
committerjaseg <git@jaseg.de>2023-02-21 00:44:09 +0100
commit9a6bc691cb0fa96d50a93e6bce60161a4fc6940d (patch)
tree3792a82fef4c4fe2f87b7ff511cc1b338e6e1af7 /gerbonara/rs274x.py
parenta374483998baff2fab4c43027c83f8bf97e5fdf5 (diff)
downloadgerbonara-9a6bc691cb0fa96d50a93e6bce60161a4fc6940d.tar.gz
gerbonara-9a6bc691cb0fa96d50a93e6bce60161a4fc6940d.tar.bz2
gerbonara-9a6bc691cb0fa96d50a93e6bce60161a4fc6940d.zip
cli: Add merge command
Diffstat (limited to 'gerbonara/rs274x.py')
-rw-r--r--gerbonara/rs274x.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/gerbonara/rs274x.py b/gerbonara/rs274x.py
index f770c51..3d28cc6 100644
--- a/gerbonara/rs274x.py
+++ b/gerbonara/rs274x.py
@@ -263,9 +263,11 @@ class GerberFile(CamFile):
:rtype: str
"""
if settings is None:
- settings = self.import_settings.copy() or FileSettings()
- settings.zeros = None
- settings.number_format = (4,5) # up to 10m by 10m with 10nm resolution
+ if self.import_settings:
+ settings = self.import_settings.copy()
+ settings.zeros = None
+ else:
+ settings = FileSettings.defaults()
return '\n'.join(self._generate_statements(settings, drop_comments=drop_comments)).encode('utf-8')
def __len__(self):