Last active
December 25, 2015 07:19
-
-
Save t-paul/6938895 to your computer and use it in GitHub Desktop.
cura-scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# The script will fetch the latest version from github, | |
# compile and install CuraEngine and start the GUI. | |
# | |
# Configuration: | |
# | |
# Installation folder where the Cura and support repositories | |
# are cloned/updated to. | |
# | |
export CURA_INSTALL_DIR="/tmp/Cura-git" | |
############################################################## | |
mkdir -p "$CURA_INSTALL_DIR" | |
cd "$CURA_INSTALL_DIR" | |
if [ -d "Cura/.git" ] | |
then | |
( cd Cura && git pull ) | |
else | |
git clone git://github.com/daid/Cura.git | |
( cd Cura && git checkout master && git checkout SteamEngine ) | |
fi | |
if [ -d "Power/.git" ] | |
then | |
( cd Power && git pull ) | |
else | |
git clone git://github.com/GreatFruitOmsk/Power.git | |
fi | |
if [ -d "CuraEngine/.git" ] | |
then | |
( cd CuraEngine && git pull ) | |
else | |
git clone git://github.com/Ultimaker/CuraEngine.git | |
fi | |
( cd CuraEngine && make ) | |
cp -v CuraEngine/CuraEngine Cura/ | |
( cd "$CURA_INSTALL_DIR/Cura" && PYTHONPATH="$CURA_INSTALL_DIR/Power:$CURA_INSTALL_DIR/Cura" ./scripts/linux/cura.py ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CURA_INSTALL_DIR=/tmp/Cura-git | |
( cd "$CURA_INSTALL_DIR/Cura" && PYTHONPATH="$CURA_INSTALL_DIR/Power:$CURA_INSTALL_DIR/Cura" ./scripts/linux/cura.py "$@" ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Wrapper script to make curaengine callable from octoprint | |
# Parameters go directly into this script for now | |
# | |
# Octoprint calls the slicer like "args = [executable, '-i', config, '-s', file_path, '-o', gcode]" | |
# | |
STL="$4" | |
GCODE="$6" | |
ENGINE=$(dirname "$0")/CuraEngine | |
# | |
# Start G-Code. Careful to not have any " in there | |
# | |
START_CODE=" | |
M109 S210 ;Heatup to 210C | |
G21 ;metric values | |
G90 ;absolute positioning | |
G28 ;Home | |
G1 Z15.0 F300 ;move the platform down 15mm | |
G92 E0 ;zero the extruded length | |
G1 F200 E5 ;extrude 5mm of feed stock | |
G92 E0 ;zero the extruded length again | |
" | |
# | |
# End G-Code. Careful to not have any " in there | |
# | |
END_CODE=" | |
M104 S0 ;extruder heater off | |
M140 S0 ;heated bed heater off (if you have it) | |
G91 ;relative positioning | |
G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure | |
G1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more | |
G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way | |
M84 ;steppers off | |
G90 ;absolute positioning | |
" | |
# | |
# insetCount is the number of perimeters | |
# | |
exec "$ENGINE" \ | |
\ | |
-s filamentDiameter=2890 \ | |
-s filamentFlow=100 \ | |
-s initialLayerThickness=300 \ | |
-s layerThickness=100 \ | |
-s extrusionWidth=400 \ | |
-s insetCount=2 \ | |
-s sparseInfillLineDistance=2000 \ | |
-s downSkinCount=6 \ | |
-s upSkinCount=6 \ | |
-s initialSpeedupLayers=4 \ | |
-s initialLayerSpeed=20 \ | |
-s printSpeed=50 \ | |
-s infillSpeed=50 \ | |
-s moveSpeed=200 \ | |
-s fanFullOnLayerNr=2 \ | |
-s skirtDistance=6000 \ | |
-s skirtLineCount=1 \ | |
-s skirtMinLength=0 \ | |
-s infillOverlap=15 \ | |
-s objectPosition.X=102500 \ | |
-s objectPosition.Y=102500 \ | |
-s retractionAmount=4500 \ | |
-s retractionSpeed=45 \ | |
-s retractionMinimalDistance=1500 \ | |
-s minimalExtrusionBeforeRetraction=100 \ | |
-s enableCombing=1 \ | |
-s minimalLayerTime=5 \ | |
-s minimalFeedrate=10 \ | |
-s coolHeadLift=1 \ | |
-s fanSpeedMin=100 \ | |
-s fanSpeedMax=100 \ | |
-s spiralizeMode=0 \ | |
-s startCode="$START_CODE" \ | |
-s endCode="$END_CODE" \ | |
\ | |
-o "$GCODE" "$STL" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment