Code Monkey home page Code Monkey logo

print_area_bed_mesh's Introduction

Print Area Bed Mesh

Description

  • This Klipper macro will create a bed mesh based on the size of your print.

Credit

Complete credit goes to ChipCE (https://gist.github.com/ChipCE/95fdbd3c2f3a064397f9610f915f7d02) for the idea and sample code. I completely rewrote the macro to be more dynamic and for some added features.

Features:

  • Reusable Bed Mesh - bed mesh will be reused if print area is smaller or equal to the previous one with ability to override
  • Easy To Add - Nothing to update in the script since the existing bltouch or probe offsets, existing bed_mesh min/max, probe_count values are used from printer.cfg
  • Seamless Bed Mesh Calibration - BED_MESH_CALIBRATE replaced with new script
  • Separate axis probe counts - if print area X or y is 50% than available area, probe_count for that axis is changed from the default to 3
  • Supports Bed Mesh Relative Reference Index - if "relative_reference_index" is set in bed_mesh, it will be reconfigured to use the middle point on the bed
  • Klicky Probe Compatible - Works with Klicky Probe on Voron

Disclaimer

This is currently in development. While it works on my 2 printers, it's impossible to account for everyone's various config. When first implementing this, be prepared to click the "Emergency Stop" button if it tries to probe off the bed.

Change Log

  • Combined klicky probe version with regular script
  • Added 20mm buffer to bed mesh
  • Fixed issue with bed mesh being skipped when current bed mesh is cleared
  • Fixed issue with offset expanding bed mesh area out of bounds

Setup

1. Download and install the macro

SSH into the Pi and run the following commands:

cd ~
git clone https://github.com/Turge08/print_area_bed_mesh.git
~/print_area_bed_mesh/install.sh

2. Include macro in your printer.cfg

Through Fluidd/Mainsail, edit printer.cfg file and add the following line at the top of your printer.cfg:

[include print_area_bed_mesh.cfg]

3. Update Moonraker for easy updating

From Fluidd/Mainsail, edit moonraker.conf (in the same folder as your printer.cfg file) and add:

[update_manager print_area_bed_mesh]
type: git_repo
path: ~/print_area_bed_mesh
origin: https://github.com/Turge08/print_area_bed_mesh.git
is_system_service: False

NOTE: You must perform step #1 at least once or Moonraker will generate an error.

4. Option 1 - Modify "start_print" macro in your printer.cfg

  • Where you normally perform a BED_MESH_CALIBRATE in your start_print macro, replace it (or add it if you didn't previously have it) with the following line:
    BED_MESH_CALIBRATE PRINT_MIN={params.PRINT_MIN} PRINT_MAX={params.PRINT_MAX}
  • If you want to force a new mesh every time, use the following syntax:
    BED_MESH_CALIBRATE PRINT_MIN={params.PRINT_MIN} PRINT_MAX={params.PRINT_MAX} FORCE_NEW_MESH=True
  • Modify your printer's start g-code in your slicer to include the PRINT_MIN and PRINT_MAX parameters:

Examples:

  • PrusaSlicer/SuperSlicer:
print_start EXTRUDER={first_layer_temperature[initial_extruder] + extruder_temperature_offset[initial_extruder]} BED=[first_layer_bed_temperature] 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]}
  • Cura (add this to your start gcode at the end of the start_print command:)
PRINT_MIN=%MINX%,%MINY% PRINT_MAX=%MAXX%,%MAXY%

*(Cura slicer plugin) To make the macro to work in Cura slicer, you need to install the post process plugin by frankbags - In cura menu Help -> Show configuration folder. - Copy the python script from the above link in to scripts folder. - Restart Cura - In cura menu Extensions -> Post processing and select Mesh Print Size

5. Option 2 - Modify your printer's start g-code in your slicer:

Examples:

  • PrusaSlicer/SuperSlicer:

    BED_MESH_CALIBRATE PRINT_MIN={first_layer_print_min[0]},{first_layer_print_min[1]} PRINT_MAX={first_layer_print_max[0]},{first_layer_print_max[1]}

  • Cura

    BED_MESH_CALIBRATE PRINT_MIN=%MINX%,%MINY% PRINT_MAX=%MAXX%,%MAXY%

  • IdeaMaker

    BED_MESH_CALIBRATE PRINT_MIN={print_pos_min_x},{print_pos_min_y} PRINT_MAX={print_pos_max_x},{print_pos_max_y}

  • BambuStudio/OrcaSlicer

    BED_MESH_CALIBRATE PRINT_MIN={first_layer_print_min[0]},{first_layer_print_min[1]} PRINT_MAX={first_layer_print_max[0]},{first_layer_print_max[1]}

