Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display Popup Window with Estimate after Slicing/Export / Possible bug in layer time output #48

Closed
MKloberg opened this issue Nov 10, 2023 · 1 comment

Comments

@MKloberg
Copy link

I'm currently doing speed Benchies and your simulator has been super insightful in understanding what is going on in terms of flow and estimating the total time it will take to print / where time is spent.
I'm using Orca and couldn't find a way to just pop-up a window with the estimate after slicing, look at it and make decisions based on what I'm seeing in terms of the additional data I'm getting now.

So I made this PowerShell wrapper that does exactly that. It practically avoids a lot of wasted filament and time, streamlining the workflow to a point that is near perfect, because one can avoid all this physical testing when changing this one thing the slicer that one thinks might make it go faster. We can simulate everything now! :-)
I had a lot of problems with spaces in file system paths while doing this, it fixes all that as well.

Feel free to release this along with the project, it works great and should work in all slicers I think.

Why this is an issue?
There seems to be a bug in the output of the simulator. I also wanted to capture the output and write it next to g-code file in addition to displaying it, so I can look at it later. This works but only up until the:
!!! Layer Time Distribution !!! is printed.
For some reason, no matter what I tried in PowerShell or simple CMD, as soon as you pipe the output into a file, it hangs up the process at that very point.
I suspect there is a stream, or a pipe not being closed properly in the layer time distribution output.
It works fine against a console, but as soon as you try to capture the output in any shape or form it hangs up on the last part being written.

Suggestions:
Either fix why this is happening or provide a switch that causes the layer time distribution to NOT print.
Some switches in general to control which sections are printing would be awesome in this use case, I personally don't care much about the layer distribution (which can be quite long and causes the pop up window to scroll up, having to scroll back to the top).

Hope this helps :-)
Mac

Run_Klipper_Estimator.zip

image

@dalegaard
Copy link
Collaborator

dalegaard commented Nov 11, 2023

Hi @MKloberg

I just released version 3.6.0, it has --omit-layer-times and --omit-move-kinds options to disable respectively the layer times and move kind distributions.

I believe the reason you were seeing the layer time distribution never finishing printing, is that there's some terminal-width-based formatting to print the layer times in columns for compactness. This probably doesn't work correctly in all cases. I don't want to mess too much with this stuff, I think if someone wants to use the output in their own tools they should probably be using the json output format instead.

Your script seems useful. If you make a Pull Request with the script put in the contrib/ folder, with an open source license in the header somewhere(I prefer MIT, but you can use whatever you want as long as it's open source), I'll merge it.

Best regards,
Lasse

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants