What's new
VORON Design

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members!

Easiest way to start using Adaptive Meshing with your machine!

I'm looking at my KAMP purge. The macro is ADAPTIVE_PURGE and you just call that in print_start. I don't recall ever setting any kind of length variable on it; I didn't change any of the variables in it--I just run those at default.
 
Would I put that in my print_start gcode macro? Or does it go somewhere else?
Yeah, that’s exactly it. We are currently working on a way to configure it in a single variable macro and move the more complicated stuff to a backend that can be updated via moonraker’s update manager. Until then, you’ll need to pipe variables into it.

Add this to your start macro:

SETUP_KAMP_LINE_PURGE PURGE_LENGTH=20

LINE_PURGE

Let me know how that goes. That should be all you need to do!
 
I'm looking at my KAMP purge. The macro is ADAPTIVE_PURGE and you just call that in print_start. I don't recall ever setting any kind of length variable on it; I didn't change any of the variables in it--I just run those at default.
Yeah, we’ve got a newish feature that allows folks to set it up with moonraker updating. This complicated the setup a bit because you can’t change the config files without the repo getting marked “Dirty”.

It’s still in development, and it’s going to be improved on. Once I get this next update pushed out it’ll be a lot slicker.
 
Yeah, we’ve got a newish feature that allows folks to set it up with moonraker updating. This complicated the setup a bit because you can’t change the config files without the repo getting marked “Dirty”.

It’s still in development, and it’s going to be improved on. Once I get this next update pushed out it’ll be a lot slicker.
Cool! It's already super awesome.
 
@kyleisah I really like the macro setup. I am having a problem though with the bed_mesh running twice as well as the purge. (Welcome to macro hell!) Mesh and purge does work correctly when executed. I'm running old Euclid macros on V2.4 with BED_MESH_CALIBRATE macro commented out... Any suggestions for finding the duplication? grepping cfg files has not found a duplication... (I'm an old linx/unix dev)

[gcode_macro PRINT_START]
gcode:
{% set BED_TEMP = params.BED_TEMP|default(110)|float %}
{% set EXTRUDER_TEMP = params.EXTRUDER|default(245)|float %}
CLEAR_PAUSE
SETUP_KAMP_MESHING DISPLAY_PARAMETERS=1 LED_ENABLE=1 PROBE_DOCK_ENABLE=1 ATTACH_MACRO="M401" DETACH_MACRO="M402"
SETUP_VORON_PURGE DISPLAY_PARAMETERS=1 ADAPTIVE_ENABLE=1 FLOW_RATE=7. SIZE=12
_CQGL ; home and qgl if needed
CALIBRATE_Z
BED_MESH_CLEAR
BED_MESH_CALIBRATE
SET_PIN pin=hour_meter value=1
G90
G0 Z20 F3000 ; move nozzle away from bed
# Set and wait temperatures
STATUS_HOMING
M118 Nozzle heating to {EXTRUDER_TEMP}
M109 S{EXTRUDER_TEMP}
STATUS_PRINTING
VORON_PURGE

EDIT: Well, I found the issue. It turns out that SS was generating TWO print_start commands in the gcode. Now I just need to fix that! Somehow the "Only custom Start G-code got unchecked in the slicer! (Printer Settings). Glad I found that.
 
Last edited:
Greetings,
Q1: Is there anything special that I must do when using TAP and S3D.
I have exclude objects already active?

Q2: RE. the Simplify3D.cfg - does the text replace the original starting script or is it in addition to?

This is what I have as starting script:


G28 ; home all axes

BED_MESH_CALIBRATE

#G1 Z5 F3000 ; lift

#G1 X5 Y10 F1500 ; move to prime

#G1 Z0.2 F3000 ; get ready to prime

#G92 E0 ; reset extrusion distance

#G1 X80 E10 F600 ; prime nozzle

#G1 X100 F5000 ; quick wipe

TIA
 