print_area_bed_mesh's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

print_area_bed_mesh's Issues

Feature Request: Dynamic Bed Mesh Size eg 5x5 vs 3x3

For small size prints as the print surface is straighter we can use smaller number of points. And for large areas, where the unevenes is large we can use more thorough meshing.

So I propose we can setup a dynamic number of points for sizes. This will save significant time...

Feature request - Probe if previous mesh had different temp for the bed.

Personally, I get different warping of the bed depending on temperature (more be warping with ABS). Would be good to check if the previous mesh was at the same temp if different than probe again. Not sure if it would be easy to implement. (I've done it after writing this first part)

Not really sure how git hub works to just do a merge request.

I've updated mine so perhaps you can add it to the main branch

BED_TEMP used so the current Start macro does not have to be edited or changed just pass a new variable with the bed temp.

Edit: Still need to handle if variable is not passed at all

ADD:
variable_parameter_BED_TEMP: 0
variable_last_bed_temp: -1 ; Do not change

        { action_respond_info("Bed Temp: %s" % (params.BED_TEMP)) }
        { action_respond_info("Last Bed Temp: %s" % (last_bed_temp)) }

        {% set bed_temp= params.BED_TEMP %}


                SET_GCODE_VARIABLE MACRO=BED_MESH_CALIBRATE VARIABLE=last_bed_temp VALUE={bed_temp|int}

Change:
        {% if (params.FORCE_NEW_MESH != null) or (bed_temp|int != last_bed_temp|int) or (print_min_x|float < last_area_start_x|float) or (print_max_x|float > last_area_end_x|float) or (print_min_y|float < last_area_start_y|float) or (print_max_y|float > last_area_end_y|float)  %}

            { action_respond_info("No need to recreate Bed Mesh since it's same as current mesh or smaller and the bed temperature is the same") }
            
Change to klipper's printer.cfg
            BED_MESH_CALIBRATE PRINT_MIN={params.PRINT_MIN} PRINT_MAX={params.PRINT_MAX} BED_TEMP={params.BED_TEMP} 

edit:
Changed a few things as I thought it was working but the variables need to be all lower case now seems to work fine

Issue: bed_mesh: min/max points too close together when using "Complete Individual Objects"

image

16:16:26
bed_mesh: min/max points too close together
16:16:26
bed_mesh: min/max points too close together
16:16:26
bed_mesh: min/max points too close together
16:16:26
relative_reference_index: 12
16:16:26
probe_count: 5,5
16:16:26
mesh_max: 20.0645,20.0645
16:16:26
mesh_min: 25,25
16:16:26
print_max: 15.0645,15.0645
16:16:26
print_min: -14.7092,-14.7092
16:16:26
Last Bed Temp: -1
16:16:26
Bed Temp: 60.0
16:15:46
File selected
16:15:46
File opened:First layer calibration_3m_0.2mm_240C_PLA.gcode Size:63883

EUCLID PROBE

Euclid.zip

Hello I am using your Euclid probe. I am trying to configure my gcode and macro to run a certain mesh. Print bed mesh uses predetermined points instead of probing the whole bed. I cannot for the life of me understand how to put these two commands together. If someone would please look at my macro for Euclid. Thank you

Unknown command:"PRINT_MIN=109.378,100.38"

I tried installing this and I added
BED_MESH_CALIBRATE PRINT_MIN={params.PRINT_MIN} PRINT_MAX={params.PRINT_MAX} FORCE_NEW_MESH=True to my start macro and set my orcaslicer start gcode to
M104 S0 ; Stops PrusaSlicer from sending temp waits separately M140 S0 PRINT_START EXTRUDER=[nozzle_temperature_initial_layer] BED=[bed_temperature_initial_layer_single] PRINT_MIN={first_layer_print_min[0]},{first_layer_print_min[1]} PRINT_MAX={first_layer_print_max[0]},{first_layer_print_max[1]}
to pass the file parameters but klipper doesn't recognize the print_min as part of the bed_mesh_calibrate, I'm using a klicky as a probe, any idea on how to fix this?

probe unable to rack in dock after failed z tilt

i use my probe as Z i have a slight issue. im using the euclid as a probe. when i z tilt and it fails i have no way of racking the probe. can i change preflight path or do i need to use a force move ? after failing and rehoming the probe hits the dock and falls off rendering it unable to probe again

Probing a small area front left of the bed. PRINT_MIN/MAX issue.

Getting a problem with a small patch on the front left of the bed. Using SuperSlicer.

15:52:52 
// print_min: -34.0422,-39.6127
15:52:52 
// print_max: 34.0422,34.0422
15:52:52 
// mesh_min: 25,25
15:52:52 
// mesh_max: 54.0422,54.0422
15:52:52 
// probe_count: 5,5
15:52:52 
// relative_reference_index: 12
15:52:52 
// Generating new points...
15:52:52 
// bed_mesh: generated points
// Index | Tool Adjusted | Probe

image

Bed Mesh ignores BlTouch x&y offset

So I've got it all set up and it does everything right(it probes an area about the size of the print) but it completely
ignores my bltouch offsets.

Any ideas?

Klipper allows a scalar to be used as the Bed_Mesh probe count - causes undefined error

Klipper allows the use of a scalar AND the use of a pair for the mesh. Example:

[bed_mesh]
probe_count: 5

From the Klipper docs:
"The number of points to probe on each axis, specified as x,y integer values. In this example 5 points will be probed along the X axis, with 3 points along the Y axis, for a total of 15 probed points. Note that if you wanted a square grid, for example 3x3, this could be specified as a single integer value that is used for both axes, ie probe_count: 3. Note that a mesh requires a minimum probe_count of 3 along each axis."

This causes an:
"Error evaluating 'gcode_macro BED_MESH_CALIBRATE:gcode': UndefinedError: list object has no element 1"

The fix is here:
Replace this line:
{% set probe_count_y = bedMeshConfig.probe_count.split(",")[1]|int %}

With this line:

{% if bedMeshConfig.probe_count.split(",")[1] is defined %}
    {% set probe_count_y = bedMeshConfig.probe_count.split(",")[1]|int %}
{% else %}
    {% set probe_count_y = probe_count_x %}
{% endif %}

The X portion works fine, but we need to check to see if the Y portion is undefined, if so, then set probe_count_y equal to probe_count_x.

Move out of range

Generating Bed_Mesh I'm getting negative values! When using your macro.

14:11:57
Move out of range: 32.000 -2.372 8.000 [0.000]
14:11:57
Move out of range: 32.000 -2.372 8.000 [0.000]
14:11:57
Move out of range: 32.000 -2.372 8.000 [0.000]
14:11:57
bed_mesh: relative_reference_index 17 is (318.00, 145.29)
14:11:57
35 | (32.0, 309.3) | (32.0, 332.3)
14:11:57
34 | (89.2, 309.3) | (89.2, 332.3)
14:11:57
33 | (146.4, 309.3) | (146.4, 332.3)
14:11:57
32 | (203.6, 309.3) | (203.6, 332.3)
14:11:57
31 | (260.8, 309.3) | (260.8, 332.3)
14:11:57
30 | (318.0, 309.3) | (318.0, 332.3)
14:11:57
29 | (318.0, 246.9) | (318.0, 269.9)
14:11:57
28 | (260.8, 246.9) | (260.8, 269.9)
14:11:57
27 | (203.6, 246.9) | (203.6, 269.9)
14:11:57
26 | (146.4, 246.9) | (146.4, 269.9)
14:11:57
25 | (89.2, 246.9) | (89.2, 269.9)
14:11:57
24 | (32.0, 246.9) | (32.0, 269.9)
14:11:57
23 | (32.0, 184.6) | (32.0, 207.6)
14:11:56
22 | (89.2, 184.6) | (89.2, 207.6)
14:11:56
21 | (146.4, 184.6) | (146.4, 207.6)
14:11:56
20 | (203.6, 184.6) | (203.6, 207.6)
14:11:56
19 | (260.8, 184.6) | (260.8, 207.6)
14:11:56
18 | (318.0, 184.6) | (318.0, 207.6)
14:11:56
17 | (318.0, 122.3) | (318.0, 145.3)
14:11:56
16 | (260.8, 122.3) | (260.8, 145.3)
14:11:56
15 | (203.6, 122.3) | (203.6, 145.3)
14:11:56
14 | (146.4, 122.3) | (146.4, 145.3)
14:11:56
13 | (89.2, 122.3) | (89.2, 145.3)
14:11:56
12 | (32.0, 122.3) | (32.0, 145.3)
14:11:56
11 | (32.0, 60.0) | (32.0, 83.0)
14:11:56
10 | (89.2, 60.0) | (89.2, 83.0)
14:11:56
9 | (146.4, 60.0) | (146.4, 83.0)
14:11:56
8 | (203.6, 60.0) | (203.6, 83.0)
14:11:56
7 | (260.8, 60.0) | (260.8, 83.0)
14:11:56
6 | (318.0, 60.0) | (318.0, 83.0)
14:11:56
5 | (318.0, -2.4) | (318.0, 20.6)
14:11:55
4 | (260.8, -2.4) | (260.8, 20.6)
14:11:55
3 | (203.6, -2.4) | (203.6, 20.6)
14:11:55
2 | (146.4, -2.4) | (146.4, 20.6)
14:11:55
1 | (89.2, -2.4) | (89.2, 20.6)
14:11:55
0 | (32.0, -2.4) | (32.0, 20.6)
14:11:55
bed_mesh: generated points
Index | Tool Adjusted | Probe
14:11:55
Generating new points...

[gcode_macro PRINT_START]
variable_parameter_PRINT_MIN : 0,0
variable_parameter_PRINT_MAX : 0,0
gcode =
{% set BED = params.BED|default(60)|float %}
{% set EXTRUDER = params.EXTRUDER|default(190)|float %}
{% set CHAMBER = params.CHAMBER|default(60)|float %}
G90 ; Absolute coordinates
SET_GCODE_OFFSET Z=0.0 ; Reset the G-Code Z offset (adjust Z offset if needed)
BED_MESH_CLEAR ; Clear the Bed_Mesh
CG28 ; initial home
PARK ; move head out of bed heat, but prep for qgl
M140 S{BED} ; Start Heating Bed
M117 Heating Bed...
M190 S{BED} ; Wait for the Bed to Heat Up
;M117 Waiting for Chamber Temp of {CHAMBER}C
;TEMPERATURE_WAIT SENSOR="temperature_fan chamber_fan" MINIMUM={CHAMBER_TEMP}
;NOZZLE_CLEAN ; Clean Nozzle
G32 ; Home and QGL before Bed Mesh
BED_MESH_CALIBRATE PRINT_MIN={params.PRINT_MIN} PRINT_MAX={params.PRINT_MAX}
PARK ; Park and wait for Extruder
M104 S{EXTRUDER}
M117 Heating Extruder...
M109 S{EXTRUDER} ; set and wait for nozzle temp
PRIME_LINE ; Purge Line
G92 E0 ; Reset Extruder
M83 ; use relative distances for extruder
UPDATE_DELAYED_GCODE ID=clear_display DURATION=10

Euclid Probe

Love that this includes the configs for Klicky, any future support for Euclid or tips on how to use that instead? Is it as easy as replacing "Klicky" commands with new ones?

Printing without a MESH if cleared

My cancel and end print have BED_MESH_CLEAR. Once it's cleared and a new print starts it says the mesh is the same size or smaller but it's not showing the MESH.

bed_mesh: invalid probe_count option

bed_mesh: invalid probe_count option when using bicubic interpolation. Combination of 3 points on one axis with more than 6 on another is not permitted. Configured Probe Count: 9, 3

How can i solve this?

Follow all of ur steps but of i Print Something rectangle it Ends in this Error Code

Didn't worked in Orca Slicer at first PRINT_MIN > AREA_START

I was using it with Cura without a problem but a had to migrate to Orca Slicer (day and night difference) and it didn`t work anymore.

In the setup guide, it is sugested to use:

BED_MESH_CALIBRATE PRINT_MIN={first_layer_print_min[0]},{first_layer_print_min[1]} PRINT_MAX={first_layer_print_max[0]},{first_layer_print_max[1]}
For BambuStudio/OrcaSlicer. But for it to work for me I had to change P{RINT_MIN and PRINT_MAX to AREA_START and AREA_END respectively:

BED_MESH_CALIBRATE AREA_START={first_layer_print_min[0]},{first_layer_print_min[1]} AREA_END={first_layer_print_max[0]},{first_layer_print_max[1]}

I may have done something wrongly tough...

The reuse function is not working at all

I have printed now several pieces on the same bed area and same size and the bed mesh was allways regathered.
So my doubt when studying your code is either the coords are not stored appropriate (i have your macro stored in a subfolder within the config-folder) or the coords are too detailed (see given example) that the comparison is not working at all.
My doubt is that the coords are not stored between each print.

PRINT_START EXTRUDER=220 BED=60 PRINT_MIN=114.967,118.382 PRINT_MAX=181.378,160.406

this is what my console is saying after each leveling
image

As my next file i print with this parameters and bed mesh was redone again, which for may view is not necessary at all if the area around the print is big enough calculated for the bed mesh.
PRINT_START EXTRUDER=220 BED=60 PRINT_MIN=109.307,116.49 PRINT_MAX=180.462,192.991

No longer using old mesh

Hi, I have noticed since the last update that the bed mesh is being done every time I call the macro regardless of the fact that the mesh size is exactly the same as previously. When looking at the macro there seems to be a whole section missing with this functionality. The "force" option is no longer available and I guess no longer needed if it is going to do the bed mesh every time.
I am often finding myself having to restart a print so the nozzle and bed are up to temperature but I still have to wait for the bed mesh to be done.
Can this code be replaced into the current version or do I have to roll back to the old version that I didn't realise I had a problem with?

Thanks

Tony

Move out of range

Hello there!

I also have a problem with move out of range on a large print (that covers most of the 308x303 print area) - I get

// print_min: 5.60788,5.60788
// print_max: 302.392,302.392
// mesh_min: -0.89212,-0.89212
// mesh_max: 293.392,308.892

Move out of range: 322.348 12.608 3.000 [0.000]

I'm using 7x7 mesh grid:

[bed_mesh]
speed: 900
horizontal_move_z: 3
mesh_min: 6,11
mesh_max: 286,294
probe_count: 7,7
fade_start: 1.0
fade_end: 10.0
mesh_pps: 2,2
algorithm: bicubic
bicubic_tension: .2

Can't install the macro through PuTTY

image
I ran the commands from step 1 after SSH'ing into my pi, but it keeps giving me this error when I trying running ~/print_area_bed_mesh/install.sh

TypeError: unsupported operand type(s) for -: 'str' and 'int'

Followed the instructions. Getting the following error.

14:55:56 
File opened:toolbox-4_1h32m_0.2mm_235C_PLA.gcode Size:722883
14:55:56 
File selected
14:56:41 
// print_min: 70.9073,54.9073
14:56:41 
// print_max: 159.093,159.093
14:56:41 
// mesh_min: 50.9073,34.9073
14:56:41 
// mesh_max: 179.093,179.093
14:56:41 
// probe_count: 3, 7
14:56:41 
!! Error evaluating 'gcode_macro BED_MESH_CALIBRATE:gcode': TypeError: unsupported operand type(s) for -: 'str' and 'int'
14:56:41 
!! Error evaluating 'gcode_macro BED_MESH_CALIBRATE:gcode': TypeError: unsupported operand type(s) for -: 'str' and 'int'

Also removed variable_parameter_PRINT_MIN : 0,0 and variable_parameter_PRINT_MAX : 0,0 as they exist in the config are they needed in the START_PRINT macro?
Result with and without are as above.

Won't work. But ChipCE code does.

I can not seem to get this to work. Although the original by ChipCE does work. I am also using Orca Slicer and not sure what to use for it. Not sure what else to say or upload. Thanks

PrusaSlicer start code wrong?

I just noticed that your suggested Prusaslicer start code is:

print_start EXTRUDER={first_layer_temperature[initial_extruder] + extruder_temperature_offset[initial_extruder]} BED=[first_layer_bed_temperature] 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[0]}

The PRINT_MAX array is using the same value two times and I think the second item should be {first_layer_print_max[1]} ?

Do I need to delete the bed mesh section in Klicky Probe?

Hi there,

Doesnt seem to pass the variables or its getting cleared. I followed your guide its still bed meshing the whole build plate.

Do you think the below in the klicky probe macro is interfering with your macro?

Thanks,

Bed Mesh Calibrate

[bed_mesh]

[gcode_macro BED_MESH_CALIBRATE]
rename_existing: _BED_MESH_CALIBRATE
description: Perform Mesh Bed Leveling with klicky automount
gcode:

{% set V = printer["gcode_macro _User_Variables"].verbose %}
{% if V %}
    { action_respond_info("Bed Mesh Calibrate") }
{% endif %}

_CheckProbe action=query
Attach_Probe

_BED_MESH_CALIBRATE {% for p in params
       %}{'%s=%s ' % (p, params[p])}{%
      endfor %}

Dock_Probe

Consider bed temperature when deciding if new mesh should be created or not

When deciding if new mesh should be created, Script should consider first layer temperature in addition to print size to decide if new mesh should be created or not.

Because bed is warping differently on different temperatures, mesh could be very different on 50°C or 90°C. Right now when I print one thing with PLA, my mesh is created on 60°C bed temperature, but when I swap filament to PETG and print the same thing, script decides that the mesh is the same size and skips bed leveling, but my bed temperature for PETG is 85°C and mesh is very different from 60°C one.

Mesh not right? Issue?

Have a look at this area that has been probed. The move is in the centre of the bed. The size looks fine but the mesh itself looks to be to the back right

image

Looks like mesurmet is in the nozzle position

im using macro for mesuring only on print area. The only problem is that it mesure from nozzler distance not sensor so all mesurments are way off. What can i change to fix that?
it shoud mesure in the middle of the bed. The print itself is printing in the middle of the bed so thats not offset problem

File opened:ender3/corner_heatbed-cable-cover-clip-Standard_PIF-Standard_ABS_PIF.gcode Size:1769350
17:26:27
File selected
17:27:00
Hyperlapse: frames started (Cycle 30 sec)
17:27:00
print_min: 40.6353,23.9347
17:27:00
print_max: 79.6818,86.8414
17:27:00
last_bed_mesh: 90.4841,82.2341 129.531,145.141
17:27:00
mesh_min: 35.6353,30.0
17:27:00
mesh_max: 84.6818,91.8414
17:27:00
probe_count: 5,5
17:27:01
Generating new points...
17:27:01
bed_mesh: generated points
Index | Tool Adjusted | Probe
17:27:01
0 | (31.9, 20.8) | (35.6, 30.0)
17:27:01
1 | (44.2, 20.8) | (47.9, 30.0)
17:27:01
2 | (56.4, 20.8) | (60.2, 30.0)
17:27:01
3 | (68.7, 20.8) | (72.4, 30.0)
17:27:01
4 | (81.0, 20.8) | (84.7, 30.0)
17:27:01
5 | (81.0, 36.2) | (84.7, 45.5)
17:27:02
6 | (68.7, 36.2) | (72.4, 45.5)
17:27:02
7 | (56.4, 36.2) | (60.2, 45.5)
17:27:02
8 | (44.2, 36.2) | (47.9, 45.5)
17:27:02
9 | (31.9, 36.2) | (35.6, 45.5)
17:27:02
10 | (31.9, 51.7) | (35.6, 60.9)
17:27:02
11 | (44.2, 51.7) | (47.9, 60.9)
17:27:02
12 | (56.4, 51.7) | (60.2, 60.9)
17:27:02
13 | (68.7, 51.7) | (72.4, 60.9)
17:27:02
14 | (81.0, 51.7) | (84.7, 60.9)
17:27:03
15 | (81.0, 67.1) | (84.7, 76.4)
17:27:03
16 | (68.7, 67.1) | (72.4, 76.4)
17:27:03
17 | (56.4, 67.1) | (60.2, 76.4)
17:27:03
18 | (44.2, 67.1) | (47.9, 76.4)
17:27:03
19 | (31.9, 67.1) | (35.6, 76.4)
17:27:03
20 | (31.9, 82.6) | (35.6, 91.8)
17:27:03
21 | (44.2, 82.6) | (47.9, 91.8)
17:27:03
22 | (56.4, 82.6) | (60.2, 91.8)
17:27:03
23 | (68.7, 82.6) | (72.4, 91.8)
17:27:04
24 | (81.0, 82.6) | (84.7, 91.8)
17:27:05
probe at 31.919,20.750 is z=2.990500
17:27:05
probe at 31.919,20.750 is z=2.990500
17:27:09
probe at 44.190,20.750 is z=2.970500
17:27:10
probe at 44.190,20.750 is z=2.968000
17:27:13
probe at 56.448,20.750 is z=2.960500
17:27:15
probe at 56.448,20.750 is z=2.945500
17:27:18
probe at 68.706,20.750 is z=3.000500
17:27:19
probe at 68.706,20.750 is z=3.000500
17:27:22
probe at 80.965,20.750 is z=2.945500
17:27:24
probe at 80.965,20.750 is z=2.965500
17:27:27
probe at 80.965,36.207 is z=2.930500
17:27:28
probe at 80.965,36.207 is z=2.938000
17:27:32
probe at 68.706,36.207 is z=2.960500
17:27:33
probe at 68.706,36.207 is z=2.960500
17:27:36
probe at 56.448,36.207 is z=2.948000
17:27:37
probe at 56.448,36.207 is z=2.950500
17:27:41
probe at 44.190,36.207 is z=2.935500
17:27:42
probe at 44.190,36.207 is z=2.943000
17:27:45
probe at 31.919,36.207 is z=2.938000
17:27:47
probe at 31.919,36.207 is z=2.948000
17:27:50
probe at 31.919,51.664 is z=2.953000
17:27:51
probe at 31.919,51.664 is z=2.953000
17:27:55
probe at 44.190,51.664 is z=2.978000
17:27:56
probe at 44.190,51.664 is z=2.948000
17:27:59
probe at 56.448,51.664 is z=2.930500
17:28:00
probe at 56.448,51.664 is z=2.938000
17:28:04
probe at 68.706,51.664 is z=2.940500
17:28:05
probe at 68.706,51.664 is z=2.930500
17:28:08
probe at 80.965,51.664 is z=2.930500
17:28:09
probe at 80.965,51.664 is z=2.938000
17:28:13
probe at 80.965,67.134 is z=2.903000
17:28:14
probe at 80.965,67.134 is z=2.888000
17:28:17
probe at 68.706,67.134 is z=2.905500
17:28:19
probe at 68.706,67.134 is z=2.908000
17:28:22
probe at 56.448,67.134 is z=2.903000
17:28:23
probe at 56.448,67.134 is z=2.920500
17:28:27
probe at 44.190,67.134 is z=2.905500
17:28:28
probe at 44.190,67.134 is z=2.898000
17:28:31
probe at 31.919,67.134 is z=2.925500
17:28:32
probe at 31.919,67.134 is z=2.920500
17:28:36
probe at 31.919,82.591 is z=2.923000
17:28:37
probe at 31.919,82.591 is z=2.948000
17:28:40
probe at 44.190,82.591 is z=2.888000
17:28:42
probe at 44.190,82.591 is z=2.893000
17:28:45
probe at 56.448,82.591 is z=2.895500
17:28:46
probe at 56.448,82.591 is z=2.900500
17:28:50
probe at 68.706,82.591 is z=2.918000
17:28:51
probe at 68.706,82.591 is z=2.905500
17:28:54
probe at 80.965,82.591 is z=2.910500
17:28:55
probe at 80.965,82.591 is z=2.915500
17:28:56
Mesh Bed Leveling Complete
unknown
286859496_1026008808046639_2096756202281595344_n

Can't get it to work, need a little help

I'm probably missing something, or misunderstanding something here, but I can't seem to get this to work. It just does the default bed mesh and not the smaller mesh as intended.
I've installed the macro, included in my printer.cfg, added it to the update manager, installed and activated the post-process script, so I think I must be misreading something in step 4/5?

My start Gcode in Cura:
BED_MESH_CALIBRATE PRINT_MIN=%MINX%,%MINY% PRINT_MAX=%MAXX%,%MAXY%
start_print
My start_print macro in printer.cfg:
[gcode_macro START_PRINT]
gcode:
{% set BED_TEMP = params.BED_TEMP|default(60)|float %}
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(200)|float %}
# Start bed heating (but don't wait for it)
M140 S{BED_TEMP}
# Use absolute coordinates
G90
# Reset the G-Code Z offset (adjust Z offset if needed)
SET_GCODE_OFFSET Z=0.0
# Home the printer
G28
# Move the nozzle near the bed
G1 Z5 F3000
# Wait for bed to reach temperature
M190 S{BED_TEMP}
# Calibrate the bed before every print
# M104 S{EXTRUDER_TEMP}
# BED_MESH_CALIBRATE PRINT_MIN={params.PRINT_MIN} PRINT_MAX={params.PRINT_MAX} FORCE_NEW_MESH=True
# Set and wait for nozzle to reach temperature
M109 S{EXTRUDER_TEMP}

Klicky does not work

hi,

i have a voron 2.4 with Klicky and Z-calibrate. Your macro runs Straight to the left front corner without picking ub the probe, and gives than a error : Probe triggered prior to movement

Any idea how to fix this ?

slicer param print min & max cannot be passed to klipper

thanks for your awesome work!
i follow every step in the readme doc
but klipper did not get the param in prusaslicer start gcode
msg in fluidd console is:

// Unknown command:"PRINT_MIN=56.0803,51.7303"

// Unknown command:"PRINT_MAX=198.92,128.27"

any help will be appreciate,thx

1.code in slicer(prusa slicer 2.5.0) start code zone:
PRINT_MIN={first_layer_print_min[0]},{first_layer_print_min[1]}
PRINT_MAX={first_layer_print_max[0]},{first_layer_print_max[1]}
PRINT_START
2.code in printer.cfg
[gcode_macro PRINT_START]
gcode:
G92 E0
SET_GCODE_OFFSET Z=0
G28
CLEAN_NOZZLE
BED_MESH_CLEAR
STATUS_HOMING
G28
STATUS_CLEANING
CLEAN_NOZZLE
G28 Z0
STATUS_MESHING
BED_MESH_CALIBRATE PRINT_MIN={params.PRINT_MIN} PRINT_MAX={params.PRINT_MAX} FORCE_NEW_MESH=True
STATUS_CALIBRATING_Z
CALIBRATE_Z
G28 X0
G28 Y0
STATUS_BUSY
M117 Printing

how to deinstall?

hi i deleted the folder print_area_bed_mesh and cleared the printer.cfg alsow moonranker is it all what i have to do ?? and modify back the bed_mesh_Calibrate

Probe Count Issue using Bicubic with Long Narrow Print Size

I have a model, 175 x 30, in a 90 degree orientation and klipper throws the following error

!! bed_mesh: invalid probe_count option when using bicubic interpolation. Combination of 3 points on one axis with more than 6 on another is not permitted. Configured Probe Count: 3, 9

I can re-orient the piece to make the print area more square.
I don't know the exact limitations or the best way to fix something like this, whether it's capping the longer axis or increasing the shorter axis.

Feature Request - Add Parameter PROFILE for BED_MESH_CALIBRATE

as the "_BED_MESH_CALIBRATE" is always saving the mesh as "default" and it seams that the command has optional parameter PROFILE available it would be nice to pass this parameter to your function and to _BED_MESH_CALIBRATE.

BED_MESH_CALIBRATE PROFILE=NewMeshProfile

Klicky_Available Variable

Hi, i'm trying to figure out how to sense the presence of Klicky in your macro.

as far as i can understand (not much tbh) there is a

{% set klicky_available = printer['gcode_macro _Probe_Variables'] != null %}

that should set in the [gcode_macro _Probe_Variables] something, and later with {% if klicky_available %} it does _CheckProbe action=query and Attach_Probe

so, if i do _CheckProbe action=query and Attach_Probe it works, the toolhead attaches the probe or based on the fact that is already attached or not, but if i run your macro that part is skipped and does not pickup the probe.

in _Probe_Variables i only have:

[gcode_macro _Probe_Variables]
variable_probe_attached:            False
variable_probe_state:               False
variable_probe_lock:                False
variable_z_endstop_x:               0
variable_z_endstop_y:               0
gcode:

Invalid Pattern for some prints

For some prints I get the following error message:

bed_mesh: invalid probe_count option when using bicubic interpolation. Combination of 3 points on one axis with more than 6 on another is not permitted. Configured Probe Count: 7, 3

Any hint for globally working base settings for the mesh?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.