Fixed bugs and added more options
|
@ -3,10 +3,28 @@
|
|||
<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$/PECRender/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/PECRender/main.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Tests/curves.svg" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Tests/debugPicture.png" beforeDir="false" afterPath="$PROJECT_DIR$/Tests/debugPicture.png" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/PES.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/PES.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/LOG.md" beforeDir="false" afterPath="$PROJECT_DIR$/LOG.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/TestOutput/MyHeaderTSPEC.pes" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/TestOutput/TSHeader.PES" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/TestOutput/myTux.pes" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/TestOutput/simple.pes" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/TestOutput/simpleTS.PES" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/TestOutput/two.PES" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/TestOutput/two.PES backup" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/TestOutput/ugliestApple.pes" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Tests/complexPath.svg" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Tests/debugPicture.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Tests/debugPictureCorrectRounding.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Tests/debugPictureWrongRounding.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Tests/letterC.svg" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Tests/simplePath.svg" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Tests/test1.svg" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Tests/trace1.svg" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Tests/tux.svg" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Tests/ugliestApple.svg" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Tests/zigzag.svg" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/PES_render_utils.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/PES_render_utils.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/main.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/svgFunctions.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/svgFunctions.py" afterDir="false" />
|
||||
</list>
|
||||
|
@ -19,8 +37,8 @@
|
|||
<component name="CoverageDataManager">
|
||||
<SUITE FILE_PATH="coverage/PES_Embroidery$PESDump.coverage" NAME="PESDump Coverage Results" MODIFIED="1543957085304" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/PESDump" />
|
||||
<SUITE FILE_PATH="coverage/PES_Embroidery$svgImport.coverage" NAME="svgImport Coverage Results" MODIFIED="1541478220694" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/src/learning" />
|
||||
<SUITE FILE_PATH="coverage/PES_Embroidery$main.coverage" NAME="main Coverage Results" MODIFIED="1544116241113" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/src" />
|
||||
<SUITE FILE_PATH="coverage/PES_Embroidery$PECRender_main.coverage" NAME="PECRender-main Coverage Results" MODIFIED="1544106433238" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/PECRender" />
|
||||
<SUITE FILE_PATH="coverage/PES_Embroidery$main.coverage" NAME="main Coverage Results" MODIFIED="1544817006984" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/src" />
|
||||
<SUITE FILE_PATH="coverage/PES_Embroidery$PECRender_main.coverage" NAME="PECRender-main Coverage Results" MODIFIED="1544198394221" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/PECRender" />
|
||||
<SUITE FILE_PATH="coverage/PES_Embroidery$getColors.coverage" NAME="getColors Coverage Results" MODIFIED="1542917684965" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/Colors" />
|
||||
<SUITE FILE_PATH="coverage/PES_Embroidery$main__1_.coverage" NAME="PESDump Coverage Results" MODIFIED="1543893622615" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/PESDump" />
|
||||
</component>
|
||||
|
@ -28,48 +46,52 @@
|
|||
<session id="-1920598427">
|
||||
<usages-collector id="statistics.lifecycle.project">
|
||||
<counts>
|
||||
<entry key="project.closed" value="13" />
|
||||
<entry key="project.closed" value="15" />
|
||||
<entry key="project.open.time.2" value="1" />
|
||||
<entry key="project.open.time.5" value="1" />
|
||||
<entry key="project.open.time.6" value="7" />
|
||||
<entry key="project.open.time.7" value="2" />
|
||||
<entry key="project.open.time.6" value="8" />
|
||||
<entry key="project.open.time.7" value="3" />
|
||||
<entry key="project.open.time.8" value="3" />
|
||||
<entry key="project.opened" value="14" />
|
||||
<entry key="project.opened" value="16" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
<usages-collector id="statistics.vcs.git.usages" />
|
||||
<usages-collector id="statistics.file.types.edit">
|
||||
<counts>
|
||||
<entry key="Python" value="44529" />
|
||||
<entry key="PLAIN_TEXT" value="474" />
|
||||
<entry key="Python" value="46062" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
<usages-collector id="statistics.js.language.service.starts" />
|
||||
<usages-collector id="statistics.file.types.open">
|
||||
<counts>
|
||||
<entry key="Python" value="47" />
|
||||
<entry key="PLAIN_TEXT" value="1" />
|
||||
<entry key="Python" value="57" />
|
||||
<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="47" />
|
||||
<entry key="py" value="57" />
|
||||
<entry key="sh" value="1" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
<usages-collector id="statistics.file.extensions.edit">
|
||||
<counts>
|
||||
<entry key="py" value="44529" />
|
||||
<entry key="py" value="46062" />
|
||||
<entry key="sh" value="474" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
</session>
|
||||
</component>
|
||||
<component name="FileEditorManager">
|
||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<file pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/src/main.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="63">
|
||||
<caret line="19" column="32" lean-forward="true" selection-start-line="19" selection-start-column="32" selection-end-line="19" selection-end-column="32" />
|
||||
<state relative-caret-position="393">
|
||||
<caret line="91" column="142" selection-start-line="91" selection-start-column="142" selection-end-line="91" selection-end-column="142" />
|
||||
<folding>
|
||||
<element signature="e#0#15#0" expanded="true" />
|
||||
</folding>
|
||||
|
@ -77,69 +99,26 @@
|
|||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="true">
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/svgFunctions.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="328">
|
||||
<caret line="402" selection-start-line="402" selection-end-line="402" />
|
||||
<state relative-caret-position="85">
|
||||
<caret line="358" column="27" lean-forward="true" selection-start-line="358" selection-start-column="27" selection-end-line="358" selection-end-column="27" />
|
||||
<folding>
|
||||
<element signature="e#0#19#0" expanded="true" />
|
||||
<marker date="1544116365862" expanded="true" signature="143:2224" ph="..." />
|
||||
<marker date="1544116365862" expanded="true" signature="8479:9002" ph="..." />
|
||||
<marker date="1544116365862" expanded="true" signature="9031:9036" ph="..." />
|
||||
<marker date="1544240663926" expanded="true" signature="143:2224" ph="..." />
|
||||
<marker date="1544240663926" expanded="true" signature="8482:9005" ph="..." />
|
||||
<marker date="1544240663926" expanded="true" signature="9034:9039" ph="..." />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/PES.py">
|
||||
<entry file="file://$PROJECT_DIR$/DATA/runTests.sh">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="408">
|
||||
<caret line="397" column="53" lean-forward="true" selection-start-line="397" selection-start-column="53" selection-end-line="397" selection-end-column="53" />
|
||||
<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>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/PES_Emb_mathutils.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="30">
|
||||
<caret line="5" column="35" selection-start-line="5" selection-start-column="35" selection-end-line="5" selection-end-column="35" />
|
||||
<folding>
|
||||
<element signature="e#0#29#0" expanded="true" />
|
||||
<marker date="1543625107768" expanded="true" signature="139:2608" ph="..." />
|
||||
<marker date="1543625107768" expanded="true" signature="497:1537" ph="..." />
|
||||
<marker date="1543625107768" expanded="true" signature="755:887" ph="..." />
|
||||
<marker date="1543625107768" expanded="true" signature="1607:2401" ph="..." />
|
||||
<marker date="1543625107768" expanded="true" signature="2659:2735" ph="..." />
|
||||
<marker date="1543625107768" expanded="true" signature="2801:2806" ph="..." />
|
||||
<marker date="1543625107768" expanded="true" signature="2801:4181" ph="..." />
|
||||
<marker date="1543625107768" expanded="true" signature="3323:3324" ph="..." />
|
||||
<marker date="1543625107768" expanded="true" signature="3730:3893" ph="..." />
|
||||
<marker date="1543625107768" expanded="true" signature="3935:4054" ph="..." />
|
||||
<marker date="1543625107768" expanded="true" signature="4091:4181" ph="..." />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/PECRender/main.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="9">
|
||||
<caret line="16" column="108" selection-start-line="16" selection-start-column="108" selection-end-line="16" selection-end-column="108" />
|
||||
<folding>
|
||||
<element signature="e#0#10#0" expanded="true" />
|
||||
</folding>
|
||||
<state relative-caret-position="285">
|
||||
<caret line="19" column="103" lean-forward="true" selection-start-line="19" selection-start-column="103" selection-end-line="19" selection-end-column="103" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
@ -147,8 +126,25 @@
|
|||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/utilities.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="15">
|
||||
<caret line="1" column="14" selection-start-line="1" selection-start-column="14" selection-end-line="1" selection-end-column="14" />
|
||||
<state relative-caret-position="30">
|
||||
<caret line="2" lean-forward="true" selection-start-line="2" selection-end-line="2" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/PES_render_utils.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="212">
|
||||
<caret line="35" column="87" lean-forward="true" selection-start-line="35" selection-start-column="87" selection-end-line="35" selection-end-column="87" />
|
||||
<folding>
|
||||
<element signature="e#0#13#0" expanded="true" />
|
||||
<marker date="1544812039822" expanded="true" signature="129:130" ph="..." />
|
||||
<marker date="1544812039822" expanded="true" signature="129:135" ph="..." />
|
||||
<marker date="1544812039822" expanded="true" signature="1308:1640" ph="..." />
|
||||
<marker date="1544812039822" expanded="true" signature="1535:1640" ph="..." />
|
||||
<marker date="1544812039822" expanded="true" signature="1667:1762" ph="..." />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
@ -164,16 +160,6 @@
|
|||
</component>
|
||||
<component name="FindInProjectRecents">
|
||||
<findStrings>
|
||||
<find>width</find>
|
||||
<find>label</find>
|
||||
<find>FF</find>
|
||||
<find>End st</find>
|
||||
<find>End</find>
|
||||
<find>starting stitches at location</find>
|
||||
<find>createStitchRoutine</find>
|
||||
<find>allStitches</find>
|
||||
<find>maxDist</find>
|
||||
<find>thumbnail</find>
|
||||
<find>512</find>
|
||||
<find>TYPE_JUMP</find>
|
||||
<find>getCoordinate</find>
|
||||
|
@ -187,13 +173,23 @@
|
|||
<find>prepend</find>
|
||||
<find>createSubshapeLineGroups</find>
|
||||
<find>subshapeLineGroups</find>
|
||||
<find>closest</find>
|
||||
<find>print</find>
|
||||
<find>long</find>
|
||||
<find>svg</find>
|
||||
<find>inver</find>
|
||||
<find>ColorChange</find>
|
||||
<find>indexInColorList</find>
|
||||
<find>loadsv</find>
|
||||
<find>maybe</find>
|
||||
<find>Render</find>
|
||||
<find>intersection</find>
|
||||
<find>addPath</find>
|
||||
<find>zig</find>
|
||||
<find>angle</find>
|
||||
<find>makeStitchLevels</find>
|
||||
<find>slope</find>
|
||||
<find>closest</find>
|
||||
<find>mode</find>
|
||||
</findStrings>
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
|
@ -210,12 +206,13 @@
|
|||
<option value="$PROJECT_DIR$/src/utilities.py" />
|
||||
<option value="$PROJECT_DIR$/Colors/getColors.py" />
|
||||
<option value="$PROJECT_DIR$/src/PES_Emb_mathutils.py" />
|
||||
<option value="$PROJECT_DIR$/src/PES_render_utils.py" />
|
||||
<option value="$PROJECT_DIR$/PESDump/main.py" />
|
||||
<option value="$PROJECT_DIR$/src/main.py" />
|
||||
<option value="$PROJECT_DIR$/PECRender/main.py" />
|
||||
<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" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
|
@ -225,7 +222,7 @@
|
|||
<detection-done>true</detection-done>
|
||||
<sorting>DEFINITION_ORDER</sorting>
|
||||
</component>
|
||||
<component name="ProjectFrameBounds" extendedState="6">
|
||||
<component name="ProjectFrameBounds">
|
||||
<option name="y" value="23" />
|
||||
<option name="width" value="1680" />
|
||||
<option name="height" value="1027" />
|
||||
|
@ -250,6 +247,11 @@
|
|||
<item name="PES-Embroidery" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="Colors" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="PES-Embroidery" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="PES-Embroidery" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="DATA" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="PES-Embroidery" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="PES-Embroidery" type="462c0819:PsiDirectoryNode" />
|
||||
|
@ -382,7 +384,7 @@
|
|||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/src/main.py" />
|
||||
<option name="PARAMETERS" value="-i "../Tests/ugliestApple.svg" -o ../TestOutput/ugliestApple.pes -d" />
|
||||
<option name="PARAMETERS" value="-i "../DATA/TestInput/simplePath.svg" -o "../DATA/TestOutput/pycharmrun.pes" -r -d --noOutline" />
|
||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||
<option name="EMULATE_TERMINAL" value="false" />
|
||||
<option name="MODULE_MODE" value="false" />
|
||||
|
@ -441,10 +443,10 @@
|
|||
<servers />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="0" y="23" width="1680" height="1027" extended-state="6" />
|
||||
<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.14346765" />
|
||||
<window_info 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" />
|
||||
|
@ -532,13 +534,6 @@
|
|||
</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="387">
|
||||
<caret line="352" selection-start-line="352" selection-end-line="352" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file:///usr/local/lib/python2.7/site-packages/pyglet/clock.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="199">
|
||||
|
@ -546,13 +541,6 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file:///usr/local/lib/python2.7/site-packages/svgpathtools/path.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="199">
|
||||
<caret line="1120" column="8" selection-start-line="1120" selection-start-column="8" selection-end-line="1120" selection-end-column="8" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Colors/getColors.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="490">
|
||||
|
@ -574,21 +562,6 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/PES_render_utils.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="390">
|
||||
<caret line="26" selection-start-line="26" selection-end-line="26" />
|
||||
<folding>
|
||||
<element signature="e#0#13#0" expanded="true" />
|
||||
<marker date="1543629358921" expanded="true" signature="129:130" ph="..." />
|
||||
<marker date="1543629358921" expanded="true" signature="129:135" ph="..." />
|
||||
<marker date="1543629358921" expanded="true" signature="1235:1567" ph="..." />
|
||||
<marker date="1543629358921" expanded="true" signature="1462:1567" ph="..." />
|
||||
<marker date="1543629358921" expanded="true" signature="1594:1689" ph="..." />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file:///usr/local/lib/python2.7/site-packages/pyglet/graphics/__init__.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="199">
|
||||
|
@ -617,9 +590,55 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/PES_Emb_mathutils.py">
|
||||
<entry file="file://$PROJECT_DIR$/PECRender/main.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="45">
|
||||
<caret line="3" column="13" lean-forward="true" selection-start-line="3" selection-start-column="13" selection-end-line="3" selection-end-column="13" />
|
||||
</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">
|
||||
<caret line="337" column="4" selection-start-line="337" selection-start-column="4" selection-end-line="337" selection-end-column="4" />
|
||||
<folding>
|
||||
<element signature="e#237#301#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file:///usr/local/lib/python2.7/site-packages/svgpathtools/path.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="304">
|
||||
<caret line="1127" column="40" selection-start-line="1127" selection-start-column="19" selection-end-line="1127" selection-end-column="47" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/utilities.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="30">
|
||||
<caret line="2" lean-forward="true" selection-start-line="2" selection-end-line="2" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/PES_Emb_mathutils.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="15">
|
||||
<caret line="5" column="35" selection-start-line="5" selection-start-column="35" selection-end-line="5" selection-end-column="35" />
|
||||
<folding>
|
||||
<element signature="e#0#29#0" expanded="true" />
|
||||
|
@ -638,57 +657,47 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/utilities.py">
|
||||
<entry file="file://$PROJECT_DIR$/src/PES_render_utils.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="15">
|
||||
<caret line="1" column="14" selection-start-line="1" selection-start-column="14" selection-end-line="1" selection-end-column="14" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PECRender/main.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="9">
|
||||
<caret line="16" column="108" selection-start-line="16" selection-start-column="108" selection-end-line="16" selection-end-column="108" />
|
||||
<state relative-caret-position="212">
|
||||
<caret line="35" column="87" lean-forward="true" selection-start-line="35" selection-start-column="87" selection-end-line="35" selection-end-column="87" />
|
||||
<folding>
|
||||
<element signature="e#0#10#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="63">
|
||||
<caret line="19" column="32" lean-forward="true" selection-start-line="19" selection-start-column="32" selection-end-line="19" selection-end-column="32" />
|
||||
<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="408">
|
||||
<caret line="397" column="53" lean-forward="true" selection-start-line="397" selection-start-column="53" selection-end-line="397" selection-end-column="53" />
|
||||
<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="..." />
|
||||
<element signature="e#0#13#0" expanded="true" />
|
||||
<marker date="1544812039822" expanded="true" signature="129:130" ph="..." />
|
||||
<marker date="1544812039822" expanded="true" signature="129:135" ph="..." />
|
||||
<marker date="1544812039822" expanded="true" signature="1308:1640" ph="..." />
|
||||
<marker date="1544812039822" expanded="true" signature="1535:1640" ph="..." />
|
||||
<marker date="1544812039822" expanded="true" signature="1667:1762" ph="..." />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/svgFunctions.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="328">
|
||||
<caret line="402" selection-start-line="402" selection-end-line="402" />
|
||||
<state relative-caret-position="85">
|
||||
<caret line="358" column="27" lean-forward="true" selection-start-line="358" selection-start-column="27" selection-end-line="358" selection-end-column="27" />
|
||||
<folding>
|
||||
<element signature="e#0#19#0" expanded="true" />
|
||||
<marker date="1544116365862" expanded="true" signature="143:2224" ph="..." />
|
||||
<marker date="1544116365862" expanded="true" signature="8479:9002" ph="..." />
|
||||
<marker date="1544116365862" expanded="true" signature="9031:9036" ph="..." />
|
||||
<marker date="1544240663926" expanded="true" signature="143:2224" ph="..." />
|
||||
<marker date="1544240663926" expanded="true" signature="8482:9005" ph="..." />
|
||||
<marker date="1544240663926" expanded="true" signature="9034:9039" ph="..." />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/DATA/runTests.sh">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="285">
|
||||
<caret line="19" column="103" lean-forward="true" selection-start-line="19" selection-start-column="103" selection-end-line="19" selection-end-column="103" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="393">
|
||||
<caret line="91" column="142" selection-start-line="91" selection-start-column="142" selection-end-line="91" selection-end-column="142" />
|
||||
<folding>
|
||||
<element signature="e#0#15#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
|
|
Przed Szerokość: | Wysokość: | Rozmiar: 2.2 KiB Po Szerokość: | Wysokość: | Rozmiar: 2.2 KiB |
|
@ -50,6 +50,7 @@
|
|||
</metadata>
|
||||
<path
|
||||
id="path3335"
|
||||
d="m 220,288.3622 c 0,0 247,-91 232,7 -15,98 -232,-7 -232,-7 z"
|
||||
style="fill:#0000ff;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1" />
|
||||
d="m 70.040118,281.6606 c 0,0 566.479412,-208.702945 532.077832,16.05407 C 567.71637,522.47168 70.040118,281.6606 70.040118,281.6606 Z"
|
||||
style="fill:#0000ff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:2.29343891px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
inkscape:connector-curvature="0" />
|
||||
</svg>
|
Przed Szerokość: | Wysokość: | Rozmiar: 1.7 KiB Po Szerokość: | Wysokość: | Rozmiar: 1.8 KiB |
|
@ -0,0 +1,76 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="210mm"
|
||||
height="297mm"
|
||||
viewBox="0 0 744.09448819 1052.3622047"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="tree.svg">
|
||||
<defs
|
||||
id="defs4">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 526.1811 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="744.09449 : 526.1811 : 1"
|
||||
inkscape:persp3d-origin="372.04724 : 350.7874 : 1"
|
||||
id="perspective4350" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.4142136"
|
||||
inkscape:cx="247.3612"
|
||||
inkscape:cy="541.38374"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="1005"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="1"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<path
|
||||
style="fill:#925d00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 279,457.3622 53,0 6.95162,145.21456 -62.18207,0.70711 z"
|
||||
id="path3335"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
style="fill:#029200;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
|
||||
d="m 277.5,456.3622 c 0,0 -60.3033,32.65507 -64.3033,-7.84493 -4,-40.5 14.94911,-65.61648 76.55635,-73.01903 62,-7.44975 86.74695,-19.13604 110.24695,25.36396 23.5,44.5 0.80761,59.20101 -21.31802,60.28249 -36.48383,1.78328 -47.03553,-4.51472 -47.03553,-4.51472 z"
|
||||
id="path4137"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="csssscc" />
|
||||
</g>
|
||||
</svg>
|
Po Szerokość: | Wysokość: | Rozmiar: 2.7 KiB |
|
@ -0,0 +1,71 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="210mm"
|
||||
height="297mm"
|
||||
viewBox="0 0 744.09448819 1052.3622047"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="ugliestApple.svg">
|
||||
<defs
|
||||
id="defs4" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.5"
|
||||
inkscape:cx="280.70627"
|
||||
inkscape:cy="734.52885"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="1005"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0" />
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<path
|
||||
style="fill:#a26200;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:2.31291723px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 266.88006,273.52334 -3.8308,-135.01583 38.30815,-2.78381 -16.60021,158.67836 z"
|
||||
id="path4140"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:#00b500;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:2.31291723px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 319.23456,305.53738 -7.66164,-87.69067 75.33941,-100.21792 29.36958,100.21792 z"
|
||||
id="path4142"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:#ef0000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:2.31291723px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 243.89517,549.12264 c 0,0 -134.07858,-94.65028 -134.07858,-100.21795 0,-5.56766 -1.27694,-160.0703 -1.27694,-160.0703 0,0 68.95469,-82.12301 74.06245,-82.12301 5.10775,0 102.1551,91.86643 102.1551,91.86643 l 34.47736,11.13532 83.00102,-33.40595 c 0,0 61.29308,-34.7979 66.40083,-37.58173 5.10776,-2.78383 42.13899,-13.91916 47.24675,-11.13533 5.10776,2.78383 20.43101,83.51493 20.43101,83.51493 l 8.93857,62.63621 -47.24673,128.05624 -76.61634,50.10897 -67.67775,-11.13533 -40.86206,-25.05448 -33.20041,15.31107 -19.15407,12.52724 z"
|
||||
id="path4144"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</svg>
|
Po Szerokość: | Wysokość: | Rozmiar: 3.0 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 1.3 KiB Po Szerokość: | Wysokość: | Rozmiar: 1.3 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 4.5 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 4.5 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 2.8 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 1.2 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 4.5 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 4.3 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 3.8 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 2.5 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 9.0 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 4.9 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 4.5 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 5.0 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 4.5 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 6.2 KiB |
|
@ -0,0 +1,20 @@
|
|||
# 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
|
||||
# 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
|
||||
|
||||
# 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
|
||||
python ../src/main.py -i "./TestInput/simplePath.svg" -o ./TestOutput/simplePathD-15.pes -r -t 2.5 -m 15
|
||||
python ../src/main.py -i "./TestInput/simplePath.svg" -o ./TestOutput/simplePathD-10.pes -r -t 2.5 -m 10
|
||||
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
|
6
LOG.md
|
@ -1,3 +1,9 @@
|
|||
# 12/5
|
||||
|
||||
Intersections seem to fail if the shape is too large and also made of curves? I'm not sure why, but I'm pretty sure it's a bug within the svgPathTools library.
|
||||
|
||||
Yeah, I have no idea why it does this. That's okay.
|
||||
|
||||
# 12/4
|
||||
|
||||
I think the sewing machine might actually follow PES commands and not PEC commands. That's kinda weird, because the PEC commands are supposed to be for the machine and the PES commands for like, desktop embroidery applications. This machine DOES have its own touch screen though, so maybe times have changed.
|
||||
|
|
19
README.md
|
@ -1,3 +1,22 @@
|
|||
# Installation
|
||||
|
||||
PES-Embroidery relies on a number of third party libraries:
|
||||
|
||||
- numpy
|
||||
- svgPathTools
|
||||
- pyEmbroidery
|
||||
- pyGlet
|
||||
|
||||
These libraries can be easily installed using `pip`.
|
||||
|
||||
```
|
||||
sudo pip install numpy svgpathtools pyembroidery pyglet`
|
||||
```
|
||||
|
||||
# Usage
|
||||
|
||||
|
||||
# Known Issues
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,58 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="svg2"
|
||||
viewBox="0 0 744.09448819 1052.3622047"
|
||||
height="297mm"
|
||||
width="210mm"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="complexPath.svg">
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1311"
|
||||
inkscape:window-height="791"
|
||||
id="namedview7"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.78623573"
|
||||
inkscape:cx="459.2861"
|
||||
inkscape:cy="601.98685"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="layer1" />
|
||||
<defs
|
||||
id="defs4" />
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1">
|
||||
<path
|
||||
id="path3336"
|
||||
d="m 192.34017,404.05477 c 0,0 -8.07021,-172.16463 83.39225,-137.19369 91.46245,34.97094 -96.84261,-108.94793 2.69007,-83.39224 99.53267,25.55569 125.08836,80.70217 125.08836,80.70217 0,0 72.63195,103.56778 -2.69007,141.2288 -75.32203,37.66101 -156.0242,147.95398 -190.99514,98.18764 -34.97094,-49.76634 -17.48547,-99.53268 -17.48547,-99.53268 z"
|
||||
style="fill:#0059ff;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1" />
|
||||
</g>
|
||||
</svg>
|
Przed Szerokość: | Wysokość: | Rozmiar: 2.0 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 2.7 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 2.1 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 2.4 KiB |
|
@ -1,3 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid meet" viewBox="194.68111332352888 225.98757819408158 250.63777335294228 172.2847343887219" width="251" height="172"><defs><path d="M292.98 303.13C308.31 343.01 302.18 321.53 330.81 308.24C359.44 294.95 337.97 300.06 348.19 247.91C358.42 195.76 360.46 246.89 420.79 294.95C481.13 343.01 418.75 311.31 356.37 368.57C294 425.83 326.72 386.98 246.96 362.44C193.79 346.08 181.18 321.87 209.13 289.83L263.32 247.91C272.87 258.14 282.75 276.54 292.98 303.13Z" id="agubZWD6j"></path></defs><g><use xlink:href="#agubZWD6j" opacity="1" fill="#ff0014" fill-opacity="1"></use><g><use xlink:href="#agubZWD6j" opacity="1" fill-opacity="0" stroke="#000000" stroke-width="1" stroke-opacity="1"></use></g></g></svg>
|
Przed Szerokość: | Wysokość: | Rozmiar: 979 B |
634
Tests/trace1.svg
Przed Szerokość: | Wysokość: | Rozmiar: 56 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 17 KiB |
|
@ -1,76 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="210mm"
|
||||
height="297mm"
|
||||
viewBox="0 0 744.09448819 1052.3622047"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="curves.svg">
|
||||
<defs
|
||||
id="defs4" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.7348765"
|
||||
inkscape:cx="280.70627"
|
||||
inkscape:cy="542.85714"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="1005"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="1"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<path
|
||||
style="fill:#a26200;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
|
||||
d="m 276.67675,433.29797 -1.72922,-55.91177 17.29229,-1.15281 -7.49333,65.71072 z"
|
||||
id="path4140"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:#00b500;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
|
||||
d="m 300.30956,446.55539 -3.45846,-36.31382 34.00819,-41.50151 13.25742,41.50151 z"
|
||||
id="path4142"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:#ef0000;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
|
||||
d="m 266.30138,547.42713 c 0,0 -60.52304,-39.19588 -60.52304,-41.50152 0,-2.30564 -0.57641,-66.28714 -0.57641,-66.28714 0,0 31.12613,-34.00818 33.43177,-34.00818 2.30564,0 46.11279,38.04305 46.11279,38.04305 l 15.56307,4.61128 37.46664,-13.83383 c 0,0 27.66768,-14.41025 29.97332,-15.56307 2.30564,-1.15282 19.02153,-5.7641 21.32717,-4.61128 2.30564,1.15282 9.22255,34.58459 9.22255,34.58459 l 4.03487,25.93845 -21.32716,53.02971 -34.5846,20.75076 -30.54972,-4.61128 -18.44512,-10.37538 -14.98666,6.34051 -8.64614,5.18769 z"
|
||||
id="path4144"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:#0065f7;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
|
||||
d="m 209.2368,559.53174 c 0,0 24.20921,-5.7641 26.51485,-6.34051 2.30564,-0.57641 20.75076,19.02152 20.75076,19.02152 l -25.36204,19.02153 z"
|
||||
id="path4146"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</svg>
|
Przed Szerokość: | Wysokość: | Rozmiar: 3.3 KiB |
|
@ -4,7 +4,9 @@ from svgpathtools import Line, CubicBezier, QuadraticBezier, Path
|
|||
class GenericRenderer:
|
||||
globalRenderer = None
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self, debug):
|
||||
self.debug = debug
|
||||
if debug:
|
||||
# Make a new window to render into
|
||||
self.window = pyglet.window.Window()
|
||||
self.window.set_size(1000, 1000)
|
||||
|
@ -17,7 +19,7 @@ class GenericRenderer:
|
|||
pyglet.gl.glLineWidth(2)#2
|
||||
pyglet.gl.glPointSize(4)
|
||||
|
||||
self.addLine(Line(start=(0+0j), end=(1000+1000j)), 255, 0, 0)
|
||||
#self.addLine(Line(start=(0+0j), end=(1000+1000j)), 255, 0, 0)
|
||||
|
||||
GenericRenderer.globalRenderer = self
|
||||
|
||||
|
@ -49,6 +51,7 @@ class GenericRenderer:
|
|||
self.pointBatch.draw()
|
||||
|
||||
def runLoop(self):
|
||||
if self.debug:
|
||||
pyglet.clock.schedule_interval(self.updateDisplay, 1 / 30.0)
|
||||
pyglet.app.run()
|
||||
|
||||
|
|
40
src/main.py
|
@ -9,25 +9,37 @@ from PES_render_utils import *
|
|||
# Argument parsing
|
||||
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)
|
||||
parser.add_argument("-o", dest="outputFile", type=str, action='store', default="output.PES", required=False)
|
||||
parser.add_argument("-d", dest="debug", action='store_true')
|
||||
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,
|
||||
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,
|
||||
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.")
|
||||
parser.add_argument("-s", dest="style", nargs=1, choices=["zigzag", "closest"], default=["closest"], action='store',
|
||||
help="The method uses to attach parallel stitches together.")
|
||||
parser.add_argument("--noOutline", dest="noOutline", action='store_true', help="Do not add outline stitches to shapes.")
|
||||
|
||||
parser.add_argument("-d", dest="debug", action='store_true', help="Print debug info and show a rendering of the PES in a window.")
|
||||
parser.add_argument("-r", dest="debugRendering", action='store_true', help="Generate a debug image next to the output file.")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.debug:
|
||||
# Create a generic renderer so we can see what's happening
|
||||
renderer = GenericRenderer()
|
||||
# (Only actually creates a window if the debug argument is set.)
|
||||
renderer = GenericRenderer(args.debug)
|
||||
|
||||
# Load the SVG file from disk
|
||||
svg = loadVectorGraphic(args.inputFile)
|
||||
paths, attributes = svg
|
||||
|
||||
if paths is None:
|
||||
print("SVG contains no paths.")
|
||||
sys.exit(0)
|
||||
|
||||
threadWidth = 2.5
|
||||
maxStitchDistance = 10.0
|
||||
threadWidth = args.threadWidth
|
||||
maxStitchDistance = args.maxStitchDistance
|
||||
|
||||
# Enumerate the shapes in the SVG to find where stitches should go.
|
||||
subshapeLevelGroups = []
|
||||
|
@ -42,16 +54,17 @@ for i, shape in enumerate(paths):
|
|||
print("Closest color: {}".format( PES.getClosestColor(fillColor) ))
|
||||
|
||||
# Fill color here is only for debugging.
|
||||
levels = makeStitchLevels(shape, fillColor, debug=args.debug, threadWidth=threadWidth)
|
||||
levels = makeStitchLevels(shape, fillColor, debug=args.debug, slope=(-args.slope), threadWidth=threadWidth)
|
||||
# Append the stitches as their own array so we can separate by colors
|
||||
subshapeLevelGroups.append(levels)
|
||||
|
||||
# Make the stitches into continuous groups.
|
||||
# This also breaks the long stitches up into little ones.
|
||||
subshapeLineGroups = createSubshapeLineGroups(subshapeLevelGroups, mode="closest", fillColors=fillColors, threadWidth=threadWidth, maxStitchDistance=maxStitchDistance)
|
||||
print("Using stitch style: {}".format(args.style[0]))
|
||||
subshapeLineGroups = createSubshapeLineGroups(subshapeLevelGroups, mode=args.style[0], fillColors=fillColors, threadWidth=threadWidth, maxStitchDistance=maxStitchDistance)
|
||||
|
||||
# Creates stitch outlines for each shape
|
||||
|
||||
if args.noOutline is not True:
|
||||
subshapeLineGroups = prependShapeTraces(paths, subshapeLineGroups, maxStitchDistance=maxStitchDistance)
|
||||
|
||||
#DEBUG lines: [[[Line(0+0j, 300+0j), Line(300+0j, 300+300j), Line(300+300j, 0+300j) , Line(0+300j, 0+0j)]]]
|
||||
|
@ -72,12 +85,13 @@ with open(args.outputFile, "w") as f:
|
|||
|
||||
print("Wrote {} to disk.".format(args.outputFile))
|
||||
|
||||
if args.debug:
|
||||
if args.debugRendering:
|
||||
loadedPES = pyembroidery.read(args.outputFile)
|
||||
if loadedPES is not None:
|
||||
print("Generating debug image.")
|
||||
pyembroidery.write_png(loadedPES, replaceFilenameAndExtensionFromPath(args.inputFile, "debugPicture", "png"))
|
||||
print("Image written to disk.")
|
||||
debugImagePath = replaceFilenameAndExtensionFromPath(args.outputFile, "debugPicture" + getFilenameAndExtensionFromPath(args.outputFile)[0], "png")
|
||||
pyembroidery.write_png(loadedPES, debugImagePath)
|
||||
print("Image written to disk: {}".format(debugImagePath))
|
||||
else:
|
||||
print("Couldn't find output file.")
|
||||
|
||||
|
|
|
@ -127,9 +127,9 @@ def makeStitchLevels(shape, fillColor=(0,0,0), threadWidth=2, slope=1, debug=Fal
|
|||
# The path should cross through the center of the bounding-
|
||||
# box square.
|
||||
intersectionPath = InfLine(m=slope, center=center)
|
||||
GenericRenderer.globalRenderer.addLine(
|
||||
Line(start=complex(1000, intersectionPath.y_for_x(1000)),
|
||||
end=complex(-1000, intersectionPath.y_for_x(-1000)) ), 0, 255, 0)
|
||||
# GenericRenderer.globalRenderer.addLine(
|
||||
# Line(start=complex(1000, intersectionPath.y_for_x(1000)),
|
||||
# end=complex(-1000, intersectionPath.y_for_x(-1000)) ), 0, 255, 0)
|
||||
intersectionPath.invertSlope()
|
||||
GenericRenderer.globalRenderer.addLine(
|
||||
Line(start=complex(1000, intersectionPath.y_for_x(1000)),
|
||||
|
@ -137,7 +137,7 @@ def makeStitchLevels(shape, fillColor=(0,0,0), threadWidth=2, slope=1, debug=Fal
|
|||
|
||||
intersectionPath = getIntersectionPathFromBox(intersectionPath, left, right, top, bottom)
|
||||
|
||||
GenericRenderer.globalRenderer.addLine(intersectionPath, 255, 255, 0)
|
||||
#GenericRenderer.globalRenderer.addLine(intersectionPath, 255, 255, 0)
|
||||
|
||||
#print("Start and end points: {}, {}".format(p1,p2))
|
||||
#intersectionPath = intersectionPath.to_svg_Line(center=center, length=intersectionLineLength)
|
||||
|
@ -163,7 +163,7 @@ def makeStitchLevels(shape, fillColor=(0,0,0), threadWidth=2, slope=1, debug=Fal
|
|||
infLine = InfLine(m=slope, center=center)
|
||||
# Convert it to a bezier line
|
||||
l = infLine.to_svg_Line(center=center, length=intersectionLineLength)
|
||||
#GenericRenderer.globalRenderer.addLine(l, 255, 255, 255)
|
||||
GenericRenderer.globalRenderer.addLine(l, 160, 160, 160)
|
||||
|
||||
# Intersect with the shape
|
||||
intersections = shape.intersect(l)
|
||||
|
@ -189,7 +189,7 @@ def makeStitchLevels(shape, fillColor=(0,0,0), threadWidth=2, slope=1, debug=Fal
|
|||
if debug:
|
||||
#print("{} intersection points for this iteration.".format(len(intersectionPoints)))
|
||||
for i in intersectionPoints:
|
||||
None#GenericRenderer.globalRenderer.addPoint(i, 255, 0, 255)
|
||||
GenericRenderer.globalRenderer.addPoint(i, 255, 0, 255)
|
||||
|
||||
genericColors = [(255, 0, 0), (0, 255, 0), (0, 0, 255), (0, 255, 255), (255, 255, 0), (255, 0, 255)]
|
||||
|
||||
|
@ -206,9 +206,9 @@ def makeStitchLevels(shape, fillColor=(0,0,0), threadWidth=2, slope=1, debug=Fal
|
|||
currentLines.append(stitchLine)
|
||||
|
||||
# Draw debug lines
|
||||
if debug:
|
||||
GenericRenderer.globalRenderer.addLine(stitchLine, genericColors[i%6][0], genericColors[i%6][1], genericColors[i%6][2])
|
||||
else:
|
||||
# if debug:
|
||||
# GenericRenderer.globalRenderer.addLine(stitchLine, genericColors[i%6][0], genericColors[i%6][1], genericColors[i%6][2])
|
||||
# else:
|
||||
GenericRenderer.globalRenderer.addLine(stitchLine, fillColor[0], fillColor[1], fillColor[2])
|
||||
|
||||
stitchLevel = StitchLevel(currentLines, infLine)
|
||||
|
@ -320,6 +320,22 @@ def createSubshapeLineGroups(subshapeLevelGroups, mode, fillColors, threadWidth=
|
|||
lines.append(Line(start=p1,end=p2))
|
||||
return lines
|
||||
|
||||
# Renders generic line groups
|
||||
# GenericRenderer.globalRenderer.clearAll()
|
||||
# curColor = 0
|
||||
# for lineGroups in subshapeLineGroups:
|
||||
# for lineGroup in lineGroups:
|
||||
# curColor += 1
|
||||
# currentColor = PES.colors[curColor % len(PES.colors)]
|
||||
# for line in lineGroup:
|
||||
# # Add slight color variation to be able to see individual stitches.
|
||||
# variation = 50
|
||||
# c1 = min(255, max(0, currentColor[1] + int(round(random.uniform(-variation, variation)))))
|
||||
# c2 = min(255, max(0, currentColor[2] + int(round(random.uniform(-variation, variation)))))
|
||||
# c3 = min(255, max(0, currentColor[3] + int(round(random.uniform(-variation, variation)))))
|
||||
# GenericRenderer.globalRenderer.addLine(line, c1, c2, c3)
|
||||
# return subshapeLineGroups
|
||||
|
||||
# Holds groups for every subshape
|
||||
shortenedSubshapeLineGroups = []
|
||||
|
||||
|
@ -372,19 +388,19 @@ def createSubshapeLineGroups(subshapeLevelGroups, mode, fillColors, threadWidth=
|
|||
lastLine = line
|
||||
|
||||
# Render the lines
|
||||
GenericRenderer.globalRenderer.clearAll()
|
||||
curColor = 0
|
||||
for lineGroups in shortenedSubshapeLineGroups:
|
||||
for lineGroup in lineGroups:
|
||||
curColor += 1
|
||||
currentColor = PES.colors[curColor % len(PES.colors)]
|
||||
for line in lineGroup:
|
||||
# Add slight color variation to be able to see individual stitches.
|
||||
variation = 50
|
||||
c1 = min(255, max(0, currentColor[1] + int(round(random.uniform(-variation, variation))) ))
|
||||
c2 = min(255, max(0, currentColor[2] + int(round(random.uniform(-variation, variation)))))
|
||||
c3 = min(255, max(0, currentColor[3] + int(round(random.uniform(-variation, variation)))))
|
||||
GenericRenderer.globalRenderer.addLine(line, c1, c2, c3)
|
||||
# GenericRenderer.globalRenderer.clearAll()
|
||||
# curColor = 0
|
||||
# for lineGroups in shortenedSubshapeLineGroups:
|
||||
# for lineGroup in lineGroups:
|
||||
# curColor += 1
|
||||
# currentColor = PES.colors[curColor % len(PES.colors)]
|
||||
# for line in lineGroup:
|
||||
# # Add slight color variation to be able to see individual stitches.
|
||||
# variation = 50
|
||||
# c1 = min(255, max(0, currentColor[1] + int(round(random.uniform(-variation, variation))) ))
|
||||
# c2 = min(255, max(0, currentColor[2] + int(round(random.uniform(-variation, variation)))))
|
||||
# c3 = min(255, max(0, currentColor[3] + int(round(random.uniform(-variation, variation)))))
|
||||
# GenericRenderer.globalRenderer.addLine(line, c1, c2, c3)
|
||||
|
||||
return shortenedSubshapeLineGroups
|
||||
|
||||
|
|