+
+
+
+
+
+ JavaScript-modules-diagram
+ $PROJECT_DIR$
+
+
+
+
+
+
+ All
+
+ Details
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/LOG.md b/LOG.md
new file mode 100644
index 0000000..eb3439d
--- /dev/null
+++ b/LOG.md
@@ -0,0 +1,9 @@
+# 11/6
+
+Trying to make sense of the "d" string in the path object. I need to be able to parse this myself I think to find intersections.
+
+Found svgpathtools Python library. This can load SVG files and even do intersections. I'm going to try it. I don't regret the research I did on Bezier curves though. Its always cool to know more. Prerequisites are numpy and svgwrite.
+
+# 11/5
+
+It turns out Bezier paths are just interpolations between mutliple points. They're much simpler than I thought.
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..e69de29
diff --git a/src/PES.py b/src/PES.py
new file mode 100644
index 0000000..e69de29
diff --git a/src/__pycache__/svgImport.cpython-36.pyc b/src/__pycache__/svgImport.cpython-36.pyc
new file mode 100644
index 0000000..f382c13
Binary files /dev/null and b/src/__pycache__/svgImport.cpython-36.pyc differ
diff --git a/src/learning/complexPath.svg b/src/learning/complexPath.svg
new file mode 100644
index 0000000..123c893
--- /dev/null
+++ b/src/learning/complexPath.svg
@@ -0,0 +1,34 @@
+
+
diff --git a/src/learning/simplePath.svg b/src/learning/simplePath.svg
new file mode 100644
index 0000000..b7fb316
--- /dev/null
+++ b/src/learning/simplePath.svg
@@ -0,0 +1,31 @@
+
+
diff --git a/src/main.py b/src/main.py
index 6d95fe9..a0867db 100644
--- a/src/main.py
+++ b/src/main.py
@@ -1 +1,21 @@
-print("Hello world")
\ No newline at end of file
+import argparse
+import sys
+from svgFunctions import *
+
+
+parser = argparse.ArgumentParser(description="Converts an SVG file into a PES embroidery file.")
+
+parser.add_argument("-i", dest="inputFile", type=str, action='store', required=True)
+
+args = parser.parse_args()
+
+# Load the SVG file from disk
+svg = loadVectorGraphic(args.inputFile)
+paths, attributes = svg
+if paths is None or attributes is None:
+ sys.exit(0)
+
+# Enumerate the shapes in the SVG to find where stitches should go.
+for shape in paths:
+
+ print(shape)
diff --git a/src/svgFunctions.py b/src/svgFunctions.py
new file mode 100644
index 0000000..b37d842
--- /dev/null
+++ b/src/svgFunctions.py
@@ -0,0 +1,12 @@
+import svgpathtools
+
+def loadVectorGraphic(filename):
+ svg = None
+ try:
+ svg = svgpathtools.svg2paths(filename)
+ except:
+ print("Couldn't load SVG file. Perhaps it doesn't exist?")
+
+ return svg
+
+def
\ No newline at end of file
diff --git a/src/svgFunctions.pyc b/src/svgFunctions.pyc
new file mode 100644
index 0000000..712bdd5
Binary files /dev/null and b/src/svgFunctions.pyc differ