OrcaSlicer icon indicating copy to clipboard operation
OrcaSlicer copied to clipboard

Wrong bed type identifier in machine start G-code for 0.4 profile

Open SchmartMaker opened this issue 3 months ago • 4 comments

Is there an existing issue for this problem?

  • [x] I have searched the existing issues

Snapmaker_Orca Version

2.3.5

Operating System (OS)

Windows

OS Version

Windows 11 Enterprise

Additional system information

N/A

Printer

Snapmaker U1

How to reproduce

  1. Edit the printer profile for "Snapmaker U1" in Snapmaker Orca.
  2. Select Snapmaker U1 (0.4 nozzle) in the topmost drowdown.
  3. Go to the Machine G-code tab.
  4. Navigate to the Machine start G-code textbox.
  5. Scroll to the line below "热床调平" that says {if curr_bed_type=="Smooth PEI Plate"}.
  6. I believe Smooth PEI Plate is not a valid identifier; I've selected all build plates and observed the generated G-code for the corresponding curr_bed_type, but there's only High Temp Plate (smooth), Textured PEI Plate (textured) and Graphic Effect Plate (graphic effect).
  7. Also note that all other conditional statements and 0.2, 0.6 and 0.8 nozzle profiles use the High Temp Plate identifier instead of Smooth PEI Plate.
  8. The consequence is that BED_MESH_CALIBRATE macro is not executed with the intended Z_OFFSET.

Actual results

When starting a print, the macro with arguments BED_MESH_CALIBRATE PROBE_COUNT=11,11 is executed when starting a print instead of the macro BED_MESH_CALIBRATE PROBE_COUNT=11,11 Z_OFFSET=-0.07. I believe this might be why my first layer is too high on my smooth PEI plate, while it's perfect on my textured PEI plate.

Expected results

When starting a print, the macro with arguments BED_MESH_CALIBRATE PROBE_COUNT=11,11 Z_OFFSET=-0.07 should execute. I expect a first layer with a good enough squish, but this is not the case consistently, and I think this might be related to the described phenomenon.

Project file & Debug log uploads

This is not applicable. The issue can be reproduced from any standard Snapmaker Orca installation.

The Snapmaker U1 0.4 profile can found on Github here:

https://github.com/Snapmaker/OrcaSlicer/blob/main/resources/profiles/Snapmaker/machine/Snapmaker%20U1%20(0.4%20nozzle).json

SchmartMaker avatar Aug 28 '26 21:08 SchmartMaker

Still present on main (5638e55, 2026-10-20) and now in all four U1 nozzle profiles (0.2/0.4/0.6/0.8): the homing branch tests "High Temp Plate" but the mesh branch tests "Smooth PEI Plate", which is only the U1 UI label (enum_labels_u1), never the serialized value, so that branch is dead. Seen in Snapmaker Orca 2.4.0 G-code: High Temp Plate jobs get G28 Z Z_OFFSET -0.07 and a plain BED_MESH_CALIBRATE PROBE_COUNT=11,11. One data point on the effect: on my U1, adding Z_OFFSET=-0.05 to the mesh command by hand left the mesh centre within 0.003 mm and the printed first layer unchanged, so the fix may not change the printed height on its own. (Drafted with an AI agent from my notes.)

monsterlag avatar Oct 21 '26 22:10 monsterlag

Since #1128 (merged 2026-10-30), the U1 profiles live in Snapmaker/snapmaker-profiles. The bug is still there in release 02.03.06.00, in all four U1 nozzle profiles. I've opened a one-line fix there: Snapmaker/snapmaker-profiles#2.

Two notes on what the fix will do, from reading the U1 firmware (homing_xyz_override.py, probe_inductance_coil.py and bed_mesh.py under klippy/extras/):

  • It raises the first layer on smooth PEI by 0.02 mm, rather than adding squish. Z_OFFSET replaces the probe's configured z_offset (−0.05 under [inductance_coil extruder]), and bed_mesh.py stores each point as probed Z minus that offset. So −0.07 makes the mesh and nozzle 0.02 mm higher than −0.05. A first layer that's too high on smooth PEI must have some other cause.
  • It only matters with auto bed leveling on. With it off, the firmware skips BED_MESH_CALIBRATE during a print ("print_task_config configuration does not do auto-leveling"), and the homing branch, which already works, sets the height. With it on, the mesh is re-probed after homing and isn't zero-referenced, so the homing offset cancels out and only the mesh offset counts.

On the earlier comment: adding Z_OFFSET=-0.05 to the mesh command by hand wouldn't change anything, because −0.05 is already the probe's default. The fix's effect would show up with -0.07.

kamalmostafa avatar Nov 04 '26 04:11 kamalmostafa

Root cause confirmed: the bed-mesh-calibrate section of the U1 start G-code tests {if curr_bed_type=="Smooth PEI Plate"}, but "Smooth PEI Plate" is not a valid bed-type name — the canonical name is "High Temp Plate" — so the condition can never be true and the smooth plate never gets the Z_OFFSET=-0.07 mesh calibration. In v2.4.1 all four U1 profiles have the same wrong line, not just 0.4.

Fix: Smooth PEI Plate → High Temp Plate in the bed-mesh conditional of all four presets (preset change, no C++).

PR: https://github.com/Snapmaker/OrcaSlicer/pull/1196

creat3dworld avatar Nov 14 '26 05:11 creat3dworld

Update: this is already fixed where the presets now live. The U1 presets moved out of this repo into the Profiles submodule (OrcaSlicer#1128, Snapmaker/snapmaker-profiles), and in that repo the bed-mesh conditional in all four U1 presets already reads "High Temp Plate" — no "Smooth PEI Plate" remains. I had opened PR #1196 against v2.4.1, but the files it touches no longer exist on main, so I closed it. No action needed — the fix is already in the profiles repo.

creat3dworld avatar Nov 14 '26 05:11 creat3dworld