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

G-code Viewer do not render "Tools" changes (in v2.5.0 or v2.4.? but was ok in v2.3.2 ...) #8467

Closed
2 tasks done
PPAC37 opened this issue Jul 6, 2022 · 4 comments
Closed
2 tasks done

Comments

@PPAC37
Copy link

PPAC37 commented Jul 6, 2022

Description of the bug

from v2.4.?, the same .gcode (with a dual extrusion ( T0 , T1 ) ) do not rendrer tools changes.

in v2.3.2 (ok, as you can see two diffrent tools)
image png 1e97b5a6ae0c577f04b21d6a947fbd82

but in v2.5.0-alpha2 and other v2.4.x i try ( not ok only one tool ... but this is the same .gcode file )
image png ad7cb676f1450f4292ae68b12a4beb43

( maybe related to #7548 and or #8324 but I speak without knowing. )

Project file & How to reproduce

.gcode file used dual.zip

Checklist of files included above

  • Project file
  • Screenshot

Version of PrusaSlicer

2.5.0-alpha2+linux-x64-GTK3

Operating system

Ubuntu 20.04

Printer model

K8400

@Kachidoki2807
Copy link

Hi,
Reproduced under win64 using v2.3.0 (ok), and v2.4.2 (nok) and 2.5.0-alpha2 (nok).

I can also see weird things about the temperature, which seems more or less linked to this issue.
2022-07-07 083851

For instance, the current tool is T0, and M104 T1 S190 apply the new temperature setpoint to this tool (green part) which is wrong,, followed by M104 S185 (blue part) which apply to T0 too which is correct (no tool specified). Those M104 are probably for pre-heating T1 and cooldown T0 before the upcoming toolchange.

I suspect a mistake during the parsing of 'T'.

Thanks @PPAC37 for reporting this issue.

@lukasmatena
Copy link
Collaborator

Thanks for the report. it seems we really broke loading of external G-Codes. This G-Code is from Cura and the T1 toolchanges are currently dismissed as invalid in GCodeProcessor::process_T, because m_result.extruders_count is empty. I do not know when it broke, maybe in b3ca8cb or a similar change where the way of determining the number of used extruders changed. @enricoturri1966 will fix it.

@lukasmatena lukasmatena added the bug label Jul 8, 2022
@Kachidoki2807
Copy link

I had a look in GCodeProcessor::process_M104:

void GCodeProcessor::process_M104(const GCodeReader::GCodeLine& line)
{
    float new_temp;
    if (line.has_value('S', new_temp))
        m_extruder_temps[m_extruder_id] = new_temp;
}

'T' parameter is not processed. It is purely ignored, and the temperature is applied to the current m_extruder_id. That explains the issue regarding the temperature.

It is unrelated to the OP issue (which is the result of the empty m_result.extruders_count), sorry for my bad assumption, even though this was really a second issue.

@kubispe1
Copy link
Collaborator

In 2.6.0 G-Code preview is fixed also parsing of G-Code M104 works. Tool should render by now and temperature should be also fine. I am closing the issue.
image
image

mmalecki pushed a commit to mmalecki/PrusaSlicer that referenced this issue Feb 1, 2023
…gcode produced by other slicers, by adding missing default values
mmalecki pushed a commit to mmalecki/PrusaSlicer that referenced this issue Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants