Git Product home page Git Product logo

cura-postprocessing-scripts's Introduction

Cura-Postprocessing-Scripts

Compilation of personnal Ultimaker Cura postprocessing scripts

Installation

The files must be stored in the user script directory of the respective Cura version: \AppData\Roaming\cura\scripts

After the next start of Cura the script can be added via Extension / Post-Processing / Modify G-Code Add a script.

Adding script

Description: This plugin shows custom messages about your print on the Printer Panel... Please look at the option - LayerId: Use the Layer ID coded in the Gcode and not an increment starting from 0

DisplayPrintInfosOnLCD.py

Description: Add slicing parameter in the GCode Header

GCodeDocumentation.py

Description: postprocessing-script to easily define a Speed Tower.

SpeedTower.py

This script offer the possibilities to modify :

  • Speed ( By using M220 instruction )
  • Acceleration
  • Jerk
  • Junction Deviation
  • Marlin Linear Advance
  • RepRap Pressure Advance

Description: postprocessing-script to easily use an temptower and not use 10 changeAtZ-scripts

The default values are for this temptower PLA model https://www.thingiverse.com/thing:2493504

  • Temp Tower PLA de 210 à 170
  • Possibility to define also a Fan Tower , Fan percentage speed indicate with semi-colon as seprator

TempFanTower.py

Description: postprocessing-script to easily create a Retract Tower

Two options :

- Speed   :  Speed variation

- Retract :  Distance retract variation

RetractTower.py

Description: FlowIroning for 3D prints. Change the Fan value on ironing operation.

FanIroning.py

Note : Some Ironing area are not detected by the script. It is mainly the small areas located on contour areas.

Sample not detected area

Description: add header infos and part thumbnail for RepRap machine 3DWOX

part thumbnail

Not fuly tested

GradientInfill.py (original idea from CNCKitchen )

Version : 1.5

GradientInfill.py Posprocessing Script for Cura PlugIn. Save the file in the C:\Program Files\Ultimaker Cura X.X\plugins\PostProcessingPlugin\scripts directory.

Extrusion mode in Cura must be set in relative mode. If it's not the case an error message will be raised in Cura.

Message

No Gcode will be generated by Cura in this case. Same behaviour if Cura settings are not suitable for Gradient Infill modification :

  • Infill pattern type ZigZag , Concentric , Cross and Cross3D not allowed
  • In cura the option "Connect Infill Lines" for the other patterns musn't be used.

The wall must be done before the Infill element. So In Cura the Option infill_before_walls must be set to Off

Postprocessing Options

PostProcessing

  • Gradient Distance : Distance of the gradient (max to min) in mm
  • Gradient Discretization : Only applicable for linear infills; number of segments within the gradient(segmentLength=gradientThickness / gradientDiscretization) use sensible values to not overload
  • Max flow : Maximum extrusion flow
  • Min flow : Minimum extrusion flow
  • Short distance flow : Extrusion flow for short distance < 2x Gradient distance
  • Gradual speed : Activate also Gradual Speed linked to the gradual flow
  • Max over speed : Maximum over speed factor
  • Min over speed : Minimum over speed factor
  • Extruder Id : Define extruder Id in case of multi extruders
  • Test with outer wall : "Test the gradiant with the outer wall segments

A new Flow Value for short distance (Linear move < 2 x Gradient distance) added to the standard GradientInfill script.

Add a gradual speed variation for machine without direct drive extruder.

gradient infill

Sample part with a Gradient distance set to 8 mm : Gradient distance set to 8 mm

This Cura Postprocessing Script adds comments to the G-Code. The user can select or deselect comments for M-Commands and G-Commands separately.

G0 and G1 commands are only commented if a retract is included.

Command, description and parameters are read from a CSV file. If a command is not contained, the required data is determined once via the website http://marlinfw.org/docs/gcode/ and added to the CSV file.

CommentGCode.py

Modification of the official script with Layer Increment.

Insert a Gcode at Layer Number. Can be insert Before or after the Layer Number.

InsertAtLayerNumber.py

Script cura to set a higher filling speed for the first layer.

FastFirstInfill.py

Original first layer speed before modification

First layer speed

First layer speed after modification with the script.

First layer speed after modification

Script to modifiy the first layer infill and Check the first Wall Speed Bug Cura 5.6

CheckFirstSpeed.py

Script used to fix a bug in Cura versions 5.5 and 5.6 bug on github

Original first layer speed before modification

First layer speed

First layer speed after modification with the script and a first infill speed of 30 mm/s.

First layer speed after modification

Script cura to reduce the speed according to the print height.

