kopia lustrzana https://github.com/Reenforcements/PES-Embroidery
Almost there
rodzic
58ce931d4e
commit
52f15ff85c
|
@ -3,7 +3,9 @@
|
|||
<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$/src/PES_Emb_mathutils.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/PES_Emb_mathutils.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/PECRender/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/PECRender/main.py" afterDir="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$/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" />
|
||||
|
@ -16,8 +18,8 @@
|
|||
</component>
|
||||
<component name="CoverageDataManager">
|
||||
<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="1543627152612" 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="1542987287831" 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="1543696967218" 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="1543697059353" 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="PECRender-main Coverage Results" MODIFIED="1542509072203" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/PECRender" />
|
||||
</component>
|
||||
|
@ -25,37 +27,37 @@
|
|||
<session id="-1920598427">
|
||||
<usages-collector id="statistics.lifecycle.project">
|
||||
<counts>
|
||||
<entry key="project.closed" value="10" />
|
||||
<entry key="project.closed" value="12" />
|
||||
<entry key="project.open.time.2" value="1" />
|
||||
<entry key="project.open.time.5" value="1" />
|
||||
<entry key="project.open.time.6" value="5" />
|
||||
<entry key="project.open.time.6" value="6" />
|
||||
<entry key="project.open.time.7" value="2" />
|
||||
<entry key="project.open.time.8" value="2" />
|
||||
<entry key="project.opened" value="11" />
|
||||
<entry key="project.open.time.8" value="3" />
|
||||
<entry key="project.opened" value="13" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
<usages-collector id="statistics.vcs.git.usages" />
|
||||
<usages-collector id="statistics.file.types.edit">
|
||||
<counts>
|
||||
<entry key="Python" value="34342" />
|
||||
<entry key="Python" value="35783" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
<usages-collector id="statistics.js.language.service.starts" />
|
||||
<usages-collector id="statistics.file.types.open">
|
||||
<counts>
|
||||
<entry key="Python" value="23" />
|
||||
<entry key="Python" value="28" />
|
||||
<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="23" />
|
||||
<entry key="py" value="28" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
<usages-collector id="statistics.file.extensions.edit">
|
||||
<counts>
|
||||
<entry key="py" value="34342" />
|
||||
<entry key="py" value="35783" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
</session>
|
||||
|
@ -65,8 +67,8 @@
|
|||
<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="100">
|
||||
<caret line="28" column="15" selection-start-line="28" selection-start-column="15" selection-end-line="28" selection-end-column="15" />
|
||||
<state relative-caret-position="196">
|
||||
<caret line="42" column="44" lean-forward="true" selection-start-line="42" selection-start-column="44" selection-end-line="42" selection-end-column="44" />
|
||||
<folding>
|
||||
<element signature="e#0#15#0" expanded="true" />
|
||||
</folding>
|
||||
|
@ -74,30 +76,30 @@
|
|||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/src/svgFunctions.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="182">
|
||||
<caret line="95" column="69" selection-start-line="95" selection-start-column="69" selection-end-line="95" selection-end-column="69" />
|
||||
<folding>
|
||||
<element signature="e#0#19#0" expanded="true" />
|
||||
<marker date="1543627151776" expanded="true" signature="143:2224" ph="..." />
|
||||
<marker date="1543627151776" expanded="true" signature="12788:12793" ph="..." />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/PES.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="450">
|
||||
<caret line="30" column="26" selection-start-line="30" selection-start-column="26" selection-end-line="30" selection-end-column="26" />
|
||||
<state relative-caret-position="864">
|
||||
<caret line="204" column="17" lean-forward="true" selection-start-line="204" selection-start-column="17" selection-end-line="204" selection-end-column="29" />
|
||||
<folding>
|
||||
<element signature="e#0#23#0" expanded="true" />
|
||||
<marker date="1543520578420" expanded="true" signature="133:210" ph="..." />
|
||||
<marker date="1543520578420" expanded="true" signature="387:427" ph="..." />
|
||||
<marker date="1543520578420" expanded="true" signature="3290:3296" ph="..." />
|
||||
<marker date="1543697169310" expanded="true" signature="133:258" ph="..." />
|
||||
<marker date="1543697169310" expanded="true" signature="435:475" ph="..." />
|
||||
<marker date="1543697169310" expanded="true" signature="3338:3344" ph="..." />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/src/svgFunctions.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="3240">
|
||||
<caret line="317" column="18" selection-start-line="317" selection-start-column="18" selection-end-line="317" selection-end-column="18" />
|
||||
<folding>
|
||||
<element signature="e#0#19#0" expanded="true" />
|
||||
<marker date="1543696307287" expanded="true" signature="143:2224" ph="..." />
|
||||
<marker date="1543696307287" expanded="true" signature="12671:12676" ph="..." />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
|
@ -106,8 +108,8 @@
|
|||
<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="182">
|
||||
<caret line="44" column="26" selection-start-line="44" selection-start-column="8" selection-end-line="44" selection-end-column="26" />
|
||||
<state relative-caret-position="246">
|
||||
<caret line="89" column="30" lean-forward="true" selection-start-line="89" selection-start-column="30" selection-end-line="89" selection-end-column="30" />
|
||||
<folding>
|
||||
<element signature="e#0#29#0" expanded="true" />
|
||||
<marker date="1543625107768" expanded="true" signature="139:2608" ph="..." />
|
||||
|
@ -136,17 +138,12 @@
|
|||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/PES_render_utils.py">
|
||||
<entry file="file://$PROJECT_DIR$/PECRender/main.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="285">
|
||||
<caret line="19" column="63" selection-start-line="19" selection-start-column="63" selection-end-line="19" selection-end-column="63" />
|
||||
<state relative-caret-position="510">
|
||||
<caret line="34" lean-forward="true" selection-start-line="34" selection-end-line="34" />
|
||||
<folding>
|
||||
<element signature="e#0#13#0" expanded="true" />
|
||||
<marker date="1543626061469" expanded="true" signature="129:130" ph="..." />
|
||||
<marker date="1543626061469" expanded="true" signature="129:135" ph="..." />
|
||||
<marker date="1543626061469" expanded="true" signature="1235:1567" ph="..." />
|
||||
<marker date="1543626061469" expanded="true" signature="1462:1567" ph="..." />
|
||||
<marker date="1543626061469" expanded="true" signature="1594:1689" ph="..." />
|
||||
<element signature="e#0#10#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
|
@ -163,28 +160,12 @@
|
|||
</component>
|
||||
<component name="FindInProjectRecents">
|
||||
<findStrings>
|
||||
<find>index</find>
|
||||
<find>type(</find>
|
||||
<find>enumerate</find>
|
||||
<find>colorIndex</find>
|
||||
<find>type</find>
|
||||
<find>getColorOfPathAtIndex</find>
|
||||
<find>closest</find>
|
||||
<find>ColorChange</find>
|
||||
<find>getClosestColor</find>
|
||||
<find>stitchLines</find>
|
||||
<find>maxDist</find>
|
||||
<find>clearAll</find>
|
||||
<find>lineIntersectsAnyBarrier</find>
|
||||
<find>intersect(</find>
|
||||
<find>StitchLevel</find>
|
||||
<find>barrier</find>
|
||||
<find>intersection points for this</find>
|
||||
<find>intersect</find>
|
||||
<find>self.b</find>
|
||||
<find>addPoint</find>
|
||||
<find>addLine</find>
|
||||
<find>endWithinStart</find>
|
||||
<find>intersectionPointWithInfLine</find>
|
||||
<find>invertLine</find>
|
||||
<find>matchInfLine</find>
|
||||
|
@ -193,6 +174,22 @@
|
|||
<find>renderPECCommands</find>
|
||||
<find>lineFallsInValidProjection</find>
|
||||
<find>makeStitchLevels</find>
|
||||
<find>TYPE_JUMP</find>
|
||||
<find>encode</find>
|
||||
<find>color</find>
|
||||
<find>1095499788</find>
|
||||
<find>a0</find>
|
||||
<find>scale</find>
|
||||
<find>seeking to</find>
|
||||
<find>print</find>
|
||||
<find>Stitch(</find>
|
||||
<find>endWithinStart</find>
|
||||
<find>Stitch</find>
|
||||
<find><</find>
|
||||
<find>Beep</find>
|
||||
<find>0x9</find>
|
||||
<find>width</find>
|
||||
<find>size</find>
|
||||
</findStrings>
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
|
@ -207,13 +204,13 @@
|
|||
<option value="$PROJECT_DIR$/src/svg.py" />
|
||||
<option value="$PROJECT_DIR$/src/PES-Emb-mathutils.py" />
|
||||
<option value="$PROJECT_DIR$/src/utilities.py" />
|
||||
<option value="$PROJECT_DIR$/PECRender/main.py" />
|
||||
<option value="$PROJECT_DIR$/Colors/getColors.py" />
|
||||
<option value="$PROJECT_DIR$/src/PES.py" />
|
||||
<option value="$PROJECT_DIR$/src/PES_Emb_mathutils.py" />
|
||||
<option value="$PROJECT_DIR$/src/PES_render_utils.py" />
|
||||
<option value="$PROJECT_DIR$/src/main.py" />
|
||||
<option value="$PROJECT_DIR$/src/svgFunctions.py" />
|
||||
<option value="$PROJECT_DIR$/src/main.py" />
|
||||
<option value="$PROJECT_DIR$/PECRender/main.py" />
|
||||
<option value="$PROJECT_DIR$/src/PES.py" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
|
@ -236,6 +233,7 @@
|
|||
<foldersAlwaysOnTop value="true" />
|
||||
</navigator>
|
||||
<panes>
|
||||
<pane id="Scope" />
|
||||
<pane id="ProjectPane">
|
||||
<subPane>
|
||||
<expand>
|
||||
|
@ -258,6 +256,11 @@
|
|||
<item name="PES-Embroidery" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="PES-Embroidery" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="PES-Embroidery" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="TestOutput" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="PES-Embroidery" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="External Libraries" type="cb654da1:ExternalLibrariesNode" />
|
||||
|
@ -266,7 +269,6 @@
|
|||
<select />
|
||||
</subPane>
|
||||
</pane>
|
||||
<pane id="Scope" />
|
||||
</panes>
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
|
@ -294,7 +296,7 @@
|
|||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="RunManager" selected="Python.main">
|
||||
<component name="RunManager" selected="Python.PECRender-main">
|
||||
<configuration name="PECRender-main" type="PythonConfigurationType" factoryName="Python" temporary="true">
|
||||
<module name="PES-Embroidery" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
|
@ -414,7 +416,7 @@
|
|||
<frame x="0" y="23" width="1680" height="1027" extended-state="6" />
|
||||
<editor active="true" />
|
||||
<layout>
|
||||
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.13980465" />
|
||||
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.14224665" />
|
||||
<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" />
|
||||
|
@ -537,10 +539,39 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file:///usr/local/lib/python2.7/site-packages/pyembroidery/PecReader.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="220">
|
||||
<caret line="24" selection-start-line="24" selection-end-line="24" />
|
||||
</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="765">
|
||||
<caret line="51" column="23" selection-start-line="51" selection-start-column="23" selection-end-line="51" selection-end-column="23" />
|
||||
<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/pyembroidery/PesReader.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="199">
|
||||
<caret line="55" selection-start-line="55" selection-end-line="55" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PECRender/main.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="68">
|
||||
<caret line="43" column="22" selection-start-line="43" selection-start-column="22" selection-end-line="43" selection-end-column="22" />
|
||||
<state relative-caret-position="510">
|
||||
<caret line="34" lean-forward="true" selection-start-line="34" selection-end-line="34" />
|
||||
<folding>
|
||||
<element signature="e#0#10#0" expanded="true" />
|
||||
</folding>
|
||||
|
@ -556,21 +587,31 @@
|
|||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/PES.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="450">
|
||||
<caret line="30" column="26" selection-start-line="30" selection-start-column="26" selection-end-line="30" selection-end-column="26" />
|
||||
<state relative-caret-position="864">
|
||||
<caret line="204" column="17" lean-forward="true" selection-start-line="204" selection-start-column="17" selection-end-line="204" selection-end-column="29" />
|
||||
<folding>
|
||||
<element signature="e#0#23#0" expanded="true" />
|
||||
<marker date="1543520578420" expanded="true" signature="133:210" ph="..." />
|
||||
<marker date="1543520578420" expanded="true" signature="387:427" ph="..." />
|
||||
<marker date="1543520578420" expanded="true" signature="3290:3296" ph="..." />
|
||||
<marker date="1543697169310" expanded="true" signature="133:258" ph="..." />
|
||||
<marker date="1543697169310" expanded="true" signature="435:475" ph="..." />
|
||||
<marker date="1543697169310" expanded="true" signature="3338:3344" ph="..." />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="196">
|
||||
<caret line="42" column="44" lean-forward="true" selection-start-line="42" selection-start-column="44" selection-end-line="42" selection-end-column="44" />
|
||||
<folding>
|
||||
<element signature="e#0#15#0" expanded="true" />
|
||||
</folding>
|
||||
</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="182">
|
||||
<caret line="44" column="26" selection-start-line="44" selection-start-column="8" selection-end-line="44" selection-end-column="26" />
|
||||
<state relative-caret-position="246">
|
||||
<caret line="89" column="30" lean-forward="true" selection-start-line="89" selection-start-column="30" selection-end-line="89" selection-end-column="30" />
|
||||
<folding>
|
||||
<element signature="e#0#29#0" expanded="true" />
|
||||
<marker date="1543625107768" expanded="true" signature="139:2608" ph="..." />
|
||||
|
@ -588,39 +629,14 @@
|
|||
</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="285">
|
||||
<caret line="19" column="63" selection-start-line="19" selection-start-column="63" selection-end-line="19" selection-end-column="63" />
|
||||
<folding>
|
||||
<element signature="e#0#13#0" expanded="true" />
|
||||
<marker date="1543626061469" expanded="true" signature="129:130" ph="..." />
|
||||
<marker date="1543626061469" expanded="true" signature="129:135" ph="..." />
|
||||
<marker date="1543626061469" expanded="true" signature="1235:1567" ph="..." />
|
||||
<marker date="1543626061469" expanded="true" signature="1462:1567" ph="..." />
|
||||
<marker date="1543626061469" expanded="true" signature="1594:1689" ph="..." />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="100">
|
||||
<caret line="28" column="15" selection-start-line="28" selection-start-column="15" selection-end-line="28" selection-end-column="15" />
|
||||
<folding>
|
||||
<element signature="e#0#15#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/svgFunctions.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="182">
|
||||
<caret line="95" column="69" selection-start-line="95" selection-start-column="69" selection-end-line="95" selection-end-column="69" />
|
||||
<state relative-caret-position="3240">
|
||||
<caret line="317" column="18" selection-start-line="317" selection-start-column="18" selection-end-line="317" selection-end-column="18" />
|
||||
<folding>
|
||||
<element signature="e#0#19#0" expanded="true" />
|
||||
<marker date="1543627151776" expanded="true" signature="143:2224" ph="..." />
|
||||
<marker date="1543627151776" expanded="true" signature="12788:12793" ph="..." />
|
||||
<marker date="1543696307287" expanded="true" signature="143:2224" ph="..." />
|
||||
<marker date="1543696307287" expanded="true" signature="12671:12676" ph="..." />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
|
|
|
@ -12,8 +12,9 @@ window.set_size(1000,1000)
|
|||
window.set_location(300, 0)
|
||||
pyglet.gl.glClearColor(0.4,0.4,0.4,1)
|
||||
|
||||
filepath = "/Users/imaustyn/Documents/MiamiUniversity/ECE 487/Project/Understanding2/tux.pes"
|
||||
#filepath = "/Users/imaustyn/Documents/MiamiUniversity/ECE 487/Project/Understanding2/tux.pes"
|
||||
#filepath = "/Users/imaustyn/Downloads/Circle embroidery designs/Circle.pes"
|
||||
filepath = "/Users/imaustyn/Documents/MiamiUniversity/ECE 487/Project/PES-Embroidery/TestOutput/simple.PES"
|
||||
|
||||
# Global variables
|
||||
class Global:
|
||||
|
@ -22,8 +23,8 @@ class Global:
|
|||
x = 0
|
||||
y = 0
|
||||
file = None
|
||||
xScale = 4.0
|
||||
yScale = 4.0
|
||||
xScale = 2.0
|
||||
yScale = 2.0
|
||||
xOffset = 500.0
|
||||
yOffset = 500.0
|
||||
testColors = [(244, 238, 66), (255,255,255), (0,0,0)]
|
||||
|
@ -51,6 +52,7 @@ class Global:
|
|||
f = cls.file # type: file
|
||||
print(f.read(8))
|
||||
PECOffset = struct.unpack("<I", f.read(4))[0]
|
||||
print("Seeking to byte: {}".format(PECOffset))
|
||||
f.seek(PECOffset)
|
||||
# Skip stuff
|
||||
cls.label = f.read(20)
|
||||
|
@ -125,7 +127,7 @@ class Global:
|
|||
if (peekByte & 0x80) > 0:
|
||||
# Double length
|
||||
c = struct.unpack(">H", Global.readBytes(f, 2))[0]
|
||||
print("Beep: {}".format(hex(c)))
|
||||
#print("Beep: {}".format(hex(c)))
|
||||
|
||||
# Color change
|
||||
if c == 0xFEB0:
|
||||
|
|
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
Przed Szerokość: | Wysokość: | Rozmiar: 69 B Po Szerokość: | Wysokość: | Rozmiar: 3.9 KiB |
71
src/PES.py
71
src/PES.py
|
@ -8,6 +8,9 @@ def encodeU8(num):
|
|||
def encodeU16(num):
|
||||
return pack("<H", num)
|
||||
|
||||
def encodeS16(num):
|
||||
return pack("<h", num)
|
||||
|
||||
def encodeU32(num):
|
||||
return pack("<I", num)
|
||||
|
||||
|
@ -112,11 +115,11 @@ class PES:
|
|||
cls.colors[closest][2],
|
||||
cls.colors[closest][3])
|
||||
|
||||
def __init__(self, PECCommands=[]):
|
||||
def __init__(self, PEC):
|
||||
self.magic = "#PES"
|
||||
self.version = "0001"
|
||||
self.sections = []
|
||||
self.PECCommands = []
|
||||
self.PEC = PEC
|
||||
|
||||
def encode(self):
|
||||
b = bytearray()
|
||||
|
@ -124,7 +127,9 @@ class PES:
|
|||
b.extend(self.version)
|
||||
# Save a spot for the PEC offset that we will
|
||||
# change later to the actual offset
|
||||
b.extend("0000")
|
||||
b.extend([0x0C, 0x00, 0x00, 0x00])
|
||||
|
||||
self.PEC.encode(b)
|
||||
|
||||
# Old code for the PES section
|
||||
# that I decided to try excluding.
|
||||
|
@ -147,9 +152,9 @@ class PES:
|
|||
return b
|
||||
|
||||
class PEC:
|
||||
def __init__(self, commands=[]):
|
||||
def __init__(self, label, colors, commands):
|
||||
self.label = "default"
|
||||
self.numberOfColors = 1
|
||||
self.colors = colors
|
||||
|
||||
# Commands include stitches, jumps, and color changes
|
||||
self.commands = commands
|
||||
|
@ -163,24 +168,26 @@ class PEC:
|
|||
# Lots of values that aren't understood but probably have to be there.
|
||||
b.extend([0x20] * 11)
|
||||
|
||||
b.extend(0xFF)
|
||||
b.extend([0xFF])
|
||||
|
||||
b.extend(0x00)
|
||||
b.extend(0xFF)
|
||||
b.extend([0x00])
|
||||
b.extend([0xFF])
|
||||
|
||||
# Thumbnail width and height
|
||||
b.extend(6)
|
||||
b.extend(38)
|
||||
b.extend([6])
|
||||
b.extend([38])
|
||||
|
||||
b.extend([0x20, 0x20, 0x20, 0x20, 0x64, 0x20, 0x00, 0x20, 0x00, 0x20, 0x20, 0x20])
|
||||
|
||||
# Number of colors - 1
|
||||
b.extend((self.numberOfColors - 1) & 0xFF)
|
||||
#TEMP, assign color palette indices
|
||||
for i in self.numberOfColors:
|
||||
b.extend(i & 0xFF)
|
||||
b.extend([ (len(self.colors) - 1) & 0xFF])
|
||||
|
||||
# Write colors indices
|
||||
for c in self.colors:
|
||||
b.extend([c[0] & 0xFF])
|
||||
|
||||
# Palette section padding?
|
||||
b.extend([0x20] * (462 - self.numberOfColors))
|
||||
b.extend([0x20] * (462 - len(self.colors) ))
|
||||
|
||||
# Second section of PEC header
|
||||
|
||||
|
@ -207,7 +214,7 @@ class PEC:
|
|||
command.encode(b)
|
||||
|
||||
# End of stitch list
|
||||
b.extend(0xFF)
|
||||
b.extend([0xFF])
|
||||
|
||||
|
||||
|
||||
|
@ -240,21 +247,27 @@ class Stitch:
|
|||
TYPE_JUMP = 0x9000
|
||||
TYPE_TRIM = 0xA000
|
||||
|
||||
lastPoint = (0+0j)
|
||||
|
||||
# Initialize a new stitch from the previous location
|
||||
# to the new location.
|
||||
def __init__(self, line):
|
||||
assert(isinstance(line, Line))
|
||||
|
||||
self.line = line
|
||||
|
||||
if self.line.length() < 63.0:
|
||||
self.type = Stitch.TYPE_SHORT
|
||||
else:
|
||||
self.type = Stitch.TYPE_LONG
|
||||
def __init__(self, toPoint):
|
||||
assert(isinstance(toPoint, complex))
|
||||
self.point = toPoint
|
||||
self.type = Stitch.TYPE_LONG
|
||||
|
||||
|
||||
def encode(self, b):
|
||||
None
|
||||
self.encodePoint(self.point - Stitch.lastPoint, b)
|
||||
Stitch.lastPoint = self.point
|
||||
|
||||
def encodePoint(self, point, b):
|
||||
self.encodeCoordinate(point.real, b)
|
||||
self.encodeCoordinate(point.imag, b)
|
||||
|
||||
def encodeCoordinate(self, coordinate, b):
|
||||
total = self.type + (int(coordinate) & 0xFFF)
|
||||
b.extend([ ((total & 0xFF00) >> 8), total & 0xFF])
|
||||
|
||||
def length(self):
|
||||
return self.line.length()
|
||||
|
@ -271,6 +284,6 @@ class ColorChange:
|
|||
self.colorIndex = colorIndex
|
||||
|
||||
def encode(self, b):
|
||||
b.append(ColorChange.TYPE_COLOR_CHANGE_left)
|
||||
b.append(ColorChange.TYPE_COLOR_CHANGE_right)
|
||||
b.append(self.colorIndex & 0xFF)
|
||||
b.extend([ ColorChange.TYPE_COLOR_CHANGE_left ])
|
||||
b.extend([ ColorChange.TYPE_COLOR_CHANGE_right ])
|
||||
b.extend([ self.colorIndex & 0xFF ])
|
BIN
src/PES.pyc
BIN
src/PES.pyc
Plik binarny nie jest wyświetlany.
|
@ -14,7 +14,7 @@ class GenericRenderer:
|
|||
self.lineBatch = pyglet.graphics.Batch()
|
||||
self.pointBatch = pyglet.graphics.Batch()
|
||||
|
||||
pyglet.gl.glLineWidth(7)#2
|
||||
pyglet.gl.glLineWidth(2)#2
|
||||
pyglet.gl.glPointSize(4)
|
||||
|
||||
self.addLine(Line(start=(0+0j), end=(1000+1000j)), 255, 0, 0)
|
||||
|
|
Plik binarny nie jest wyświetlany.
17
src/main.py
17
src/main.py
|
@ -26,14 +26,16 @@ paths, attributes = svg
|
|||
if paths is None:
|
||||
sys.exit(0)
|
||||
|
||||
threadWidth = 3
|
||||
threadWidth = 0.5
|
||||
|
||||
# Enumerate the shapes in the SVG to find where stitches should go.
|
||||
levelGroups = []
|
||||
fillColors = []
|
||||
PECColors = []
|
||||
for i, shape in enumerate(paths):
|
||||
fillColor = getColorOfPathAtIndex(attributes,i)
|
||||
fillColors.append(fillColor)
|
||||
PECColors.append(PES.getClosestColor(fillColor))
|
||||
|
||||
print("Doing shape {} with fill color {}".format(shape, fillColor))
|
||||
print("Closest color: {}".format( PES.getClosestColor(fillColor) ))
|
||||
|
@ -47,16 +49,23 @@ for i, shape in enumerate(paths):
|
|||
PECCommands = createStitchRoutine(levelGroups, fillColors=fillColors, threadWidth=threadWidth)
|
||||
|
||||
# Render the PEC commands
|
||||
#renderPECCommands(PECCommands)
|
||||
renderPECCommands(PECCommands)
|
||||
|
||||
pes = PES(PECCommands=PECCommands)
|
||||
pes.encode()
|
||||
pec = PEC(label="pec1", colors=PECColors, commands=PECCommands)
|
||||
pes = PES(PEC=pec)
|
||||
encodedPES = pes.encode()
|
||||
|
||||
with open(args.outputFile, "w") as f:
|
||||
f.write(encodedPES)
|
||||
|
||||
print("Wrote {} to disk.".format(args.outputFile))
|
||||
|
||||
if args.debug:
|
||||
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.")
|
||||
else:
|
||||
print("Couldn't find output file.")
|
||||
|
||||
|
|
|
@ -218,9 +218,7 @@ def makeStitchLevels(shape, fillColor=(0,0,0), threadWidth=2, slope=1, debug=Fal
|
|||
def switchPointsInLine(line):
|
||||
return Line(start=line.end, end=line.start)
|
||||
|
||||
def endWithinStart(l1, l2, dist):
|
||||
p1 = l1.end
|
||||
p2 = l2.start
|
||||
def pointWithinPoint(p1, p2, dist):
|
||||
return math.sqrt( math.pow(p1.real - p2.real, 2) + math.pow(p1.imag - p2.imag, 2) ) <= dist
|
||||
|
||||
# Take all the stitches we created and actually make
|
||||
|
@ -311,16 +309,16 @@ def createStitchRoutine(levelGroups, fillColors, threadWidth=2):
|
|||
if isinstance(allStitches[-1], Stitch):
|
||||
lastStitch = allStitches[-1]
|
||||
# Is the distance greater than the minimum?
|
||||
if endWithinStart(lastStitch.line, singleLineGroup[0], maxDist) is not True:
|
||||
if pointWithinPoint(lastStitch.point, singleLineGroup[0].start, maxDist) is not True:
|
||||
# Jump to the location of this shape.
|
||||
jump = Stitch( line=Line(start=lastStitch.line.end, end=singleLineGroup[0].start) )
|
||||
jump = Stitch( singleLineGroup[0].start )
|
||||
jump.type = Stitch.TYPE_JUMP
|
||||
allStitches.append(jump)
|
||||
|
||||
for singleLine in singleLineGroup:
|
||||
# Do I really need to do two stitches per stitch or just one?
|
||||
# Maybe I can add different modes for this.
|
||||
s = Stitch(singleLine)
|
||||
s = Stitch(singleLine.start)
|
||||
allStitches.append(s)
|
||||
s = Stitch(singleLine.end)
|
||||
allStitches.append(s)
|
||||
|
||||
print("Created {} stitches.".format(len(allStitches)))
|
||||
|
@ -330,24 +328,22 @@ def renderPECCommands(PECCommands):
|
|||
|
||||
GenericRenderer.globalRenderer.clearAll()
|
||||
|
||||
lastPoint = (0+0j)
|
||||
currentColor = ("None", 0,0,0)
|
||||
curIndex = 1
|
||||
jumps = []
|
||||
for command in PECCommands:
|
||||
|
||||
currentColor = PES.colors[curIndex % len(PES.colors)]
|
||||
|
||||
if isinstance(command, Stitch):
|
||||
if command.type is Stitch.TYPE_JUMP:
|
||||
jumps.append(command.line)
|
||||
#GenericRenderer.globalRenderer.addLine(command.line, 255, 255, 255)
|
||||
curIndex = curIndex + 1
|
||||
jumps.append(Line(lastPoint, command.point))
|
||||
else:
|
||||
# Regular stitch
|
||||
GenericRenderer.globalRenderer.addLine(command.line, currentColor[1], currentColor[2], currentColor[3])
|
||||
if isinstance(command, ColorChange):
|
||||
None
|
||||
#currentColor = PES.colors[command.colorIndex]
|
||||
GenericRenderer.globalRenderer.addLine(Line(lastPoint, command.point), currentColor[1], currentColor[2], currentColor[3])
|
||||
|
||||
lastPoint = command.point
|
||||
|
||||
if isinstance(command, ColorChange):
|
||||
currentColor = PES.colors[command.colorIndex]
|
||||
|
||||
# Render all the jumps on top
|
||||
for jump in jumps:
|
||||
GenericRenderer.globalRenderer.addLine(jump, 255, 255, 255)
|
Plik binarny nie jest wyświetlany.
Ładowanie…
Reference in New Issue