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

Include the Z height along with the Layer # in the "preview-slider" text box. #7576

Open
GregValiant opened this issue Apr 23, 2020 · 26 comments
Labels
Status: Deferred We don't have time to work on this for now but intend to in the future. Status: Triage This ticket requires input from someone of the Cura team Type: New Feature Adding some entirely new functionality.

Comments

@GregValiant
Copy link
Collaborator

My printer displays the Z height. Cura displays the layer number. When editing Gcode it would be nice to have the Z height displayed along with the Layer number in the little text box at the top of the preview slider. It would also be nice if the layer number in Cura was the same as the layer number in the Gcode file that Cura generates. Right now Gcode layers start at "0" and Cura layers start at "1".

@GregValiant GregValiant added the Type: New Feature Adding some entirely new functionality. label Apr 23, 2020
@mahtDFR
Copy link
Contributor

mahtDFR commented Apr 28, 2020

Nice idea. We don't have time to do it though, so it's deferred.

@mahtDFR mahtDFR closed this as completed Apr 28, 2020
@mahtDFR mahtDFR reopened this Apr 28, 2020
@mahtDFR mahtDFR added the Status: Deferred We don't have time to work on this for now but intend to in the future. label Apr 28, 2020
@louiswouters
Copy link
Contributor

@GregValiant I wrote a couple of PostProcessing plugins that will help you. Get them here.
One script increase the layer numbers in the G-Code file by 1 so that they match up with the layers in cura.
Another adds the layer number to the screen of your printer.

@GregValiant
Copy link
Collaborator Author

GregValiant commented Jun 11, 2020 via email

@mahtDFR
Copy link
Contributor

mahtDFR commented Jun 12, 2020

Check out the readme on that repo, it explains what you need to do.

You'll need to drop the scripts in your Cura installation folder, something like C://Program Files/Ultimaker Cura X.X/plugins/PostProcessingPlugin/scripts

Restart Cura and the script will be available to use.

@GregValiant
Copy link
Collaborator Author

GregValiant commented Jun 12, 2020 via email

@GregValiant
Copy link
Collaborator Author

GregValiant commented Jun 13, 2020 via email

@louiswouters
Copy link
Contributor

@GregValiant Interesting. I played around with this a bit and here's my finding. When opening GCode with Cura, the order of the file doesn't seem to matter. So when you would reverse all layers manually. Cura's preview would look normal. However, your 3D printer will start with the top layer, thus printing in midair. I even tried renaming a single layer, ;LAYER:8 -> ;LAYER:18. This would cause the preview to have an empty layer 9, then at layer 19 it will show that the 9th and 19th layer are printed one after the other. The 3D print would be fine though.

@GregValiant
Copy link
Collaborator Author

GregValiant commented Jun 14, 2020 via email

@louiswouters
Copy link
Contributor

Yes, you are completely right

@Ghostkeeper
Copy link
Collaborator

When the Gcode file is created it
has layers 1 thru 100.

This is where it's going wrong then. The g-code file should start counting from 0. Unless there's a raft involved. Then it starts at a negative number.

I'm not getting the same result as you though. Here's a snippet from the start of a g-code file:

...
G1 F1500 E-6.5
;LAYER_COUNT:98
;LAYER:0
M107
M204 S625
M205 X6 Y6
G1 F600 Z2.27
G0 F4285.7 X106.44 Y97.765 Z2.27
M204 S500
M205 X5 Y5
;TYPE:SKIRT
G1 F600 Z0.27
G1 F1500 E0
G1 F1200 X106.977 Y97.25 E0.01323
G1 X107.566 Y96.795 E0.02646
... (continue printing brim)

@Ghostkeeper
Copy link
Collaborator

I'd expect Cura's layer view to be irrespective of layer number comments. It should be able to read g-code generated by other slicers too, after all. Not sure if/how that works though; I haven't been involved much in that part of the code.

@louiswouters
Copy link
Contributor

@Ghostkeeper

When the Gcode file is created it
has layers 1 thru 100.

This is where it's going wrong then. The g-code file should start counting from 0. Unless there's a raft involved. Then it starts at a negative number.

I'm not getting the same result as you though.

That is with the postProcessingPlugin "StartLayerNumberingAt1".
It adjusts those comments in the g-code file to match the layer counter in Cura's preview
Apparently, Cura relies on these special codewords ";LAYER:X" so it messes up the preview when the Gcode is loaded back into cura.

@GregValiant
Copy link
Collaborator Author

GregValiant commented Jun 18, 2020 via email

@Ghostkeeper
Copy link
Collaborator

