GithubHelp home page GithubHelp logo

klipper-preprocessor's Issues

Not Working for me - Cura 5.2.1

What happened

I followed your settup steps but it is not adding anything to the GCode not even the Timelapse code. I manually checked and nothing is their. I am pretty new to all this so forgive me if I am making a stupid mistake. Below are the paths I used and screen shots of all the folders and the setup.

Path to Cancellation: C:\Users\Louis\AppData\Roaming\cura\5.2\Object_Cancellation\preprocess_cancellation-windows.exe

Path to Estimator: C:\Users\Louis\AppData\Roaming\cura\5.2\Klipper_Estimator\klipper_estimator.exe
Moonraker URL: http://XXX.XXX.XX.XXX:7125

Path to Config: /home/LCasadia/printer_data/config/klipper_estimator.json

Capture
Capture4
Capture3
Capture2

Moonraker URL: http://XXX.XXX.XX.XXX:7125

Path to Config: /home/LCasadia/printer_data/config/klipper_estimator.json

What did you expect to happen

See Above

How to reproduce

See Above

Additional information

No response

Specify API key

Is your feature request related to a problem? Please describe

Hi,

I'm running my network as if it is untrusted (i.e., I don't trust anything just because it comes from a local IP address, and I run TLS on everything); however, then Klipper preprocessing refuses to run; on upload from Cura, I get this:

