summaryrefslogtreecommitdiff
path: root/gerbonara/gerber/utils.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2022-01-19 01:10:40 +0100
committerjaseg <git@jaseg.de>2022-01-19 01:10:40 +0100
commit40286fc92fc05ce82cbad4615f497ba389ac9457 (patch)
tree1fbc6407cf004da1e81344444209651dd586d014 /gerbonara/gerber/utils.py
parent9e86bf6b3e92706c190283af83d71999fee03442 (diff)
downloadgerbonara-40286fc92fc05ce82cbad4615f497ba389ac9457.tar.gz
gerbonara-40286fc92fc05ce82cbad4615f497ba389ac9457.tar.bz2
gerbonara-40286fc92fc05ce82cbad4615f497ba389ac9457.zip
Remove unnecessary statement class indirection layer
Diffstat (limited to 'gerbonara/gerber/utils.py')
-rw-r--r--gerbonara/gerber/utils.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/gerbonara/gerber/utils.py b/gerbonara/gerber/utils.py
index f7df4ed..060aa0b 100644
--- a/gerbonara/gerber/utils.py
+++ b/gerbonara/gerber/utils.py
@@ -24,6 +24,7 @@ files.
"""
import os
+from enum import Enum
from math import radians, sin, cos, sqrt, atan2, pi
@@ -75,6 +76,12 @@ units = {'inch': Inch, 'mm': MM, None: None}
to_unit = lambda name: units[name]
+class InterpMode(Enum):
+ LINEAR = 0
+ CIRCULAR_CW = 1
+ CIRCULAR_CCW = 2
+
+
def decimal_string(value, precision=6, padding=False):
""" Convert float to string with limited precision
@@ -161,3 +168,4 @@ def sq_distance(point1, point2):
diff2 = point1[1] - point2[1]
return diff1 * diff1 + diff2 * diff2
+