summaryrefslogtreecommitdiff
path: root/gerber/excellon.py
diff options
context:
space:
mode:
Diffstat (limited to 'gerber/excellon.py')
-rwxr-xr-xgerber/excellon.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/gerber/excellon.py b/gerber/excellon.py
index f5d6c29..13aacc6 100755
--- a/gerber/excellon.py
+++ b/gerber/excellon.py
@@ -39,6 +39,7 @@ def read(filename):
-------
file : :class:`gerber.excellon.ExcellonFile`
An ExcellonFile created from the specified file.
+
"""
detected_settings = detect_excellon_format(filename)
settings = FileSettings(**detected_settings)
@@ -317,7 +318,7 @@ def detect_excellon_format(filename):
hole_area = 0.0
for hit in p.hits:
tool = hit[0]
- hole_area += math.pow(math.pi * tool.diameter, 2)
+ hole_area += math.pow(math.pi * tool.diameter / 2., 2)
results[key] = (size, p.hole_count, hole_area)
except:
pass