summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2021-06-13 15:00:17 +0200
committerjaseg <git@jaseg.de>2021-06-13 15:00:17 +0200
commit4eb0e063bcd34c21b737023aa6ed5baed80658d1 (patch)
tree3a56ef7d05f4f64cde930f2432119986e4aab49d
parent889ea37d9b66cbfb7a61795c7750b9f4311faa3f (diff)
downloadgerbonara-4eb0e063bcd34c21b737023aa6ed5baed80658d1.tar.gz
gerbonara-4eb0e063bcd34c21b737023aa6ed5baed80658d1.tar.bz2
gerbonara-4eb0e063bcd34c21b737023aa6ed5baed80658d1.zip
Repo re-org, make gerberex tests run
-rw-r--r--gerberex/__init__.py15
-rw-r--r--gerbonara/gerber/__init__.py (renamed from gerber/__init__.py)7
-rw-r--r--gerbonara/gerber/__main__.py (renamed from gerber/__main__.py)0
-rw-r--r--gerbonara/gerber/am_eval.py (renamed from gerber/am_eval.py)0
-rw-r--r--gerbonara/gerber/am_read.py (renamed from gerber/am_read.py)0
-rw-r--r--gerbonara/gerber/am_statements.py (renamed from gerber/am_statements.py)0
-rw-r--r--gerbonara/gerber/cam.py (renamed from gerber/cam.py)0
-rw-r--r--gerbonara/gerber/common.py (renamed from gerber/common.py)0
-rwxr-xr-xgerbonara/gerber/excellon.py (renamed from gerber/excellon.py)0
-rw-r--r--gerbonara/gerber/excellon_report/excellon_drr.py (renamed from gerber/excellon_report/excellon_drr.py)0
-rw-r--r--gerbonara/gerber/excellon_settings.py (renamed from gerber/excellon_settings.py)0
-rw-r--r--gerbonara/gerber/excellon_statements.py (renamed from gerber/excellon_statements.py)0
-rw-r--r--gerbonara/gerber/excellon_tool.py (renamed from gerber/excellon_tool.py)0
-rw-r--r--gerbonara/gerber/exceptions.py (renamed from gerber/exceptions.py)0
-rw-r--r--gerbonara/gerber/gerber_statements.py (renamed from gerber/gerber_statements.py)0
-rw-r--r--gerbonara/gerber/ipc356.py (renamed from gerber/ipc356.py)0
-rw-r--r--gerbonara/gerber/layers.py (renamed from gerber/layers.py)0
-rw-r--r--gerbonara/gerber/ncparam/allegro.py (renamed from gerber/ncparam/allegro.py)0
-rw-r--r--gerbonara/gerber/operations.py (renamed from gerber/operations.py)0
-rw-r--r--gerbonara/gerber/panelize/__init__.py8
-rw-r--r--gerbonara/gerber/panelize/am_expression.py (renamed from gerberex/am_expression.py)6
-rw-r--r--gerbonara/gerber/panelize/am_primitive.py (renamed from gerberex/am_primitive.py)8
-rw-r--r--gerbonara/gerber/panelize/common.py (renamed from gerberex/common.py)27
-rw-r--r--gerbonara/gerber/panelize/composition.py (renamed from gerberex/composition.py)26
-rw-r--r--gerbonara/gerber/panelize/dxf.py (renamed from gerberex/dxf.py)18
-rw-r--r--gerbonara/gerber/panelize/dxf_path.py (renamed from gerberex/dxf_path.py)16
-rw-r--r--gerbonara/gerber/panelize/excellon.py (renamed from gerberex/excellon.py)16
-rw-r--r--gerbonara/gerber/panelize/gerber_statements.py (renamed from gerberex/gerber_statements.py)6
-rw-r--r--gerbonara/gerber/panelize/rs274x.py (renamed from gerberex/rs274x.py)18
-rw-r--r--gerbonara/gerber/panelize/utility.py (renamed from gerberex/utility.py)0
-rw-r--r--gerbonara/gerber/pcb.py (renamed from gerber/pcb.py)0
-rw-r--r--gerbonara/gerber/primitives.py (renamed from gerber/primitives.py)0
-rw-r--r--gerbonara/gerber/render/__init__.py (renamed from gerber/render/__init__.py)0
-rw-r--r--gerbonara/gerber/render/cairo_backend.py (renamed from gerber/render/cairo_backend.py)0
-rw-r--r--gerbonara/gerber/render/excellon_backend.py (renamed from gerber/render/excellon_backend.py)0
-rw-r--r--gerbonara/gerber/render/render.py (renamed from gerber/render/render.py)0
-rw-r--r--gerbonara/gerber/render/rs274x_backend.py (renamed from gerber/render/rs274x_backend.py)0
-rw-r--r--gerbonara/gerber/render/theme.py (renamed from gerber/render/theme.py)0
-rw-r--r--gerbonara/gerber/rs274x.py (renamed from gerber/rs274x.py)0
-rw-r--r--gerbonara/gerber/tests/__init__.py (renamed from gerber/tests/__init__.py)0
-rw-r--r--gerbonara/gerber/tests/golden/example_am_exposure_modifier.png (renamed from gerber/tests/golden/example_am_exposure_modifier.png)bin10091 -> 10091 bytes
-rw-r--r--gerbonara/gerber/tests/golden/example_coincident_hole.png (renamed from gerber/tests/golden/example_coincident_hole.png)bin47261 -> 47261 bytes
-rw-r--r--gerbonara/gerber/tests/golden/example_cutin_multiple.png (renamed from gerber/tests/golden/example_cutin_multiple.png)bin1348 -> 1348 bytes
-rw-r--r--gerbonara/gerber/tests/golden/example_flash_circle.png (renamed from gerber/tests/golden/example_flash_circle.png)bin5978 -> 5978 bytes
-rw-r--r--gerbonara/gerber/tests/golden/example_flash_obround.png (renamed from gerber/tests/golden/example_flash_obround.png)bin3443 -> 3443 bytes
-rw-r--r--gerbonara/gerber/tests/golden/example_flash_polygon.png (renamed from gerber/tests/golden/example_flash_polygon.png)bin4087 -> 4087 bytes
-rw-r--r--gerbonara/gerber/tests/golden/example_flash_rectangle.png (renamed from gerber/tests/golden/example_flash_rectangle.png)bin1731 -> 1731 bytes
-rw-r--r--gerbonara/gerber/tests/golden/example_fully_coincident.png (renamed from gerber/tests/golden/example_fully_coincident.png)bin71825 -> 71825 bytes
-rw-r--r--gerbonara/gerber/tests/golden/example_holes_dont_clear.png (renamed from gerber/tests/golden/example_holes_dont_clear.png)bin11552 -> 11552 bytes
-rw-r--r--gerbonara/gerber/tests/golden/example_not_overlapping_contour.png (renamed from gerber/tests/golden/example_not_overlapping_contour.png)bin71825 -> 71825 bytes
-rw-r--r--gerbonara/gerber/tests/golden/example_not_overlapping_touching.png (renamed from gerber/tests/golden/example_not_overlapping_touching.png)bin96557 -> 96557 bytes
-rw-r--r--gerbonara/gerber/tests/golden/example_overlapping_contour.png (renamed from gerber/tests/golden/example_overlapping_contour.png)bin33301 -> 33301 bytes
-rw-r--r--gerbonara/gerber/tests/golden/example_overlapping_touching.png (renamed from gerber/tests/golden/example_overlapping_touching.png)bin33301 -> 33301 bytes
-rw-r--r--gerbonara/gerber/tests/golden/example_simple_contour.png (renamed from gerber/tests/golden/example_simple_contour.png)bin31830 -> 31830 bytes
-rw-r--r--gerbonara/gerber/tests/golden/example_single_contour.png (renamed from gerber/tests/golden/example_single_contour.png)bin556 -> 556 bytes
-rw-r--r--gerbonara/gerber/tests/golden/example_single_contour_3.png (renamed from gerber/tests/golden/example_single_contour_3.png)bin2297 -> 2297 bytes
-rw-r--r--gerbonara/gerber/tests/golden/example_single_quadrant.gbr (renamed from gerber/tests/golden/example_single_quadrant.gbr)0
-rw-r--r--gerbonara/gerber/tests/golden/example_single_quadrant.png (renamed from gerber/tests/golden/example_single_quadrant.png)bin9658 -> 9658 bytes
-rw-r--r--gerbonara/gerber/tests/golden/example_two_square_boxes.gbr (renamed from gerber/tests/golden/example_two_square_boxes.gbr)0
-rw-r--r--gerbonara/gerber/tests/golden/example_two_square_boxes.png (renamed from gerber/tests/golden/example_two_square_boxes.png)bin18219 -> 18219 bytes
-rw-r--r--gerbonara/gerber/tests/resources/board_outline.GKO (renamed from gerber/tests/resources/board_outline.GKO)0
-rw-r--r--gerbonara/gerber/tests/resources/bottom_copper.GBL (renamed from gerber/tests/resources/bottom_copper.GBL)0
-rw-r--r--gerbonara/gerber/tests/resources/bottom_mask.GBS (renamed from gerber/tests/resources/bottom_mask.GBS)0
-rw-r--r--gerbonara/gerber/tests/resources/bottom_silk.GBO (renamed from gerber/tests/resources/bottom_silk.GBO)0
-rw-r--r--gerbonara/gerber/tests/resources/example_am_exposure_modifier.gbr (renamed from gerber/tests/resources/example_am_exposure_modifier.gbr)0
-rw-r--r--gerbonara/gerber/tests/resources/example_coincident_hole.gbr (renamed from gerber/tests/resources/example_coincident_hole.gbr)0
-rw-r--r--gerbonara/gerber/tests/resources/example_cutin.gbr (renamed from gerber/tests/resources/example_cutin.gbr)0
-rw-r--r--gerbonara/gerber/tests/resources/example_cutin_multiple.gbr (renamed from gerber/tests/resources/example_cutin_multiple.gbr)0
-rw-r--r--gerbonara/gerber/tests/resources/example_flash_circle.gbr (renamed from gerber/tests/resources/example_flash_circle.gbr)0
-rw-r--r--gerbonara/gerber/tests/resources/example_flash_obround.gbr (renamed from gerber/tests/resources/example_flash_obround.gbr)0
-rw-r--r--gerbonara/gerber/tests/resources/example_flash_polygon.gbr (renamed from gerber/tests/resources/example_flash_polygon.gbr)0
-rw-r--r--gerbonara/gerber/tests/resources/example_flash_rectangle.gbr (renamed from gerber/tests/resources/example_flash_rectangle.gbr)0
-rw-r--r--gerbonara/gerber/tests/resources/example_fully_coincident.gbr (renamed from gerber/tests/resources/example_fully_coincident.gbr)0
-rw-r--r--gerbonara/gerber/tests/resources/example_guess_by_content.g0 (renamed from gerber/tests/resources/example_guess_by_content.g0)0
-rw-r--r--gerbonara/gerber/tests/resources/example_holes_dont_clear.gbr (renamed from gerber/tests/resources/example_holes_dont_clear.gbr)0
-rw-r--r--gerbonara/gerber/tests/resources/example_level_holes.gbr (renamed from gerber/tests/resources/example_level_holes.gbr)0
-rw-r--r--gerbonara/gerber/tests/resources/example_not_overlapping_contour.gbr (renamed from gerber/tests/resources/example_not_overlapping_contour.gbr)0
-rw-r--r--gerbonara/gerber/tests/resources/example_not_overlapping_touching.gbr (renamed from gerber/tests/resources/example_not_overlapping_touching.gbr)0
-rw-r--r--gerbonara/gerber/tests/resources/example_overlapping_contour.gbr (renamed from gerber/tests/resources/example_overlapping_contour.gbr)0
-rw-r--r--gerbonara/gerber/tests/resources/example_overlapping_touching.gbr (renamed from gerber/tests/resources/example_overlapping_touching.gbr)0
-rw-r--r--gerbonara/gerber/tests/resources/example_simple_contour.gbr (renamed from gerber/tests/resources/example_simple_contour.gbr)0
-rw-r--r--gerbonara/gerber/tests/resources/example_single_contour_1.gbr (renamed from gerber/tests/resources/example_single_contour_1.gbr)0
-rw-r--r--gerbonara/gerber/tests/resources/example_single_contour_2.gbr (renamed from gerber/tests/resources/example_single_contour_2.gbr)0
-rw-r--r--gerbonara/gerber/tests/resources/example_single_contour_3.gbr (renamed from gerber/tests/resources/example_single_contour_3.gbr)0
-rw-r--r--gerbonara/gerber/tests/resources/example_single_quadrant.gbr (renamed from gerber/tests/resources/example_single_quadrant.gbr)0
-rw-r--r--gerbonara/gerber/tests/resources/example_two_square_boxes.gbr (renamed from gerber/tests/resources/example_two_square_boxes.gbr)0
-rw-r--r--gerbonara/gerber/tests/resources/ipc-d-356.ipc (renamed from gerber/tests/resources/ipc-d-356.ipc)0
-rw-r--r--gerbonara/gerber/tests/resources/multiline_read.ger (renamed from gerber/tests/resources/multiline_read.ger)0
-rw-r--r--gerbonara/gerber/tests/resources/ncdrill.DRD (renamed from gerber/tests/resources/ncdrill.DRD)0
-rw-r--r--gerbonara/gerber/tests/resources/top_copper.GTL (renamed from gerber/tests/resources/top_copper.GTL)0
-rw-r--r--gerbonara/gerber/tests/resources/top_mask.GTS (renamed from gerber/tests/resources/top_mask.GTS)0
-rw-r--r--gerbonara/gerber/tests/resources/top_silk.GTO (renamed from gerber/tests/resources/top_silk.GTO)0
-rw-r--r--gerbonara/gerber/tests/test_am_statements.py (renamed from gerber/tests/test_am_statements.py)0
-rw-r--r--gerbonara/gerber/tests/test_cairo_backend.py (renamed from gerber/tests/test_cairo_backend.py)0
-rw-r--r--gerbonara/gerber/tests/test_cam.py (renamed from gerber/tests/test_cam.py)0
-rw-r--r--gerbonara/gerber/tests/test_common.py (renamed from gerber/tests/test_common.py)0
-rw-r--r--gerbonara/gerber/tests/test_excellon.py (renamed from gerber/tests/test_excellon.py)0
-rw-r--r--gerbonara/gerber/tests/test_excellon_statements.py (renamed from gerber/tests/test_excellon_statements.py)0
-rw-r--r--gerbonara/gerber/tests/test_gerber_statements.py (renamed from gerber/tests/test_gerber_statements.py)0
-rw-r--r--gerbonara/gerber/tests/test_ipc356.py (renamed from gerber/tests/test_ipc356.py)0
-rw-r--r--gerbonara/gerber/tests/test_layers.py (renamed from gerber/tests/test_layers.py)0
-rw-r--r--gerbonara/gerber/tests/test_primitives.py (renamed from gerber/tests/test_primitives.py)0
-rw-r--r--gerbonara/gerber/tests/test_rs274x.py (renamed from gerber/tests/test_rs274x.py)0
-rw-r--r--gerbonara/gerber/tests/test_rs274x_backend.py (renamed from gerber/tests/test_rs274x_backend.py)0
-rw-r--r--gerbonara/gerber/tests/test_utils.py (renamed from gerber/tests/test_utils.py)0
-rw-r--r--gerbonara/gerber/utils.py (renamed from gerber/utils.py)0
-rw-r--r--setup.py4
-rw-r--r--tests/test_am_expression.py8
-rw-r--r--tests/test_dxf.py36
-rw-r--r--tests/test_excellon.py12
-rw-r--r--tests/test_rs274x.py14
-rw-r--r--tests/test_utility.py2
112 files changed, 120 insertions, 127 deletions
diff --git a/gerberex/__init__.py b/gerberex/__init__.py
deleted file mode 100644
index f379c1c..0000000
--- a/gerberex/__init__.py
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-# Copyright 2019 Hiroshi Murayama <opiopan@gmail.com>
-"""
-Gerber Tools Extension
-======================
-**Gerber Tools Extenstion**
-gerber-tools-extension is a extention package for gerber-tools.
-This package provide panelizing of PCB fucntion.
-"""
-
-from gerberex.common import read, loads, rectangle
-from gerberex.composition import GerberComposition, DrillComposition
-from gerberex.dxf import DxfFile
diff --git a/gerber/__init__.py b/gerbonara/gerber/__init__.py
index 1faba53..a3d4753 100644
--- a/gerber/__init__.py
+++ b/gerbonara/gerber/__init__.py
@@ -15,11 +15,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""
-Gerber Tools
-============
-**Gerber Tools**
+Gerbonara
+=========
-gerber-tools provides utilities for working with Gerber (RS-274X) and Excellon
+gerbonara provides utilities for working with Gerber (RS-274X) and Excellon
files in python.
"""
diff --git a/gerber/__main__.py b/gerbonara/gerber/__main__.py
index 988adff..988adff 100644
--- a/gerber/__main__.py
+++ b/gerbonara/gerber/__main__.py
diff --git a/gerber/am_eval.py b/gerbonara/gerber/am_eval.py
index 3a7e1ed..3a7e1ed 100644
--- a/gerber/am_eval.py
+++ b/gerbonara/gerber/am_eval.py
diff --git a/gerber/am_read.py b/gerbonara/gerber/am_read.py
index 4aff00b..4aff00b 100644
--- a/gerber/am_read.py
+++ b/gerbonara/gerber/am_read.py
diff --git a/gerber/am_statements.py b/gerbonara/gerber/am_statements.py
index 31c0ae4..31c0ae4 100644
--- a/gerber/am_statements.py
+++ b/gerbonara/gerber/am_statements.py
diff --git a/gerber/cam.py b/gerbonara/gerber/cam.py
index 4f20283..4f20283 100644
--- a/gerber/cam.py
+++ b/gerbonara/gerber/cam.py
diff --git a/gerber/common.py b/gerbonara/gerber/common.py
index f496809..f496809 100644
--- a/gerber/common.py
+++ b/gerbonara/gerber/common.py
diff --git a/gerber/excellon.py b/gerbonara/gerber/excellon.py
index 5ab062a..5ab062a 100755
--- a/gerber/excellon.py
+++ b/gerbonara/gerber/excellon.py
diff --git a/gerber/excellon_report/excellon_drr.py b/gerbonara/gerber/excellon_report/excellon_drr.py
index ab9e857..ab9e857 100644
--- a/gerber/excellon_report/excellon_drr.py
+++ b/gerbonara/gerber/excellon_report/excellon_drr.py
diff --git a/gerber/excellon_settings.py b/gerbonara/gerber/excellon_settings.py
index 4dbe0ca..4dbe0ca 100644
--- a/gerber/excellon_settings.py
+++ b/gerbonara/gerber/excellon_settings.py
diff --git a/gerber/excellon_statements.py b/gerbonara/gerber/excellon_statements.py
index 2c50ef9..2c50ef9 100644
--- a/gerber/excellon_statements.py
+++ b/gerbonara/gerber/excellon_statements.py
diff --git a/gerber/excellon_tool.py b/gerbonara/gerber/excellon_tool.py
index a9ac450..a9ac450 100644
--- a/gerber/excellon_tool.py
+++ b/gerbonara/gerber/excellon_tool.py
diff --git a/gerber/exceptions.py b/gerbonara/gerber/exceptions.py
index 65ae905..65ae905 100644
--- a/gerber/exceptions.py
+++ b/gerbonara/gerber/exceptions.py
diff --git a/gerber/gerber_statements.py b/gerbonara/gerber/gerber_statements.py
index 28f5e81..28f5e81 100644
--- a/gerber/gerber_statements.py
+++ b/gerbonara/gerber/gerber_statements.py
diff --git a/gerber/ipc356.py b/gerbonara/gerber/ipc356.py
index 9337a99..9337a99 100644
--- a/gerber/ipc356.py
+++ b/gerbonara/gerber/ipc356.py
diff --git a/gerber/layers.py b/gerbonara/gerber/layers.py
index 69e1c0d..69e1c0d 100644
--- a/gerber/layers.py
+++ b/gerbonara/gerber/layers.py
diff --git a/gerber/ncparam/allegro.py b/gerbonara/gerber/ncparam/allegro.py
index a67bcf1..a67bcf1 100644
--- a/gerber/ncparam/allegro.py
+++ b/gerbonara/gerber/ncparam/allegro.py
diff --git a/gerber/operations.py b/gerbonara/gerber/operations.py
index d06876e..d06876e 100644
--- a/gerber/operations.py
+++ b/gerbonara/gerber/operations.py
diff --git a/gerbonara/gerber/panelize/__init__.py b/gerbonara/gerber/panelize/__init__.py
new file mode 100644
index 0000000..a3de2c1
--- /dev/null
+++ b/gerbonara/gerber/panelize/__init__.py
@@ -0,0 +1,8 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+# Copyright 2019 Hiroshi Murayama <opiopan@gmail.com>
+
+from .common import read, loads, rectangle
+from .composition import GerberComposition, DrillComposition
+from .dxf import DxfFile
diff --git a/gerberex/am_expression.py b/gerbonara/gerber/panelize/am_expression.py
index f43ba2e..9e19f71 100644
--- a/gerberex/am_expression.py
+++ b/gerbonara/gerber/panelize/am_expression.py
@@ -3,9 +3,9 @@
# Copyright 2019 Hiroshi Murayama <opiopan@gmail.com>
-from gerber.utils import *
-from gerber.am_eval import OpCode
-from gerber.am_statements import *
+from ..utils import *
+from ..am_eval import OpCode
+from ..am_statements import *
class AMExpression(object):
CONSTANT = 1
diff --git a/gerberex/am_primitive.py b/gerbonara/gerber/panelize/am_primitive.py
index a3ad824..123f030 100644
--- a/gerberex/am_primitive.py
+++ b/gerbonara/gerber/panelize/am_primitive.py
@@ -3,11 +3,11 @@
# Copyright 2019 Hiroshi Murayama <opiopan@gmail.com>
-from gerber.utils import *
-from gerber.am_statements import *
-from gerber.am_eval import OpCode
+from ..utils import *
+from ..am_statements import *
+from ..am_eval import OpCode
-from gerberex.am_expression import eval_macro, AMConstantExpression, AMOperatorExpression
+from .am_expression import eval_macro, AMConstantExpression, AMOperatorExpression
class AMPrimitiveDef(AMPrimitive):
def __init__(self, code, exposure=None, rotation=None):
diff --git a/gerberex/common.py b/gerbonara/gerber/panelize/common.py
index 6e8a832..03bf9b0 100644
--- a/gerberex/common.py
+++ b/gerbonara/gerber/panelize/common.py
@@ -4,14 +4,15 @@
# Copyright 2019 Hiroshi Murayama <opiopan@gmail.com>
import os
-from gerber.common import loads as loads_org
-from gerber.exceptions import ParseError
-from gerber.utils import detect_file_format
-import gerber.rs274x
-import gerber.ipc356
-import gerberex.rs274x
-import gerberex.excellon
-import gerberex.dxf
+from ..common import loads as loads_org
+from ..exceptions import ParseError
+from ..utils import detect_file_format
+from .. import rs274x
+from .. import ipc356
+
+from . import rs274x as ex_rs274x
+from . import excellon
+from . import dxf
def read(filename, format=None):
with open(filename, 'rU') as f:
@@ -21,14 +22,14 @@ def read(filename, format=None):
def loads(data, filename=None, format=None):
if os.path.splitext(filename if filename else '')[1].lower() == '.dxf':
- return gerberex.dxf.loads(data, filename)
+ return dxf.loads(data, filename)
fmt = detect_file_format(data)
if fmt == 'rs274x':
- file = gerberex.rs274x.loads(data, filename=filename)
- return gerberex.rs274x.GerberFile.from_gerber_file(file)
+ file = ex_rs274x.loads(data, filename=filename)
+ return ex_rs274x.GerberFile.from_gerber_file(file)
elif fmt == 'excellon':
- return gerberex.excellon.loads(data, filename=filename, format=format)
+ return excellon.loads(data, filename=filename, format=format)
elif fmt == 'ipc_d_356':
return ipc356.loads(data, filename=filename)
else:
@@ -36,5 +37,5 @@ def loads(data, filename=None, format=None):
def rectangle(width, height, left=0, bottom=0, units='metric', draw_mode=None, filename=None):
- return gerberex.dxf.DxfFile.rectangle(
+ return dxf.DxfFile.rectangle(
width, height, left, bottom, units, draw_mode, filename)
diff --git a/gerberex/composition.py b/gerbonara/gerber/panelize/composition.py
index b5dffb1..619a0cf 100644
--- a/gerberex/composition.py
+++ b/gerbonara/gerber/panelize/composition.py
@@ -4,13 +4,13 @@
# Copyright 2019 Hiroshi Murayama <opiopan@gmail.com>
import os
from functools import reduce
-from gerber.cam import FileSettings
-from gerber.gerber_statements import EofStmt
-from gerber.excellon_statements import *
-from gerber.excellon import DrillSlot, DrillHit
-import gerberex.rs274x
-import gerberex.excellon
-import gerberex.dxf
+from ..cam import FileSettings
+from ..gerber_statements import EofStmt
+from ..excellon_statements import *
+from ..excellon import DrillSlot, DrillHit
+from . import rs274x
+from . import excellon
+from . import dxf
class Composition(object):
def __init__(self, settings = None, comments = None):
@@ -27,9 +27,9 @@ class GerberComposition(Composition):
self.drawings = []
def merge(self, file):
- if isinstance(file, gerberex.rs274x.GerberFile):
+ if isinstance(file, rs274x.GerberFile):
self._merge_gerber(file)
- elif isinstance(file, gerberex.dxf.DxfFile):
+ elif isinstance(file, dxf.DxfFile):
self._merge_dxf(file)
else:
raise Exception('unsupported file type')
@@ -46,7 +46,7 @@ class GerberComposition(Composition):
self.settings.notation = 'absolute'
self.settings.zeros = 'trailing'
with open(path, 'w') as f:
- gerberex.rs274x.write_gerber_header(f, self.settings)
+ rs274x.write_gerber_header(f, self.settings)
for statement in statements():
f.write(statement.to_gerber(self.settings) + '\n')
@@ -120,9 +120,9 @@ class DrillComposition(Composition):
self.dxf_statements = []
def merge(self, file):
- if isinstance(file, gerberex.excellon.ExcellonFileEx):
+ if isinstance(file, excellon.ExcellonFileEx):
self._merge_excellon(file)
- elif isinstance(file, gerberex.DxfFile):
+ elif isinstance(file, DxfFile):
self._merge_dxf(file)
else:
raise Exception('unsupported file type')
@@ -142,7 +142,7 @@ class DrillComposition(Composition):
self.settings.notation = 'absolute'
self.settings.zeros = 'trailing'
with open(path, 'w') as f:
- gerberex.excellon.write_excellon_header(f, self.settings, self.tools)
+ excellon.write_excellon_header(f, self.settings, self.tools)
for statement in statements():
f.write(statement + '\n')
diff --git a/gerberex/dxf.py b/gerbonara/gerber/panelize/dxf.py
index 2341092..9eb9217 100644
--- a/gerberex/dxf.py
+++ b/gerbonara/gerber/panelize/dxf.py
@@ -6,15 +6,15 @@
import io, sys
from math import pi, cos, sin, tan, atan, atan2, acos, asin, sqrt
import dxfgrabber
-from gerber.cam import CamFile, FileSettings
-from gerber.utils import inch, metric, write_gerber_value, rotate_point
-from gerber.gerber_statements import ADParamStmt
-from gerber.excellon_statements import ExcellonTool
-from gerber.excellon_statements import CoordinateStmt
-from gerberex.utility import is_equal_point, is_equal_value
-from gerberex.dxf_path import generate_paths, judge_containment
-from gerberex.excellon import write_excellon_header
-from gerberex.rs274x import write_gerber_header
+from ..cam import CamFile, FileSettings
+from ..utils import inch, metric, write_gerber_value, rotate_point
+from ..gerber_statements import ADParamStmt
+from ..excellon_statements import ExcellonTool
+from ..excellon_statements import CoordinateStmt
+from .utility import is_equal_point, is_equal_value
+from .dxf_path import generate_paths, judge_containment
+from .excellon import write_excellon_header
+from .rs274x import write_gerber_header
ACCEPTABLE_ERROR = 0.001
diff --git a/gerberex/dxf_path.py b/gerbonara/gerber/panelize/dxf_path.py
index 960b054..201dcff 100644
--- a/gerberex/dxf_path.py
+++ b/gerbonara/gerber/panelize/dxf_path.py
@@ -3,10 +3,10 @@
# Copyright 2019 Hiroshi Murayama <opiopan@gmail.com>
-from gerber.utils import inch, metric, write_gerber_value
-from gerber.cam import FileSettings
-from gerberex.utility import is_equal_point, is_equal_value, normalize_vec2d, dot_vec2d
-from gerberex.excellon import CoordinateStmtEx
+from ..utils import inch, metric, write_gerber_value
+from ..cam import FileSettings
+from .utility import is_equal_point, is_equal_value, normalize_vec2d, dot_vec2d
+from .excellon import CoordinateStmtEx
class DxfPath(object):
def __init__(self, statements, error_range=0):
@@ -176,7 +176,7 @@ class DxfPath(object):
return True
def to_gerber(self, settings=FileSettings(), pitch=0, width=0):
- from gerberex.dxf import DxfArcStatement
+ from .dxf import DxfArcStatement
if pitch == 0:
x0, y0 = self.statements[0].start
gerber = 'G01*\nX{0}Y{1}D02*\nG75*'.format(
@@ -222,7 +222,7 @@ class DxfPath(object):
return gerber
def to_excellon(self, settings=FileSettings(), pitch=0, width=0):
- from gerberex.dxf import DxfArcStatement
+ from .dxf import DxfArcStatement
if pitch == 0:
x0, y0 = self.statements[0].start
excellon = 'G00{0}\nM15\n'.format(
@@ -322,7 +322,7 @@ class DxfPath(object):
raise Exception('inconsistensy is detected while cross judgement between paths')
def generate_paths(statements, error_range=0):
- from gerberex.dxf import DxfPolylineStatement
+ from .dxf import DxfPolylineStatement
paths = []
for statement in filter(lambda s: isinstance(s, DxfPolylineStatement), statements):
@@ -365,7 +365,7 @@ def generate_paths(statements, error_range=0):
return (closed_path, open_path)
def judge_containment(path1, path2, error_range=0):
- from gerberex.dxf import DxfArcStatement, DxfLineStatement
+ from .dxf import DxfArcStatement, DxfLineStatement
nocontainment = (None, None)
if not path1.may_be_in_collision(path2):
diff --git a/gerberex/excellon.py b/gerbonara/gerber/panelize/excellon.py
index f7787d3..ae0b68e 100644
--- a/gerberex/excellon.py
+++ b/gerbonara/gerber/panelize/excellon.py
@@ -5,24 +5,24 @@
import operator
-import gerber.excellon
-from gerber.excellon import ExcellonParser, detect_excellon_format, ExcellonFile, DrillHit, DrillSlot
-from gerber.excellon_statements import ExcellonStatement, UnitStmt, CoordinateStmt, UnknownStmt, \
+from .. import excellon
+from ..excellon import ExcellonParser, detect_excellon_format, ExcellonFile, DrillHit, DrillSlot
+from ..excellon_statements import ExcellonStatement, UnitStmt, CoordinateStmt, UnknownStmt, \
SlotStmt, DrillModeStmt, RouteModeStmt, LinearModeStmt, \
ToolSelectionStmt, ZAxisRoutPositionStmt, \
RetractWithClampingStmt, RetractWithoutClampingStmt, \
EndOfProgramStmt
-from gerber.cam import FileSettings
-from gerber.utils import inch, metric, write_gerber_value, parse_gerber_value
-from gerberex.utility import rotate
+from ..cam import FileSettings
+from ..utils import inch, metric, write_gerber_value, parse_gerber_value
+from .utility import rotate
def loads(data, filename=None, settings=None, tools=None, format=None):
if not settings:
settings = FileSettings(**detect_excellon_format(data))
if format:
settings.format = format
- gerber.excellon.CoordinateStmt = CoordinateStmtEx
- gerber.excellon.UnitStmt = UnitStmtEx
+ excellon.CoordinateStmt = CoordinateStmtEx
+ excellon.UnitStmt = UnitStmtEx
file = ExcellonParser(settings, tools).parse_raw(data, filename)
return ExcellonFileEx.from_file(file)
diff --git a/gerberex/gerber_statements.py b/gerbonara/gerber/panelize/gerber_statements.py
index c2eb565..875d656 100644
--- a/gerberex/gerber_statements.py
+++ b/gerbonara/gerber/panelize/gerber_statements.py
@@ -3,9 +3,9 @@
# Copyright 2019 Hiroshi Murayama <opiopan@gmail.com>
-from gerber.gerber_statements import AMParamStmt, ADParamStmt
-from gerber.utils import inch, metric
-from gerberex.am_primitive import to_primitive_defs
+from ..gerber_statements import AMParamStmt, ADParamStmt
+from ..utils import inch, metric
+from .am_primitive import to_primitive_defs
class AMParamStmtEx(AMParamStmt):
@classmethod
diff --git a/gerberex/rs274x.py b/gerbonara/gerber/panelize/rs274x.py
index 3a3a712..2f44cd4 100644
--- a/gerberex/rs274x.py
+++ b/gerbonara/gerber/panelize/rs274x.py
@@ -3,15 +3,15 @@
# Copyright 2019 Hiroshi Murayama <opiopan@gmail.com>
-from gerber.cam import FileSettings
-import gerber.rs274x
-from gerber.gerber_statements import *
-from gerberex.gerber_statements import AMParamStmt, AMParamStmtEx, ADParamStmtEx
-from gerberex.utility import rotate
+from ..cam import FileSettings
+from .. import rs274x
+from ..gerber_statements import *
+from .gerber_statements import AMParamStmt, AMParamStmtEx, ADParamStmtEx
+from .utility import rotate
import re
def loads(data, filename=None):
- cls = gerber.rs274x.GerberParser
+ cls = rs274x.GerberParser
cls.SF = \
r"(?P<param>SF)(A(?P<a>{decimal}))?(B(?P<b>{decimal}))?".format(decimal=cls.DECIMAL)
cls.PARAMS = (cls.FS, cls.MO, cls.LP, cls.AD_CIRCLE,
@@ -27,11 +27,11 @@ def write_gerber_header(file, settings):
FSParamStmt('FS', settings.zero_suppression,
settings.notation, settings.format).to_gerber(settings)))
-class GerberFile(gerber.rs274x.GerberFile):
+class GerberFile(rs274x.GerberFile):
@classmethod
def from_gerber_file(cls, gerber_file):
- if not isinstance(gerber_file, gerber.rs274x.GerberFile):
- raise Exception('only gerber.rs274x.GerberFile object is specified')
+ if not isinstance(gerber_file, rs274x.GerberFile):
+ raise Exception('only gerbonara.gerber.rs274x.GerberFile object is specified')
return cls(gerber_file.statements, gerber_file.settings, gerber_file.primitives,\
gerber_file.apertures, gerber_file.filename)
diff --git a/gerberex/utility.py b/gerbonara/gerber/panelize/utility.py
index 37de5e8..37de5e8 100644
--- a/gerberex/utility.py
+++ b/gerbonara/gerber/panelize/utility.py
diff --git a/gerber/pcb.py b/gerbonara/gerber/pcb.py
index 1d22e74..1d22e74 100644
--- a/gerber/pcb.py
+++ b/gerbonara/gerber/pcb.py
diff --git a/gerber/primitives.py b/gerbonara/gerber/primitives.py
index 757f117..757f117 100644
--- a/gerber/primitives.py
+++ b/gerbonara/gerber/primitives.py
diff --git a/gerber/render/__init__.py b/gerbonara/gerber/render/__init__.py
index c7dbdd5..c7dbdd5 100644
--- a/gerber/render/__init__.py
+++ b/gerbonara/gerber/render/__init__.py
diff --git a/gerber/render/cairo_backend.py b/gerbonara/gerber/render/cairo_backend.py
index e1d1408..e1d1408 100644
--- a/gerber/render/cairo_backend.py
+++ b/gerbonara/gerber/render/cairo_backend.py
diff --git a/gerber/render/excellon_backend.py b/gerbonara/gerber/render/excellon_backend.py
index 765d68c..765d68c 100644
--- a/gerber/render/excellon_backend.py
+++ b/gerbonara/gerber/render/excellon_backend.py
diff --git a/gerber/render/render.py b/gerbonara/gerber/render/render.py
index 580a7ea..580a7ea 100644
--- a/gerber/render/render.py
+++ b/gerbonara/gerber/render/render.py
diff --git a/gerber/render/rs274x_backend.py b/gerbonara/gerber/render/rs274x_backend.py
index c7af2ea..c7af2ea 100644
--- a/gerber/render/rs274x_backend.py
+++ b/gerbonara/gerber/render/rs274x_backend.py
diff --git a/gerber/render/theme.py b/gerbonara/gerber/render/theme.py
index 2f558a1..2f558a1 100644
--- a/gerber/render/theme.py
+++ b/gerbonara/gerber/render/theme.py
diff --git a/gerber/rs274x.py b/gerbonara/gerber/rs274x.py
index afdf45f..afdf45f 100644
--- a/gerber/rs274x.py
+++ b/gerbonara/gerber/rs274x.py
diff --git a/gerber/tests/__init__.py b/gerbonara/gerber/tests/__init__.py
index e69de29..e69de29 100644
--- a/gerber/tests/__init__.py
+++ b/gerbonara/gerber/tests/__init__.py
diff --git a/gerber/tests/golden/example_am_exposure_modifier.png b/gerbonara/gerber/tests/golden/example_am_exposure_modifier.png
index dac951f..dac951f 100644
--- a/gerber/tests/golden/example_am_exposure_modifier.png
+++ b/gerbonara/gerber/tests/golden/example_am_exposure_modifier.png
Binary files differ
diff --git a/gerber/tests/golden/example_coincident_hole.png b/gerbonara/gerber/tests/golden/example_coincident_hole.png
index 9855b11..9855b11 100644
--- a/gerber/tests/golden/example_coincident_hole.png
+++ b/gerbonara/gerber/tests/golden/example_coincident_hole.png
Binary files differ
diff --git a/gerber/tests/golden/example_cutin_multiple.png b/gerbonara/gerber/tests/golden/example_cutin_multiple.png
index ebc1191..ebc1191 100644
--- a/gerber/tests/golden/example_cutin_multiple.png
+++ b/gerbonara/gerber/tests/golden/example_cutin_multiple.png
Binary files differ
diff --git a/gerber/tests/golden/example_flash_circle.png b/gerbonara/gerber/tests/golden/example_flash_circle.png
index 0c407f6..0c407f6 100644
--- a/gerber/tests/golden/example_flash_circle.png
+++ b/gerbonara/gerber/tests/golden/example_flash_circle.png
Binary files differ
diff --git a/gerber/tests/golden/example_flash_obround.png b/gerbonara/gerber/tests/golden/example_flash_obround.png
index 2fd4dc3..2fd4dc3 100644
--- a/gerber/tests/golden/example_flash_obround.png
+++ b/gerbonara/gerber/tests/golden/example_flash_obround.png
Binary files differ
diff --git a/gerber/tests/golden/example_flash_polygon.png b/gerbonara/gerber/tests/golden/example_flash_polygon.png
index 89a964b..89a964b 100644
--- a/gerber/tests/golden/example_flash_polygon.png
+++ b/gerbonara/gerber/tests/golden/example_flash_polygon.png
Binary files differ
diff --git a/gerber/tests/golden/example_flash_rectangle.png b/gerbonara/gerber/tests/golden/example_flash_rectangle.png
index 797e0c3..797e0c3 100644
--- a/gerber/tests/golden/example_flash_rectangle.png
+++ b/gerbonara/gerber/tests/golden/example_flash_rectangle.png
Binary files differ
diff --git a/gerber/tests/golden/example_fully_coincident.png b/gerbonara/gerber/tests/golden/example_fully_coincident.png
index 4e522ff..4e522ff 100644
--- a/gerber/tests/golden/example_fully_coincident.png
+++ b/gerbonara/gerber/tests/golden/example_fully_coincident.png
Binary files differ
diff --git a/gerber/tests/golden/example_holes_dont_clear.png b/gerbonara/gerber/tests/golden/example_holes_dont_clear.png
index 7efb67b..7efb67b 100644
--- a/gerber/tests/golden/example_holes_dont_clear.png
+++ b/gerbonara/gerber/tests/golden/example_holes_dont_clear.png
Binary files differ
diff --git a/gerber/tests/golden/example_not_overlapping_contour.png b/gerbonara/gerber/tests/golden/example_not_overlapping_contour.png
index 4e522ff..4e522ff 100644
--- a/gerber/tests/golden/example_not_overlapping_contour.png
+++ b/gerbonara/gerber/tests/golden/example_not_overlapping_contour.png
Binary files differ
diff --git a/gerber/tests/golden/example_not_overlapping_touching.png b/gerbonara/gerber/tests/golden/example_not_overlapping_touching.png
index d485495..d485495 100644
--- a/gerber/tests/golden/example_not_overlapping_touching.png
+++ b/gerbonara/gerber/tests/golden/example_not_overlapping_touching.png
Binary files differ
diff --git a/gerber/tests/golden/example_overlapping_contour.png b/gerbonara/gerber/tests/golden/example_overlapping_contour.png
index 7504311..7504311 100644
--- a/gerber/tests/golden/example_overlapping_contour.png
+++ b/gerbonara/gerber/tests/golden/example_overlapping_contour.png
Binary files differ
diff --git a/gerber/tests/golden/example_overlapping_touching.png b/gerbonara/gerber/tests/golden/example_overlapping_touching.png
index 7504311..7504311 100644
--- a/gerber/tests/golden/example_overlapping_touching.png
+++ b/gerbonara/gerber/tests/golden/example_overlapping_touching.png
Binary files differ
diff --git a/gerber/tests/golden/example_simple_contour.png b/gerbonara/gerber/tests/golden/example_simple_contour.png
index 564ae14..564ae14 100644
--- a/gerber/tests/golden/example_simple_contour.png
+++ b/gerbonara/gerber/tests/golden/example_simple_contour.png
Binary files differ
diff --git a/gerber/tests/golden/example_single_contour.png b/gerbonara/gerber/tests/golden/example_single_contour.png
index 3341638..3341638 100644
--- a/gerber/tests/golden/example_single_contour.png
+++ b/gerbonara/gerber/tests/golden/example_single_contour.png
Binary files differ
diff --git a/gerber/tests/golden/example_single_contour_3.png b/gerbonara/gerber/tests/golden/example_single_contour_3.png
index 1eecfee..1eecfee 100644
--- a/gerber/tests/golden/example_single_contour_3.png
+++ b/gerbonara/gerber/tests/golden/example_single_contour_3.png
Binary files differ
diff --git a/gerber/tests/golden/example_single_quadrant.gbr b/gerbonara/gerber/tests/golden/example_single_quadrant.gbr
index b0a3166..b0a3166 100644
--- a/gerber/tests/golden/example_single_quadrant.gbr
+++ b/gerbonara/gerber/tests/golden/example_single_quadrant.gbr
diff --git a/gerber/tests/golden/example_single_quadrant.png b/gerbonara/gerber/tests/golden/example_single_quadrant.png
index 89b763f..89b763f 100644
--- a/gerber/tests/golden/example_single_quadrant.png
+++ b/gerbonara/gerber/tests/golden/example_single_quadrant.png
Binary files differ
diff --git a/gerber/tests/golden/example_two_square_boxes.gbr b/gerbonara/gerber/tests/golden/example_two_square_boxes.gbr
index b5c60d1..b5c60d1 100644
--- a/gerber/tests/golden/example_two_square_boxes.gbr
+++ b/gerbonara/gerber/tests/golden/example_two_square_boxes.gbr
diff --git a/gerber/tests/golden/example_two_square_boxes.png b/gerbonara/gerber/tests/golden/example_two_square_boxes.png
index 98d0518..98d0518 100644
--- a/gerber/tests/golden/example_two_square_boxes.png
+++ b/gerbonara/gerber/tests/golden/example_two_square_boxes.png
Binary files differ
diff --git a/gerber/tests/resources/board_outline.GKO b/gerbonara/gerber/tests/resources/board_outline.GKO
index 40b8c7d..40b8c7d 100644
--- a/gerber/tests/resources/board_outline.GKO
+++ b/gerbonara/gerber/tests/resources/board_outline.GKO
diff --git a/gerber/tests/resources/bottom_copper.GBL b/gerbonara/gerber/tests/resources/bottom_copper.GBL
index 0d98da3..0d98da3 100644
--- a/gerber/tests/resources/bottom_copper.GBL
+++ b/gerbonara/gerber/tests/resources/bottom_copper.GBL
diff --git a/gerber/tests/resources/bottom_mask.GBS b/gerbonara/gerber/tests/resources/bottom_mask.GBS
index b06654f..b06654f 100644
--- a/gerber/tests/resources/bottom_mask.GBS
+++ b/gerbonara/gerber/tests/resources/bottom_mask.GBS
diff --git a/gerber/tests/resources/bottom_silk.GBO b/gerbonara/gerber/tests/resources/bottom_silk.GBO
index 0e19197..0e19197 100644
--- a/gerber/tests/resources/bottom_silk.GBO
+++ b/gerbonara/gerber/tests/resources/bottom_silk.GBO
diff --git a/gerber/tests/resources/example_am_exposure_modifier.gbr b/gerbonara/gerber/tests/resources/example_am_exposure_modifier.gbr
index 5f3f3dd..5f3f3dd 100644
--- a/gerber/tests/resources/example_am_exposure_modifier.gbr
+++ b/gerbonara/gerber/tests/resources/example_am_exposure_modifier.gbr
diff --git a/gerber/tests/resources/example_coincident_hole.gbr b/gerbonara/gerber/tests/resources/example_coincident_hole.gbr
index 4f896ea..4f896ea 100644
--- a/gerber/tests/resources/example_coincident_hole.gbr
+++ b/gerbonara/gerber/tests/resources/example_coincident_hole.gbr
diff --git a/gerber/tests/resources/example_cutin.gbr b/gerbonara/gerber/tests/resources/example_cutin.gbr
index 365e5e1..365e5e1 100644
--- a/gerber/tests/resources/example_cutin.gbr
+++ b/gerbonara/gerber/tests/resources/example_cutin.gbr
diff --git a/gerber/tests/resources/example_cutin_multiple.gbr b/gerbonara/gerber/tests/resources/example_cutin_multiple.gbr
index 8e19429..8e19429 100644
--- a/gerber/tests/resources/example_cutin_multiple.gbr
+++ b/gerbonara/gerber/tests/resources/example_cutin_multiple.gbr
diff --git a/gerber/tests/resources/example_flash_circle.gbr b/gerbonara/gerber/tests/resources/example_flash_circle.gbr
index 20b2566..20b2566 100644
--- a/gerber/tests/resources/example_flash_circle.gbr
+++ b/gerbonara/gerber/tests/resources/example_flash_circle.gbr
diff --git a/gerber/tests/resources/example_flash_obround.gbr b/gerbonara/gerber/tests/resources/example_flash_obround.gbr
index 5313f82..5313f82 100644
--- a/gerber/tests/resources/example_flash_obround.gbr
+++ b/gerbonara/gerber/tests/resources/example_flash_obround.gbr
diff --git a/gerber/tests/resources/example_flash_polygon.gbr b/gerbonara/gerber/tests/resources/example_flash_polygon.gbr
index 177cf9b..177cf9b 100644
--- a/gerber/tests/resources/example_flash_polygon.gbr
+++ b/gerbonara/gerber/tests/resources/example_flash_polygon.gbr
diff --git a/gerber/tests/resources/example_flash_rectangle.gbr b/gerbonara/gerber/tests/resources/example_flash_rectangle.gbr
index 8fde812..8fde812 100644
--- a/gerber/tests/resources/example_flash_rectangle.gbr
+++ b/gerbonara/gerber/tests/resources/example_flash_rectangle.gbr
diff --git a/gerber/tests/resources/example_fully_coincident.gbr b/gerbonara/gerber/tests/resources/example_fully_coincident.gbr
index 3764128..3764128 100644
--- a/gerber/tests/resources/example_fully_coincident.gbr
+++ b/gerbonara/gerber/tests/resources/example_fully_coincident.gbr
diff --git a/gerber/tests/resources/example_guess_by_content.g0 b/gerbonara/gerber/tests/resources/example_guess_by_content.g0
index 5b26afe..5b26afe 100644
--- a/gerber/tests/resources/example_guess_by_content.g0
+++ b/gerbonara/gerber/tests/resources/example_guess_by_content.g0
diff --git a/gerber/tests/resources/example_holes_dont_clear.gbr b/gerbonara/gerber/tests/resources/example_holes_dont_clear.gbr
index deeebd0..deeebd0 100644
--- a/gerber/tests/resources/example_holes_dont_clear.gbr
+++ b/gerbonara/gerber/tests/resources/example_holes_dont_clear.gbr
diff --git a/gerber/tests/resources/example_level_holes.gbr b/gerbonara/gerber/tests/resources/example_level_holes.gbr
index 1b4e189..1b4e189 100644
--- a/gerber/tests/resources/example_level_holes.gbr
+++ b/gerbonara/gerber/tests/resources/example_level_holes.gbr
diff --git a/gerber/tests/resources/example_not_overlapping_contour.gbr b/gerbonara/gerber/tests/resources/example_not_overlapping_contour.gbr
index e3ea631..e3ea631 100644
--- a/gerber/tests/resources/example_not_overlapping_contour.gbr
+++ b/gerbonara/gerber/tests/resources/example_not_overlapping_contour.gbr
diff --git a/gerber/tests/resources/example_not_overlapping_touching.gbr b/gerbonara/gerber/tests/resources/example_not_overlapping_touching.gbr
index 3b9b955..3b9b955 100644
--- a/gerber/tests/resources/example_not_overlapping_touching.gbr
+++ b/gerbonara/gerber/tests/resources/example_not_overlapping_touching.gbr
diff --git a/gerber/tests/resources/example_overlapping_contour.gbr b/gerbonara/gerber/tests/resources/example_overlapping_contour.gbr
index 74886a2..74886a2 100644
--- a/gerber/tests/resources/example_overlapping_contour.gbr
+++ b/gerbonara/gerber/tests/resources/example_overlapping_contour.gbr
diff --git a/gerber/tests/resources/example_overlapping_touching.gbr b/gerbonara/gerber/tests/resources/example_overlapping_touching.gbr
index 27fce15..27fce15 100644
--- a/gerber/tests/resources/example_overlapping_touching.gbr
+++ b/gerbonara/gerber/tests/resources/example_overlapping_touching.gbr
diff --git a/gerber/tests/resources/example_simple_contour.gbr b/gerbonara/gerber/tests/resources/example_simple_contour.gbr
index d851760..d851760 100644
--- a/gerber/tests/resources/example_simple_contour.gbr
+++ b/gerbonara/gerber/tests/resources/example_simple_contour.gbr
diff --git a/gerber/tests/resources/example_single_contour_1.gbr b/gerbonara/gerber/tests/resources/example_single_contour_1.gbr
index e9f9a75..e9f9a75 100644
--- a/gerber/tests/resources/example_single_contour_1.gbr
+++ b/gerbonara/gerber/tests/resources/example_single_contour_1.gbr
diff --git a/gerber/tests/resources/example_single_contour_2.gbr b/gerbonara/gerber/tests/resources/example_single_contour_2.gbr
index 085c72c..085c72c 100644
--- a/gerber/tests/resources/example_single_contour_2.gbr
+++ b/gerbonara/gerber/tests/resources/example_single_contour_2.gbr
diff --git a/gerber/tests/resources/example_single_contour_3.gbr b/gerbonara/gerber/tests/resources/example_single_contour_3.gbr
index 40de149..40de149 100644
--- a/gerber/tests/resources/example_single_contour_3.gbr
+++ b/gerbonara/gerber/tests/resources/example_single_contour_3.gbr
diff --git a/gerber/tests/resources/example_single_quadrant.gbr b/gerbonara/gerber/tests/resources/example_single_quadrant.gbr
index c398601..c398601 100644
--- a/gerber/tests/resources/example_single_quadrant.gbr
+++ b/gerbonara/gerber/tests/resources/example_single_quadrant.gbr
diff --git a/gerber/tests/resources/example_two_square_boxes.gbr b/gerbonara/gerber/tests/resources/example_two_square_boxes.gbr
index 54a8ac1..54a8ac1 100644
--- a/gerber/tests/resources/example_two_square_boxes.gbr
+++ b/gerbonara/gerber/tests/resources/example_two_square_boxes.gbr
diff --git a/gerber/tests/resources/ipc-d-356.ipc b/gerbonara/gerber/tests/resources/ipc-d-356.ipc
index 2ed3f49..2ed3f49 100644
--- a/gerber/tests/resources/ipc-d-356.ipc
+++ b/gerbonara/gerber/tests/resources/ipc-d-356.ipc
diff --git a/gerber/tests/resources/multiline_read.ger b/gerbonara/gerber/tests/resources/multiline_read.ger
index 02242e4..02242e4 100644
--- a/gerber/tests/resources/multiline_read.ger
+++ b/gerbonara/gerber/tests/resources/multiline_read.ger
diff --git a/gerber/tests/resources/ncdrill.DRD b/gerbonara/gerber/tests/resources/ncdrill.DRD
index ced00ca..ced00ca 100644
--- a/gerber/tests/resources/ncdrill.DRD
+++ b/gerbonara/gerber/tests/resources/ncdrill.DRD
diff --git a/gerber/tests/resources/top_copper.GTL b/gerbonara/gerber/tests/resources/top_copper.GTL
index 01c848e..01c848e 100644
--- a/gerber/tests/resources/top_copper.GTL
+++ b/gerbonara/gerber/tests/resources/top_copper.GTL
diff --git a/gerber/tests/resources/top_mask.GTS b/gerbonara/gerber/tests/resources/top_mask.GTS
index a3886f5..a3886f5 100644
--- a/gerber/tests/resources/top_mask.GTS
+++ b/gerbonara/gerber/tests/resources/top_mask.GTS
diff --git a/gerber/tests/resources/top_silk.GTO b/gerbonara/gerber/tests/resources/top_silk.GTO
index ea46f80..ea46f80 100644
--- a/gerber/tests/resources/top_silk.GTO
+++ b/gerbonara/gerber/tests/resources/top_silk.GTO
diff --git a/gerber/tests/test_am_statements.py b/gerbonara/gerber/tests/test_am_statements.py
index 0d100b5..0d100b5 100644
--- a/gerber/tests/test_am_statements.py
+++ b/gerbonara/gerber/tests/test_am_statements.py
diff --git a/gerber/tests/test_cairo_backend.py b/gerbonara/gerber/tests/test_cairo_backend.py
index 51007a9..51007a9 100644
--- a/gerber/tests/test_cairo_backend.py
+++ b/gerbonara/gerber/tests/test_cairo_backend.py
diff --git a/gerber/tests/test_cam.py b/gerbonara/gerber/tests/test_cam.py
index 8a71a32..8a71a32 100644
--- a/gerber/tests/test_cam.py
+++ b/gerbonara/gerber/tests/test_cam.py
diff --git a/gerber/tests/test_common.py b/gerbonara/gerber/tests/test_common.py
index a6b1264..a6b1264 100644
--- a/gerber/tests/test_common.py
+++ b/gerbonara/gerber/tests/test_common.py
diff --git a/gerber/tests/test_excellon.py b/gerbonara/gerber/tests/test_excellon.py
index d6e83cc..d6e83cc 100644
--- a/gerber/tests/test_excellon.py
+++ b/gerbonara/gerber/tests/test_excellon.py
diff --git a/gerber/tests/test_excellon_statements.py b/gerbonara/gerber/tests/test_excellon_statements.py
index 41fe294..41fe294 100644
--- a/gerber/tests/test_excellon_statements.py
+++ b/gerbonara/gerber/tests/test_excellon_statements.py
diff --git a/gerber/tests/test_gerber_statements.py b/gerbonara/gerber/tests/test_gerber_statements.py
index 140cbd1..140cbd1 100644
--- a/gerber/tests/test_gerber_statements.py
+++ b/gerbonara/gerber/tests/test_gerber_statements.py
diff --git a/gerber/tests/test_ipc356.py b/gerbonara/gerber/tests/test_ipc356.py
index 77f0782..77f0782 100644
--- a/gerber/tests/test_ipc356.py
+++ b/gerbonara/gerber/tests/test_ipc356.py
diff --git a/gerber/tests/test_layers.py b/gerbonara/gerber/tests/test_layers.py
index 2178787..2178787 100644
--- a/gerber/tests/test_layers.py
+++ b/gerbonara/gerber/tests/test_layers.py
diff --git a/gerber/tests/test_primitives.py b/gerbonara/gerber/tests/test_primitives.py
index ad5b34f..ad5b34f 100644
--- a/gerber/tests/test_primitives.py
+++ b/gerbonara/gerber/tests/test_primitives.py
diff --git a/gerber/tests/test_rs274x.py b/gerbonara/gerber/tests/test_rs274x.py
index e7baf11..e7baf11 100644
--- a/gerber/tests/test_rs274x.py
+++ b/gerbonara/gerber/tests/test_rs274x.py
diff --git a/gerber/tests/test_rs274x_backend.py b/gerbonara/gerber/tests/test_rs274x_backend.py
index 13347c5..13347c5 100644
--- a/gerber/tests/test_rs274x_backend.py
+++ b/gerbonara/gerber/tests/test_rs274x_backend.py
diff --git a/gerber/tests/test_utils.py b/gerbonara/gerber/tests/test_utils.py
index 68484d1..68484d1 100644
--- a/gerber/tests/test_utils.py
+++ b/gerbonara/gerber/tests/test_utils.py
diff --git a/gerber/utils.py b/gerbonara/gerber/utils.py
index 3d39df9..3d39df9 100644
--- a/gerber/utils.py
+++ b/gerbonara/gerber/utils.py
diff --git a/setup.py b/setup.py
index f26885a..4e576c6 100644
--- a/setup.py
+++ b/setup.py
@@ -29,8 +29,8 @@ def version():
setup(
name='gerbonara',
version=version(),
- author='XenGi, Jaseg',
- author_email='contact@gerbonara.io',
+ author='XenGi, jaseg',
+ author_email='contact@gerbonara.jaseg.de',
description='Tools to handle Gerber and Excellon files in Python',
long_description=long_description(),
long_description_content_type='text/markdown',
diff --git a/tests/test_am_expression.py b/tests/test_am_expression.py
index 7490284..cf30ab7 100644
--- a/tests/test_am_expression.py
+++ b/tests/test_am_expression.py
@@ -4,10 +4,10 @@
# Copyright 2019 Hiroshi Murayama <opiopan@gmail.com>
import unittest
-from gerberex.am_expression import *
-from gerberex.am_expression import AMOperatorExpression as Op
-from gerber.utils import inch, metric
-from gerber.am_read import read_macro
+from gerbonara.gerber.panelize.am_expression import *
+from gerbonara.gerber.panelize.am_expression import AMOperatorExpression as Op
+from gerbonara.gerber.utils import inch, metric
+from gerbonara.gerber.am_read import read_macro
class TestAMConstantExpression(unittest.TestCase):
def setUp(self):
diff --git a/tests/test_dxf.py b/tests/test_dxf.py
index 782c8c7..e138320 100644
--- a/tests/test_dxf.py
+++ b/tests/test_dxf.py
@@ -5,8 +5,8 @@
import os
import unittest
-import gerberex
-from gerber.utils import inch, metric
+from gerbonara.gerber import panelize
+from gerbonara.gerber.utils import inch, metric
class TestExcellon(unittest.TestCase):
@@ -34,7 +34,7 @@ class TestExcellon(unittest.TestCase):
def test_save_line(self):
outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'save_line.gtl')
- dxf = gerberex.read(self.METRIC_FILE)
+ dxf = panelize.read(self.METRIC_FILE)
dxf.draw_mode = dxf.DM_LINE
dxf.width = 0.2
dxf.write(outfile)
@@ -42,14 +42,14 @@ class TestExcellon(unittest.TestCase):
def test_save_fill(self):
outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'save_fill.gtl')
- dxf = gerberex.read(self.METRIC_FILE)
+ dxf = panelize.read(self.METRIC_FILE)
dxf.draw_mode = dxf.DM_FILL
dxf.write(outfile)
self._checkResult(outfile)
def test_save_fill_simple(self):
outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'save_fill_simple.gtl')
- dxf = gerberex.read(self.METRIC_FILE)
+ dxf = panelize.read(self.METRIC_FILE)
dxf.draw_mode = dxf.DM_FILL
dxf.fill_mode = dxf.FM_SIMPLE
dxf.write(outfile)
@@ -57,7 +57,7 @@ class TestExcellon(unittest.TestCase):
def test_save_mousebites(self):
outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'save_mousebites.gtl')
- dxf = gerberex.read(self.METRIC_FILE)
+ dxf = panelize.read(self.METRIC_FILE)
dxf.draw_mode = dxf.DM_MOUSE_BITES
dxf.width = 0.5
dxf.pitch = 1.4
@@ -67,7 +67,7 @@ class TestExcellon(unittest.TestCase):
def test_save_excellon(self):
outfile = os.path.join(
self.OUTDIR, self.OUTPREFIX + 'save_line.txt')
- dxf = gerberex.read(self.METRIC_FILE)
+ dxf = panelize.read(self.METRIC_FILE)
dxf.draw_mode = dxf.DM_LINE
dxf.format = (3,3)
dxf.width = 0.2
@@ -77,7 +77,7 @@ class TestExcellon(unittest.TestCase):
def test_save_excellon_mousebites(self):
outfile = os.path.join(
self.OUTDIR, self.OUTPREFIX + 'save_mousebites.txt')
- dxf = gerberex.read(self.METRIC_FILE)
+ dxf = panelize.read(self.METRIC_FILE)
dxf.draw_mode = dxf.DM_MOUSE_BITES
dxf.format = (3, 3)
dxf.width = 0.5
@@ -87,7 +87,7 @@ class TestExcellon(unittest.TestCase):
def test_to_inch(self):
outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'to_inch.gtl')
- dxf = gerberex.read(self.METRIC_FILE)
+ dxf = panelize.read(self.METRIC_FILE)
dxf.to_inch()
dxf.format = (2, 5)
dxf.write(outfile)
@@ -95,7 +95,7 @@ class TestExcellon(unittest.TestCase):
def _test_to_metric(self):
outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'to_metric.gtl')
- dxf = gerberex.read(self.INCH_FILE)
+ dxf = panelize.read(self.INCH_FILE)
dxf.to_metric()
dxf.format = (3, 5)
dxf.write(outfile)
@@ -103,34 +103,34 @@ class TestExcellon(unittest.TestCase):
def test_offset(self):
outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'offset.gtl')
- dxf = gerberex.read(self.METRIC_FILE)
+ dxf = panelize.read(self.METRIC_FILE)
dxf.offset(11, 5)
dxf.write(outfile)
self._checkResult(outfile)
def test_rotate(self):
outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'rotate.gtl')
- dxf = gerberex.read(self.METRIC_FILE)
+ dxf = panelize.read(self.METRIC_FILE)
dxf.rotate(20, (10, 10))
dxf.write(outfile)
self._checkResult(outfile)
def test_rectangle_metric(self):
outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'rectangle_metric.gtl')
- dxf = gerberex.DxfFile.rectangle(width=10, height=10, units='metric')
+ dxf = panelize.DxfFile.rectangle(width=10, height=10, units='metric')
dxf.write(outfile)
self._checkResult(outfile)
def test_rectangle_inch(self):
outfile = os.path.join(
self.OUTDIR, self.OUTPREFIX + 'rectangle_inch.gtl')
- dxf = gerberex.DxfFile.rectangle(width=inch(10), height=inch(10), units='inch')
+ dxf = panelize.DxfFile.rectangle(width=inch(10), height=inch(10), units='inch')
dxf.write(outfile)
self._checkResult(outfile)
def test_complex_fill(self):
outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'complex_fill.gtl')
- dxf = gerberex.read(self.COMPLEX_FILE)
+ dxf = panelize.read(self.COMPLEX_FILE)
dxf.draw_mode = dxf.DM_FILL
dxf.write(outfile)
self._checkResult(outfile)
@@ -138,11 +138,11 @@ class TestExcellon(unittest.TestCase):
def test_complex_fill_flip(self):
outfile = os.path.join(
self.OUTDIR, self.OUTPREFIX + 'complex_fill_flip.gtl')
- ctx = gerberex.GerberComposition()
- base = gerberex.rectangle(width=100, height=100, left=0, bottom=0, units='metric')
+ ctx = panelize.GerberComposition()
+ base = panelize.rectangle(width=100, height=100, left=0, bottom=0, units='metric')
base.draw_mode = base.DM_FILL
ctx.merge(base)
- dxf = gerberex.read(self.COMPLEX_FILE)
+ dxf = panelize.read(self.COMPLEX_FILE)
dxf.negate_polarity()
dxf.draw_mode = dxf.DM_FILL
ctx.merge(dxf)
diff --git a/tests/test_excellon.py b/tests/test_excellon.py
index 36093cd..4aa6dcf 100644
--- a/tests/test_excellon.py
+++ b/tests/test_excellon.py
@@ -5,7 +5,7 @@
import os
import unittest
-import gerberex
+from gerbonara.gerber import panelize
class TestExcellon(unittest.TestCase):
@@ -33,13 +33,13 @@ class TestExcellon(unittest.TestCase):
def test_save(self):
outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'save.txt')
- drill = gerberex.read(self.METRIC_FILE)
+ drill = panelize.read(self.METRIC_FILE)
drill.write(outfile)
self._checkResult(outfile)
def test_to_inch(self):
outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'to_inch.txt')
- drill = gerberex.read(self.METRIC_FILE)
+ drill = panelize.read(self.METRIC_FILE)
drill.to_inch()
drill.format = (2, 4)
drill.write(outfile)
@@ -47,7 +47,7 @@ class TestExcellon(unittest.TestCase):
def test_to_metric(self):
outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'to_metric.txt')
- drill = gerberex.read(self.INCH_FILE)
+ drill = panelize.read(self.INCH_FILE)
drill.to_metric()
drill.format = (3, 3)
drill.write(outfile)
@@ -55,14 +55,14 @@ class TestExcellon(unittest.TestCase):
def test_offset(self):
outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'offset.txt')
- drill = gerberex.read(self.METRIC_FILE)
+ drill = panelize.read(self.METRIC_FILE)
drill.offset(11, 5)
drill.write(outfile)
self._checkResult(outfile)
def test_rotate(self):
outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'rotate.txt')
- drill = gerberex.read(self.METRIC_FILE)
+ drill = panelize.read(self.METRIC_FILE)
drill.rotate(20, (10, 10))
drill.write(outfile)
self._checkResult(outfile)
diff --git a/tests/test_rs274x.py b/tests/test_rs274x.py
index dbb5f62..1a1475a 100644
--- a/tests/test_rs274x.py
+++ b/tests/test_rs274x.py
@@ -5,7 +5,7 @@
import os
import unittest
-import gerberex
+from gerbonara.gerber import panelize
class TestRs274x(unittest.TestCase):
@classmethod
@@ -32,13 +32,13 @@ class TestRs274x(unittest.TestCase):
def test_save(self):
outfile=os.path.join(self.OUTDIR, self.OUTPREFIX + 'save.gtl')
- gerber = gerberex.read(self.METRIC_FILE)
+ gerber = panelize.read(self.METRIC_FILE)
gerber.write(outfile)
self._checkResult(outfile)
def test_to_inch(self):
outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'to_inch.gtl')
- gerber = gerberex.read(self.METRIC_FILE)
+ gerber = panelize.read(self.METRIC_FILE)
gerber.to_inch()
gerber.format = (2,5)
gerber.write(outfile)
@@ -46,7 +46,7 @@ class TestRs274x(unittest.TestCase):
def test_to_metric(self):
outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'to_metric.gtl')
- gerber = gerberex.read(self.INCH_FILE)
+ gerber = panelize.read(self.INCH_FILE)
gerber.to_metric()
gerber.format = (3, 4)
gerber.write(outfile)
@@ -54,21 +54,21 @@ class TestRs274x(unittest.TestCase):
def test_offset(self):
outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'offset.gtl')
- gerber = gerberex.read(self.METRIC_FILE)
+ gerber = panelize.read(self.METRIC_FILE)
gerber.offset(11, 5)
gerber.write(outfile)
self._checkResult(outfile)
def test_rotate(self):
outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'rotate.gtl')
- gerber = gerberex.read(self.METRIC_FILE)
+ gerber = panelize.read(self.METRIC_FILE)
gerber.rotate(20, (10,10))
gerber.write(outfile)
self._checkResult(outfile)
def test_single_quadrant(self):
outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'single_quadrant.gtl')
- gerber = gerberex.read(self.SQ_FILE)
+ gerber = panelize.read(self.SQ_FILE)
gerber.write(outfile)
self._checkResult(outfile)
diff --git a/tests/test_utility.py b/tests/test_utility.py
index 4ede8d5..d7a4101 100644
--- a/tests/test_utility.py
+++ b/tests/test_utility.py
@@ -5,7 +5,7 @@
import unittest
-from gerberex.utility import *
+from gerbonara.gerber.panelize.utility import *
from math import sqrt
class TestUtility(unittest.TestCase):