Skip to content

Palette2 Post Processing tool for Slic3r

Notifications You must be signed in to change notification settings

totalitarian/p2pp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

p2pp - Palette2 Post Processing tool for Slic3r PE

Tested with version 1.41.2 and 1.42.0 Alpha 1 earlier versions may generate different code patterns and may not work correctly

Purpose

Allow Palette 2 users to exploit all features and functionality of the palette 2 (Pro) with the Slic3r PE functionality for multi material printing including:

  • use of variable layers without bloating the wipe tower
  • wipe to waste object
  • wipe to infill
  • configurable option to create more filament at the end of the print

IMPORTANT:

P2pp currently only works for devices in a connected setup. It does not generate the required sequences to meet the Pause-based pings in accessory mode.

Functionality

P2pp is a python script with a shell script/batch file wrapper.

P22pp works as a post processor to GCode files generated by Splic3r PE, just like Chroma does. If does however not create any new code for wipe towers etc, it just adds Palette 2 MCF information codes to the file. The script is triggered automatically when exporting GCode or when sending information to the printer so no manual additional step is required.

IMPORTANT

Prior to using the script it is imperative that you setup the printer according to the specifications set by Mosaic( this includes full calibration using canvas or Chroma). Follow the guide(s) below and create a new Printer profile as there are some settings that contradict the Mosiac Guide for slicing with Chroma. In addition, it's important that your printers extruder is calibrated and working correctly.

WINDOWS INSTALLATION

  1. Clone this Github repository to a zip file and extract this zipfile to a location of your choice.
  2. Download and Install Python. P2PP is currently compatible with both Python 2.7 and 3.7. https://www.python.org/downloads/windows/
  3. Edit the .bat file.
  4. Change "c:\python27\python.exe" to your python.exe path.
  5. Change "c:\p2pp\p2pp.py" to the the path of p2pp.py (which you downloaded earlier)
c:\python27\python.exe c:\p2pp\p2pp.py -i %1

If your path to P2PP contains spaces;
c:\python27\python.exe "c:\program files\p2pp\p2pp.py" -i %1

If your python path contains spaces;
"c:\program files\python27\python.exe" c:\p2pp\p2pp.py -i %1

If your both P2PP and Python path contains spaces;
"c:\program files\python27\python.exe" "c:\program files\p2pp\p2pp.py" -i %1

Unix / Mac OSX INSTALLATION

  1. Clone this Github repository to a zip file and extract this zipfile to a location of your choice.
  2. You will need either python 2.7 or python 3 to be installed on your machine.
  3. Further when running on a unix-flavoured system (Mac OSX or Linux), you will need to make the script p2pp.sh executable:
cd place_where_you_extracted_the_zip_file
chmod 755 p2pp.sh

Test your work by typing ./p2pp.sh and this should result in the following error:

usage: P2PP.py [-h] -i INPUT_FILE [-d OUTPUT_FILE] [-o SPLICE_OFFSET] [-g GUI]
               [-p PRINTER_PROFILE] [-s SILENT]
P2PP.py: error: argument -i/--input-file: expected one argument

This indicates all files are properly setup and has executed correctly. The remainder of the configuration is done in Slic3r PE

Configuration of Slic3r PE:

NOTE:

For now, there is no error checking on some of the P2PP codes. You need to ensure that they are followed exactly. They are CaSe SeNSiTiVE!

If you want a head-start, you can import the configuration file in the splic3r_templates subfolder. This file contains PLA Filament, print and printer definitions.

