summaryrefslogtreecommitdiff
path: root/gerberex/dxf.py
diff options
context:
space:
mode:
authoropiopan <opiopan@gmail.com>2019-04-03 00:30:00 +0900
committeropiopan <opiopan@gmail.com>2019-04-03 00:30:00 +0900
commitcb420e39e278f7ab6f002600a7698d7be101eb7d (patch)
tree1d82fcd72627c71715ec0b9724c8f976a49bdfdd /gerberex/dxf.py
parentb72d891998cc87273b9dd8bfe4d864cbe6a8cc62 (diff)
downloadgerbonara-cb420e39e278f7ab6f002600a7698d7be101eb7d.tar.gz
gerbonara-cb420e39e278f7ab6f002600a7698d7be101eb7d.tar.bz2
gerbonara-cb420e39e278f7ab6f002600a7698d7be101eb7d.zip
fix a rotaion issue
Diffstat (limited to 'gerberex/dxf.py')
-rw-r--r--gerberex/dxf.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/gerberex/dxf.py b/gerberex/dxf.py
index 1b2ddf7..39d256b 100644
--- a/gerberex/dxf.py
+++ b/gerberex/dxf.py
@@ -11,17 +11,11 @@ from gerber.utils import inch, metric, write_gerber_value
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_closed_paths
ACCEPTABLE_ERROR = 0.001
-def is_equal_value(a, b, error_range=0):
- return a - b <= error_range and a - b >= -error_range
-
-def is_equal_point(a, b, error_range=0):
- return is_equal_value(a[0], b[0], error_range) and \
- is_equal_value(a[1], b[1], error_range)
-
class DxfStatement(object):
def __init__(self, entity):
self.entity = entity