Full Version: Post processor script development (S3D/Prusa Slic3r support)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12
Some time ago I mentioned about post processor script to make Simplify3D and possibly other slicers work with Prometheus System. As is probably known by all, only Cura slices models properly for Prometheus, Simplify3D and others simply don't either support enough features (missing or inadequate purge tower) and the filament switching g-code routines aren't robust enough (purge trail not printed for each layer -> gaps -> mess). Pictures and more in depth explanation in here:

Anyway, been bit busy during this spring so nothing done in this front yet, but planning on starting this soon.

So far the basic feature set plan is something like this:
  • automatically add a raft for the purge trail (no need for the extra model)
  • add filament change g-code (only need to add placeholder comment to slicer)
  • user defined coordinates for the purge trail (maybe automatic in future...)
  • make sure purge trail is printed even though slicer doesn't do switching every layer
  • make sure purge tower is printed after purge trail
  • make sure retractions are done properly
  • detect layer height and adjust purge trail etc. accordingly
  • user definable extra purge after filament change. Useful with KISSlicer and Slic3r as they have don't allow purge tower settings...
That should cover it. Any other ideas? S3D will be the first supported. Time permitting, I'll be extending the support to Prusa Slic3r edition and KISSlicer (which is already working very well, but could do with some automation).
Probably going to do this with Python as I already have some existing code.
This post is reserved for release changelogs:

Version 0.15.

  • Issue #26: fix Nonetype error while parsing temperatures
  • Update
  • Z-offset fixes for S3D and Prusa Slic3r
  • Moar fix for S3D temperature handling
  • Fix temperature setpoint detection
  • Add support for Prusa Slic3r 1.37.2
  • Issue #18: print raft just before infill/purge
  • More fixes after refactoring
  • Fix Delta tower position regression
  • Update gitignore
  • Issue #16: move Z close before printing raft
  • Issue #19: fix tower not generating fully
  • Add raft extrusion multiplier GUI control
  • Raft speed to use slicer defined speed
  • Refactoring: settings-module

Support nozzle temp changes for S3D and Slic3r

  • Correct T id for temp change before tool change
  • Prusa slicer code cleanup, retraction check
  • Improve extruder move detection
  • Slic3r temperature change support
  • Temperature change refactor
  • Support different temperatures (S3D)
  • Add temperature gcode functions, handle whitespace

  • Add PEEK4 and PTFE4 HW profiles
  • Issue #16: tower position fix
  • Support slicer z-offset, add layer height check
  • Fix z-move after tower, line was not added

  • Update README and bump version to 0.12
  • Issue #15: add M83 after raft
  • Issue #15: add M83 after tower g-code
  • Fix Prusa Slic3r first tool change
  • Support Prusa Slic3r 1.37.1
  • Proper bed size handling for Prusa Slic3r
  • Prusa Slic3r support, mostly working
  • WIP Prisa Slic3r support


  • Don't check last tool switch height if no tool changes
  • Change version type to string
  • Fix post-tower prime function
  • Tower add function: fix indexing, handle unwanted retracts
  • Issue #12: remove unnecessary warning

  • Issue #12: remove unnecessary warning
  • Update README
  • GUI updates: show version, fix window close
  • Added small util for 'translating' g-code coordinates
  • Tune filament switch g-code
  • Issue #11: z-position fix part 2
  • Issue #11: z-position fixes
  • Multi-tower: print towers in ordered fashion, z-hop fix
  • First working version of multi-tower functionality
  • GUI: add tabs. Configurable purge lines
  • Logger: add error and warning descriptions
  • Fix two bugs
  • Remove x-bit from filaswitch.bat
  • Update filaswitch.bat: proper path to, args
  • Issue #7: bed size detection
  • Disable error popup
  • CLI: add position default AUTO

  • Issue #4: purge tower position: user selectable position for the purge tower (left, right, top, bottom). Or automatic, which currently is top
  • Fix issue #10: Outer perimeter speed detection
  • Analyser update: more detailed prints
  • Refactor g-code generator code 3 (final)
  • Refactor g-code generator code 3
  • WIP: refactor g-code generator code 2
  • WIP: refactor g-code generator code
  • Add utility function for checking if float value is zero
  • Extruder: add get feed rate function
  • Layer-class: support generator-type line additions
  • Read S3D wipe settings
  • Coasting and extrusion multiplier settings
  • GUI: add scrollbar, info view read-only
  • Fix too high feed rate check
  • Fix bug with last purge line; speed value is not feed rate
  • Fix crash with perimeter rate detection

v0.8 beta:
  • fix fatal bug introduced in v0,7 where the extrusion length was always set to very high number and causing dangerous extrude to happen
  • fix functionality that was supposed to detect this erratic behaviour. Also set the max feed rate ratio to 0.2 for now. In future, automatic max value calculation by nozzle size could be implemented