Nope. Tap is just the z probe. If that's working, then you are getting your z probing data. The slicer doesn't know or care.
 
Hello,
I got a notification from klipper:

Option 'relative_reference_index' in section 'bed_mesh' is deprecated and will be removed in a future release.

Got a Voron 2.4 350. When I installed Adaptiver Meshing and Purge, I couldn't get Kamp to work, so I installed it directly in printer.cfg. Works nicely and I'm very happy with it.

What are the implications of the notification above? I read the discord, but didn't understand it, sorry. Do I have to clean up printer.cfg and retry to install Kamp or should I just replace "relative _reference_index" with zero_reference_position?

Thank you


[bed_mesh]
speed: 300
horizontal_move_z: 10
##--------------------------------------------------------------------
## Uncomment below for 250mm build
#mesh_min: 40, 40
#mesh_max: 210,210

## Uncomment for 300mm build
#mesh_min: 40, 40
#mesh_max: 260,260

## Uncomment for 350mm build
mesh_min: 40, 40
mesh_max: 310,310
##--------------------------------------------------------------------
fade_start: 0.6
fade_end: 10.0
probe_count: 9,9 # Values should be odd, so one point is directly at bed center
algorithm: bicubic
relative_reference_index: 40 # Update when changing probe_count, to ((x points * y points) - 1) / 2. (the center point)

# # # Klipper Adaptive Meshing # # #

# Heads up! If you have any other BED_MESH_CALIBRATE macros defined elsewhere in your config, you will need to comment out / remove them for this to work. (Klicky/Euclid Probe)
# You will also need to be sure that [exclude_object] is defined in printer.cfg, and your slicer is labeling objects.
# This macro will parse information from objects in your gcode to define a min and max mesh area to probe, creating an adaptive mesh!
# This macro will not increase probe_count values in your [bed_mesh] config. If you want richer meshes, be sure to increase probe_count. We recommend at least 5,5.

[gcode_macro BED_MESH_CALIBRATE]
rename_existing: _BED_MESH_CALIBRATE

### This section allows control of status LEDs your printer may have.

variable_led_enable: False # Enables/disables the use of status LEDs in this macro.
variable_status_macro: 'status_meshing' # If you have status LEDs in your printer (StealthBurner), you can use the macro that changes their status here.

### This section configures mesh point fuzzing, which allows probe points to be varied slightly if printing multiples of the same G-code file.

variable_fuzz_enable: False # Enables/disables the use of mesh point fuzzing to slightly randomize probing points to spread out wear on a build surface, default is False.
variable_fuzz_min: 0 # If enabled, the minimum amount in mm a probe point can be randomized, default is 0.
variable_fuzz_max: 4 # If enabled, the maximum amount in mm a probe point can be randomized, default is 4.

### This section is for configuring a mesh margin, which allows the probed mesh to be expanded outwards from the print area.

variable_margin_enable: False # Enables/disables adding a margin to the meshed area to pad a mesh out for specific needs, default is False.
variable_margin_size: 5 # Size in millimeters to expand the mesh outwards from the print area in all directions.

### This section is for those using a dockable probe that is stored outside of the print area. ###

variable_probe_dock_enable: False # Enables/disables the use of a dockable probe that is stored outside of the print area, default is False.
variable_attach_macro: 'Attach_Probe' # Here is where you define the macro that ATTACHES the probe to the printhead. E.g. 'Attach_Probe'
variable_detach_macro: 'Dock_Probe' # Here is where you define the macro that DETACHES the probe from the printhead. E.g. 'Dock_Probe'

### This section is for those who are using Moonraker's Update Manager for KAMP, or want a more verbose macro. ###

variable_display_parameters: True # Display macro paramters in the console, useful for debugging the SETUP_KAMP_MESHING call, or more verbosity.

gcode:

