Updated README
|
@ -3,7 +3,29 @@
|
|||
<component name="ChangeListManager">
|
||||
<list default="true" id="0b5af789-e47c-4138-bdb9-8fa765481e1e" name="Default Changelist" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/DATA/TestOutput/debugPicturesimplePath.png" beforeDir="false" afterPath="$PROJECT_DIR$/DATA/TestOutput/debugPicturesimplePath.png" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/DATA/TestOutput/debugPicturesimplePathClosest.png" beforeDir="false" afterPath="$PROJECT_DIR$/DATA/TestOutput/debugPicturesimplePathClosest.png" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/DATA/TestOutput/debugPicturesimplePathZigzag.png" beforeDir="false" afterPath="$PROJECT_DIR$/DATA/TestOutput/debugPicturesimplePathZigzag.png" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/DATA/TestOutput/debugPicturetree.png" beforeDir="false" afterPath="$PROJECT_DIR$/DATA/TestOutput/debugPicturetree.png" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/DATA/TestOutput/debugPictureugliestApple.png" beforeDir="false" afterPath="$PROJECT_DIR$/DATA/TestOutput/debugPictureugliestApple.png" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/DATA/TestOutput/debugPicturezigzag.png" beforeDir="false" afterPath="$PROJECT_DIR$/DATA/TestOutput/debugPicturezigzag.png" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/DATA/TestOutput/simplePath.pes" beforeDir="false" afterPath="$PROJECT_DIR$/DATA/TestOutput/simplePath.pes" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/DATA/TestOutput/simplePathClosest.pes" beforeDir="false" afterPath="$PROJECT_DIR$/DATA/TestOutput/simplePathClosest.pes" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/DATA/TestOutput/simplePathD-10.pes" beforeDir="false" afterPath="$PROJECT_DIR$/DATA/TestOutput/simplePathD-10.pes" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/DATA/TestOutput/simplePathD-15.pes" beforeDir="false" afterPath="$PROJECT_DIR$/DATA/TestOutput/simplePathD-15.pes" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/DATA/TestOutput/simplePathD-20.pes" beforeDir="false" afterPath="$PROJECT_DIR$/DATA/TestOutput/simplePathD-20.pes" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/DATA/TestOutput/simplePathD-5.pes" beforeDir="false" afterPath="$PROJECT_DIR$/DATA/TestOutput/simplePathD-5.pes" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/DATA/TestOutput/simplePathZigzag.pes" beforeDir="false" afterPath="$PROJECT_DIR$/DATA/TestOutput/simplePathZigzag.pes" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/DATA/TestOutput/simplePath_1_5.pes" beforeDir="false" afterPath="$PROJECT_DIR$/DATA/TestOutput/simplePath_1_5.pes" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/DATA/TestOutput/simplePath_2_5.pes" beforeDir="false" afterPath="$PROJECT_DIR$/DATA/TestOutput/simplePath_2_5.pes" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/DATA/TestOutput/simplePath_3_5.pes" beforeDir="false" afterPath="$PROJECT_DIR$/DATA/TestOutput/simplePath_3_5.pes" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/DATA/TestOutput/simplePath_4_5.pes" beforeDir="false" afterPath="$PROJECT_DIR$/DATA/TestOutput/simplePath_4_5.pes" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/DATA/TestOutput/tree.pes" beforeDir="false" afterPath="$PROJECT_DIR$/DATA/TestOutput/tree.pes" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/DATA/TestOutput/ugliestApple.pes" beforeDir="false" afterPath="$PROJECT_DIR$/DATA/TestOutput/ugliestApple.pes" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/DATA/TestOutput/zigzag.pes" beforeDir="false" afterPath="$PROJECT_DIR$/DATA/TestOutput/zigzag.pes" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/DATA/runTests.sh" beforeDir="false" afterPath="$PROJECT_DIR$/DATA/runTests.sh" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/main.py" afterDir="false" />
|
||||
</list>
|
||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
|
@ -35,40 +57,40 @@
|
|||
<usages-collector id="statistics.vcs.git.usages" />
|
||||
<usages-collector id="statistics.file.types.edit">
|
||||
<counts>
|
||||
<entry key="PLAIN_TEXT" value="474" />
|
||||
<entry key="Python" value="46062" />
|
||||
<entry key="PLAIN_TEXT" value="504" />
|
||||
<entry key="Python" value="46064" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
<usages-collector id="statistics.js.language.service.starts" />
|
||||
<usages-collector id="statistics.file.types.open">
|
||||
<counts>
|
||||
<entry key="PLAIN_TEXT" value="1" />
|
||||
<entry key="Python" value="57" />
|
||||
<entry key="Python" value="58" />
|
||||
<entry key="UML" value="1" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
<usages-collector id="statistics.file.extensions.open">
|
||||
<counts>
|
||||
<entry key="JavaScript-modules-diagram//Users/imaustyn/Documents/MiamiUniversity/ECE 487/Project/PES-Embroidery" value="1" />
|
||||
<entry key="py" value="57" />
|
||||
<entry key="py" value="58" />
|
||||
<entry key="sh" value="1" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
<usages-collector id="statistics.file.extensions.edit">
|
||||
<counts>
|
||||
<entry key="py" value="46062" />
|
||||
<entry key="sh" value="474" />
|
||||
<entry key="py" value="46064" />
|
||||
<entry key="sh" value="504" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
</session>
|
||||
</component>
|
||||
<component name="FileEditorManager">
|
||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
||||
<file pinned="false" current-in-tab="true">
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="420">
|
||||
<caret line="28" column="56" lean-forward="true" selection-start-line="28" selection-start-column="56" selection-end-line="28" selection-end-column="56" />
|
||||
<state relative-caret-position="405">
|
||||
<caret line="27" lean-forward="true" selection-start-line="27" selection-end-line="27" />
|
||||
<folding>
|
||||
<element signature="e#0#15#0" expanded="true" />
|
||||
</folding>
|
||||
|
@ -94,8 +116,8 @@
|
|||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/DATA/runTests.sh">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="120">
|
||||
<caret line="8" column="98" lean-forward="true" selection-start-line="8" selection-start-column="98" selection-end-line="8" selection-end-column="98" />
|
||||
<state relative-caret-position="330">
|
||||
<caret line="22" lean-forward="true" selection-start-line="22" selection-end-line="22" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
@ -126,6 +148,23 @@
|
|||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/src/PES.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="201">
|
||||
<caret line="344" column="22" lean-forward="true" selection-start-line="344" selection-start-column="22" selection-end-line="344" selection-end-column="22" />
|
||||
<folding>
|
||||
<element signature="e#0#23#0" expanded="true" />
|
||||
<marker date="1544116240082" expanded="true" signature="149:339" ph="..." />
|
||||
<marker date="1544116240082" expanded="true" signature="287:339" ph="..." />
|
||||
<marker date="1544116240082" expanded="true" signature="516:556" ph="..." />
|
||||
<marker date="1544116240082" expanded="true" signature="3450:3456" ph="..." />
|
||||
<marker date="1544116240082" expanded="true" signature="11805:11901" ph="..." />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
</leaf>
|
||||
</component>
|
||||
<component name="FileTemplateManagerImpl">
|
||||
|
@ -137,7 +176,6 @@
|
|||
</component>
|
||||
<component name="FindInProjectRecents">
|
||||
<findStrings>
|
||||
<find>512</find>
|
||||
<find>TYPE_JUMP</find>
|
||||
<find>getCoordinate</find>
|
||||
<find>PECColors</find>
|
||||
|
@ -167,6 +205,7 @@
|
|||
<find>slope</find>
|
||||
<find>closest</find>
|
||||
<find>mode</find>
|
||||
<find>JUMP</find>
|
||||
</findStrings>
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
|
@ -188,8 +227,8 @@
|
|||
<option value="$PROJECT_DIR$/src/PES.py" />
|
||||
<option value="$PROJECT_DIR$/src/svgFunctions.py" />
|
||||
<option value="$PROJECT_DIR$/src/PES_render_utils.py" />
|
||||
<option value="$PROJECT_DIR$/DATA/runTests.sh" />
|
||||
<option value="$PROJECT_DIR$/src/main.py" />
|
||||
<option value="$PROJECT_DIR$/DATA/runTests.sh" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
|
@ -423,12 +462,12 @@
|
|||
<frame x="0" y="23" width="1680" height="1027" extended-state="0" />
|
||||
<editor active="true" />
|
||||
<layout>
|
||||
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.14713065" />
|
||||
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.14713065" />
|
||||
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
|
||||
<window_info id="Favorites" order="2" side_tool="true" />
|
||||
<window_info anchor="bottom" id="Message" order="0" />
|
||||
<window_info anchor="bottom" id="Find" order="1" />
|
||||
<window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.27058825" />
|
||||
<window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.27058825" />
|
||||
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
|
||||
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
|
||||
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
|
||||
|
@ -574,21 +613,6 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/PES.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="3600">
|
||||
<caret line="240" selection-start-line="240" selection-end-line="240" />
|
||||
<folding>
|
||||
<element signature="e#0#23#0" expanded="true" />
|
||||
<marker date="1544116240082" expanded="true" signature="149:339" ph="..." />
|
||||
<marker date="1544116240082" expanded="true" signature="287:339" ph="..." />
|
||||
<marker date="1544116240082" expanded="true" signature="516:556" ph="..." />
|
||||
<marker date="1544116240082" expanded="true" signature="3450:3456" ph="..." />
|
||||
<marker date="1544116240082" expanded="true" signature="11805:11901" ph="..." />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file:///usr/local/lib/python2.7/site-packages/svgpathtools/bezier.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="5055">
|
||||
|
@ -664,20 +688,35 @@
|
|||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/DATA/runTests.sh">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="120">
|
||||
<caret line="8" column="98" lean-forward="true" selection-start-line="8" selection-start-column="98" selection-end-line="8" selection-end-column="98" />
|
||||
<state relative-caret-position="330">
|
||||
<caret line="22" lean-forward="true" selection-start-line="22" selection-end-line="22" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="420">
|
||||
<caret line="28" column="56" lean-forward="true" selection-start-line="28" selection-start-column="56" selection-end-line="28" selection-end-column="56" />
|
||||
<state relative-caret-position="405">
|
||||
<caret line="27" lean-forward="true" selection-start-line="27" selection-end-line="27" />
|
||||
<folding>
|
||||
<element signature="e#0#15#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/PES.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="201">
|
||||
<caret line="344" column="22" lean-forward="true" selection-start-line="344" selection-start-column="22" selection-end-line="344" selection-end-column="22" />
|
||||
<folding>
|
||||
<element signature="e#0#23#0" expanded="true" />
|
||||
<marker date="1544116240082" expanded="true" signature="149:339" ph="..." />
|
||||
<marker date="1544116240082" expanded="true" signature="287:339" ph="..." />
|
||||
<marker date="1544116240082" expanded="true" signature="516:556" ph="..." />
|
||||
<marker date="1544116240082" expanded="true" signature="3450:3456" ph="..." />
|
||||
<marker date="1544116240082" expanded="true" signature="11805:11901" ph="..." />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</component>
|
||||
</project>
|
Po Szerokość: | Wysokość: | Rozmiar: 552 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 436 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 492 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 629 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 705 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 604 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 711 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 808 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 598 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 520 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 1.2 MiB |
Po Szerokość: | Wysokość: | Rozmiar: 920 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 540 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 326 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 699 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 4.5 KiB Po Szerokość: | Wysokość: | Rozmiar: 1.2 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 4.5 KiB Po Szerokość: | Wysokość: | Rozmiar: 4.5 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 2.8 KiB Po Szerokość: | Wysokość: | Rozmiar: 2.9 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 2.5 KiB Po Szerokość: | Wysokość: | Rozmiar: 965 B |
Przed Szerokość: | Wysokość: | Rozmiar: 9.0 KiB Po Szerokość: | Wysokość: | Rozmiar: 3.0 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 4.9 KiB Po Szerokość: | Wysokość: | Rozmiar: 2.1 KiB |
|
@ -1,13 +1,13 @@
|
|||
# Generate PES files for the four test shapes
|
||||
python ../src/main.py -i "./TestInput/simplePath.svg" -o ./TestOutput/simplePath.pes -r
|
||||
python ../src/main.py -i "./TestInput/tree.svg" -o ./TestOutput/tree.pes -r
|
||||
python ../src/main.py -i "./TestInput/ugliestApple.svg" -o ./TestOutput/ugliestApple.pes -r
|
||||
python ../src/main.py -i "./TestInput/zigzag.svg" -o ./TestOutput/zigzag.pes -r
|
||||
python ../src/main.py -i "./TestInput/simplePath.svg" -o ./TestOutput/simplePath.pes -r -t 1.5 -m 20
|
||||
python ../src/main.py -i "./TestInput/tree.svg" -o ./TestOutput/tree.pes -r -t 1.5 -m 20
|
||||
python ../src/main.py -i "./TestInput/ugliestApple.svg" -o ./TestOutput/ugliestApple.pes -r -t 1.5 -m 20
|
||||
python ../src/main.py -i "./TestInput/zigzag.svg" -o ./TestOutput/zigzag.pes -r -t 1.5 -m 20
|
||||
# Generate PES files for different stitch widths
|
||||
python ../src/main.py -i "./TestInput/simplePath.svg" -o ./TestOutput/simplePath_4_5.pes -r -t 4.5
|
||||
python ../src/main.py -i "./TestInput/simplePath.svg" -o ./TestOutput/simplePath_3_5.pes -r -t 3.5
|
||||
python ../src/main.py -i "./TestInput/simplePath.svg" -o ./TestOutput/simplePath_2_5.pes -r -t 2.5
|
||||
python ../src/main.py -i "./TestInput/simplePath.svg" -o ./TestOutput/simplePath_1_5.pes -r -t 1.5
|
||||
python ../src/main.py -i "./TestInput/simplePath.svg" -o ./TestOutput/simplePath_4_5.pes -r -t 4.5 -m 10
|
||||
python ../src/main.py -i "./TestInput/simplePath.svg" -o ./TestOutput/simplePath_3_5.pes -r -t 3.5 -m 10
|
||||
python ../src/main.py -i "./TestInput/simplePath.svg" -o ./TestOutput/simplePath_2_5.pes -r -t 2.5 -m 10
|
||||
python ../src/main.py -i "./TestInput/simplePath.svg" -o ./TestOutput/simplePath_1_5.pes -r -t 1.5 -m 10
|
||||
|
||||
# Generate PES files for different minimum stitch distances
|
||||
python ../src/main.py -i "./TestInput/simplePath.svg" -o ./TestOutput/simplePathD-20.pes -r -t 2.5 -m 20
|
||||
|
@ -16,5 +16,7 @@ python ../src/main.py -i "./TestInput/simplePath.svg" -o ./TestOutput/simplePath
|
|||
python ../src/main.py -i "./TestInput/simplePath.svg" -o ./TestOutput/simplePathD-5.pes -r -t 2.5 -m 5
|
||||
|
||||
# Closest vs Zigzag stitch methods
|
||||
python ../src/main.py -i "./TestInput/simplePath.svg" -o ./TestOutput/simplePathClosest.pes -r -s closest
|
||||
python ../src/main.py -i "./TestInput/simplePath.svg" -o ./TestOutput/simplePathZigzag.pes -r -s zigzag
|
||||
python ../src/main.py -i "./TestInput/simplePath.svg" -o ./TestOutput/simplePathClosest.pes -r -s closest -m 20 -t 2.5
|
||||
python ../src/main.py -i "./TestInput/simplePath.svg" -o ./TestOutput/simplePathZigzag.pes -r -s zigzag -m 20 -t 2.5
|
||||
|
||||
|
||||
|
|
23
README.md
|
@ -2,6 +2,13 @@
|
|||
|
||||
This project is a program for a CAD tool design class (ECE 487) at Miami University. The tool converts .SVG vector graphics to .PES embroidery files that can be used by machines such as the Brother SE600.
|
||||
|
||||
# Examples
|
||||
|
||||
![Apple](./DATA/Results/apple.jpg)
|
||||
![Tree](./DATA/Results/tree.jpg)
|
||||
![Droplet](./DATA/Results/droplet.jpg)
|
||||
![Zigzag](./DATA/Results/zigzag.jpg)
|
||||
|
||||
# Installation
|
||||
|
||||
Python is required to run the program.
|
||||
|
@ -31,8 +38,8 @@ For decimal parameters, 10 units are equal to 1mm.
|
|||
- `-h` Display parameter help.
|
||||
- `-i [path]` The full path of the input SVG file.
|
||||
- `-o [path]` The full path of the output PES file.
|
||||
- `-t [decimal number]` This will be used as the distance between parallel stitches. Default is 2.5.
|
||||
- `-m [decimal number]` This is the max distance the sewing machine will travel between stitches. Default is 10.
|
||||
- `-t [decimal number]` This will be used as the distance between parallel stitches. Default is 1.5.
|
||||
- `-m [decimal number]` This is the max distance the sewing machine will travel between stitches. Default is 20.
|
||||
- `-l [decimal number]` This is the mathematical slope that the stitch lines will have. Default is a slope of 1.
|
||||
- `-s ['closest' or 'zigzag']` This is the stitch style for connecting parallel stitch groups. The default is closest.
|
||||
- `--noOutline` If this flag is specified, the embroidery design will not contain stitches that outline each shape.
|
||||
|
@ -46,4 +53,14 @@ For decimal parameters, 10 units are equal to 1mm.
|
|||
|
||||
# References
|
||||
|
||||
Colors for PES version 1 were taken from [here.](https://edutechwiki.unige.ch/en/Embroidery_format_PEC#Stitch)
|
||||
General PES/PEC information from [here.](https://github.com/frno7/libpes/wiki/PES-format)
|
||||
|
||||
General PES/PEC information and colors for PES version 1 taken from [here.](https://edutechwiki.unige.ch/en/Embroidery_format_PEC#Stitch)
|
||||
|
||||
[svgPathTools](https://pypi.org/project/svgpathtools/)
|
||||
|
||||
[numpy](https://pypi.org/project/numpy/)
|
||||
|
||||
[pyEmbroidery](https://pypi.org/project/pyembroidery/)
|
||||
|
||||
Tux embroidery demo file from [here.](https://github.com/t2b/embroidery)
|
Po Szerokość: | Wysokość: | Rozmiar: 71 KiB |
|
@ -0,0 +1,66 @@
|
|||
\documentclass{article}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage{natbib}
|
||||
\usepackage{graphicx}
|
||||
\usepackage{float}
|
||||
\usepackage{chngcntr}
|
||||
\counterwithin{figure}{section}
|
||||
|
||||
\title{SVG to PES CAD Tool}
|
||||
\author{Austyn Larkin}
|
||||
\date{2018-11-14}
|
||||
|
||||
\pdfpagewidth 8.5in
|
||||
\pdfpageheight 11in
|
||||
|
||||
\begin{document}
|
||||
\maketitle
|
||||
\section{Intro}
|
||||
Home sewing machines are becoming so advanced that some now include the ability to embroider designs onto cloth. Pre-made designs can be selected from the machine's memory or new designs can be downloaded to the machine using a USB flash drive. If a user wants to make their own design, they need to download embroidery software to their desktop computer. However, most embroidery software is very expensive and is not affordable for hobbyists or home users. In this paper, we propose a new CAD tool to convert a common vector shape format (.SVG) to the embroidery format used by machines such as the Brother® SE600 (.PES).
|
||||
|
||||
\section{Background}
|
||||
|
||||
\subsection{The SVG File Format}
|
||||
|
||||
\cite{SVGFormat} describes the SVG file format in detail. An SVG is a scalable vector graphic. It utilizes XML to allow for the description of two-dimensional vector graphics. Although the SVG format can be used to describe a number of common shapes, the only aspect of interest will be the paths. Paths within the SVG format allow for the description of arbitrary vector shapes. These paths are made up of quadratic and cubic Bézier curves. Each test SVG design is exclusively made up of one or more paths. The svgPathTools library \cite{svgpathtools} will be used to read and perform intersections on the test SVG paths. The SVG file format was chosen as it is a common and widely supported. Free software such as Inkscape [4] can export user designs to the SVG format. An example of an SVG can be seen in Figure \ref{apple}.
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=2in]{SVGExample}
|
||||
\caption{An SVG that contains three separate paths.}
|
||||
\label{apple}
|
||||
\end{figure}
|
||||
|
||||
\subsection{The PES File Format}
|
||||
|
||||
Although the PES file format is proprietary, major parts of the format have been reverse engineered \cite{PESFormat}. The file format is primarily used by Brother and Bernina International machines. The format can be divided by its three major parts: the header, the PES section, and the PEC section.
|
||||
|
||||
The header starts with the "magic number" that specifies that the file is a PES file. This is simply the four characters that spell out "\#PES". Four more characters follow after which determine the version number.
|
||||
|
||||
The PES section contains higher level stitch information. These include actual stitches that an embroidery machine would make, but later versions allow common shapes to be specified. This portion of the file was largely ignored as it's used by desktop embroidery software and not by the embroidery machine.
|
||||
|
||||
The PEC section contains the actual commands and data that the embroidery machine uses to embroider a design. The major aspects are listed as follows: The header contains the thread colors that should be used when embroidering the design. For PES version 1, thread colors are represented as integer indices in a known list of thread colors specific to the format. Each thread color index is listed in the PEC header and will show up on the embroidery machine in the order they should be loaded. The command list is made up of four different command types: short stitch, long stitch, jump stitch, and color change. Short stitches are two bytes. Each byte specifies how far to move in the X and Y directions before making the next stitch. A long stitch is similar, except each axis takes up two bytes. This is to allow for extra movement distance and some bit flags. If the 12th bit is set in a long stitch command, the command is a jump stitch command. This tells the sewing machine to make a loose stitch that can be cut away later. These stitches are necessary so the machine can jump between discontinuous stitch regions in the design. The last command is a color change command. It tells the machine to stop so the user can swap out the thread color before continuing.
|
||||
|
||||
\section{Software Description}
|
||||
|
||||
The software was written as a command line tool in Python. A number of arguments can be passed to the program. This allows the user to set parameters such as parallel stitch distance and max stitch length. The program takes an SVG file as an input and produces a PES file as an output. The software works by intersecting each path in the SVG shape with an array of parallel lines. From these lines, the software figures out where stitches should go. It then takes these stitches and makes them continuous. It finishes by encoding the stitches in the PES format and saving the file to disk. A much more detailed version of this process is described by Figures \ref{p-1} through \ref{}.
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=3in]{p-1}
|
||||
\caption{}
|
||||
\label{p-1}
|
||||
\end{figure}
|
||||
|
||||
|
||||
\section{Experimental Setup}
|
||||
|
||||
\section{Results}
|
||||
|
||||
\section{Conclusion}
|
||||
|
||||
\section{Future Ideas}
|
||||
|
||||
\bibliographystyle{plain}
|
||||
\bibliography{references}
|
||||
\end{document}
|
|
@ -11,9 +11,9 @@ parser = argparse.ArgumentParser(description="Converts an SVG file into a PES em
|
|||
|
||||
parser.add_argument("-i", dest="inputFile", type=str, action='store', required=True, help="The SVG file to be converted.")
|
||||
parser.add_argument("-o", dest="outputFile", type=str, action='store', default="output.PES", required=False, help="The output PES file.")
|
||||
parser.add_argument("-t", dest="threadWidth", type=float, action='store', default=2.5, required=False,
|
||||
parser.add_argument("-t", dest="threadWidth", type=float, action='store', default=1.5, required=False,
|
||||
help="The thread width to use. This controls how close parallel stitches are to one another.")
|
||||
parser.add_argument("-m", dest="maxStitchDistance", type=float, action='store', default=10.0, required=False,
|
||||
parser.add_argument("-m", dest="maxStitchDistance", type=float, action='store', default=20.0, required=False,
|
||||
help="The maximum distance the sewing machine can traverse before it has to make a stitch.")
|
||||
parser.add_argument("-l", dest="slope", type=float, action='store', default=-1.0, required=False,
|
||||
help="The slope of the line to use when performing intersections.")
|
||||
|
|