v0.7 beta:
- center raft
- add perimeter around the purge tower; helps keep the tower outlines clean and also bit more purge
- update HW config names: PEEK-PRO-12|PTFE-PRO-12|PTFE-EV6
- fix a bug with 'Perform retraction during wipe'-fix; not all wipes were processed
- change preferred tool change retraction from 0 to users normal retraction
- purge line feed rates are now calculated based on print profile's print speeds and outer perimeter feed rates
- fix a bug with E3DV6 hw-config where last purge line was retracting instead of extruding


v0.6 beta:
  • Simplify3D 3.1.1 'Perform retraction during wipe movement' bug fix
  • detects print speeds from S3D settings and use them with purge tower
  • purge line speed tuning, should result in more consistent feed rates after purge tower
  • detect number of unique tools used in print. If only one (i.e. single color print), skip all purge tower additions
  • some g-code formatting changes, does not affect print results


v0.5 beta:
Add support for different Prometheus HW configurations (PTFE, E3DV6, PEEK).
  • GUI updated with selector
  • added mandatory cli argument
  • hw specific purge g-code added

Other changes:
  • save last used directory and open file browser there if possible
  • save last used hw config and restore it to UI when restarting tool
  • retraction corner case bug fix

v0.4 beta:

Added first draft of GUI
  • allows selecting file and it does it's thing
  • logging update so log messages are shown on the GUI

v0.3 beta:
  • retraction, handle it properly before and after purge tower

  • raft material feed rate improved

  • purge tower tuning, should result in more even distribution of material

  • z-hop handling on purge tower

v0.2 beta:
  • Mostly tunings retractions, should be more accurate.
  • Also some tweaks to the purge tower and material flow

v0.1 (alpha):
  • supports Simplify3D and can detect basic values (nozzle size, retraction, z-hop, etc.) from S3D header

  • detects tool changes and adds proper purge tower

  • detects layers with no tool changes and adds sparse infill

Alright, first version done. consider it early beta. But it does have the basic functionality.
Only tested with one print so far so bugs to be found!

Testing and test reports welcome. Report them here and also for issue tracking:

Pics of test model print:

There's still tweaking to be done, especially the retraction/prime settings, but so far so good.
v0.2 release. Better retraction handling, but probably needs more work yet.

v0.1 on the left, v0.2 on the right:
Having some weird over-extrusion problem while printing 3DBenchy in dual color:

Some parts are getting way too much material and some parts seem ok. I'm printing single-color benchy to see if it's S3D going some weirdness or if filaswitch is doing somethings strange. I've been looking at the g-code but I can't spot anything odd with it, retractions and primes are done correctly.

Also a GUI is planned for the tool. Should be easier for people to use the tool since S3D doesn't seem to want to run python or python scripts as a post processing commands. At least not on Windows...
Well it seems filaswitch is not the problem with over-extrusion. To test this, I first printed Benchy in single extruder mode (S3D profile with only one extruder).
Looking quite nice, though some layer inconsistencies are evident. Probably the cheapish ESUN PLA, might not be the most consistent material. Certainly no over-extrusion:

Next I used the dual extruder profile, but removed all extruder change g-code from it so basically what happens is that S3D slices the two models for dual extrusion, but printing happens with only one extruder. And of course I did not run filaswitch on it, so the result is S3D all the way. My theory is that S3D botches the calculations for how much material to deposit after it thinks tool has changed and it shows especially in small areas. The resulting print is ugly, print pretty much failed after extra material started to accumulate and nozzle hit it -> skipped some steps -> mess. I've marked the extra material buildup on the first picture:

So it seems that S3D has bugs. Not a surprise, but I'd think that something like this would have been noticed and fixed by now. Or not, I'll need to have a look at S3D forums and probably contact their support...

It could be some kind of misconfiguration on my part. But I've already tried the Tool change retraction settings and all they do is change the retraction lines and those I've checked, they are in proper places (mostly). I've also tried 4 different dual extruder profiles on S3D and each of those have shown similar symptoms.

I can always try to fix this in the post processor; I can read the extruder moves after tool change and calculate if S3D decides to push out more material than needed. But I'd rather not as this should work properly in the slicer. This post in S3D forums lead me to try disabling Retraction during wipe movement and it seems to fix the problem. Yay, I can go back to developing the tool.

"Dual color" print with Retract wipe disabled:

The quality overall seems to take bit of a hit and there's some stringing, but no over-extrusion. I'll see if I can get this reported to S3D support...
Aand it's working:

Bit of stringing but no ever-extrusion. And material changes were working very well. Purge tower works well also.

Onto designin a GUI for the tool
v0.3 released

Great work! It looks like your post-processing script is almost ready Smile

We can't wait to see the GUI and start beta-testing!
Indeed it's looking good. Here's ABS print of dual color tree frog:

I also got first GUI version done. I haven't done a release of it yet, but it has the basic functionality which means selecting file and running post processing on it.
You can download it for testing from this link:

In Windows, run filaswitch.bat. On linux, only shell works for now so run ./ Also on Ubuntu one needs to install python3-tk package.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12