{% if display_parameters == True %}
{ action_respond_info("led_enable : %d" % (led_enable)) }
{ action_respond_info("status_macro: \'%s\'" % (status_macro)) }
{ action_respond_info("fuzz_enable : %d" % (fuzz_enable)) }
{ action_respond_info("fuzz_min : %f" % (fuzz_min)) }
{ action_respond_info("fuzz_max : %f" % (fuzz_max)) }
{ action_respond_info("probe_dock_enable: %d" % (probe_dock_enable)) }
{ action_respond_info("attach_macro: \'%s\'" % (attach_macro)) }
{ action_respond_info("detach_macro: \'%s\'" % (detach_macro)) }
{% endif %}

{% set all_points = printer.exclude_object.objects | map(attribute='polygon') | sum(start=[]) %}
{% set bed_mesh_min = printer.configfile.settings.bed_mesh.mesh_min %}
{% set bed_mesh_max = printer.configfile.settings.bed_mesh.mesh_max %}
{% set probe_count = printer.configfile.settings.bed_mesh.probe_count %}
{% set probe_count = probe_count if probe_count|length > 1 else probe_count * 2 %}
{% set max_probe_point_distance_x = ( bed_mesh_max[0] - bed_mesh_min[0] ) / (probe_count[0] - 1) %}
{% set max_probe_point_distance_y = ( bed_mesh_max[1] - bed_mesh_min[1] ) / (probe_count[1] - 1) %}
{% set x_min = all_points | map(attribute=0) | min | default(bed_mesh_min[0]) %}
{% set y_min = all_points | map(attribute=1) | min | default(bed_mesh_min[1]) %}
{% set x_max = all_points | map(attribute=0) | max | default(bed_mesh_max[0]) %}
{% set y_max = all_points | map(attribute=1) | max | default(bed_mesh_max[1]) %}

{% if margin_enable == False %}
{% set margin_size = 0 %}
{% endif %}

{ action_respond_info("{} object points, clamping to bed mesh [{!r} {!r}]".format(
all_points | count,
bed_mesh_min,
bed_mesh_max,
)) }

{% if fuzz_enable == True %}
{% set fuzz_range = range((fuzz_min * 100) | int, (fuzz_max * 100) | int + 1) %}
{% set x_min = (bed_mesh_min[0] + fuzz_max - margin_size, x_min) | max - (fuzz_range | random / 100.0) %}
{% set y_min = (bed_mesh_min[1] + fuzz_max - margin_size, y_min) | max - (fuzz_range | random / 100.0) %}
{% set x_max = (bed_mesh_max[0] - fuzz_max + margin_size, x_max) | min + (fuzz_range | random / 100.0) %}
{% set y_max = (bed_mesh_max[1] - fuzz_max + margin_size, y_max) | min + (fuzz_range | random / 100.0) %}
{% else %}
{% set x_min = [ bed_mesh_min[0], x_min - margin_size ] | max %}
{% set y_min = [ bed_mesh_min[1], y_min - margin_size ] | max %}
{% set x_max = [ bed_mesh_max[0], x_max + margin_size ] | min %}
{% set y_max = [ bed_mesh_max[1], y_max + margin_size ] | min %}
{% endif %}

{ action_respond_info("Object bounds, clamped to the bed_mesh: {!r}, {!r}".format(
(x_min, y_min),
(x_max, y_max),
)) }

{% set points_x = (((x_max - x_min) / max_probe_point_distance_x) | round(method='ceil') | int) + 1 %}
{% set points_y = (((y_max - y_min) / max_probe_point_distance_y) | round(method='ceil') | int) + 1 %}

{% if (([points_x, points_y]|max) > 6) %}
{% set algorithm = "bicubic" %}
{% set min_points = 4 %}
{% else %}
{% set algorithm = "lagrange" %}
{% set min_points = 3 %}
{% endif %}
{ action_respond_info( "Algorithm: {}".format(algorithm)) }

{% set points_x = [points_x, min_points]|max %}
{% set points_y = [points_y, min_points]|max %}
{ action_respond_info( "Points: x: {}, y: {}".format(points_x, points_y) ) }