SlowZ.py

- Slow Z percentage : Positive value to slow the print as the z value rises up to this percentage.

- Slow Z height : Positive value to define the start height of the speed reduction.

- Display details on LCD : This setting will insert M117 gcode instructions, to display current modification in the G-Code is being used.

SlowZ settings

Script cura to duplicate the initial Brim/skirt to obtain a thick Brim.

Note : Updated for Cura 5.0 & 5.1

MultiBrim.py

- Brim addition : Number of brim to add to the existing one.

- Brim speed : Speed for the subsequent brims.

Multi layer brim height request on Cura Github #6929

Different tests made with the current release (V1.6)

MultiBrim test

Script Cura to change the FAN value when we are in the case of Minimum Layer Time. When we are in minimum Layer Time situation the Script fix the FAN values to the Fan value in %

ChangeFanValue.py

Note : In GCode 100% = 255 for the Fan Value M106S255.

Script Cura to turn off the print cooling fan on the first X Layers.

InhibFan.py

Note : In GCode turn off the print cooling fan. M107.

Description: Z hop for every G0 displacement even if Retraction is not define ( Retraction must be desactivate) . Use the speed_z_hop and the retraction_hop as retraction parameter.

ZMoveG0.py

Errors messages if Retraction is activate.

Error ZMoveG0

Description: ZMoveIroning for 3D prints. Z hop for ironing

ZMoveIroning.py

Description: SpoonOrder is a script used in the spoon Anti-warping Plugin, Print every spoon tabs first.

SpoonOrder.py

Description: InfillLast print for the first layer every Infill path at the end of the First Layer. ( Work in progress )

InfillLast.py

Author : Greg Foresi (GregValiant)

Description: This script changes the Z-Hop height from the beginning of the 'Start Layer' to the end of the 'End Layer'. If the new hop height is 0.0 it negates the z-hop movement. The Z-hop command lines are altered, not removed.

- This script supports different hop heights for up to 4 extruders.
- Z-Hops at tool change are not affected when 'Alter Z-Hops' runs BEFORE other post-processors that make code insertions just before Tool Change lines
- Adaptive Layers is not compatible and there is an exit if it is enabled in Cura
- Z-Hops must be enabled for at least one extruder in Cura or the plugin exits.

AlterZhops.py

Modifiy existing Zhop to get Diagonal ZHop for 3D prints.

cura-postprocessing-scripts's People

Contributors

5axes avatar icarianom avatar tispokes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cura-postprocessing-scripts's Issues

FastFirstInfill not working

Hi.
I've been looking for days for a way to do this then I found FastFirstInfill only to find its not working.
Is it because of changes made to 5.x? is there any way to fix it possibly?

Post Processing Scripts not saving

The retraction tower only goes to 5mm. I need up to 7mm. I followed the instructions to open Post Processing Script. I changed the value from 5 to 7. How does it save? I clicked on close. Closed Cura (5.1), reopened it and it still is only 5 tall(5mm). Now by the slice button, there is a </>1 next to it.
image
If I click on the </>1 it goes back to the Post Processing Script with the change made. But it doesn't change the tower.

Settings

Does this simply add the Cura settings to the gcode or can you somehow extract these into Cura as well?

I ask because people always want to know my settings so they can use them and often Cura fails to import profiles exported from a different version.

Either way it’s a beautiful script and I thank you.

*int* instead of *float*

Hi, I was using your genius post processing script atm.
In particular the TempFanTower.
Was wondering if Change Layer and Change Layer Offset meant to be in mm cuz it's a float and layers alwas int. So i was struggeling a bit and want to check inside the code whats going on.

Whats about changing them into int? Or any specific reasons why it is a float? At the end you're casting it back to a int.
Temp and TempIncrement may seems okay with float.

Looking forward to discuss about :-) Hope it's okay that I use the issue-tool

Lars

Gcode Documentation post processing script not working with Cura 5.x

Not sure if I am doing something wrong. I put the script in the scripts directory but it doesn't give the same output as it did in Cura v4.13.1
I attached a screenshot of the v5.4 window showing the plugin active as well as the v4.13.1 and v5.4 outputs.
The 4.13.1 output gives all the settings in plain english while the v5.4 doesn't.
I tried v5.3 as well and checked my gcode files and ever since v5.0 it looks like it went missing.
I am using Win11 Pro 64BIt v22H2
Can you assist ?

Cura v5 4 Screenshot#2
Cura v4 13 1 Screenshot
Cura v5 4 Screenshot#1

Quick Question

Is there a way to show a popup menu to confirm with a yes or no if the script has to run?