This is in regards to the "StartLayerNumberingAt1" plugin.

There is no such plug-in or post-processing script in Cura.

@louiswouters
Copy link
Contributor

This is in regards to the "StartLayerNumberingAt1" plugin.

There is no such plug-in or post-processing script in Cura.

It's a postProcessing script I made. find code here. All it does is increase every number after ";LAYER:" by 1 but it seems to mess up the preview in Cura if you load the Gcode back in.

@jrmoserbaltimore
Copy link

Indicating the layer number next to the printing % gives users a spatial sense of where the print is. This is a quick fix: a really nice and complete approach would immediately move to the correct layer in the Preview window and advance the print simulation to that point, but of course the preview pane isn't tied to the print job and, besides, that would be a heroic effort.

In general, print % has been a rather useless metric versus layer n of x.

@reibuehl
Copy link
Contributor

Would it be possible to have the mm value just as a popup when hoovering over the layer count display in preview?

@mkoic-gh
Copy link

The Adaptive Layers feature makes it more important than ever to be able to see exactly how z-height in mm corresponds to layer. I’d love to see this request implemented.

@moebis
Copy link

moebis commented May 6, 2021

I'll throw my hat in the ring, we really need this feature in Cura please. It should be a simply calculation for each layer. What height am I at?

@hockeyguy820
Copy link

I was interested in having this feature so I implemented it myself in the Cura Python and QML code. My unofficial patch adds the layer's height in mm to the layer slider, underneath the layer number. The text file of the patch can be downloaded here:
https://drive.google.com/file/d/1jhxR0Qp3Jrdocv4LTiclolvHdFscvVEU/view?usp=sharing

This patch is based on Cura 4.9.1, but I checked and it also applies cleanly to Cura 4.8.0, and probably will on top of other recent versions as well. You can apply it using the "patch" utility as follows, starting from the top level Cura folder which in Windows would be "C:\Program Files\Ultimaker Cura 4.9.1":
patch -p1 < cura_z_height_patch.txt
If you have Cura checked out using GIT, then you can apply the patch as a commit, as follows:
git am -3 cura_z_height_patch.txt

In addition to showing the Z height, you can also edit the height number to move the layer slider to the desired height, rounded up. I tested using rafts and adaptive layers, and everything seems to work properly. I am not a Cura developer so this patch is unofficial. I recommended backing up the 4 affected source files before applying the patch, just in case:
plugins/SimulationView/LayerSlider.qml
plugins/SimulationView/SimulationSliderLabel.qml
plugins/SimulationView/SimulationView.py
plugins/SimulationView/SimulationViewProxy.py

You can also reverse the patch using the -R option of the "patch" utility. If you have trouble applying the patch automatically, it's not very big so it only takes a few minutes to apply the patch manually by copy/pasting sections of the patch file using a text editor.

@reibuehl
Copy link
Contributor

Please create a pull request for your patch, @hockeyguy820 ! That would be very useful.

@github-actions
Copy link
Contributor

Hi 👋,
We are cleaning our list of issues to improve our focus.
This feature request seems to be older than a year, which is at least three major Cura releases ago.
It also received the label Deferred indicating that we did not have time to work on it back then and haven't found time to work on it since.

If this is still something that you think can improve how you and others use Cura, can you please leave a comment?
We will have a fresh set of eyes to look at it.

If it has been resolved or don't need it to be improved anymore, you don't have to do anything, and this issue will be automatically closed in 14 days.

@github-actions github-actions bot added the Status: Stale ⌛ This issue is over a year old. It might be obsolete or just needs a fresh set of eyes label Jun 29, 2023
@reibuehl
Copy link
Contributor

I think this is still a valid request and should be implemented.

@github-actions github-actions bot added Status: Triage This ticket requires input from someone of the Cura team and removed Status: Stale ⌛ This issue is over a year old. It might be obsolete or just needs a fresh set of eyes labels Jun 29, 2023
@GregValiant
Copy link
Collaborator Author

Me too.

@hgpt
Copy link

hgpt commented Aug 24, 2023

I also think this is a valid request and a basic feature to have: display layer height instead of layer number in Cura.

@shultays
Copy link

This would be very useful.

If I notice something weird while printing stuff, I want to check what sliced model looks like at that height/for that layer. My printer shows current height, cura slicer shows the layers using numbers, so hard to tell which layer exactly it is

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Deferred We don't have time to work on this for now but intend to in the future. Status: Triage This ticket requires input from someone of the Cura team Type: New Feature Adding some entirely new functionality.
Projects
None yet
Development

No branches or pull requests