{% if printer.configfile.settings.bed_mesh.relative_reference_index is defined %}
{% set ref_index = (points_x * points_y / 2) | int %}
{ action_respond_info( "Reference index: {}".format(ref_index) ) }
{% else %}
{% set ref_index = -1 %}
{% endif %}

{% if probe_dock_enable == True %}
{attach_macro} # Attach/deploy a probe if the probe is stored somewhere outside of the print area
{% endif %}

{% if led_enable == True %}
{status_macro} # Set status LEDs
{% endif %}

_BED_MESH_CALIBRATE mesh_min={x_min},{y_min} mesh_max={x_max},{y_max} ALGORITHM={algorithm} PROBE_COUNT={points_x},{points_y} RELATIVE_REFERENCE_INDEX={ref_index}

{% if probe_dock_enable == True %}
{detach_macro} # Detach/stow a probe if the probe is stored somewhere outside of the print area
{% endif %}
 
I don't use auto z any more now that I've moved to Tap. What exactly isn't working?

An aside, I just updated to KAMP v1.1.1 on my printer and it was a little bit of a struggle, probably because I was not updating Klipper, Moonraker, and OS to try and avoid the USB issue. I ended up getting fully updated and all is well here now.
 
Part 2: comment out
#enable_object_processing: False
in moonraker cfg?
And put
[file_manager]
enable_object_processing: True
under it?

Part 3 How do I make sure super slicer is labeling objects? Where do I find that?

This is the result of trying to SHH using putty
cd

git clone https://github.com/kyleisah/Klipper-Adaptive-Meshing-Purging.git
Cloning into 'Klipper-Adaptive-Meshing-Purging'...
fatal: unable to access 'https://github.com/kyleisah/Klipper-Adaptive-Meshing-Purging.git/': Could not resolve host: github.com
pi@mainsailos:~ $

This place: suggests using:
ln -s ~/Klipper-Adaptive-Meshing-Purging/Configuration klipper_config
instead of the github line:
ln -s ~/Klipper-Adaptive-Meshing-Purging/Configuration printer_data/config/KAMP
 
Part 2: Yes, that's what you need.
Part 3: Look in Print Settings / Output Options under Output File and check the Label Objects box (middle of the three options).
 
That sounds like a connectivity issue. Can your Pi access the internet at all?
 
It's connected to my laptop through an ethernet cable.
The laptop is connected to wifi.
Unless you do some fancy internet sharing on and through your laptop, the pi will not have internet this way.
If you have wifi I would let the pi connect to it. Or look up how you can share your wifi through your laptops ethernet.

Btw, adaptive mesh is now part of klipper if you update it to latest version (Which of course also needs internet)
 
I've been using winSCP to stick files into the PI using the ethernet cable.
Where would I find it in klipper? I'll see if I have it already.
There is no KAMP.cfg file in machine.
This software stuff has been way harder for me than the physical assembly.
Thanks for your help.
 
I've been using winSCP to stick files into the PI using the ethernet cable.
Where would I find it in klipper? I'll see if I have it already.
There is no KAMP.cfg file in machine.
This software stuff has been way harder for me than the physical assembly.
Thanks for your help.
I think you have to set up mesh min and max and then wherever you do the BED_MESH_CALIBRATE with ADAPTIVE=1 parameter (Often print start or start gcode in your slicer)

Well yeah it's hard if you have no internet on the device.

 
I haven't watched that video yet, so thanks for the link.
Still doesn't work, same message:
fatal: unable to access 'https://github.com/Klipper3d/klipper.git/': Could not resolve host: github.com
Still not understanding why I can't load it on my laptop, then transfer it to the Pi through the ethernet cable.
If I can get my printer within range of wifi can I get it to work?
 
OK, seems like I'm wiffy connected.
So many things I couldn't do without connection. LEDs etc.
I'll let you know if I have any other problems.
thanks for your help.
 
Top