Tryed with QT6 but failed

@IcarianOM at Telegram if this is not the correct way to ask this questions

what version of cura does Multibrim.py this work with

Hi im trying to use the Multibrim.py script, i have tried with cura versions 4.13.1 and 5.0 but it does not work, theres no extra brims in the preview, please help i really wanna use this post processing script

TempFanTower script not taking temperature changes into account that are already in the Gcode

I'm using:
Windows 11Pro 23H2
Cura 5.7.0
Ultimaker S5 gen1 printer with material station
_Edit:
I'm using AA 0,8mm printcores in both extruders and a 0,2mm layer height.
I've set the script settings to:

  • offset layer 8
  • start with 265 degrees C
  • increments from 5 degrees C
  • change at layerheight 50_

I used this model to perform a temperature test for PETG filament. I ran the post processing script: TempFanTower and set the settings...

I ran the test and noticed several unwanted temperature changes:
temp tower temp profile

I unpacked the *.UFP file and looked at the Gcode and saw the added temperature changes as 'M140 S' but also other temperature changes also M104 S, probably generated by Cura (could't find out why).

I looked at the TempFanTower.py script on github and noticed there isn't a routine that does a check if there are more M104 S codes in between the added temperature settings for every layer change. It should do that.

Furthermore it's better to use the M109 R command; this waits for the nozzle to reach the setted temperature before moving on and it does this for both cooling off or heating up to that temperature (see here)

Multibrim .py Doesnt work with cura 5.0

Multibrim Successfully installed on cura 4.13.1 and cura 5.0, Multibrim tested and works on cura 4.13.1 but it does not work on cura 5.0, no extra brim is printed, can we please get an updated script for cura 5.0 ?? i will happily make a donation

PostProcessing Plugins

Hello @5axes
I have been fooling around with Python and post-processors. I have a re-write of "Insert at Layer Change" that is finished and works. I added support for multi-line insertions, start and end layers, and options for insertion at every layer, every 2nd, 3rd, 5th, 10th, 25th, 50th and 100th (that seemed like enough). I'm not savvy enough to do a proper pull-request and at any rate it could use another set of eyeballs as I'm not good with Python.
The other project is a work-in-progress and I've taken it as far as I can. It's the Cooling Profile post-processor. I've got it loading properly and the dialog boxes appear to be correct. It doesn't work though. I think it's throwing errors when splitting a string and moving the data to a list "Layer/FanPercentage" (as "1123/50"). I think I have a good start to it and maybe you would care to take over or maybe steer me in the right direction.
You will notice that I've modestly named them after myself. That was actually to keep from over-writing the stock files.
If you want to disregard this I'll understand..

GregVInsertAtLayerChange.zip

GregVCoolingProfile.zip

My thoughts on the cooling profile design:
Remove all the M106 lines from the file.
Pull in {machine_scale_fan_speed_zero_to_one} from Cura.
If "by Layer" then the strings are split and the list is created. My thought was that it should be fixed length and so I've entered place keepers if a user doesn't need al 12 insertion options. As each value is appended to the list the actual fan speed is calculated and appended instead of the percent. There is an "if" for fan_mode 0 to 1 or 0 to 255.
As the gcode is parsed - lines with ";LAYER:" trigger a search through the list (called fan_array in the code) for a match. When a layer match is found then the new M106 string is put together and inserted.
If the user selects "By Feature" then the Layer setting boxes are disabled and the By Feature boxes are enabled. The fan speed for each feature is stored. There is a possible start and end layer. The data is parsed and every time a "TYPE:SKIRT" or "TYPE:WALL:INNER", etc. is encountered then the corresponding fan line is assembled and inserted. This goes on from the Start Layer to either the user defined End Layer, or to the end of the file. If the user selected an "end layer" than at that layer the "Final Fan Speed" is inserted.
Lastly, in either case, since all the M106 lines were removed (or maybe commented out) then M106 S0 needs to be inserted when ";End of Gcode" line is encountered.

So that's it. I've typed a little bit. All that's left is everything else.

I'd appreciate if you would let me know what you think.

Greg (Valiant) Foresi

Layer numbering in "Pause at height"

The description for "Pause Layer" says "Enter the Number of the LAST layer you want to finish prior to the pause. Note that 0 is the first layer..."

Seems to me it doesn't work this way. Making 4 layers labels, the background being two layers, and the text being two layers, have to enter 2 in order to get text printed as third and fourth layers. 1+2 = background, 3+4 = text ; same numbering as Cura preview.

Shouldn't the help bubble say "Note that 1 is the first layer" ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.