summaryrefslogtreecommitdiff
path: root/PyEmb.py
diff options
context:
space:
mode:
authorLex Neva <github@lexneva.name>2016-10-30 22:58:51 -0400
committerLex Neva <github@lexneva.name>2016-11-02 23:20:31 -0400
commit841e9196ba27176d606d448d30f6c2b6b6bbc739 (patch)
treeb011773bb41d7bc00f2f7aeb47e8b2a1c562ff27 /PyEmb.py
parent9249a3ae7730e62cdff282a33e989c1da5d00411 (diff)
major refactor
Split into classes for Fill, Stroke, and SatinColumn. Renamed params to be the same across XML attributes and OptionParser. Added distinct stitch length params for satin underlay. Renamed "satin underlay" to "contour underlay" and split out "center walk underlay" and "zigzag underlay". The code is ten times more readable, parameters make more sense, and everything is specified by the user in millimeters. Basically, everything is way better.
Diffstat (limited to 'PyEmb.py')
-rw-r--r--PyEmb.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/PyEmb.py b/PyEmb.py
index 585cbaf7..cc572185 100644
--- a/PyEmb.py
+++ b/PyEmb.py
@@ -60,6 +60,11 @@ class Point:
def __cmp__(self, other):
return cmp(self.as_tuple(), other.as_tuple())
+ def __getitem__(self, item):
+ return self.as_tuple()[item]
+
+ def __len__(self):
+ return 2
class Stitch(Point):