From 559f855ef0fc8d11d4c04efabadce005b148f5db Mon Sep 17 00:00:00 2001
From: daid
Date: Mon, 13 Feb 2012 11:33:38 +0100
Subject: [PATCH 1/8] Updated build script so it works for osx. (Thanks bbum!)
Added osx pronterface start script (Thanks bbum!) General update to the build
script so it's easier to use.
---
build.sh | 155 +++++++++++++++++++++--------------
scripts/linux/pronterface.sh | 17 ++++
scripts/osx64/pronterface.sh | 19 +++++
scripts/win32/printrun.bat | 1 +
scripts/win32/skeinforge.bat | 2 +
5 files changed, 132 insertions(+), 62 deletions(-)
create mode 100644 scripts/linux/pronterface.sh
create mode 100644 scripts/osx64/pronterface.sh
create mode 100644 scripts/win32/printrun.bat
create mode 100644 scripts/win32/skeinforge.bat
diff --git a/build.sh b/build.sh
index ea124c5c67..2ccd7a1ee0 100755
--- a/build.sh
+++ b/build.sh
@@ -1,47 +1,78 @@
-#!/bin/sh
+#!/bin/bash
#############################
# CONFIGURATION
#############################
+
+##Select the build target
+BUILD_TARGET=win32
+#BUILD_TARGET=linux
+#BUILD_TARGET=osx64
+
+##Do we need to create the final archive
+ARCHIVE_FOR_DISTRIBUTION=1
+##Which version name are we appending to the final archive
+BUILD_NAME=Alpha4
+TARGET_DIR=${BUILD_TARGET}-SkeinPyPy-${BUILD_NAME}
+
+##Which versions of external programs to use
PYPY_VERSION=1.8
WIN_PORTABLE_PY_VERSION=2.7.2.1
WIN_PYSERIAL_VERSION=2.5
-BUILD_NAME=Alpha4
+
+#############################
+# Support functions
+#############################
+function checkTool
+{
+ if [ -z `which $1` ]; then
+ echo "The $1 command must be somewhere in your \$PATH."
+ echo "Fix your \$PATH or install $2"
+ exit 1
+ fi
+}
#############################
# Actual build script
#############################
-#Check if we have 7zip, needed to extract and packup a bunch of packages.
-7z > /dev/null 2>&1
-if [ $? != 0 ]; then
- echo $0 requires 7zip to run.
- exit 1
+checkTool git "git: http://git-scm.com/"
+checkTool curl "curl: http://curl.haxx.se/"
+if [ $BUILD_TARGET = "win32" ]; then
+ #Check if we have 7zip, needed to extract and packup a bunch of packages for windows.
+ checkTool 7z "7zip: http://www.7-zip.org/"
+fi
+#For building under MacOS we need gnutar instead of tar
+if [ -z `which gnutar` ]; then
+ TAR=tar
+else
+ TAR=gnutar
fi
#############################
# Download all needed files.
#############################
-#Get portable python for windows and extract it. (Linux and Mac need to install python themselfs)
-if [ ! -f "PortablePython_${WIN_PORTABLE_PY_VERSION}.exe" ]; then
- wget http://ftp.nluug.nl/languages/python/portablepython/v2.7/PortablePython_${WIN_PORTABLE_PY_VERSION}.exe
-fi
-if [ ! -f pyserial-${WIN_PYSERIAL_VERSION}.exe ]; then
- wget http://sourceforge.net/projects/pyserial/files/pyserial/${WIN_PYSERIAL_VERSION}/pyserial-${WIN_PYSERIAL_VERSION}.win32.exe/download
- mv download pyserial-${WIN_PYSERIAL_VERSION}.exe
-fi
-#Get pypy
-if [ ! -f "pypy-${PYPY_VERSION}-win32.zip" ]; then
- wget https://bitbucket.org/pypy/pypy/downloads/pypy-${PYPY_VERSION}-win32.zip
-fi
-if [ ! -f "pypy-${PYPY_VERSION}-linux.tar.bz2" ]; then
- wget https://bitbucket.org/pypy/pypy/downloads/pypy-${PYPY_VERSION}-linux.tar.bz2
-fi
-if [ ! -f "pypy-${PYPY_VERSION}-osx64.tar.bz2" ]; then
- wget https://bitbucket.org/pypy/pypy/downloads/pypy-${PYPY_VERSION}-osx64.tar.bz2
+if [ $BUILD_TARGET = "win32" ]; then
+ #Get portable python for windows and extract it. (Linux and Mac need to install python themselfs)
+ if [ ! -f "PortablePython_${WIN_PORTABLE_PY_VERSION}.exe" ]; then
+ curl -L -O http://ftp.nluug.nl/languages/python/portablepython/v2.7/PortablePython_${WIN_PORTABLE_PY_VERSION}.exe
+ fi
+ if [ ! -f pyserial-${WIN_PYSERIAL_VERSION}.exe ]; then
+ curl -L -O http://sourceforge.net/projects/pyserial/files/pyserial/${WIN_PYSERIAL_VERSION}/pyserial-${WIN_PYSERIAL_VERSION}.win32.exe/download
+ mv download pyserial-${WIN_PYSERIAL_VERSION}.exe
+ fi
+ #Get pypy
+ if [ ! -f "pypy-${PYPY_VERSION}-win32.zip" ]; then
+ curl -L -O https://bitbucket.org/pypy/pypy/downloads/pypy-${PYPY_VERSION}-win32.zip
+ fi
+else
+ if [ ! -f "pypy-${PYPY_VERSION}-${BUILD_TARGET}.tar.bz2" ]; then
+ curl -L -O https://bitbucket.org/pypy/pypy/downloads/pypy-${PYPY_VERSION}-${BUILD_TARGET}.tar.bz2
+ fi
fi
+
#Get our own version of Printrun
rm -rf Printrun
git clone git://github.com/daid/Printrun.git
@@ -50,55 +81,55 @@ rm -rf Printrun/.git
#############################
# Build the packages
#############################
-rm -rf target_win32 target_linux target_osx64
-mkdir -p target_win32 target_linux target_osx64
+rm -rf ${TARGET_DIR}
+mkdir -p ${TARGET_DIR}
-7z x PortablePython_${WIN_PORTABLE_PY_VERSION}.exe \$_OUTDIR/App
-7z x PortablePython_${WIN_PORTABLE_PY_VERSION}.exe \$_OUTDIR/Lib/site-packages
-7z x pyserial-${WIN_PYSERIAL_VERSION}.exe PURELIB
+if [ $BUILD_TARGET = "win32" ]; then
+ #For windows extract portable python to include it.
+ 7z x PortablePython_${WIN_PORTABLE_PY_VERSION}.exe \$_OUTDIR/App
+ 7z x PortablePython_${WIN_PORTABLE_PY_VERSION}.exe \$_OUTDIR/Lib/site-packages
+ 7z x pyserial-${WIN_PYSERIAL_VERSION}.exe PURELIB
-mkdir -p target_win32/python
-mv \$_OUTDIR/App/* target_win32/python
-mv \$_OUTDIR/Lib/site-packages/wx* target_win32/python/Lib/site-packages/
-mv PURELIB/serial target_win32/python/Lib
-rm -rf \$_OUTDIR
-rm -rf PURELIB
+ mkdir -p ${TARGET_DIR}/python
+ mv \$_OUTDIR/App/* ${TARGET_DIR}/python
+ mv \$_OUTDIR/Lib/site-packages/wx* ${TARGET_DIR}/python/Lib/site-packages/
+ mv PURELIB/serial ${TARGET_DIR}/python/Lib
+ rm -rf \$_OUTDIR
+ rm -rf PURELIB
+fi
#Extract pypy
-7z x pypy-${PYPY_VERSION}-win32.zip -otarget_win32
-mv target_win32/pypy-${PYPY_VERSION} target_win32/pypy
-cd target_linux; tar -xjf ../pypy-${PYPY_VERSION}-linux.tar.bz2; cd ..
-mv target_linux/pypy-${PYPY_VERSION} target_linux/pypy
-cd target_osx64; tar -xjf ../pypy-${PYPY_VERSION}-osx64.tar.bz2; cd ..
-mv target_linux/pypy-${PYPY_VERSION} target_osx64/pypy
+if [ $BUILD_TARGET = "win32" ]; then
+ 7z x pypy-${PYPY_VERSION}-win32.zip -o${TARGET_DIR}
+ mv ${TARGET_DIR}/pypy-${PYPY_VERSION} ${TARGET_DIR}/pypy
+else
+ cd ${TARGET_DIR}; $TAR -xjf ../pypy-${PYPY_VERSION}-${BUILD_TARGET}.tar.bz2; cd ..
+ mv ${TARGET_DIR}/pypy-${PYPY_VERSION} ${TARGET_DIR}/pypy
+fi
#add Skeinforge
-cp -a SkeinPyPy target_win32/SkeinPyPy
-cp -a SkeinPyPy target_linux/SkeinPyPy
-cp -a SkeinPyPy target_osx64/SkeinPyPy
+cp -a SkeinPyPy ${TARGET_DIR}/SkeinPyPy
#add printrun
-cp -a Printrun target_win32/Printrun
-cp -a Printrun target_linux/Printrun
-cp -a Printrun target_osx64/Printrun
+mv Printrun ${TARGET_DIR}/Printrun
-#add windows batch files
-echo "python\\python.exe SkeinPyPy\\skeinforge_application\\skeinforge.py" > target_win32/skeinforge.bat
-echo "python\\python.exe printrun\\pronterface.py" > target_win32/printrun.bat
+#add script files
+cp -a scripts/${BUILD_TARGET}/* $TARGET_DIR/
#add readme file
-cp README target_win32/README.txt
-cp README target_linux/README.txt
-cp README target_osx64/README.txt
+cp README ${TARGET_DIR}/README.txt
#package the result
-cd target_win32
-7z a ../SkeinPyPy_Win32_${BUILD_NAME}.zip *
-cd ..
-cd target_linux
-7z a ../SkeinPyPy_Linux_${BUILD_NAME}.zip *
-cd ..
-cd target_osx64
-7z a ../SkeinPyPy_MacOSX_${BUILD_NAME}.zip *
-cd ..
+if (( ${ARCHIVE_FOR_DISTRIBUTION} )); then
+ if [ $BUILD_TARGET = "win32" ]; then
+ cd ${TARGET_DIR}
+ 7z a ../SkeinPyPy_${BUILD_TARGET}_${BUILD_NAME}.zip *
+ cd ..
+ else
+ echo "Archiving to ${TARGET_DIR}.tar.gz"
+ $TAR cfp - ${TARGET_DIR} | gzip --best -c > ${TARGET_DIR}.tar.gz
+ fi
+else
+ echo "Installed into ${TARGET_DIR}"
+fi
diff --git a/scripts/linux/pronterface.sh b/scripts/linux/pronterface.sh
new file mode 100644
index 0000000000..68d3c0d02d
--- /dev/null
+++ b/scripts/linux/pronterface.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+python -c 'import wx'
+if [ $? != 0 ]; then
+ echo "Requires wx python."
+ exit 1
+fi
+
+python -c 'import serial'
+if [ $? != 0 ]; then
+ echo "Requires pyserial."
+ exit 1
+fi
+
+SCRIPT_DIR=`dirname $0`
+python ${SCRIPT_DIR}/Printrun/pronterface.py
+
diff --git a/scripts/osx64/pronterface.sh b/scripts/osx64/pronterface.sh
new file mode 100644
index 0000000000..93005942b0
--- /dev/null
+++ b/scripts/osx64/pronterface.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+arch -arch i386 python2.7 -c 'import wx'
+if [ $? != 0 ]; then
+ echo "Requires wx. Download and install from:"
+ echo " http://www.wxpython.org/download.php"
+ exit 1
+fi
+
+python2.7 -c 'import serial'
+if [ $? != 0 ]; then
+ echo "Requires pyserial."
+ echo " sudo easy_install-2.7 pyserial"
+ exit 1
+fi
+
+SCRIPT_DIR=`dirname $0`
+arch -arch i386 python2.7 ${SCRIPT_DIR}/Printrun/pronterface.py
+
diff --git a/scripts/win32/printrun.bat b/scripts/win32/printrun.bat
new file mode 100644
index 0000000000..e174179322
--- /dev/null
+++ b/scripts/win32/printrun.bat
@@ -0,0 +1 @@
+@python\python.exe printrun\pronterface.py
diff --git a/scripts/win32/skeinforge.bat b/scripts/win32/skeinforge.bat
new file mode 100644
index 0000000000..19b9e466c4
--- /dev/null
+++ b/scripts/win32/skeinforge.bat
@@ -0,0 +1,2 @@
+@python\python.exe SkeinPyPy\skeinforge_application\skeinforge.py
+
From 97e29467f573681cbcbc2e15adcb6dcf5e5da37b Mon Sep 17 00:00:00 2001
From: daid
Date: Mon, 13 Feb 2012 14:24:55 +0100
Subject: [PATCH 2/8] Removed some 'useless' buttons. (they where not useless,
but nobody would use them and they are just clutter)
---
SkeinPyPy/fabmetheus_utilities/settings.py | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/SkeinPyPy/fabmetheus_utilities/settings.py b/SkeinPyPy/fabmetheus_utilities/settings.py
index 0351270b89..925db3ed05 100644
--- a/SkeinPyPy/fabmetheus_utilities/settings.py
+++ b/SkeinPyPy/fabmetheus_utilities/settings.py
@@ -1605,10 +1605,10 @@ class PluginFrame:
gridVertical.frameGridVertical = GridVertical( 0, 0 )
gridVertical.frameGridVertical.setExecutablesRepository( gridVertical.repository )
executeTitle = gridVertical.repository.executeTitle
- if executeTitle != None:
- executeButton = Tkinter.Button( gridVertical.master, activebackground = 'black', activeforeground = 'blue', text = executeTitle, command = gridVertical.frameGridVertical.execute )
- executeButton.grid( row = gridVertical.row, column = gridVertical.column, sticky = Tkinter.W )
- gridVertical.column += 1
+ #if executeTitle != None:
+ # executeButton = Tkinter.Button( gridVertical.master, activebackground = 'black', activeforeground = 'blue', text = executeTitle, command = gridVertical.frameGridVertical.execute )
+ # executeButton.grid( row = gridVertical.row, column = gridVertical.column, sticky = Tkinter.W )
+ # gridVertical.column += 1
self.helpButton = Tkinter.Button( gridVertical.master, activebackground = 'black', activeforeground = 'white', text = "?", command = HelpPageRepository( gridVertical.repository ).openPage )
self.helpButton.grid( row = gridVertical.row, column = gridVertical.column, sticky = Tkinter.W )
addEmptyRow( gridVertical )
@@ -1713,12 +1713,12 @@ class PluginGroupFrame( PluginFrame ):
gridVertical.repository = getReadRepository( pluginModule.getNewRepository() )
gridVertical.setExecutablesRepository( gridVertical.repository )
executeTitle = gridVertical.repository.executeTitle
- if executeTitle != None:
- executeButton = Tkinter.Button( gridVertical.master, activebackground = 'black', activeforeground = 'blue', text = executeTitle, command = gridVertical.execute )
- executeButton.grid( row = gridVertical.row, column = gridVertical.column, sticky = Tkinter.W )
- gridVertical.column += 1
- self.helpButton = Tkinter.Button( gridVertical.master, activebackground = 'black', activeforeground = 'white', text = "?", command = HelpPageRepository( gridVertical.repository ).openPage )
- self.helpButton.grid( row = gridVertical.row, column = gridVertical.column, sticky = Tkinter.W )
+ #if executeTitle != None:
+ # executeButton = Tkinter.Button( gridVertical.master, activebackground = 'black', activeforeground = 'blue', text = executeTitle, command = gridVertical.execute )
+ # executeButton.grid( row = gridVertical.row, column = gridVertical.column, sticky = Tkinter.W )
+ # gridVertical.column += 1
+ #self.helpButton = Tkinter.Button( gridVertical.master, activebackground = 'black', activeforeground = 'white', text = "?", command = HelpPageRepository( gridVertical.repository ).openPage )
+ #self.helpButton.grid( row = gridVertical.row, column = gridVertical.column, sticky = Tkinter.W )
addEmptyRow( gridVertical )
gridVertical.increment()
for setting in gridVertical.repository.displayEntities:
From 5f36247788b6e1e7bf907d6d6ba41b4049bf9156 Mon Sep 17 00:00:00 2001
From: daid
Date: Mon, 13 Feb 2012 17:29:58 +0100
Subject: [PATCH 3/8] Remove menus that open new windows. Attempt to cleanup
the clutter in the menus.
---
SkeinPyPy/fabmetheus_utilities/settings.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/SkeinPyPy/fabmetheus_utilities/settings.py b/SkeinPyPy/fabmetheus_utilities/settings.py
index 925db3ed05..8a55ec7c9a 100644
--- a/SkeinPyPy/fabmetheus_utilities/settings.py
+++ b/SkeinPyPy/fabmetheus_utilities/settings.py
@@ -913,8 +913,8 @@ class FileHelpMenuBar:
addAcceleratorCommand('', quitWindows, self.root, self.fileMenu, 'Quit')
skeinforgePluginsPath = archive.getSkeinforgePath('skeinforge_plugins')
pluginFileNames = archive.getPluginFileNamesFromDirectoryPath(skeinforgePluginsPath)
- for pluginFileName in pluginFileNames:
- self.addPluginToMenuBar(os.path.join(skeinforgePluginsPath, pluginFileName), repository, window)
+ #for pluginFileName in pluginFileNames:
+ # self.addPluginToMenuBar(os.path.join(skeinforgePluginsPath, pluginFileName), repository, window)
def saveClose(self):
"Call the save function then the close function."
From 1abaa7c03f7c0f8c9586dacab165402c47f8dca2 Mon Sep 17 00:00:00 2001
From: daid
Date: Tue, 14 Feb 2012 14:26:56 +0100
Subject: [PATCH 4/8] Fixed the cool/dimension plugin so they work without a
"flowrate".
---
.../skeinforge_plugins/craft_plugins/cool.py | 6 ++++--
.../skeinforge_plugins/craft_plugins/dimension.py | 10 +++++-----
.../skeinforge_plugins/craft_plugins/speed.py | 2 +-
3 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/cool.py b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/cool.py
index e70d078add..d8572d363f 100644
--- a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/cool.py
+++ b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/cool.py
@@ -374,7 +374,8 @@ class CoolSkein:
self.addOrbitsIfNecessary(remainingOrbitTime)
else:
self.setMultiplier(remainingOrbitTime)
- self.addFlowRate(self.multiplier * self.oldFlowRate)
+ if self.oldFlowRate != None:
+ self.addFlowRate(self.multiplier * self.oldFlowRate)
z = float(splitLine[1])
self.boundaryLayer = euclidean.LoopLayer(z)
self.highestZ = max(z, self.highestZ)
@@ -386,7 +387,8 @@ class CoolSkein:
if self.coolTemperature != None:
self.addTemperature(self.oldTemperature)
self.coolTemperature = None
- self.addFlowRate(self.oldFlowRate)
+ if self.oldFlowRate != None:
+ self.addFlowRate(self.oldFlowRate)
elif firstWord == '()':
self.boundaryLoop = []
self.boundaryLayer.loops.append(self.boundaryLoop)
diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/dimension.py b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/dimension.py
index 713ad4d82e..e95f2c1fec 100644
--- a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/dimension.py
+++ b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/dimension.py
@@ -211,9 +211,6 @@ class DimensionSkein:
if not self.repository.retractWithinIsland.value:
self.parseBoundaries()
self.flowScaleSixty = 60.0 * self.layerHeight * self.edgeWidth / filamentPackingArea
- if self.operatingFlowRate == None:
- print('There is no operatingFlowRate so dimension will do nothing.')
- return gcodeText
self.restartDistance = self.repository.retractionDistance.value + self.repository.restartExtraDistance.value
self.extruderRetractionSpeedMinuteString = self.distanceFeedRate.getRounded(60.0 * self.repository.extruderRetractionSpeed.value)
if self.maximumZFeedRatePerSecond != None and self.travelFeedRatePerSecond != None:
@@ -287,8 +284,11 @@ class DimensionSkein:
print(distance)
print(splitLine)
return ''
- scaledFlowRate = self.flowRate * self.flowScaleSixty
- return self.getExtrusionDistanceStringFromExtrusionDistance(scaledFlowRate / self.feedRateMinute * distance)
+ if self.operatingFlowRate == None:
+ return self.getExtrusionDistanceStringFromExtrusionDistance(self.flowScaleSixty / 60 * distance)
+ else:
+ scaledFlowRate = self.flowRate * self.flowScaleSixty
+ return self.getExtrusionDistanceStringFromExtrusionDistance(scaledFlowRate / self.feedRateMinute * distance)
def getExtrusionDistanceStringFromExtrusionDistance(self, extrusionDistance):
'Get the extrusion distance string from the extrusion distance.'
diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/speed.py b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/speed.py
index 56b80666f5..370a315dc6 100644
--- a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/speed.py
+++ b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/speed.py
@@ -174,7 +174,7 @@ class SpeedRepository:
self.fileNameInput = settings.FileNameInput().getFromFileName( fabmetheus_interpret.getGNUTranslatorGcodeFileTypeTuples(), 'Open File for Speed', self, '')
self.openWikiManualHelpPage = settings.HelpPage().getOpenFromAbsolute('http://fabmetheus.crsndoo.com/wiki/index.php/Skeinforge_Speed')
self.activateSpeed = settings.BooleanSetting().getFromValue('Activate Speed', self, True )
- self.addFlowRate = settings.BooleanSetting().getFromValue('Add Flow Rate:', self, True )
+ self.addFlowRate = settings.BooleanSetting().getFromValue('Add Flow Rate:', self, False )
settings.LabelSeparator().getFromRepository(self)
settings.LabelDisplay().getFromName('- Bridge -', self )
self.bridgeFeedRateMultiplier = settings.FloatSpin().getFromValue( 0.8, 'Bridge Feed Rate Multiplier (ratio):', self, 1.2, 1.0 )
From 836c18d73149e6779c68d50183787bf4ee45aa5e Mon Sep 17 00:00:00 2001
From: daid
Date: Tue, 14 Feb 2012 14:31:52 +0100
Subject: [PATCH 5/8] Fixed possible integer problem.
---
.../skeinforge_plugins/craft_plugins/dimension.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/dimension.py b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/dimension.py
index e95f2c1fec..6eee34778d 100644
--- a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/dimension.py
+++ b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/dimension.py
@@ -285,7 +285,7 @@ class DimensionSkein:
print(splitLine)
return ''
if self.operatingFlowRate == None:
- return self.getExtrusionDistanceStringFromExtrusionDistance(self.flowScaleSixty / 60 * distance)
+ return self.getExtrusionDistanceStringFromExtrusionDistance(self.flowScaleSixty / 60.0 * distance)
else:
scaledFlowRate = self.flowRate * self.flowScaleSixty
return self.getExtrusionDistanceStringFromExtrusionDistance(scaledFlowRate / self.feedRateMinute * distance)
From 8a68eaa980a9763722288e730c81b9d9a52ddc85 Mon Sep 17 00:00:00 2001
From: daid
Date: Wed, 15 Feb 2012 13:53:12 +0100
Subject: [PATCH 6/8] Made win32 build zip name same as linux/macos tgz names
---
build.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build.sh b/build.sh
index 2ccd7a1ee0..675b5b8248 100755
--- a/build.sh
+++ b/build.sh
@@ -123,7 +123,7 @@ cp README ${TARGET_DIR}/README.txt
if (( ${ARCHIVE_FOR_DISTRIBUTION} )); then
if [ $BUILD_TARGET = "win32" ]; then
cd ${TARGET_DIR}
- 7z a ../SkeinPyPy_${BUILD_TARGET}_${BUILD_NAME}.zip *
+ 7z a ../${TARGET_DIR}.zip *
cd ..
else
echo "Archiving to ${TARGET_DIR}.tar.gz"
From c2b732e7d52f42869799e102a7eecfaf1258136d Mon Sep 17 00:00:00 2001
From: daid
Date: Thu, 16 Feb 2012 15:06:50 +0100
Subject: [PATCH 7/8] Updated to skeinforge 49
---
SkeinPyPy/SkeinforgeVersion | 2 +-
SkeinPyPy/documentation/contents.html | 1 +
.../fabmetheus_utilities.gcodec.html | 4 +
...skeinforge_plugins.craft_plugins.clip.html | 8 +-
...skeinforge_plugins.craft_plugins.comb.html | 2 -
...keinforge_plugins.craft_plugins.drill.html | 4 +-
...einforge_plugins.craft_plugins.export.html | 4 +-
...tion.skeinforge_plugins.craft_plugins.html | 11 +-
...skeinforge_utilities.skeinforge_craft.html | 1 -
SkeinPyPy/fabmetheus_utilities/gcodec.py | 29 +-
SkeinPyPy/fabmetheus_utilities/version.txt | 2 +-
.../skeinforge_application/skeinforge.py | 17 +-
.../analyze_utilities/tableau.py | 4 +-
.../analyze_plugins/skeiniso.py | 2 +
.../analyze_plugins/skeinlayer.py | 2 +
.../skeinforge_plugins/craft_plugins/clip.py | 39 +--
.../skeinforge_plugins/craft_plugins/comb.py | 24 +-
.../craft_plugins/dwindle.py | 270 ++++++++++++++++++
.../skeinforge_plugins/craft_plugins/inset.py | 2 +
.../skeinforge_plugins/craft_plugins/raft.py | 12 +-
.../craft_plugins/splodge.py | 2 +-
.../profile_plugins/extrusion.py | 2 +-
.../skeinforge_utilities/skeinforge_craft.py | 11 +-
23 files changed, 373 insertions(+), 82 deletions(-)
create mode 100644 SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/dwindle.py
diff --git a/SkeinPyPy/SkeinforgeVersion b/SkeinPyPy/SkeinforgeVersion
index 21e72e8ac3..95f9650f01 100644
--- a/SkeinPyPy/SkeinforgeVersion
+++ b/SkeinPyPy/SkeinforgeVersion
@@ -1 +1 @@
-48
+49
diff --git a/SkeinPyPy/documentation/contents.html b/SkeinPyPy/documentation/contents.html
index 376a8a37bf..a930f5aad0 100644
--- a/SkeinPyPy/documentation/contents.html
+++ b/SkeinPyPy/documentation/contents.html
@@ -53,6 +53,7 @@ Previous / Next / Contents
Cool
Dimension
Drill
+ Dwindle
Export
Binary 16 Byte
Gcode Step
diff --git a/SkeinPyPy/documentation/fabmetheus_utilities.gcodec.html b/SkeinPyPy/documentation/fabmetheus_utilities.gcodec.html
index 7e58b2b16c..39531e069f 100644
--- a/SkeinPyPy/documentation/fabmetheus_utilities.gcodec.html
+++ b/SkeinPyPy/documentation/fabmetheus_utilities.gcodec.html
@@ -88,6 +88,8 @@ many lines of text
Methods defined here:
- __init__(self)
- Initialize.
+- addFlowRateLine(self, flowRate)
- Add a flow rate line.
+
- addGcodeFromFeedRateThreadZ(self, feedRateMinute, thread, travelFeedRateMinute, z)
- Add a thread to the output.
- addGcodeFromLoop(self, loop, z)
- Add the gcode loop.
@@ -98,6 +100,8 @@ many lines of text
- addGcodeMovementZWithFeedRate(self, feedRateMinute, point, z)
- Add a movement to the output.
+- addGcodeMovementZWithFeedRateVector3(self, feedRateMinute, vector3)
- Add a movement to the output by Vector3.
+
- addLine(self, line)
- Add a line of text and a newline to the output.
- addLineCheckAlteration(self, line)
- Add a line of text and a newline to the output and check to see if it is an alteration line.
diff --git a/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.clip.html b/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.clip.html
index 559506d543..b0833de253 100644
--- a/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.clip.html
+++ b/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.clip.html
@@ -136,7 +136,7 @@ The clip tool has created the file:
- getConnectionIsCloseWithoutOverlap(self, location, path)
- Determine if the connection is close enough and does not overlap another thread.
-- getCraftedGcode(self, clipRepository, gcodeText)
- Parse gcode text and store the clip gcode.
+- getCraftedGcode(self, gcodeText, repository)
- Parse gcode text and store the clip gcode.
- getNextThreadIsACloseLoop(self, path)
- Determine if the next thread is a loop.
@@ -144,7 +144,7 @@ The clip tool has created the file:
- linearMove(self, splitLine)
- Add to loop path if this is a loop or path.
-- parseInitialization(self, clipRepository)
- Parse gcode initialization and store the parameters.
+- parseInitialization(self)
- Parse gcode initialization and store the parameters.
- parseLine(self, line)
- Parse a gcode line and add it to the clip skein.
@@ -157,8 +157,8 @@ The clip tool has created the file:
Functions |
| |
-- getCraftedText(fileName, text, clipRepository=None)
- Clip a gcode linear move file or text.
- - getCraftedTextFromText(gcodeText, clipRepository=None)
- Clip a gcode linear move text.
+ | - getCraftedText(fileName, text, repository=None)
- Clip a gcode linear move file or text.
+ - getCraftedTextFromText(gcodeText, repository=None)
- Clip a gcode linear move text.
- getNewRepository()
- Get new repository.
- main()
- Display the clip dialog.
- writeOutput(fileName, shouldAnalyze=True)
- Clip a gcode linear move file. Chain clip the gcode if it is not already clipped.
diff --git a/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.comb.html b/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.comb.html
index 0d969ed46b..5cd7aee12e 100644
--- a/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.comb.html
+++ b/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.comb.html
@@ -141,8 +141,6 @@ The comb tool has created the file:
- getAroundBetweenPath(self, begin, end)
- Get the path around the loops in the way of the original line segment.
-- getBetweens(self)
- Get betweens for the layer.
-
- getBoundaries(self)
- Get boundaries for the layer.
- getBoundaryIndexes(self, begin, boundaries, end, points)
- Get boundary indexes and set the points in the way of the original line segment.
diff --git a/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.drill.html b/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.drill.html
index 2f9f8e0663..5ae1b02ab2 100644
--- a/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.drill.html
+++ b/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.drill.html
@@ -10,7 +10,7 @@
> | index /home/enrique/Desktop/backup/babbleold/script/reprap/fabmetheus/skeinforge_application/skeinforge_plugins/craft_plugins/drill.py |
-Previous / Next / Contents
+Previous / Next / Contents
Drill is a script to drill down small holes.
@@ -60,7 +60,7 @@ The drill tool has created the file:
-Previous / Next / Contents
+Previous / Next / Contents
diff --git a/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.export.html b/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.export.html
index 7c2d994792..8cda68c8ed 100644
--- a/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.export.html
+++ b/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.export.html
@@ -10,7 +10,7 @@
>index /home/enrique/Desktop/backup/babbleold/script/reprap/fabmetheus/skeinforge_application/skeinforge_plugins/craft_plugins/export.py |
-Previous / Next / Contents
+Previous / Next / Contents
Export is a craft tool to pick an export plugin, add information to the file name, and delete comments.
@@ -149,7 +149,7 @@ The export tool has created the file:
-Previous / Next / Contents
+Previous / Next / Contents
diff --git a/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.html b/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.html
index 40ae545e24..d7076fa6a1 100644
--- a/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.html
+++ b/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.html
@@ -28,7 +28,8 @@
comb
cool
dimension
-drill
+drill
+ | dwindle
export
export_plugins (package)
feed
@@ -39,8 +40,8 @@
hop
inset
jitter
- | lash
-lift
+lash
+ | lift
limit
mill
multiply
@@ -50,9 +51,9 @@
raft
scale
skin
- | skirt
+skirt
smooth
-speed
+ | speed
splodge
stretch
temperature
diff --git a/SkeinPyPy/documentation/skeinforge_application.skeinforge_utilities.skeinforge_craft.html b/SkeinPyPy/documentation/skeinforge_application.skeinforge_utilities.skeinforge_craft.html
index 881b12c586..7c8e9a6f0c 100644
--- a/SkeinPyPy/documentation/skeinforge_application.skeinforge_utilities.skeinforge_craft.html
+++ b/SkeinPyPy/documentation/skeinforge_application.skeinforge_utilities.skeinforge_craft.html
@@ -92,7 +92,6 @@ The plugin buttons which are commonly used are bolded and the ones which are rar
- getPluginsDirectoryPath()
- Get the plugins directory path.
- getProcedures(procedure, text)
- Get the procedures up to and including the given procedure.
- getReadCraftSequence()
- Get profile sequence.
- - getSequenceIndexFromProcedure(procedure)
- Get the profile sequence index of the procedure. Return None if the procedure is not in the sequence
- getSequenceIndexPlusOneFromText(fileText)
- Get the profile sequence index of the file plus one. Return zero if the procedure is not in the file
- main()
- Write craft output.
- writeChainTextWithNounMessage(fileName, procedure, shouldAnalyze=True)
- Get and write a crafted shape file.
diff --git a/SkeinPyPy/fabmetheus_utilities/gcodec.py b/SkeinPyPy/fabmetheus_utilities/gcodec.py
index 9ec90f987c..b348674a99 100644
--- a/SkeinPyPy/fabmetheus_utilities/gcodec.py
+++ b/SkeinPyPy/fabmetheus_utilities/gcodec.py
@@ -201,6 +201,11 @@ def isProcedureDone(gcodeText, procedure):
return False
extruderInitializationIndex = gcodeText.find('()')
if extruderInitializationIndex == -1:
+ metadataBeginIndex = gcodeText.find('')
+ metadataEndIndex = gcodeText.find('')
+ if metadataBeginIndex != -1 and metadataEndIndex != -1:
+ attributeString = "procedureName='%s'" % procedure
+ return gcodeText.find(attributeString, metadataBeginIndex, metadataEndIndex) != -1
return False
return gcodeText.find(getTagBracketedProcedure(procedure), 0, extruderInitializationIndex) != -1
@@ -260,6 +265,10 @@ class DistanceFeedRate:
self.decimalPlacesCarried = 3
self.output = cStringIO.StringIO()
+ def addFlowRateLine(self, flowRate):
+ 'Add a flow rate line.'
+ self.output.write('M108 S%s\n' % euclidean.getFourSignificantFigures(flowRate))
+
def addGcodeFromFeedRateThreadZ(self, feedRateMinute, thread, travelFeedRateMinute, z):
'Add a thread to the output.'
if len(thread) > 0:
@@ -270,10 +279,10 @@ class DistanceFeedRate:
print('thread of only one point in addGcodeFromFeedRateThreadZ in gcodec, this should never happen.')
print(thread)
return
- self.addLine('M101') # Turn extruder on.
+ self.output.write('M101\n') # Turn extruder on.
for point in thread[1 :]:
self.addGcodeMovementZWithFeedRate(feedRateMinute, point, z)
- self.addLine('M103') # Turn extruder off.
+ self.output.write('M103\n') # Turn extruder off.
def addGcodeFromLoop(self, loop, z):
'Add the gcode loop.'
@@ -292,18 +301,24 @@ class DistanceFeedRate:
print('thread of only one point in addGcodeFromThreadZ in gcodec, this should never happen.')
print(thread)
return
- self.addLine('M101') # Turn extruder on.
+ self.output.write('M101\n') # Turn extruder on.
for point in thread[1 :]:
self.addGcodeMovementZ(point, z)
- self.addLine('M103') # Turn extruder off.
+ self.output.write('M103\n') # Turn extruder off.
def addGcodeMovementZ(self, point, z):
'Add a movement to the output.'
- self.addLine(self.getLinearGcodeMovement(point, z))
+ self.output.write(self.getLinearGcodeMovement(point, z) + '\n')
def addGcodeMovementZWithFeedRate(self, feedRateMinute, point, z):
'Add a movement to the output.'
- self.addLine(self.getLinearGcodeMovementWithFeedRate(feedRateMinute, point, z))
+ self.output.write(self.getLinearGcodeMovementWithFeedRate(feedRateMinute, point, z) + '\n')
+
+ def addGcodeMovementZWithFeedRateVector3(self, feedRateMinute, vector3):
+ 'Add a movement to the output by Vector3.'
+ xRounded = self.getRounded(vector3.x)
+ yRounded = self.getRounded(vector3.y)
+ self.output.write('G1 X%s Y%s Z%s F%s\n' % (xRounded, yRounded, self.getRounded(vector3.z), self.getRounded(feedRateMinute)))
def addLine(self, line):
'Add a line of text and a newline to the output.'
@@ -392,7 +407,7 @@ class DistanceFeedRate:
def getLinearGcodeMovement(self, point, z):
'Get a linear gcode movement.'
- return 'G1 X%s Y%s Z%s' % ( self.getRounded( point.real ), self.getRounded( point.imag ), self.getRounded(z) )
+ return 'G1 X%s Y%s Z%s' % (self.getRounded(point.real), self.getRounded(point.imag), self.getRounded(z))
def getLinearGcodeMovementWithFeedRate(self, feedRateMinute, point, z):
'Get a z limited gcode movement.'
diff --git a/SkeinPyPy/fabmetheus_utilities/version.txt b/SkeinPyPy/fabmetheus_utilities/version.txt
index a4bc447a2c..0d73a0c7fa 100644
--- a/SkeinPyPy/fabmetheus_utilities/version.txt
+++ b/SkeinPyPy/fabmetheus_utilities/version.txt
@@ -1 +1 @@
-12.01.21
\ No newline at end of file
+12.02.10
\ No newline at end of file
diff --git a/SkeinPyPy/skeinforge_application/skeinforge.py b/SkeinPyPy/skeinforge_application/skeinforge.py
index 590fd250e1..33279a9a7e 100755
--- a/SkeinPyPy/skeinforge_application/skeinforge.py
+++ b/SkeinPyPy/skeinforge_application/skeinforge.py
@@ -232,6 +232,12 @@ import platform
import subprocess
+# dwindle check for close, document announce dwindle
+# document chamber: heated bed off at a layer http://blog.makerbot.com/2011/03/17/if-you-cant-stand-the-heat/
+# document announce volumeFraction
+# question, should 'Infill Odd Layer Extra Rotation' be dropped
+# consolidate Object First Layer Flow
+#
# document raft, stretch, then carve, comb, fill, inset, oozebane, splodge, temperature, speed once they are updated
# wiki document help, description, polyfile
# subplugins like export static, maybe later mill cut and coil plugins, maybe later still export plugins & change file extension to output file extension http://fabmetheus.crsndoo.com/wiki/index.php/Skeinforge
@@ -246,14 +252,9 @@ import subprocess
# analyze doesn't save skeinlayer settings, remember xy in skeiniso
#
#
-#
-# question, should 'Infill Odd Layer Extra Rotation' be dropped
-# consolidate Object First Layer Flow
-#
# retraction step leave
# melt _extrusion
# think about http://code.google.com/p/skeinarchiver/ and/or undo
-# add volume fraction to fill
# getStrokeRadius default to edgeWidth
# look at loop end removed bug in upper loop of layer 8 of Screw_Holder_alteration
# fix tower edge line start problem
@@ -261,7 +262,6 @@ import subprocess
# set temperature in temperature
# maybe rename geometry_plugins xml
# maybe add carve preview, opening it up in browser
-# dwindle or dawdle or taper
# voronoi average location intersection looped inset intercircles
# skin layers without something over the infill
# check for last existing then remove unneeded fill code (getLastExistingFillLoops) from euclidean, add fill in penultimate loops, if there is no fill it should not use edge - skin should work
@@ -269,8 +269,8 @@ import subprocess
# unpause slow flow rate instead of speeding feed rate
# maybe in svgReader if loop intersection with previous union else add
# add links download manual svg_writer, add left right arrow keys to layer
-# delete location from wipe, in other words Arrival X instead of Location Arrival X, also convert Location Arrival to Arrival Location
# command
+# thin support When using support, thin column and then gradually widen: http://img534.imageshack.us/img534/514/overhang.jpg
# manipulation derivations
# cutting ahmet
#
@@ -279,7 +279,6 @@ import subprocess
# check inset loop for intersection with loopLayer.loops
# maybe make vectorwrite prominent, not skeiniso, probably not because it doesn't work on Mac
# close, getPillarByLoopLists, addConcave, polymorph original graph section, loop, add step object, add continuous object
-# chamber: heated bed off at a layer http://blog.makerbot.com/2011/03/17/if-you-cant-stand-the-heat/
# profile copy / rename / delete, maybe move craft type to profile
# think about rectangular getVector3RemoveByPre..
# del previous, add begin & end if far get actual path
@@ -360,7 +359,6 @@ import subprocess
# get arounds in inset, the inside become extrude loops and the outside below loops _speed
#
#
-# add hook _extrusion
# integral thin width _extrusion
# layer color, for multilayer start http://reprap.org/pub/Main/MultipleMaterialsFiles/legend.xml _extrusion
# maybe raft triple layer base, middle interface with hot loop or ties
@@ -404,7 +402,6 @@ import subprocess
# maybe split into source code and documentation sections
# transform plugins, start with sarrus http://www.thingiverse.com/thing:1425
# maybe make setting backups
-# move skeinforge_utilities to fabmetheus_utilities
# maybe lathe cutting
# maybe lathe extrusion
# maybe lathe milling
diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/analyze_utilities/tableau.py b/SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/analyze_utilities/tableau.py
index c282d95e4a..a52555205e 100644
--- a/SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/analyze_utilities/tableau.py
+++ b/SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/analyze_utilities/tableau.py
@@ -526,8 +526,8 @@ class TableauWindow:
def limitIndex(self):
'Limit the index so it is not below zero or above the top.'
- self.repository.layer.value = max( 0, self.repository.layer.value )
- self.repository.layer.value = min( len( self.skeinPanes ) - 1, self.repository.layer.value )
+ self.repository.layer.value = max(0, self.repository.layer.value)
+ self.repository.layer.value = min(len(self.skeinPanes) - 1, self.repository.layer.value)
def limitIndexSetArrowMouseDeleteCanvas(self):
'Limit the index, set the arrow type, and delete all the canvas items.'
diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/skeiniso.py b/SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/skeiniso.py
index 68406e7725..180f5c9d84 100644
--- a/SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/skeiniso.py
+++ b/SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/skeiniso.py
@@ -763,6 +763,8 @@ class SkeinWindow( tableau.TableauWindow ):
def getColoredLines(self):
"Get the colored lines from the skein pane."
+ if len(self.skeinPanes) == 0:
+ return []
return self.skeinPanes[ self.repository.layer.value ].coloredLines
def getCopy(self):
diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/skeinlayer.py b/SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/skeinlayer.py
index 35d8cde538..e2a3fe0d20 100644
--- a/SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/skeinlayer.py
+++ b/SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/skeinlayer.py
@@ -463,6 +463,8 @@ class SkeinWindow( tableau.TableauWindow ):
def getColoredLines(self):
"Get the colored lines from the skein pane."
+ if len(self.skeinPanes) == 0:
+ return []
return self.skeinPanes[self.repository.layer.value]
def getCopy(self):
diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/clip.py b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/clip.py
index 8e5dd7a81b..6b8b169cf2 100644
--- a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/clip.py
+++ b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/clip.py
@@ -62,19 +62,19 @@ __date__ = '$Date: 2008/21/04 $'
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
-def getCraftedText( fileName, text, clipRepository = None ):
+def getCraftedText(fileName, text, repository=None):
"Clip a gcode linear move file or text."
- return getCraftedTextFromText( archive.getTextIfEmpty(fileName, text), clipRepository )
+ return getCraftedTextFromText(archive.getTextIfEmpty(fileName, text), repository)
-def getCraftedTextFromText( gcodeText, clipRepository = None ):
+def getCraftedTextFromText(gcodeText, repository=None):
"Clip a gcode linear move text."
- if gcodec.isProcedureDoneOrFileIsEmpty( gcodeText, 'clip'):
+ if gcodec.isProcedureDoneOrFileIsEmpty(gcodeText, 'clip'):
return gcodeText
- if clipRepository == None:
- clipRepository = settings.getReadRepository( ClipRepository() )
- if not clipRepository.activateClip.value:
+ if repository == None:
+ repository = settings.getReadRepository(ClipRepository())
+ if not repository.activateClip.value:
return gcodeText
- return ClipSkein().getCraftedGcode( clipRepository, gcodeText )
+ return ClipSkein().getCraftedGcode(gcodeText, repository)
def getNewRepository():
'Get new repository.'
@@ -89,12 +89,12 @@ class ClipRepository:
"A class to handle the clip settings."
def __init__(self):
"Set the default settings, execute title & settings fileName."
- skeinforge_profile.addListsToCraftTypeRepository('skeinforge_application.skeinforge_plugins.craft_plugins.clip.html', self )
- self.fileNameInput = settings.FileNameInput().getFromFileName( fabmetheus_interpret.getGNUTranslatorGcodeFileTypeTuples(), 'Open File for Clip', self, '')
+ skeinforge_profile.addListsToCraftTypeRepository('skeinforge_application.skeinforge_plugins.craft_plugins.clip.html', self)
+ self.fileNameInput = settings.FileNameInput().getFromFileName(fabmetheus_interpret.getGNUTranslatorGcodeFileTypeTuples(), 'Open File for Clip', self, '')
self.openWikiManualHelpPage = settings.HelpPage().getOpenFromAbsolute('http://fabmetheus.crsndoo.com/wiki/index.php/Skeinforge_Clip')
- self.activateClip = settings.BooleanSetting().getFromValue('Activate Clip', self, False )
- self.clipOverEdgeWidth = settings.FloatSpin().getFromValue( 0.1, 'Clip Over Perimeter Width (ratio):', self, 0.8, 0.5 )
- self.maximumConnectionDistanceOverEdgeWidth = settings.FloatSpin().getFromValue( 1.0, 'Maximum Connection Distance Over Perimeter Width (ratio):', self, 20.0, 10.0 )
+ self.activateClip = settings.BooleanSetting().getFromValue('Activate Clip', self, False)
+ self.clipOverEdgeWidth = settings.FloatSpin().getFromValue(0.1, 'Clip Over Perimeter Width (ratio):', self, 0.8, 0.5)
+ self.maximumConnectionDistanceOverEdgeWidth = settings.FloatSpin().getFromValue(1.0, 'Maximum Connection Distance Over Perimeter Width (ratio):', self, 20.0, 10.0)
self.executeTitle = 'Clip'
def execute(self):
@@ -180,10 +180,11 @@ class ClipSkein:
euclidean.addValueSegmentToPixelTable( path[-1], locationComplex, self.layerPixelTable, None, self.layerPixelWidth )
return True
- def getCraftedGcode( self, clipRepository, gcodeText ):
+ def getCraftedGcode(self, gcodeText, repository):
"Parse gcode text and store the clip gcode."
self.lines = archive.getTextLines(gcodeText)
- self.parseInitialization( clipRepository )
+ self.repository = repository
+ self.parseInitialization()
for self.lineIndex in xrange(self.lineIndex, len(self.lines)):
line = self.lines[self.lineIndex]
self.parseLine(line)
@@ -243,7 +244,7 @@ class ClipSkein:
self.loopPath.path.append(location.dropAxis())
self.oldLocation = location
- def parseInitialization(self, clipRepository):
+ def parseInitialization(self):
'Parse gcode initialization and store the parameters.'
for self.lineIndex in xrange(len(self.lines)):
line = self.lines[self.lineIndex]
@@ -254,13 +255,13 @@ class ClipSkein:
self.distanceFeedRate.addTagBracketedProcedure('clip')
return
elif firstWord == '(':
- self.distanceFeedRate.addTagBracketedLine('clipOverEdgeWidth', clipRepository.clipOverEdgeWidth.value)
+ self.distanceFeedRate.addTagBracketedLine('clipOverEdgeWidth', self.repository.clipOverEdgeWidth.value)
self.edgeWidth = float(splitLine[1])
absoluteEdgeWidth = abs(self.edgeWidth)
- self.clipLength = clipRepository.clipOverEdgeWidth * self.edgeWidth
+ self.clipLength = self.repository.clipOverEdgeWidth.value * self.edgeWidth
self.connectingStepLength = 0.5 * absoluteEdgeWidth
self.layerPixelWidth = 0.34321 * absoluteEdgeWidth
- self.maximumConnectionDistance = clipRepository.maximumConnectionDistanceOverEdgeWidth.value * absoluteEdgeWidth
+ self.maximumConnectionDistance = self.repository.maximumConnectionDistanceOverEdgeWidth.value * absoluteEdgeWidth
elif firstWord == '(':
self.travelFeedRateMinute = 60.0 * float(splitLine[1])
self.distanceFeedRate.addLine(line)
diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/comb.py b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/comb.py
index 7fc787241e..8ca5e2d270 100644
--- a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/comb.py
+++ b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/comb.py
@@ -175,7 +175,7 @@ class CombSkein:
"A class to comb a skein of extrusions."
def __init__(self):
'Initialize'
- self.betweenTable = {}
+# self.betweenTable = {}
self.boundaryLoop = None
self.distanceFeedRate = gcodec.DistanceFeedRate()
self.extruderActive = False
@@ -241,7 +241,7 @@ class CombSkein:
def getAroundBetweenPath(self, begin, end):
'Get the path around the loops in the way of the original line segment.'
aroundBetweenPath = []
- betweens = self.getBetweens()
+# betweens = self.getBetweens()
boundaries = self.getBoundaries()
boundarySegments = self.getBoundarySegments(begin, boundaries, end)
for boundarySegmentIndex, boundarySegment in enumerate(boundarySegments):
@@ -261,18 +261,18 @@ class CombSkein:
afterIndex = pointIndex + 1
if afterIndex < len(aroundBetweenPath):
pointAfter = aroundBetweenPath[afterIndex]
- if not euclidean.isLineIntersectingLoops(betweens, pointBefore, pointAfter):
+ if not euclidean.isLineIntersectingLoops(boundaries, pointBefore, pointAfter):
del aroundBetweenPath[pointIndex]
return aroundBetweenPath
- def getBetweens(self):
- 'Get betweens for the layer.'
- if not self.layerZ in self.betweenTable:
- self.betweenTable[self.layerZ] = []
- for boundary in self.getBoundaries():
- self.betweenTable[self.layerZ] += intercircle.getInsetLoopsFromLoop(boundary, self.betweenInset)
- return self.betweenTable[self.layerZ]
-
+# def getBetweens(self):
+# 'Get betweens for the layer.'
+# if not self.layerZ in self.betweenTable:
+# self.betweenTable[self.layerZ] = []
+# for boundary in self.getBoundaries():
+# self.betweenTable[self.layerZ] += intercircle.getInsetLoopsFromLoop(boundary, self.betweenInset)
+# return self.betweenTable[self.layerZ]
+#
def getBoundaries(self):
"Get boundaries for the layer."
if self.layerZ in self.layerTable:
@@ -440,7 +440,7 @@ class CombSkein:
return
elif firstWord == '(':
self.edgeWidth = float(splitLine[1])
- self.betweenInset = 0.7 * self.edgeWidth
+# self.betweenInset = 0.7 * self.edgeWidth
self.doubleEdgeWidth = self.edgeWidth + self.edgeWidth
self.halfEdgeWidth = 0.5 * self.edgeWidth
self.quadrupleEdgeWidth = self.doubleEdgeWidth + self.doubleEdgeWidth
diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/dwindle.py b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/dwindle.py
new file mode 100644
index 0000000000..05c1b599f7
--- /dev/null
+++ b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/dwindle.py
@@ -0,0 +1,270 @@
+"""
+This page is in the table of contents.
+Dwindle is a plugin to smooth the surface dwindle of an object by replacing the edge surface with a surface printed at a fraction of the carve
+height. This gives the impression that the object was carved at a much thinner height giving a high-quality finish, but still prints
+in a relatively short time. The latest process has some similarities with a description at:
+
+The dwindle manual page is at:
+http://fabmetheus.crsndoo.com/wiki/index.php/Skeinforge_Dwindle
+
+==Operation==
+The default 'Activate Dwindle' checkbox is off. When it is on, the functions described below will work, when it is off, nothing will be done.
+
+==Settings==
+====Vertical Divisions====
+Default: 2
+
+Defines the number of times the dwindle infill and edges are divided vertically.
+
+==Examples==
+The following examples dwindle the file Screw Holder Bottom.stl. The examples are run in a terminal in the folder which contains Screw Holder Bottom.stl and dwindle.py.
+
+> python dwindle.py
+This brings up the dwindle dialog.
+
+> python dwindle.py Screw Holder Bottom.stl
+The dwindle tool is parsing the file:
+Screw Holder Bottom.stl
+..
+The dwindle tool has created the file:
+.. Screw Holder Bottom_dwindle.gcode
+
+"""
+
+from __future__ import absolute_import
+#Init has to be imported first because it has code to workaround the python bug where relative imports don't work if the module is imported as a main module.
+import __init__
+
+from fabmetheus_utilities.fabmetheus_tools import fabmetheus_interpret
+from fabmetheus_utilities.vector3 import Vector3
+from fabmetheus_utilities import archive
+from fabmetheus_utilities import euclidean
+from fabmetheus_utilities import gcodec
+from fabmetheus_utilities import settings
+from skeinforge_application.skeinforge_utilities import skeinforge_craft
+from skeinforge_application.skeinforge_utilities import skeinforge_polyfile
+from skeinforge_application.skeinforge_utilities import skeinforge_profile
+import math
+import sys
+
+
+__author__ = 'Enrique Perez (perez_enrique aht yahoo.com)'
+__date__ = '$Date: 2008/21/04 $'
+__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
+
+
+def getCraftedText(fileName, gcodeText, repository=None):
+ 'Dwindle a gcode linear move text.'
+ return getCraftedTextFromText(archive.getTextIfEmpty(fileName, gcodeText), repository)
+
+def getCraftedTextFromText(gcodeText, repository=None):
+ 'Dwindle a gcode linear move text.'
+ if gcodec.isProcedureDoneOrFileIsEmpty(gcodeText, 'dwindle'):
+ return gcodeText
+ if repository == None:
+ repository = settings.getReadRepository(DwindleRepository())
+ if not repository.activateDwindle.value:
+ return gcodeText
+ return DwindleSkein().getCraftedGcode(gcodeText, repository)
+
+def getNewRepository():
+ 'Get new repository.'
+ return DwindleRepository()
+
+def writeOutput(fileName, shouldAnalyze=True):
+ 'Dwindle a gcode linear move file. Chain dwindle the gcode if it is not already dwindle.'
+ skeinforge_craft.writeChainTextWithNounMessage(fileName, 'dwindle', shouldAnalyze)
+
+
+class DwindleRepository:
+ 'A class to handle the dwindle settings.'
+ def __init__(self):
+ 'Set the default settings, execute title & settings fileName.'
+ skeinforge_profile.addListsToCraftTypeRepository('skeinforge_application.skeinforge_plugins.craft_plugins.dwindle.html', self )
+ self.fileNameInput = settings.FileNameInput().getFromFileName( fabmetheus_interpret.getGNUTranslatorGcodeFileTypeTuples(), 'Open File for Dwindle', self, '')
+ self.openWikiManualHelpPage = settings.HelpPage().getOpenFromAbsolute('http://fabmetheus.crsndoo.com/wiki/index.php/Skeinforge_Dwindle')
+ self.activateDwindle = settings.BooleanSetting().getFromValue('Activate Dwindle', self, False)
+ settings.LabelSeparator().getFromRepository(self)
+ self.endRateMultiplier = settings.FloatSpin().getFromValue(0.4, 'End Rate Multiplier (ratio):', self, 0.8, 0.5)
+ self.pentUpVolume = settings.FloatSpin().getFromValue(0.1, 'Pent Up Volume (cubic millimeters):', self, 1.0, 0.4)
+ self.slowdownSteps = settings.IntSpin().getFromValue(2, 'Slowdown Steps (positive integer):', self, 10, 3)
+ self.slowdownVolume = settings.FloatSpin().getFromValue(0.4, 'Slowdown Volume (cubic millimeters):', self, 4.0, 2.0)
+ self.executeTitle = 'Dwindle'
+
+ def execute(self):
+ 'Dwindle button has been clicked.'
+ fileNames = skeinforge_polyfile.getFileOrDirectoryTypesUnmodifiedGcode(self.fileNameInput.value, fabmetheus_interpret.getImportPluginFileNames(), self.fileNameInput.wasCancelled)
+ for fileName in fileNames:
+ writeOutput(fileName)
+
+
+class DwindleSkein:
+ 'A class to dwindle a skein of extrusions.'
+ def __init__(self):
+ 'Initialize.'
+ self.distanceFeedRate = gcodec.DistanceFeedRate()
+ self.feedRateMinute = 959.0
+ self.isActive = False
+ self.layerIndex = -1
+ self.lineIndex = 0
+ self.lines = None
+ self.oldFlowRate = None
+ self.oldLocation = None
+ self.threadSections = []
+
+ def addThread(self):
+ 'Add the thread sections to the gcode.'
+ if len(self.threadSections) == 0:
+ return
+ area = self.area
+ dwindlePortion = 0.0
+ endRateMultiplier = self.repository.endRateMultiplier.value
+ halfOverSteps = self.halfOverSteps
+ oneOverSteps = self.oneOverSteps
+ currentPentUpVolume = self.repository.pentUpVolume.value * self.oldFlowRate / self.operatingFlowRate
+ slowdownFlowRateMultiplier = 1.0 - (currentPentUpVolume / self.repository.slowdownVolume.value)
+ operatingFeedRateMinute = self.operatingFeedRateMinute
+ slowdownVolume = self.repository.slowdownVolume.value
+ for threadSectionIndex in xrange(len(self.threadSections) - 1, -1, -1):
+ threadSection = self.threadSections[threadSectionIndex]
+ dwindlePortion = threadSection.getDwindlePortion(area, dwindlePortion, operatingFeedRateMinute, self.operatingFlowRate, slowdownVolume)
+ for threadSection in self.threadSections:
+ threadSection.addGcodeThreadSection(self.distanceFeedRate, endRateMultiplier, halfOverSteps, oneOverSteps, slowdownFlowRateMultiplier)
+ self.distanceFeedRate.addFlowRateLine(self.oldFlowRate)
+ self.threadSections = []
+
+ def getCraftedGcode(self, gcodeText, repository):
+ 'Parse gcode text and store the dwindle gcode.'
+ self.lines = archive.getTextLines(gcodeText)
+ self.repository = repository
+ self.parseInitialization()
+ self.area = self.infillWidth * self.layerHeight
+ self.oneOverSteps = 1.0 / float(repository.slowdownSteps.value)
+ self.halfOverSteps = 0.5 * self.oneOverSteps
+ for self.lineIndex in xrange(self.lineIndex, len(self.lines)):
+ line = self.lines[self.lineIndex]
+ self.parseLine(line)
+ return gcodec.getGcodeWithoutDuplication('M108', self.distanceFeedRate.output.getvalue())
+
+ def parseInitialization(self):
+ 'Parse gcode initialization and store the parameters.'
+ for self.lineIndex in xrange(len(self.lines)):
+ line = self.lines[self.lineIndex]
+ splitLine = gcodec.getSplitLineBeforeBracketSemicolon(line)
+ firstWord = gcodec.getFirstWord(splitLine)
+ self.distanceFeedRate.parseSplitLine(firstWord, splitLine)
+ if firstWord == '()':
+ self.distanceFeedRate.addTagBracketedProcedure('dwindle')
+ return
+ elif firstWord == '(':
+ self.infillWidth = float(splitLine[1])
+ elif firstWord == '(':
+ self.layerHeight = float(splitLine[1])
+ elif firstWord == '(':
+ self.operatingFeedRateMinute = 60.0 * float(splitLine[1])
+ elif firstWord == '(':
+ self.operatingFlowRate = float(splitLine[1])
+ self.oldFlowRate = self.operatingFlowRate
+ self.distanceFeedRate.addLine(line)
+
+ def parseLine(self, line):
+ 'Parse a gcode line and add it to the dwindle skein.'
+ splitLine = gcodec.getSplitLineBeforeBracketSemicolon(line)
+ if len(splitLine) < 1:
+ return
+ firstWord = splitLine[0]
+ if firstWord == 'G1':
+ self.feedRateMinute = gcodec.getFeedRateMinute(self.feedRateMinute, splitLine)
+ location = gcodec.getLocationFromSplitLine(self.oldLocation, splitLine)
+ if self.isActive:
+ self.threadSections.append(ThreadSection(self.feedRateMinute, self.oldFlowRate, location, self.oldLocation))
+ self.oldLocation = location
+ elif firstWord == '(':
+ self.layerIndex += 1
+ settings.printProgress(self.layerIndex, 'dwindle')
+ elif firstWord == 'M101':
+ self.isActive = True
+ elif firstWord == 'M103':
+ self.isActive = False
+ self.addThread()
+ elif firstWord == 'M108':
+ self.oldFlowRate = gcodec.getDoubleAfterFirstLetter(splitLine[1])
+ if len(self.threadSections) == 0:
+ self.distanceFeedRate.addLine(line)
+
+
+class ThreadSection:
+ 'A class to handle a volumetric section of a thread.'
+ def __init__(self, feedRateMinute, flowRate, location, oldLocation):
+ 'Initialize.'
+ self.feedRateMinute = feedRateMinute
+ self.flowRate = flowRate
+ self.location = location
+ self.oldLocation = oldLocation
+
+ def addGcodeMovementByRate(self, distanceFeedRate, endRateMultiplier, location, rateMultiplier, slowdownFlowRateMultiplier):
+ 'Add gcode movement by rate multiplier.'
+ flowRate = self.flowRate
+ rateMultiplier = rateMultiplier + endRateMultiplier * (1.0 - rateMultiplier)
+ if rateMultiplier < 1.0:
+ flowRate *= slowdownFlowRateMultiplier
+ distanceFeedRate.addFlowRateLine(flowRate * rateMultiplier)
+ distanceFeedRate.addGcodeMovementZWithFeedRateVector3(self.feedRateMinute * rateMultiplier, location)
+
+ def addGcodeThreadSection(self, distanceFeedRate, endRateMultiplier, halfOverSteps, oneOverSteps, slowdownFlowRateMultiplier):
+ 'Add gcode thread section.'
+ if self.dwindlePortionEnd > 1.0 - halfOverSteps:
+ distanceFeedRate.addFlowRateLine(self.flowRate)
+ distanceFeedRate.addGcodeMovementZWithFeedRateVector3(self.feedRateMinute, self.location)
+ return
+ dwindleDifference = self.dwindlePortionBegin - self.dwindlePortionEnd
+ if self.dwindlePortionBegin < 1.0 and dwindleDifference > oneOverSteps:
+ numberOfStepsFloat = math.ceil(dwindleDifference / oneOverSteps)
+ numberOfSteps = int(numberOfStepsFloat)
+ for stepIndex in xrange(numberOfSteps):
+ alongBetween = (float(stepIndex) + 0.5) / numberOfStepsFloat
+ location = self.getLocation(float(stepIndex + 1) / numberOfStepsFloat)
+ rateMultiplier = self.dwindlePortionEnd * alongBetween + self.dwindlePortionBegin * (1.0 - alongBetween)
+ self.addGcodeMovementByRate(distanceFeedRate, endRateMultiplier, location, rateMultiplier, slowdownFlowRateMultiplier)
+ return
+ if self.dwindlePortionBegin > 1.0 and self.dwindlePortionEnd < 1.0:
+ alongDwindle = 0.0
+ if self.dwindlePortionBegin > 1.0 + halfOverSteps:
+ alongDwindle = (self.dwindlePortionBegin - 1.0) / dwindleDifference
+ self.addGcodeMovementByRate(distanceFeedRate, endRateMultiplier, self.getLocation(alongDwindle), 1.0, slowdownFlowRateMultiplier)
+ alongDwindlePortion = self.dwindlePortionEnd * alongDwindle + self.dwindlePortionBegin * (1.0 - alongDwindle)
+ alongDwindleDifference = alongDwindlePortion - self.dwindlePortionEnd
+ numberOfStepsFloat = math.ceil(alongDwindleDifference / oneOverSteps)
+ numberOfSteps = int(numberOfStepsFloat)
+ for stepIndex in xrange(numberOfSteps):
+ alongBetween = (float(stepIndex) + 0.5) / numberOfStepsFloat
+ alongDwindleLocation = float(stepIndex + 1) / numberOfStepsFloat
+ location = self.getLocation(alongDwindleLocation + alongDwindle * (1.0 - alongDwindleLocation))
+ rateMultiplier = self.dwindlePortionEnd * alongBetween + alongDwindlePortion * (1.0 - alongBetween)
+ self.addGcodeMovementByRate(distanceFeedRate, endRateMultiplier, location, rateMultiplier, slowdownFlowRateMultiplier)
+ return
+ rateMultiplier = min(0.5 * (self.dwindlePortionBegin + self.dwindlePortionEnd), 1.0)
+ self.addGcodeMovementByRate(distanceFeedRate, endRateMultiplier, self.location, rateMultiplier, slowdownFlowRateMultiplier)
+
+ def getDwindlePortion(self, area, dwindlePortion, operatingFeedRateMinute, operatingFlowRate, slowdownVolume):
+ 'Get cumulative dwindle portion.'
+ self.dwindlePortionEnd = dwindlePortion
+ distance = abs(self.oldLocation - self.location)
+ volume = area * distance
+ self.dwindlePortionBegin = dwindlePortion + volume / slowdownVolume
+ return self.dwindlePortionBegin
+
+ def getLocation(self, along):
+ 'Get location along way.'
+ return self.location * along + self.oldLocation * (1.0 - along)
+
+
+def main():
+ 'Display the dwindle dialog.'
+ if len(sys.argv) > 1:
+ writeOutput(' '.join(sys.argv[1 :]))
+ else:
+ settings.startMainLoopFromConstructor(getNewRepository())
+
+if __name__ == '__main__':
+ main()
diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/inset.py b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/inset.py
index 8f1ec926bb..74cc85c058 100644
--- a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/inset.py
+++ b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/inset.py
@@ -302,6 +302,7 @@ class InsetRepository:
self.loopOrderDescendingArea = settings.MenuRadio().getFromMenuButtonDisplay(self.loopOrderChoice, 'Descending Area', self, False)
self.overlapRemovalWidthOverEdgeWidth = settings.FloatSpin().getFromValue(0.3, 'Overlap Removal Width over Perimeter Width (ratio):', self, 0.9, 0.6)
self.turnExtruderHeaterOffAtShutDown = settings.BooleanSetting().getFromValue('Turn Extruder Heater Off at Shut Down', self, True)
+ self.volumeFraction = settings.FloatSpin().getFromValue(0.7, 'Volume Fraction (ratio):', self, 0.9, 0.82)
self.executeTitle = 'Inset'
def execute(self):
@@ -426,6 +427,7 @@ class InsetSkein:
layerHeight = float(splitLine[1])
self.infillWidth = self.repository.infillWidthOverThickness.value * layerHeight
self.distanceFeedRate.addTagRoundedLine('infillWidth', self.infillWidth)
+ self.distanceFeedRate.addTagRoundedLine('volumeFraction', self.repository.volumeFraction.value)
elif firstWord == '(':
self.edgeWidth = float(splitLine[1])
self.halfEdgeWidth = 0.5 * self.edgeWidth
diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/raft.py b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/raft.py
index bf6fbb278a..cdb47ce4ba 100644
--- a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/raft.py
+++ b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/raft.py
@@ -439,6 +439,7 @@ class RaftSkein:
self.oldLocation = None
self.oldTemperatureOutputString = None
self.operatingFeedRateMinute = None
+ self.operatingFlowRate = None
self.operatingLayerEndLine = '( )'
self.operatingJump = None
self.orbitalFeedRatePerSecond = 2.01
@@ -548,8 +549,8 @@ class RaftSkein:
aroundWidth = 0.34321 * step
paths = euclidean.getPathsFromEndpoints(endpoints, 1.5 * step, aroundPixelTable, aroundWidth)
self.addLayerLine(z)
- if self.oldFlowRate != None:
- self.addFlowRate(flowRateMultiplier * self.oldFlowRate)
+ if self.operatingFlowRate != None:
+ self.addFlowRate(flowRateMultiplier * self.operatingFlowRate)
for path in paths:
simplifiedPath = euclidean.getSimplifiedPath(path, step)
self.distanceFeedRate.addGcodeFromFeedRateThreadZ(feedRateMinute, simplifiedPath, self.travelFeedRateMinute, z)
@@ -903,6 +904,8 @@ class RaftSkein:
return
elif firstWord == '(':
self.layerHeight = float(splitLine[1])
+ elif firstWord == 'M108':
+ self.oldFlowRate = float(splitLine[1][1 :])
elif firstWord == '(':
self.objectFirstLayerFeedRateInfillMultiplier = float(splitLine[1])
elif firstWord == '(':
@@ -919,8 +922,9 @@ class RaftSkein:
self.operatingFeedRateMinute = 60.0 * float(splitLine[1])
self.feedRateMinute = self.operatingFeedRateMinute
elif firstWord == '(':
- self.oldFlowRate = float(splitLine[1])
- self.supportFlowRate = self.oldFlowRate * self.repository.supportFlowRateOverOperatingFlowRate.value
+ self.operatingFlowRate = float(splitLine[1])
+ self.oldFlowRate = self.operatingFlowRate
+ self.supportFlowRate = self.operatingFlowRate * self.repository.supportFlowRateOverOperatingFlowRate.value
elif firstWord == '(':
self.edgeWidth = float(splitLine[1])
self.halfEdgeWidth = 0.5 * self.edgeWidth
diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/splodge.py b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/splodge.py
index d13a958f4f..7404029cfb 100644
--- a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/splodge.py
+++ b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/splodge.py
@@ -117,7 +117,7 @@ class SplodgeRepository:
settings.LabelDisplay().getFromName('- Operating -', self )
self.operatingLiftOverExtraThickness = settings.FloatSpin().getFromValue( 0.5, 'Operating Lift over Extra Thickness (ratio):', self, 1.5, 1.0 )
self.operatingSplodgeFeedRate = settings.FloatSpin().getFromValue( 0.4, 'Operating Splodge Feed Rate (mm/s):', self, 2.4, 1.0 )
- self.operatingSplodgeQuantityLength = settings.FloatSpin().getFromValue( 0.4, 'Operating Splodge Quantity Length (millimeters):', self, 2.4, 1.0 )
+ self.operatingSplodgeQuantityLength = settings.FloatSpin().getFromValue(0.4, 'Operating Splodge Quantity Length (millimeters):', self, 2.4, 1.0)
settings.LabelSeparator().getFromRepository(self)
self.executeTitle = 'Splodge'
diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/profile_plugins/extrusion.py b/SkeinPyPy/skeinforge_application/skeinforge_plugins/profile_plugins/extrusion.py
index a6f09a93a9..e32917b5c9 100644
--- a/SkeinPyPy/skeinforge_application/skeinforge_plugins/profile_plugins/extrusion.py
+++ b/SkeinPyPy/skeinforge_application/skeinforge_plugins/profile_plugins/extrusion.py
@@ -28,7 +28,7 @@ __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agp
def getCraftSequence():
'Get the extrusion craft sequence.'
- return 'carve scale bottom preface widen inset fill multiply speed temperature raft skirt chamber tower jitter clip smooth stretch skin comb cool hop wipe oozebane splodge home lash fillet limit unpause dimension alteration export'.split()
+ return 'carve scale bottom preface widen inset fill multiply speed temperature raft skirt chamber tower jitter clip smooth stretch skin comb cool hop wipe oozebane dwindle splodge home lash fillet limit unpause dimension alteration export'.split()
def getNewRepository():
'Get new repository.'
diff --git a/SkeinPyPy/skeinforge_application/skeinforge_utilities/skeinforge_craft.py b/SkeinPyPy/skeinforge_application/skeinforge_utilities/skeinforge_craft.py
index 4a872db6a7..d44137327c 100644
--- a/SkeinPyPy/skeinforge_application/skeinforge_utilities/skeinforge_craft.py
+++ b/SkeinPyPy/skeinforge_application/skeinforge_utilities/skeinforge_craft.py
@@ -90,21 +90,16 @@ def getPluginsDirectoryPath():
def getProcedures( procedure, text ):
"Get the procedures up to and including the given procedure."
craftSequence = getReadCraftSequence()
+ sequenceIndexFromProcedure = 0
+ if procedure in craftSequence:
+ sequenceIndexFromProcedure = craftSequence.index(procedure)
sequenceIndexPlusOneFromText = getSequenceIndexPlusOneFromText(text)
- sequenceIndexFromProcedure = getSequenceIndexFromProcedure(procedure)
return craftSequence[ sequenceIndexPlusOneFromText : sequenceIndexFromProcedure + 1 ]
def getReadCraftSequence():
"Get profile sequence."
return skeinforge_profile.getCraftTypePluginModule().getCraftSequence()
-def getSequenceIndexFromProcedure(procedure):
- "Get the profile sequence index of the procedure. Return None if the procedure is not in the sequence"
- craftSequence = getReadCraftSequence()
- if procedure not in craftSequence:
- return 0
- return craftSequence.index(procedure)
-
def getSequenceIndexPlusOneFromText(fileText):
"Get the profile sequence index of the file plus one. Return zero if the procedure is not in the file"
craftSequence = getReadCraftSequence()
From 64314d2eeb66e793612a2dededfc72cbf89863e9 Mon Sep 17 00:00:00 2001
From: daid
Date: Fri, 17 Feb 2012 12:15:30 +0100
Subject: [PATCH 8/8] Added replace file so M101 and M103 get removed.
---
SkeinPyPy/skeinforge_application/alterations/replace.csv | 3 +++
1 file changed, 3 insertions(+)
create mode 100644 SkeinPyPy/skeinforge_application/alterations/replace.csv
diff --git a/SkeinPyPy/skeinforge_application/alterations/replace.csv b/SkeinPyPy/skeinforge_application/alterations/replace.csv
new file mode 100644
index 0000000000..dbcbd1bf1a
--- /dev/null
+++ b/SkeinPyPy/skeinforge_application/alterations/replace.csv
@@ -0,0 +1,3 @@
+M101
+M103
+
|