MANDATORY STEPS:

  1. Open one of the .mcf.gcode you recently sliced with Canvas or Chroma. It's important that you use a file that has been printed and or previously calibrated with to save manual additional steps. A mistake here will trigger recalibration with your printer for a new printer profile.
  2. Near the top of the gcode there should be a line starting with "O22 Dxxxxxxxxxxxxxxxxxxxx".
  3. Copy everything after the "D". This is your Printer Profile ID. Note this down and have it ready for the next steps. (Copy and paste, don't type it). E.G. If your O22 line reads "O22 De827315ff39aaaaa", then your printer profile is: e827315ff39aaaaa

Printer Settings

  1. In Slic3r, Click the "Printer Settings Tab".

  2. Click the "Custom G-code" menu item.

  3. Locate the "Start G-code" input box at the top.

  4. INSERT (not overwrite) the following lines at the TOP of the Start G-code. You'll note that they are all commented out and are in no way going to interfere with the print.

    ;P2PP PRINTERPROFILE=REPLACE_WITH_YOUR_PRINTER_PROFILE_OBTAINED_FROM_ABOVE
    ;P2PP SPLICEOFFSET=30
    ;P2PP MINSTARTSPLICE=100
    ;P2PP MINSPLICE=70
    ;P2PP MATERIAL_DEFAULT_0_0_0
    ;P2PP MATERIAL_PVA_PVA_0_0_0
    ;P2PP MATERIAL_PVA_PLA_0_0_0
    ;P2PP MATERIAL_PLA_PLA_0_0_0
    ;P2PP MATERIAL_PET_PET_0_0_0
    
  5. In the "After layer change G-code" INSERT (not overwrite) the following line.

    ;LAYER [layer_num]
    
  6. Click the "General" menu item.

  7. Locate "Capabilities".

  8. Change Extruders to "4".

  9. ENABLE "Single Extruder Multi Material" (Contradicts Mosaic Instructions).

  10. Click "Single Extruder MM Setup" menu item.

  11. Change ALL entries within "Single Extruder MM Setup" to 0.

  12. Click Each of the Extruders (1,2,3 & 4) and ensure their settings are Identical to each other (except the extruder colour)

  13. Click the floppy-disk icon, and append "Palette P2PP" to the end of the Printer Settings profile name.

SPLICEOFFSET Is the amount of mm added to the first splice. It works in a similar way to the transition position % from Chroma and Canvas. Here the value is a fixed length. In our testing, 30mm seemed to be a good position resulting in perfect prints. You may want to tweak this value if you find the transition happens too early or too late.

MATERIAL_XXX_XXX_#_#_# This is used to to define heat/compression/cooling settings for the splice between materials. The MATERIAL_DEFAULT setting provides a configurable fallback in case no profile is defined for the material combination. Please be aware that entries are not symmetrical and you need to define the settings for both directions in order to specify a complete process. The definition is as per standard Chroma and Canvas profiles. Order of parameters is CURRENT-MATERIAL/NEW-MATERIAL/HEAT/COMPRESSION/COOLING. Default is all 0 as per standard in Chroma and Canvas.

Print Settings

  1. In Slic3r, Click the "Print Settings Tab"
  2. Click the "Multiple Extruders" menu item
  3. Locate "Wipe tower"
  4. Ensure "Wipe tower" IS ENABLED (Contradicts Mosaic Instructions)
  5. Ensure "Prime all printing extruders" is DISABLED
  6. Click the "Output Options" menu item
  7. Locate the "Post-processing scripts" input box at the bottom
  8. Put the full name of the .sh (unix/Mac OSX) or .bat (Windows) in this input box. Include the full path (don't use ~ for OSX). Add no parameters.
    For Windows: c:\yourpath\p2pp.bat
    For Mac/Unix: /yourpath/p2pp.sh
    
  9. Click the floppy-disk icon, and append "Palette P2PP" to the end of the Print Settings profile name.

NOTE:

The minimal first slice length is 100mm. This is required to make the filament reach the outgoing drive. Minimum slice distance for following slices can be set as low as 40, however this will impact the speed at which filament can be created and so print speed may have to be adjusted accordingly

Filament Settings

  1. In Slic3r, Click the "Filament Settings Tab"
  2. Navigate to the "Custom G-Code" menu item.
  3. Add the following lines exactly as shown to EACH filament profile you want to use with the palette 2. These changes will not interfere with the normal working under other profiles as only comments are added to the gcode file.
;P2PP FN=[filament_preset]
;P2PP FT=[filament_type]
;P2PP FC=[extruder_colour]
  1. Remember to click the floppy-disk icon to save!

NOTE:

[filament_preset], [filament_type] and [extruder_colour] are all built-in Slic3r variables. No changes are required here.

FN will be populated with the name of the Filament Preset (e.g. PETG - eSUN RED, Prusa PETG, Some Filament profile name...)

FT will be populated with the type of the filament (from the drop down box in the filament settings) (e.g. PET, PLA,PVA,ABS...)

FC will be populated with the web hex colour code of the extruder colour (e.g. #FFFFF, #FF00FF etc..)

Usage

When setup correctly the script will be triggered automatically from Slic3r PE and exported files will contain the mcf header required for palette operation. This functionality will only be enabled when selecting the right print/filament and printer profiles so when selecting any other profiles, single filament file generation will happen as before.

During the conversion the script may come up with a window stating possible warninngs.

The purge settings in Slic3r PE are defined under the purge volumes settings. This button is only visible on the "Plater Tab" and only when a Multi-Material Printer Profile is selected when "Multi Material, Single Extruder" is enabled. The information entered in this screen is volumetric. This means that you have to roughly multiply the number in these fields by a factor 2.4 in order to get the filament length. We've found that 180mm3 (75mm of Filament) works well.

You do not need to set any volume for "Unloaded" - Leave this as 0.

On your first prints make sure you review the output file to make sure it contains the Omega header. (bunch of commands starting with capital letter O (oh))

If slices are too short:

Increase the purge volumes until the required length is met (or lower the P2PP_MINSPLICE setting). If the start slice is too short, you can add a brim or skirt to use more filament in the first color.

Happy printing.

Acknowledgements

Thanks to Tim Brookman for the co-development of this plugin and for all who tested and provided feedback.

Good luck & happy printing !!!

About

Palette2 Post Processing tool for Slic3r

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.3%
  • Other 0.7%