Failed to run klipper_estimator
Failed to load printer configuration: Access denied (you may need to use --config_moonraker_api_key): HTTP status client error (401 Unauthorized) for url (https://<my URL here>/printer/objects/query?configfile=settings)

But there's no way in the Cura UI to specify that API key.

Describe the solution you'd like

A text box in the UI where I can enter a Moonraker API key; if nonempty, should be given to klipper_estimator.

Describe alternatives you've considered

No response

Additional information

No response

Failing to load on macOS, Cura 1.4

What happened

Installing the script doesn't do anything - it errors at line 274 because macOS doesn't support subprocess.STARTUPINFO

What did you expect to happen

The script works

How to reproduce

Install the script on Cura 1.4, macOS 13.0.1

Additional information

No response

Timeout for preprocess_cancellation and klipper_estimator is too short

What happened

When slicing a large file (~50 objects), preprocess_cancellation and klipper_estimator may take longer to run than the hardcoded timeout of 10 seconds, generating an error.

What did you expect to happen

Large files should be correctly processed.

How to reproduce

I was able to cause this by slicing a file with 50 Benchys. Note that this is on my 8th gen i7 laptop; YMMV as it's obviously dependent on CPU performance.

Additional information

I increased the timeouts manually to 600 seconds and the file was postprocessed correctly.

Bed Cooldown towards the end of a print

Is your feature request related to a problem? Please describe

In OctoPrint i loved to cooldown the bed towards the end of a print to

  1. Save Energy
  2. Make it easier to detach your print from the build plate (as mine is always super sticky when hot)

This is the link to the OctoPrint plugin, which allows for the same
https://plugins.octoprint.org/plugins/bedcooldown/

There it is solved by monitoring the print, but as klipper_estimator creates such perfect estimations, one would know that layer beforehand.

Describe the solution you'd like

Identical to the OctoPrint Plugin, it would be perfect to have two additional fields for the configuration

  1. Print time left threshold [s] (Default = 300)
  2. Print completion threshold [%] (Default = 90)
  3. Cooldown temp [°C] (Default = 0)

After the klipper_estimator has run, the script knows the exact time which a print durates. Based on this time, the script would insert
M140 S<COOLDOWNTEMP>
when both conditions are met. The question is how to get the right position (maybe sum up times ?) or maybe cooperate with the maker of klipper_estimator? One would need a table with layer_num;progress;elapsed_time. Based on this and the total print duration the correct layer_num to insert can be identified and the GCODE can be implemented.

Describe alternatives you've considered

  1. slice Model in Cura
  2. see resulting layer count
  3. Calculate layer where to insert the bed cooldown, e.g. 45
  4. Insert Post Processing Plugin 'Search and Replace'
    Search: ;LAYER:(45)
    Replace: ;LAYER:(45)\nM140 S0

Additional information

I would REALLY REALLY love this (and my friends as well)

klipper-preprocessor does not appear in "add a script" list

What happened

Placed the file in the script folder but get nothing in the add a script list in Cura 5.3.0

What did you expect to happen

Expected the script to appear in the post processing script list as per instructions.

How to reproduce

install cura 5.3.0 add KlipperPreprocessor.py to scripts folder.

Additional information

No response

Object cancelation doesn't properly recognize and label groups.

What happened

In Cura......

I have some groups/assemblies. If I want to cancel one ideally it should show as a single 'object' for cancelation, but this doesn't happen. With 4 groups I end up with 7 objects.

Also, none of the objects takes the name of the group in cura ( i.e. 'group 1'), instead the object names are based on the name of the file ( object_file name_i, object_file name_i+1, object_file name_i+2) , making it even harder to identify what I would like to cancel.

Finally, the groups all show as overlapping polygons in mainsail making it impossible to identify and cancel the relevant group/object.

What did you expect to happen

Objects based on grouping, with the object name matching that of the group in the cura object list.

How to reproduce

Group a few things, slice and cancel.

Additional information

Hi Pedro, I know your script only routes to the the cancelation preprocessor. But I thought maybe I should raise the issue with you first. I imagine this is likely an issue that must be fixed with the cancelation preprocessor exe?

Error with SET_PRINT_STATS_INFO

What happened

Goodnight. I don't really know if this is a bug, but anything (if it does), move it to the correct place.
I installed the plugin and, when I activate SET_PRINT_STATS_INFO, the printer does the entire heating and leveling process, however, when it starts printing, the Klipper console returns an error saying: !! Error on 'SET_PRINT_STATS_INFO_BASE CURRENT_LAYER=-4': CURRENT_LAYER must have minimum of 0
I went to check gcode and noticed that the first layers are numbered starting with ;LAYER:-6
SET_PRINT_STATS_INFO CURRENT_LAYER=-5
Is it my mistake?
Anyway, thanks for the help...

image

What did you expect to happen

Just let the printing begin... xD

How to reproduce

I just installed the plugin and in the EXTENSIONS >> POST PROCESSING >> MODIFY G-CODE menu, I enabled Klipper PreProcessor v1.2.2 and checked the Add SET_PRINT_STATS_INFO option. All other options are disabled.

image

Additional information

CE3S1_Townsfolke_Woman.zip

Here is the g-code it is generating.

Enabling Preprocessor causes 'max_extrude_only_distance' error

What happened

When I use the Klipper Preprossesor, I get an error after print mesh is complete:

Extrude only move too long (-647.247mm vs 500.000mm)
See the 'max_extrude_only_distance' config option for detailsPreprocessor

What did you expect to happen

The print to start.

How to reproduce

Enable Klipper Preprossesor in Cura, activating TIMELAPSE_TAKE_FRAME and SET_PRINT_STATS_INFO, slice, then upload to klipper. Start print, run Bed Mesh. After Bed Mesh state has been saved to profile, the error occurs.

Additional information

image
image

Possible to add total filament usage to script?

Is your feature request related to a problem? Please describe

Yes, when wanting to switch a spool that will be running out it is nice to be able to plan the pause for a number of reasons. Knowing when to pause requires (for me) knowing how much of the cumulative filament has been used up, at each layer. Currently Cura doesn't provide this info.

Describe the solution you'd like

A simple comment at the end of each layer saying how much cumulative filament has been used. The comment should be unique so it is searchable.

Describe alternatives you've considered

Adding it with a spread sheet. echh.

Additional information

The new Pause @ layer functionality is fantastic. I was discussing with the developers at mainsail if it was possible to delay the pause until the infill section of that layer.

Please see the brief discussion.
mainsail-crew/mainsail#1283

Maybe it would be a possible option that could be integrated into the preprocessor rather than klipper/mainsail.

Thanks for your work!!!

Klipper preprocessor makes saving/uploading from Cura extremely slow on larger files

What happened

I am running Klipper preprocessor with klipper_estimator and "add SET_PRINT_STATS_INFO" enabled. While smaller files (with slicer time estimate of about 1h) the plugin works as expected, the time required by the plugin increases exponentially, when a larger object is sliced (and one can notice that CPU becomes very busy). For moderately sized object the delay might be 1-5 minutes, but for larger files the time becomes unbearable.

For example a file "ap1.stl" from https://www.thingiverse.com/thing:3063072/files, the plugin did not complete within an hour. Using klipper_estimator separately on the same stl file takes about 1 second.

I am using Cura 5.2.1 under Ubuntu 20.04.

What did you expect to happen

The plugin would handle the file within couple of seconds.

How to reproduce

For example a file "ap1.stl" from https://www.thingiverse.com/thing:3063072/files, the plugin did not complete within an hour. Using klipper_estimator separately on the same stl file takes about 1 second.

Additional information

No response

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.