summaryrefslogtreecommitdiff
path: root/gerbonara/gerber/utils.py
diff options
context:
space:
mode:
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
+