Compare commits

6 Commits
v0.1 ... master

Author SHA1 Message Date
682790922d Update README.md
Fixed forum link
2022-02-10 01:17:19 +01:00
bfc0b7a800 new windows build with dropTemp enabled 2019-04-05 14:13:30 -07:00
Nikolai
45140c1ed3 Update mmuGcodeParser.py
Bump up the version
2019-02-01 21:55:42 -08:00
Nikolai
ced093a634 Update README.md 2019-02-01 21:54:25 -08:00
Nikolai
0e5377f857 Merge pull request #1 from mebrein/master
lower ramming temperature when all filaments have same temp
2019-02-01 21:50:20 -08:00
Merijn van Mourik
007b20e0dc lower ramming temperature when all filaments have same temp 2019-02-01 11:03:16 +01:00
3 changed files with 36 additions and 7 deletions

View File

@@ -4,6 +4,10 @@ Improves Slic3r gcode for better MMU handling and allows true Multi Material pri
If you're using Prusa MMU1/MMU2 and Slic3r 1.41 you will encounter an issue if the temperature differ between the used materials. If you're using Prusa MMU1/MMU2 and Slic3r 1.41 you will encounter an issue if the temperature differ between the used materials.
Slic3r sets the new temperature between toolchanges only once after cooling and before unloading. This causing an issue in the transition from high temp filament to cold because it is being purged with cold temperature. Slic3r sets the new temperature between toolchanges only once after cooling and before unloading. This causing an issue in the transition from high temp filament to cold because it is being purged with cold temperature.
# Changelog
* v0.2 Set ram_temp_diff_wait_for_stabilize = True to drop the temperature even for same type of filament. Thanks @membrein
* v0.1 Initial upload
## Table of contents ## Table of contents
* [Installation](#installation) * [Installation](#installation)
* [Linux/Mac](#linux/Mac) * [Linux/Mac](#linux/Mac)
@@ -76,4 +80,4 @@ This is a first release and a proof of concept. I've printed the test object wit
I'm currently using it for any multi material prints as it helps as soon as you use filament with different temperature requirements. I'm currently using it for any multi material prints as it helps as soon as you use filament with different temperature requirements.
Once the process is refined, it will be implemented in Slic3r so no additional post processing is required. Once the process is refined, it will be implemented in Slic3r so no additional post processing is required.
For further discussions please use this official [Prusa forum thread](https://sourceforge.net/projects/linuxconsole/) For further discussions please use this official [Prusa forum thread](https://forum.prusaprinters.org/forum/original-prusa-i3-mmu2s-mmu2-general-discussion-announcements-and-releases/mmu2-real-multi-material/)

View File

@@ -32,9 +32,10 @@ from io import open
""" --------------------------------------------------------------------- """ ---------------------------------------------------------------------
### Constants ### Constants
""" """
VERSION = "v0.1" VERSION = "v0.2"
MYGCODEMARK = " ; MMUGCODEPARSER " + VERSION MYGCODEMARK = " ; MMUGCODEPARSER " + VERSION
UNLOAD_START_LINE = "unloadStartLine" UNLOAD_START_LINE = "unloadStartLine"
LOAD_START_LINE = "loadStartLine"
DEST_TEMP_LINE = "destTempLine" DEST_TEMP_LINE = "destTempLine"
DEST_TEMP = "destTemp" DEST_TEMP = "destTemp"
UNLOAD_LINE = "unloadLine" UNLOAD_LINE = "unloadLine"
@@ -52,6 +53,8 @@ debug_set = False
# Drop the temperature by 10C during the ramming process. Checking if it might help # Drop the temperature by 10C during the ramming process. Checking if it might help
ram_temp_diff = 10 ram_temp_diff = 10
# Set this to True if you want to drop the temperature even for the same filament
ram_temp_diff_wait_for_stabilize = False
# get the input file specified, and turn it into a path variable for the current OS # get the input file specified, and turn it into a path variable for the current OS
inpath = sys.argv[1] inpath = sys.argv[1]
@@ -72,8 +75,9 @@ unloading = r"^T[0-9]?"
purge = r"^; CP TOOLCHANGE WIPE" purge = r"^; CP TOOLCHANGE WIPE"
# 3. Print # 3. Print
printLine = r"^; CP TOOLCHANGE END" printLine = r"^; CP TOOLCHANGE END"
# 4. Before unload # 4. Before unload/load
beforeUnload = r"^; CP TOOLCHANGE UNLOAD" beforeUnload = r"^; CP TOOLCHANGE UNLOAD"
beforeLoad = r"^; CP TOOLCHANGE LOAD"
# 5. Target temperature # 5. Target temperature
targetTemp = r"^M104 S([0-9]*)" targetTemp = r"^M104 S([0-9]*)"
@@ -86,6 +90,7 @@ purge_detect = re.compile(purge)
print_detect = re.compile(printLine) print_detect = re.compile(printLine)
unloading_detect = re.compile(unloading) unloading_detect = re.compile(unloading)
before_unload_detect = re.compile(beforeUnload) before_unload_detect = re.compile(beforeUnload)
before_load_detect = re.compile(beforeLoad)
target_temp_detect = re.compile(targetTemp) target_temp_detect = re.compile(targetTemp)
@@ -208,9 +213,22 @@ def none_handler(p_tool_change, p_line_number):
if ram_temp_diff > 0: # Only if set if ram_temp_diff > 0: # Only if set
# Add temp drop for better tip # Add temp drop for better tip
lv_lower_temp = int(p_tool_change[CURR_TEMP]) - ram_temp_diff lv_lower_temp = int(p_tool_change[CURR_TEMP]) - ram_temp_diff
if ram_temp_diff_wait_for_stabilize:
# wait for stable nozzle temp
lv_output = "M109 S" + str(lv_lower_temp)
else:
# set nozzle temp without wait
lv_output = "M104 S" + str(lv_lower_temp) lv_output = "M104 S" + str(lv_lower_temp)
lv_insert = 1 # after the line lv_insert = 1 # after the line
if p_tool_change[p_line_number] == LOAD_START_LINE:
if ram_temp_diff > 0: # Only if set
lv_restore_temp = int(p_tool_change[CURR_TEMP])
# don't wait for stable nozzle temperature
# (enough time for nozzle to reach correct temp)
lv_output = "M104 S" + str(lv_restore_temp)
lv_insert = 1
if p_tool_change[p_line_number] == DEST_TEMP_LINE: if p_tool_change[p_line_number] == DEST_TEMP_LINE:
# nothing to do # nothing to do
pass pass
@@ -261,13 +279,20 @@ for line in infile:
# create dictionary entry # create dictionary entry
myToolChanges[toolChangeID] = myToolChange myToolChanges[toolChangeID] = myToolChange
# Search for the 'before loading' position # Search for the 'before unloading' position
before_unload_match = before_unload_detect.search(line) before_unload_match = before_unload_detect.search(line)
if before_unload_match is not None: if before_unload_match is not None:
if len(myToolChanges) > 0: # we found at least the start tool change if len(myToolChanges) > 0: # we found at least the start tool change
# remember the line number # remember the line number
myToolChanges[toolChangeID][line_number] = UNLOAD_START_LINE myToolChanges[toolChangeID][line_number] = UNLOAD_START_LINE
# Search for the 'before loading' position
before_load_match = before_load_detect.search(line)
if before_load_match is not None:
if len(myToolChanges) > 0: # we found at least the start tool change
# remember the line number
myToolChanges[toolChangeID][line_number] = LOAD_START_LINE
# Search for the target temperature # Search for the target temperature
targetTemp_match = target_temp_detect.search(line) targetTemp_match = target_temp_detect.search(line)
if targetTemp_match is not None: if targetTemp_match is not None:

Binary file not shown.