Code Monkey home page Code Monkey logo

klipper-preprocessor's Introduction

Klipper Preprocessor script for Cura

Project Maintenance License

Follow pedrolamas on Twitter Follow pedrolamas on Mastodon

Klipper Preprocessor is a Cura Post Processing Script to improve the output G-Code for Klipper usage.

Currently it allows the following improvements:

  • Add SET_PRINT_STATS_INFO so that Klipper can know what is the exact total layer count, and the current layer number in real-time.
  • Add TIMELAPSE_TAKE_FRAME so that Klipper together with moonraker-timelapse can take snapshots on each layer change to make timelapse videos.
  • Run preprocess_cancellation tool to add object cancellation data to the resulting G-Code, enabling Klipper to cancel any specific single object while printing.
  • Run klipper_estimator to add a more accurate time estimation to the resulting G-Code.

Klipper Preprocessor script for Cura

Initial setup

  1. Open Cura
  2. Open the "Help" menu and click "Show Configuration Folder"
  3. On the file list, open the "scripts" folder
  4. Download KlipperPreprocessor.py to the "scripts" folder
  5. Close the file list
  6. Close Cura
  7. (optional) Download preprocess_cancellation to a folder of your choice
  8. (optional) Download klipper_estimator to a folder of your choice
  9. Open Cura
  10. Open the "Extensions" menu, then "Post Processing", and click on "Modify G-Code"
  11. Click on "Add a script" and select "Klipper Preprocessor"
  12. Set options acording to your needs (hover any option to view the description)
  13. Click "Close" when ready

Recommended Cura settings for Klipper

Klipper documentation includes some generic slicer recommended settings that must be followed.

Below are some other settings that will improve your Cura slicing results while using Klipper.

Disable Jerk

Klipper does not support Jerk and instead relies on square_corner_velocity.

Is is recommended to untick the "Enable Jerk Control" option in the "Speed" section in Cura.

Adding extra metadata for Moonraker

Moonraker actively reads metadata from all sliced files, but there is some missing data in Cura sliced files.

To make sure you get all possible metadata on these files, add this to the top of your "Start G-code" in Cura, before any other instructions:

;Nozzle diameter = {machine_nozzle_size}
;Filament type = {material_type}
;Filament name = {material_name}
;Filament weight = {filament_weight}
; M190 S{material_bed_temperature_layer_0}
; M109 S{material_print_temperature_layer_0}

These lines are marked as comments, so they have no impact on the g-code, but Moonraker will still be able to find and use those values.

Improving Cura print time estimations

The default printer (machine) profiles in Cura have fixed values for max-acceleration and max-speed, so when we set values above those defaults while slicing a file, Cura will ignore when estimating the printing time and use the default ones instead, so the estimation will be off.

To fix this, follow these steps:

  1. Open Cura
  2. Click on the "Marketplace" button on the top right of the window
  3. On the Plugins list, select the "Printer Settings"
  4. Click "Install"
  5. Restart Cura
  6. On the "Print settings" flyout, there should now be a new section called "Printer Settings" (you might need to ensure they are visible by clicking the "hamburger" menu on the top right and selecting "All")
  7. Expand that section and change the "Maximum Speed..." and "Maximum Acceleration..." fields to match the values you are using in your Klipper configuration

FAQ

Why am I seeing "Unknown Command M205" while printing?

That will be because you have jerk enabled in Cura. You can safely disable jerk to fix it.

What is the "NOMESH" object that shows on my prints?

Cura 5.3.0 was released with a known bug that causes the identification of a "NOMESH" object.

This bug was fixed in Cura 5.3.1, so all you need to do is update to a more recent version.

I get some strange artifacts on the outer walls of my prints

Cura 5.3.0 was released with a known bug that causes some print quality issues.

This bug was fixed in Cura 5.4.0, so all you need to do is update to a more recent version.

Credits and Acknowledgements

License

MIT

klipper-preprocessor's People

Contributors

pedrolamas avatar

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.