SoftFever / OrcaSlicer

G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, Creality, etc.)
https://discord.gg/P4VE9UY9gJ
GNU Affero General Public License v3.0
6.84k stars 805 forks source link

Add an override for Z Offset in build plate settings #5851

Open DarkDoldier opened 3 months ago

DarkDoldier commented 3 months ago

Is there an existing issue for this feature request?

Is your feature request related to a problem?

If changing build plates, the Z Offset might need to be different because I use a FR4 and a deep pei coated sheet. Currently, Z Offset is in the printer profile and aims to compensate for bad distance between nozzle and bed. This ignores the fact that the Z Offset often needs to be adapted. I have it Set up for the smooth plate. On the PEI plate I need constantly -0.120 for a good first layer / even adhesion.

Which printers will be beneficial to this feature?

Klipper

Describe the solution you'd like

A setting that sets a Klipper call for SET_GCODE_OFFSET Z=-0.120. That should be configurable in Printer Settings.

Describe alternatives you've considered

I tried it by putting a macro together.

In my orca start code I have:

PRINT_START EXTRUDER=[nozzle_temperature_initial_layer] BED=[bed_temperature_initial_layer_single] Chamber=[chamber_temperature] PRINT_MIN={first_layer_print_min[0]},{first_layer_print_min[1]} PRINT_MAX={first_layer_print_max[0]},{first_layer_print_max[1]} FILAMENT_TYPE="{filament_type[0]}" CURR_BED_TYPE="{curr_bed_type}"

That comes for example in a GCODE file:

PRINT_START EXTRUDER=225 BED=60 Chamber=0 PRINT_MIN=158.603,29.8189 PRINT_MAX=169.889,41.1043 FILAMENT_TYPE="PLA" CURR_BED_TYPE="Textured PEI Plate"

In my PRINT_START macro I have:

{% set CURR_BED_TYPE = params.CURR_BED_TYPE %}

Later on comes:

CONFIGURE_BED_OFFSET CURR_BED_TYPE="{CURR_BED_TYPE}"

And the macro looks like:

[gcode_macro CONFIGURE_BED_OFFSET]
gcode:
    {% set CURR_BED_TYPE = params.CURR_BED_TYPE %}

    {% if CURR_BED_TYPE == ['High Temp Plate'] %}
        SET_GCODE_OFFSET Z=0.0
    {% elif CURR_BED_TYPE == ['Textured PEI Plate'] %}
        SET_GCODE_OFFSET Z=-0.100
    {% else %}
        SET_GCODE_OFFSET Z=0.0
    {% endif %}

But I just can't get it running........... On several tries and changes it did nothing and print without the Z_OFFSET change wich results in having to do it manually and now with the config like it is above I get these error and the print just stops instantly:

Malformed command 'CONFIGURE_BED_OFFSET CURR_BED_TYPE=Textured PEI Plate' Malformed command 'CONFIGURE_BED_OFFSET CURR_BED_TYPE=Textured PEI Plate'

I just can't get it running.

Additional context

No response

kylek29 commented 3 months ago

I was going to post this as well. I think the build plate (bed type) system might need to evolve to be like the other systems, I was mapping it out last week. There's so many build plate options now that I have to calibrate for each one because they're all different, and my printer's (BBL X1C) method of calculating it during bed leveling is not that accurate with many.

From looking into the code, it seems to have in-code settings for:

Possibly a refinement would to remove these from the code (or set them as the default fallbacks) and put the plate configs into the presets so users can assign the available plates to their printers like they do filaments. The options available could be:

Offsets & Modifiers
DarkDoldier commented 3 months ago

I was able to get some of the things above to work via macro. I uploaded it as a repository.

github-actions[bot] commented 15 hours ago

Orca bot: this issue is stale because it has been open for 90 days with no activity.