summaryrefslogtreecommitdiff
path: root/gerbonara/gerber/utils.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2022-01-17 23:14:52 +0100
committerjaseg <git@jaseg.de>2022-01-17 23:14:52 +0100
commit73a44901c0ef0e94e9465c2f35750ca6f85a4473 (patch)
treea5c66526a38fe5a4e3d004dc7127680b6d0e25c6 /gerbonara/gerber/utils.py
parent336a18fb493c79824323a59865083a0037a4a2f4 (diff)
downloadgerbonara-73a44901c0ef0e94e9465c2f35750ca6f85a4473.tar.gz
gerbonara-73a44901c0ef0e94e9465c2f35750ca6f85a4473.tar.bz2
gerbonara-73a44901c0ef0e94e9465c2f35750ca6f85a4473.zip
Excellon, unit conversion WIP
Diffstat (limited to 'gerbonara/gerber/utils.py')
-rw-r--r--gerbonara/gerber/utils.py41
1 files changed, 0 insertions, 41 deletions
diff --git a/gerbonara/gerber/utils.py b/gerbonara/gerber/utils.py
index 8e84c87..4074c4e 100644
--- a/gerbonara/gerber/utils.py
+++ b/gerbonara/gerber/utils.py
@@ -110,39 +110,6 @@ def validate_coordinates(position):
if not (isinstance(coord, int) or isinstance(coord, float)):
raise TypeError('Coordinates must be integers or floats')
-
-def metric(value):
- """ Convert inch value to millimeters
-
- Parameters
- ----------
- value : float
- A value in inches.
-
- Returns
- -------
- value : float
- The equivalent value expressed in millimeters.
- """
- return value * MILLIMETERS_PER_INCH
-
-
-def inch(value):
- """ Convert millimeter value to inches
-
- Parameters
- ----------
- value : float
- A value in millimeters.
-
- Returns
- -------
- value : float
- The equivalent value expressed in inches.
- """
- return value / MILLIMETERS_PER_INCH
-
-
def rotate_point(point, angle, center=(0.0, 0.0)):
""" Rotate a point about another point.
@@ -183,11 +150,3 @@ def sq_distance(point1, point2):
diff2 = point1[1] - point2[1]
return diff1 * diff1 + diff2 * diff2
-def convert_units(value, src, dst):
- if src == dst or src is None or dst is None or value is None:
- return value
- elif dst == 'mm':
- return value * 25.4
- else:
- return value / 25.4
-