From b18c835a661068854f100b7265c07de11e910a55 Mon Sep 17 00:00:00 2001 From: Adam Yellen <6933682+AdamYellen@users.noreply.github.com> Date: Mon, 8 Aug 2022 14:02:23 -0400 Subject: [PATCH] First import --- .gitignore | 2 + .gitmodules | 3 + TEST_SPEED.cfg | 108 +++++ adaptive_bed_mesh.cfg | 134 ++++++ config | 1 + custom-velocities.txt | 52 ++ input_shaper/.gitignore | 1 + klicky/klicky-bed-mesh-calibrate.cfg | 32 ++ klicky/klicky-macros.cfg | 680 +++++++++++++++++++++++++++ klicky/klicky-probe.cfg | 10 + klicky/klicky-specific.cfg | 1 + klicky/klicky-variables.cfg | 81 ++++ klicky/klicky-z-calibration.cfg | 92 ++++ klicky/klicky-z-tilt-adjust.cfg | 31 ++ moonraker.conf | 47 ++ printer-jabbasnot.cfg | 361 ++++++++++++++ 16 files changed, 1636 insertions(+) create mode 100644 .gitignore create mode 100644 .gitmodules create mode 100644 TEST_SPEED.cfg create mode 100644 adaptive_bed_mesh.cfg create mode 160000 config create mode 100644 custom-velocities.txt create mode 100644 input_shaper/.gitignore create mode 100644 klicky/klicky-bed-mesh-calibrate.cfg create mode 100644 klicky/klicky-macros.cfg create mode 100644 klicky/klicky-probe.cfg create mode 100644 klicky/klicky-specific.cfg create mode 100644 klicky/klicky-variables.cfg create mode 100644 klicky/klicky-z-calibration.cfg create mode 100644 klicky/klicky-z-tilt-adjust.cfg create mode 100644 moonraker.conf create mode 100644 printer-jabbasnot.cfg diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b74d3b3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.bkp +printer-*-????????_*.cfg \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..e71411d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "config"] + path = config + url = https://github.com/AdamYellen/RatOS-configuration diff --git a/TEST_SPEED.cfg b/TEST_SPEED.cfg new file mode 100644 index 0000000..9b326f9 --- /dev/null +++ b/TEST_SPEED.cfg @@ -0,0 +1,108 @@ +# Home, get position, throw around toolhead, home again. +# If MCU stepper positions (first line in GET_POSITION) are greater than a full step different (your number of microsteps), then skipping occured. +# We only measure to a full step to accomodate for endstop variance. +# Example: TEST_SPEED SPEED=300 ACCEL=5000 ITERATIONS=10 + +[gcode_macro TEST_SPEED] +gcode: + # Speed + {% set speed = params.SPEED|default(printer.configfile.settings.printer.max_velocity)|int %} + # Iterations + {% set iterations = params.ITERATIONS|default(5)|int %} + # Acceleration + {% set accel = params.ACCEL|default(printer.configfile.settings.printer.max_accel)|int %} + # Bounding inset for large pattern (helps prevent slamming the toolhead into the sides after small skips, and helps to account for machines with imperfectly set dimensions) + {% set bound = params.BOUND|default(20)|int %} + # Size for small pattern box + {% set smallpatternsize = SMALLPATTERNSIZE|default(20)|int %} + + # Large pattern + # Max positions, inset by BOUND + {% set x_min = printer.toolhead.axis_minimum.x + bound %} + {% set x_max = printer.toolhead.axis_maximum.x - bound %} + {% set y_min = printer.toolhead.axis_minimum.y + bound %} + {% set y_max = printer.toolhead.axis_maximum.y - bound %} + + # Small pattern at center + # Find X/Y center point + {% set x_center = (printer.toolhead.axis_minimum.x|float + printer.toolhead.axis_maximum.x|float ) / 2 %} + {% set y_center = (printer.toolhead.axis_minimum.y|float + printer.toolhead.axis_maximum.y|float ) / 2 %} + + # Set small pattern box around center point + {% set x_center_min = x_center - (smallpatternsize/2) %} + {% set x_center_max = x_center + (smallpatternsize/2) %} + {% set y_center_min = y_center - (smallpatternsize/2) %} + {% set y_center_max = y_center + (smallpatternsize/2) %} + + # Save current gcode state (absolute/relative, etc) + SAVE_GCODE_STATE NAME=TEST_SPEED + + # Output parameters to g-code terminal + { action_respond_info("TEST_SPEED: starting %d iterations at speed %d, accel %d" % (iterations, speed, accel)) } + + # Absolute positioning + G90 + + # Set new limits + SET_VELOCITY_LIMIT VELOCITY={speed} ACCEL={accel} ACCEL_TO_DECEL={accel / 2} + + # Home and get position for comparison later: + G28 + # QGL if not already QGLd (only if QGL section exists in config) + {% if printer.configfile.settings.quad_gantry_level %} + {% if printer.quad_gantry_level.applied == False %} + QUAD_GANTRY_LEVEL + G28 Z + {% endif %} + {% endif %} + G0 X{printer.toolhead.axis_maximum.x} Y{printer.toolhead.axis_maximum.y} F{30*60} + G4 P1000 + GET_POSITION + + # Go to starting position + G0 X{x_min} Y{y_min} Z{bound + 10} F{speed*60} + + {% for i in range(iterations) %} + # Large pattern + # Diagonals + G0 X{x_min} Y{y_min} F{speed*60} + G0 X{x_max} Y{y_max} F{speed*60} + G0 X{x_min} Y{y_min} F{speed*60} + G0 X{x_max} Y{y_min} F{speed*60} + G0 X{x_min} Y{y_max} F{speed*60} + G0 X{x_max} Y{y_min} F{speed*60} + + # Box + G0 X{x_min} Y{y_min} F{speed*60} + G0 X{x_min} Y{y_max} F{speed*60} + G0 X{x_max} Y{y_max} F{speed*60} + G0 X{x_max} Y{y_min} F{speed*60} + + # Small pattern + # Small diagonals + G0 X{x_center_min} Y{y_center_min} F{speed*60} + G0 X{x_center_max} Y{y_center_max} F{speed*60} + G0 X{x_center_min} Y{y_center_min} F{speed*60} + G0 X{x_center_max} Y{y_center_min} F{speed*60} + G0 X{x_center_min} Y{y_center_max} F{speed*60} + G0 X{x_center_max} Y{y_center_min} F{speed*60} + + # Small box + G0 X{x_center_min} Y{y_center_min} F{speed*60} + G0 X{x_center_min} Y{y_center_max} F{speed*60} + G0 X{x_center_max} Y{y_center_max} F{speed*60} + G0 X{x_center_max} Y{y_center_min} F{speed*60} + {% endfor %} + + # Restore max speed/accel/accel_to_decel to their configured values + SET_VELOCITY_LIMIT VELOCITY={printer.configfile.settings.printer.max_velocity} ACCEL={printer.configfile.settings.printer.max_accel} ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} + + # Re-home and get position again for comparison: + G28 + # Go to XY home positions (in case your homing override leaves it elsewhere) + G0 X{printer.toolhead.axis_maximum.x} Y{printer.toolhead.axis_maximum.y} F{30*60} + G4 P1000 + GET_POSITION + + # Restore previous gcode state (absolute/relative, etc) + RESTORE_GCODE_STATE NAME=TEST_SPEED \ No newline at end of file diff --git a/adaptive_bed_mesh.cfg b/adaptive_bed_mesh.cfg new file mode 100644 index 0000000..fa55de7 --- /dev/null +++ b/adaptive_bed_mesh.cfg @@ -0,0 +1,134 @@ +######################################### +########## ADAPTIVE BED MESH ############ +######################################### +# Written by Frix_x#0161 # + +### What is it ? ### + +# The adaptive bed mesh is simple: it's a normal bed mesh, but only "where" and "when" it's necessary. +# Sometime I print small parts, sometime I print full plates and I like to get a precise bed_mesh (like 9x9 or more). However, it take a +# lot of time and it's useless to probe all the plate for only a 5cm² part in the center. So this is where the adaptive bed mesh is helping: +# 1. It get the corners coordinates of the fisrt layer surface from the slicer +# 2. It compute a new set of points to probe on this new zone to get at least the same precision as your standard bed mesh. For example, if +# a normal bed mesh is set to 9x9 for 300mm², it will then compute 3x3 for a 100mm² surface. Also if for whatever reason your parts are in +# the corner of the build plate (like for a damaged PEI in the center), it will follow them to probe this exact area. +# 3. As the probed point computed are odd, it will also compute the new relative reference index point in the center of the zone +# 4. To go further, the macro will not do any bed_mesh if there is less than 3x3 points to probe (very small part alone) and choose/change the +# algorithm (bicubic/lagrange) depending of the size and shape of the mesh computed (like 3x3 vs 3x9) + +### Installation ### +# 1. You need to change some custom settings in your slicer: +# a. SuperSlicer is easy: add in your custom g_code PRINT_START macro the SIZE argument like this: +# PRINT_START [all your shit..] SIZE={first_layer_print_min[0]}_{first_layer_print_min[1]}_{first_layer_print_max[0]}_{first_layer_print_max[1]} +# b. Cura is a bit more tricky as you need to install the post process plugin by frankbags called MeshPrintSize.py. +# In Cura menu, click Help > Show configuration folder. Copy the python script from the following link into the plugins folder: https://gist.github.com/frankbags/c85d37d9faff7bce67b6d18ec4e716ff#file-meshprintsize-py +# Then restart Cura and select in the menu: Extensions > Post processing > select Mesh Print Size +# At the end, change your custom g_code PRINT_START macro the SIZE argument like this: +# PRINT_START [all your shit..] SIZE=%MINX%_%MINY%_%MAXX%_%MAXY% +# 2. In klipper, configure a normal [bed_mesh] section in your config as you want for your machine (it will be the base to compute the new adaptive bed mesh). Keep +# in mind that you can push the precision a little bit with a mesh of 9x9 for example as not all the points will be probed. +# 3. VERY IMPORTANT CHECKS: +# a. Be sure to put the "mesh_pps" entry in the [bed_mesh] section. You can choose what you want or let it to default, but even if it's optional for Klipper, it's mandatory +# to really specify it in your config for my macro to work correctly. +# b. Also check that the mesh_min, mesh_max, probe_count and mesh_pps configs entry in your [bed_mesh] section are specified using double numbers like "probe_count: 9,9" +# as my macro is waiting for TWO numbers and will fail if there is only one specified at thoose positions. +# 4. In your PRINT_START macro definition, get the SIZE argument and pass it to the ADAPTIVE_BED_MESH to start the probing sequence like so: +# {% set FL_SIZE = params.SIZE|default("0_0_0_0")|string %} +# ADAPTIVE_BED_MESH SIZE={FL_SIZE} +# 5. Optional: my macro is using the RESPOND command for debugging purposes: add the [respond] section to your config or delete all the RESPOND lines in my macro + +# Feel free to ping me on Discord (Frix_x#0161) if you need help or have any comments to improve it :) + + +[gcode_macro ADAPTIVE_BED_MESH] +description: Perform a bed mesh, but only where and when it's needed +gcode: + # 1 ----- GET ORIGINAL BEDMESH PARAMS FROM CONFIG ---------------------- + {% set xMinConf, yMinConf = printer["configfile"].config["bed_mesh"]["mesh_min"].split(',')|map('trim')|map('int') %} + {% set xMaxConf, yMaxConf = printer["configfile"].config["bed_mesh"]["mesh_max"].split(',')|map('trim')|map('int') %} + {% set xProbeCntConf, yProbeCntConf = printer["configfile"].config["bed_mesh"]["probe_count"].split(',')|map('trim')|map('int') %} + {% set algo = printer["configfile"].config["bed_mesh"]["algorithm"] %} + {% set xMeshPPS, yMeshPPS = printer["configfile"].config["bed_mesh"]["mesh_pps"].split(',')|map('trim')|map('int') %} + + # If the SIZE parameter is defined and set not a dummy placeholder, we do the adaptive + # bed mesh logic. If it's ommited, we still do the original BED_MESH_CALIBRATE function + {% if params.SIZE is defined and params.SIZE != "0_0_0_0" %} + + # 2 ----- GET MESH SIZE AND MARGIN FROM MACRO CALL -------------------- + {% set xMinSpec, yMinSpec, xMaxSpec, yMaxSpec = params.SIZE.split('_')|map('trim')|map('int') %} + {% set margin = params.MARGIN|default(5)|int %} + + # 3 ----- APPLY MARGINS ---------------------------------------------- + # We use min/max function as we want it to be constrained by the original + # bedmesh size. This will avoid going outside the machine limits + {% set xMin = [xMinConf, (xMinSpec - margin)]|max %} + {% set xMax = [xMaxConf, (xMaxSpec + margin)]|min %} + {% set yMin = [yMinConf, (yMinSpec - margin)]|max %} + {% set yMax = [yMaxConf, (yMaxSpec + margin)]|min %} + + # 4 ----- COMPUTE A NEW PROBE COUNT ---------------------------------- + # The goal is to have at least the same precision as from the config. So we compute an equivalent number + # of probe points on each X/Y dimensions (distance between two points should be the same as in the config) + {% set xProbeCnt = ((xMax - xMin) * xProbeCntConf / (xMaxConf - xMinConf))|round(0, 'ceil')|int %} + {% set yProbeCnt = ((yMax - yMin) * yProbeCntConf / (yMaxConf - yMinConf))|round(0, 'ceil')|int %} + + # Then, three possibilities : + # a) Both dimensions have less than 3 probe points : the bed_mesh is not needed as it's a small print. + # b) If one of the dimension is less than 3 and the other is greater. The print looks to be elongated and + # need the adaptive bed_mesh : we add probe points to the small direction to reach 3 and be able to do it. + # c) If both direction are greater than 3, we need the adaptive bed_mesh and it's ok. + # At the end we control (according to Klipper bed_mesh method: "_verify_algorithm") that the computed probe_count is + # valid according to the choosen algorithm or change it if needed. + {% if xProbeCnt < 3 and yProbeCnt < 3 %} + RESPOND MSG="Adaptive bed mesh: mesh not needed" + + {% else %} + {% set xProbeCnt = [3, xProbeCnt]|max %} + {% set yProbeCnt = [3, yProbeCnt]|max %} + + # We verify that the number of probe points on each axis is odd or add + # one to it. This is to have a relative_reference_index point at the center of the mesh + {% if xProbeCnt % 2 == 0 %} + {% set xProbeCnt = xProbeCnt + 1 %} + {% endif %} + {% if yProbeCnt % 2 == 0 %} + {% set yProbeCnt = yProbeCnt + 1 %} + {% endif %} + + # Check of the probe points and interpolation algorithms according to Klipper code + {% if xMeshPPS != 0 or yMeshPPS != 0 %} + {% set probeCntMin = [xProbeCnt, yProbeCnt]|min %} + {% set probeCntMax = [xProbeCnt, yProbeCnt]|max %} + {% if algo == "lagrange" and probeCntMax > 6 %} + # Lagrange interpolation tends to oscillate when using more than 6 samples: swith to bicubic + {% set algo = "bicubic" %} + {% endif %} + {% if algo == "bicubic" and probeCntMin < 4 %} + {% if probeCntMax > 6 %} + # Impossible case: need to add probe point on the small axis to be >= 4 (we want 5 to keep it odd) + {% if xProbeCnt > yProbeCnt %} + {% set yProbeCnt = 5 %} + {% else %} + {% set xProbeCnt = 5 %} + {% endif %} + {% else %} + # In this case bicubic is not adapted (less than 4 points): switch to lagrange + {% set algo = "lagrange" %} + {% endif %} + {% endif %} + {% endif %} + + # 5 ----- COMPUTE THE RELATIVE_REFERENCE_INDEX POINT -------------------- + {% set rRefIndex = (((xProbeCnt * yProbeCnt) - 1) / 2)|int %} + + # 6 ----- FORMAT THE PARAMETERS TO CALL BED_MESH_CALIBRATE -------------- + {% set mesh_min = "%d,%d"|format(xMin, yMin) %} + {% set mesh_max = "%d,%d"|format(xMax, yMax) %} + {% set probe_count = "%d,%d"|format(xProbeCnt, yProbeCnt) %} + RESPOND MSG="Adaptive bed mesh: MESH_MIN={mesh_min} MESH_MAX={mesh_max} PROBE_COUNT={probe_count} RELATIVE_REFERENCE_INDEX={rRefIndex} ALGORITHM={algo}" + BED_MESH_CALIBRATE MESH_MIN={mesh_min} MESH_MAX={mesh_max} PROBE_COUNT={probe_count} RELATIVE_REFERENCE_INDEX={rRefIndex} ALGORITHM={algo} + {% endif %} + {% else %} + RESPOND MSG="Adaptive bed mesh: nominal bed mesh" + BED_MESH_CALIBRATE + {% endif %} diff --git a/config b/config new file mode 160000 index 0000000..2350955 --- /dev/null +++ b/config @@ -0,0 +1 @@ +Subproject commit 23509555eb40b425fd193071c4744f2535406c03 diff --git a/custom-velocities.txt b/custom-velocities.txt new file mode 100644 index 0000000..922a854 --- /dev/null +++ b/custom-velocities.txt @@ -0,0 +1,52 @@ +# ; External perimeter +# {if extrusion_role=~/ExternalPerimeter/};[extrusion_role] +# SET_VELOCITY_LIMIT ACCEL=1000 ACCEL_TO_DECEL=500 SQUARE_CORNER_VELOCITY=5 + +# ; Perimeter +# {elsif extrusion_role=~/Perimeter/};[extrusion_role] +# SET_VELOCITY_LIMIT ACCEL=2000 ACCEL_TO_DECEL=1000 SQUARE_CORNER_VELOCITY=5 + +# ; Overhang perimeter +# {elsif extrusion_role=~/OverhangPerimeter/};[extrusion_role] +# SET_VELOCITY_LIMIT ACCEL=2000 ACCEL_TO_DECEL=1000 SQUARE_CORNER_VELOCITY=5 + +# ; Internal infill +# {elsif extrusion_role=~/InternalInfill/};[extrusion_role] +# SET_VELOCITY_LIMIT ACCEL=5000 ACCEL_TO_DECEL=2500 SQUARE_CORNER_VELOCITY=5 + +# ; Top solid infill +# {elsif extrusion_role=~/TopSolidInfill/};[extrusion_role] +# SET_VELOCITY_LIMIT ACCEL=2000 ACCEL_TO_DECEL=1000 SQUARE_CORNER_VELOCITY=5 + +# ; Solid infill +# {elsif extrusion_role=~/SolidInfill/};[extrusion_role] +# SET_VELOCITY_LIMIT ACCEL=4000 ACCEL_TO_DECEL=2000 SQUARE_CORNER_VELOCITY=5 + +# ; Bridge infill +# {elsif extrusion_role=~/BridgeInfill/};[extrusion_role] +# SET_VELOCITY_LIMIT ACCEL=5000 ACCEL_TO_DECEL=2500 SQUARE_CORNER_VELOCITY=5 + +# ; Gap fill +# {elsif extrusion_role=~/GapFill/};[extrusion_role] +# SET_VELOCITY_LIMIT ACCEL=2000 ACCEL_TO_DECEL=1000 SQUARE_CORNER_VELOCITY=5 + +# ; Skirt +# {elsif extrusion_role=~/Skirt/};[extrusion_role] +# SET_VELOCITY_LIMIT ACCEL=5000 ACCEL_TO_DECEL= 2500 SQUARE_CORNER_VELOCITY=5 + +# ; Support material +# {elsif extrusion_role=~/SupportMaterial/};[extrusion_role] +# SET_VELOCITY_LIMIT ACCEL=5000 ACCEL_TO_DECEL= 2500 SQUARE_CORNER_VELOCITY=5 + +# ; Support material interface +# {elsif extrusion_role=~/SupportMaterialInterface/};[extrusion_role] +# SET_VELOCITY_LIMIT ACCEL=5000 ACCEL_TO_DECEL= 2500 SQUARE_CORNER_VELOCITY=5 + +# ; Thin walls +# {elsif extrusion_role=~/ThinWall/};[extrusion_role] +# SET_VELOCITY_LIMIT ACCEL=2000 ACCEL_TO_DECEL=1000 SQUARE_CORNER_VELOCITY=5 + +# ; Other +# {else};[extrusion_role] +# SET_VELOCITY_LIMIT ACCEL=4444 ACCEL_TO_DECEL=2222 SQUARE_CORNER_VELOCITY=5 +# {endif} diff --git a/input_shaper/.gitignore b/input_shaper/.gitignore new file mode 100644 index 0000000..aab52d9 --- /dev/null +++ b/input_shaper/.gitignore @@ -0,0 +1 @@ +*.png \ No newline at end of file diff --git a/klicky/klicky-bed-mesh-calibrate.cfg b/klicky/klicky-bed-mesh-calibrate.cfg new file mode 100644 index 0000000..a3695f6 --- /dev/null +++ b/klicky/klicky-bed-mesh-calibrate.cfg @@ -0,0 +1,32 @@ +# This macro was provided by discord user Garrettwp to whom i give my thanks for sharing it with me. +# I have tweaked it a lot. +# They are based on the great Annex magprobe dockable probe macros "#Originally developed by Mental, +# modified for better use on K-series printers by RyanG and Trails", kudos to them. +# That macro as since evolved into a klipper plugin that currently is pending inclusion in klipper, +# more information here, https://github.com/Annex-Engineering/Quickdraw_Probe/tree/main/Klipper_Macros +# User richardjm revised the macro variables and added some functions, thanks a lot +# by standing on the shoulders of giants, lets see if we can see further +# +# the current home for this version is https://github.com/jlas1/Klicky-Probe + +################### +# Bed mesh calibrate +[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 + G90 + Attach_Probe + + _BED_MESH_CALIBRATE {% for p in params + %}{'%s=%s ' % (p, params[p])}{% + endfor %} + + Dock_Probe diff --git a/klicky/klicky-macros.cfg b/klicky/klicky-macros.cfg new file mode 100644 index 0000000..572eb7c --- /dev/null +++ b/klicky/klicky-macros.cfg @@ -0,0 +1,680 @@ +# This macro was provided by discord user Garrettwp to whom i give my thanks for sharing it with me. +# I have tweaked it a lot. +# They are based on the great Annex magprobe dockable probe macros "#Originally developed by Mental, +# modified for better use on K-series printers by RyanG and Trails", kudos to them. +# That macro as since evolved into a klipper plugin that currently is pending inclusion in klipper, +# more information here, https://github.com/Annex-Engineering/Quickdraw_Probe/tree/main/Klipper_Macros +# User richardjm revised the macro variables and added some functions, thanks a lot +# by standing on the shoulders of giants, lets see if we can see further +# +# the current home for this version is https://github.com/jlas1/Klicky-Probe + +[respond] + +[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: + + +#checks if the variable definitions are up to date +[gcode_macro _klicky_check_variables_version] +gcode: + {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} + + {% if version != 1 %} + { action_raise_error("Please update your klicky variables, there are some functionality changes") } + {% endif %} + +[gcode_macro _exit_point] +gcode: + {% set function = 'pre_' ~ params.FUNCTION %} + {% set move = params.MOVE|default(0) %} + {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} + # mandatory to save the new safe position + M400 + SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} + SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} + RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} + + +[gcode_macro _entry_point] +gcode: + {% set function = 'pre_' ~ params.FUNCTION %} + {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} + # mandatory to save the new safe position + M400 + SAVE_GCODE_STATE NAME={function} + # removes the Z offset for better bed based docking + SET_GCODE_OFFSET Z=0 + # all the macros initially assume absolute positioning + G90 + # set a safe(sane) Acceleration + SET_VELOCITY_LIMIT ACCEL={move_accel} + +[gcode_macro _Homing_Variables] +gcode: + {% set reset = params.RESET|default(0) %} + {% if reset %} + SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } + {% endif %} + +########################## +# Attach probe and lock it +[gcode_macro Attach_Probe_Lock] +description: Attaches Klicky Probe, can only be docked after unlocking +gcode: + Attach_Probe + _Probe_Lock + +######################## +# Dock probe and lock it +[gcode_macro Dock_Probe_Unlock] +description: Docks Klicky Probe even if it was locked +gcode: + _Probe_Unlock + Dock_Probe + +############## +# Unlock Probe +[gcode_macro _Probe_Unlock] +description: Unlocks Klicky Probe state +gcode: + SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } + +############ +# Lock Probe +[gcode_macro _Probe_Lock] +description: Locks Klicky Probe state +gcode: + SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } + +###################### +# Attach Probe Routine +[gcode_macro Attach_Probe] +description: Attaches Klicky Probe +gcode: + # See if the position should be restored after the attach + {% set goback = params.BACK|default(0) %} + # Get probe attach status + {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} + {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} + {% set verbose = printer["gcode_macro _User_Variables"].verbose %} + # Get Docking location + {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} + {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} + {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} + {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} + {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} + {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} + {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} + {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} + {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} + # Safe Z for travel + {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} + {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} + # Set feedrates + {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} + {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} + {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} + {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} + + _entry_point function=Attach_Probe + + # If there is no undock movement, fail + {% if dockmove_x == dockmove_y == dockmove_z == 0 %} + { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } + {% endif %} + # If there is no Attach movement, fail + {% if attachmove_x == attachmove_y == attachmove_z == 0 %} + { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } + {% endif %} + + # If x and y are not homed + {% if not 'xy' in printer.toolhead.homed_axes %} + { action_raise_error("Must Home X and Y Axis First!") } + + # If probe not attached and locked + {% elif not probe_attached and not probe_lock %} + {% if verbose %} + { action_respond_info("Attaching Probe") } + {% endif %} + + {% if not 'z' in printer.toolhead.homed_axes %} + {% if verbose %} + { action_respond_info("Resetting Z position to zero") } + {% endif %} + SET_KINEMATIC_POSITION Z=0 + {% if not enable_z_hop %} # Disables safe_z + {% set safe_z = 0 %} + {% endif %} + {% endif %} + + # Prior to saving actual position, check if its necessary to move to a safe Z + # that has enought overhead for the attached probe + {% if printer.toolhead.position.z < safe_z %} + {% if verbose %} + { action_respond_info("moving to a safe Z distance") } + {% endif %} + G0 Z{safe_z} F{z_drop_feedrate} + {% endif %} + + {% if not 'z' in printer.toolhead.homed_axes %} + {% if verbose %} + { action_respond_info("Resetting Z position to zero") } + {% endif %} + SET_KINEMATIC_POSITION Z=0 + {% endif %} + + {% if printer.toolhead.position.z < safe_z %} + G0 Z{safe_z} F{z_drop_feedrate} + {% endif %} + + _Umbilical_Path + + _entry_point function=Attach_Probe_intern + + + # Probe entry location + G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} + {% if docklocation_z != -128 %} + G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} + {% endif %} + + # Drop Probe to Probe location + {% if docklocation_z != -128 %} + G0 Z{docklocation_z} F{dock_feedrate} + {% endif %} + G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} + + # Probe Attach + {% if docklocation_z != -128 %} + G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} + {% endif %} + G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} + + # Go to Z safe distance + {% if printer.toolhead.position.z < safe_z %} + G0 Z{safe_z} F{z_drop_feedrate} + {% endif %} + + _Park_Toolhead + + _CheckProbe action=attach + + _exit_point function=Attach_Probe_intern move={goback} + + {% elif probe_lock %} + {% if verbose %} + { action_respond_info("Probe locked!") } + {% endif %} + + # Probe attached, do nothing + _CheckProbe action=query + + {% else %} + {% if verbose %} + { action_respond_info("Probe already attached!") } + {% endif %} + + # Probe attached, do nothing + _CheckProbe action=query + + {% endif %} + + _exit_point function=Attach_Probe + +#################### +# Dock Probe Routine +[gcode_macro Dock_Probe] +description: Docks Klicky Probe +gcode: + # See if the position should be restored after the dock + {% set goback = params.back|default(0) %} + # Get probe attach status + {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} + {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} + {% set verbose = printer["gcode_macro _User_Variables"].verbose %} + # Get Docking location + {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} + {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} + {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} + {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} + {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} + {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} + {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} + {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} + {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} + # Safe Z for travel + {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} + # Set feedrates + {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} + {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} + {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} + {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} + + # If there is no undock movement, fail + {% if dockmove_x == dockmove_y == dockmove_z == 0 %} + { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } + {% endif %} + # If there is no Attach movement, fail + {% if attachmove_x == attachmove_y == attachmove_z == 0 %} + { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } + {% endif %} + + # If axis aren't homed, fail + {% if not 'xyz' in printer.toolhead.homed_axes %} + { action_raise_error("Must Home X, Y and Z Axis First!") } + {% endif %} + + _entry_point function=Dock_Probe + + # If probe not attached and not locked + {% if probe_attached and not probe_lock %} + {% if verbose %} + { action_respond_info("Docking Probe") } + {% endif %} + + {% if printer.toolhead.position.z < safe_z %} + G0 Z{safe_z} F{z_drop_feedrate} + {% endif %} + + _Umbilical_Path + + # Probe entry location + G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} + {% if docklocation_z != -128 %} + G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} + {% endif %} + + # Drop Probe to Probe location + G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} + {% if docklocation_z != -128 %} + G0 Z{docklocation_z} F{dock_feedrate} + {% endif %} + + # Probe decoupling + {% if docklocation_z != -128 %} + G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} + {% endif %} + G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} + G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} + + # Go to Z safe distance + {% if printer.toolhead.position.z < safe_z %} + G0 Z{safe_z} F{z_drop_feedrate} + {% endif %} + + _Park_Toolhead + + G4 P1000 + _CheckProbe action=dock + + {% elif probe_lock %} + {% if verbose %} + { action_respond_info("Probe locked") } + {% endif %} + + # Probe docked, do nothing + _CheckProbe action=query + + {% else %} + {% if verbose %} + { action_respond_info("Probe already docked") } + {% endif %} + + # Probe docked, do nothing + _CheckProbe action=query + + {% endif %} + + _exit_point function=Dock_Probe move={goback} + +################# +# Probe Calibrate +[gcode_macro PROBE_CALIBRATE] +rename_existing: _PROBE_CALIBRATE +description:Calibrate the probes z_offset with klicky automount +gcode: + {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} + {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} + {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} + {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} + {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} + {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} + {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} + + {% if not 'xyz' in printer.toolhead.homed_axes %} + { action_raise_error("Must Home X, Y and Z Axis First!") } + {% endif %} + + # Protect against PROBE CALIBRATE performed from outside the bed + {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) + or printer['gcode_move'].position.y < probe_offset_y + or printer['gcode_move'].position.x > (max_x - probe_offset_x) + or printer['gcode_move'].position.x < probe_offset_x %} + { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } + {% endif%} + + _CheckProbe action=query + G90 + Attach_Probe back=1 + + _PROBE_CALIBRATE {% for p in params + %}{'%s=%s ' % (p, params[p])}{% + endfor %} + + M118 moving the toolhead 20 mm from the bed + TESTZ Z=20 + M118 remove manually the probe and continue calibration + +################ +# Probe Accuracy +[gcode_macro PROBE_ACCURACY] +rename_existing: _PROBE_ACCURACY +description:Probe Z-height accuracy at current XY position with klicky automount +gcode: + {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} + {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} + {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} + {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} + {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} + {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} + {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} + + {% if not 'xyz' in printer.toolhead.homed_axes %} + { action_raise_error("Must Home X, Y and Z Axis First!") } + {% endif %} + + _entry_point function=PROBE_ACCURACY + + # Protect against PROBE_ACCURACY performed from outside the bed + {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) + or printer['gcode_move'].position.y < probe_offset_y + or printer['gcode_move'].position.x > (max_x - probe_offset_x) + or printer['gcode_move'].position.x < probe_offset_x %} + { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } + {% endif%} + + _CheckProbe action=query + Attach_Probe back=1 + + _PROBE_ACCURACY {% for p in params + %}{'%s=%s ' % (p, params[p])}{% + endfor %} + + Dock_Probe back=1 + + _exit_point function=PROBE_ACCURACY move=1 + +############################################# +# Enable to SET_KINEMATIC_POSITION for Z hop +[force_move] +enable_force_move: True + +################# +# Homing Override +[homing_override] +axes: xyz +gcode: + # collect user state variables + _User_Variables + {% set verbose = printer["gcode_macro _User_Variables"].verbose %} + {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} + # Safe Z for travel + {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} + {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} + {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} + {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} + {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} + {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} + + #checks if the variable definitions are up to date + _klicky_check_variables_version + + # if there is no Attach movement, fail + {% if attachmove_x == attachmove_y == attachmove_z == 0 %} + { action_raise_error("No attachmove location!") } + {% endif %} + + _CheckProbe action=query + + # reset parameters + {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} + + {% if 'PROBE_LOCK' in params%} + {% if verbose %} + { action_respond_info("PROBE_LOCK = True") } + {% endif %} + {% set leave_probe_attached = True %} + {% endif %} + + # which axes have been requested for homing + {% if not 'X' in params + and not 'Y' in params + and not 'Z' in params %} + + {% set home_x, home_y, home_z = True, True, True %} + + {% else %} + # Frame mount x-endstop - home Y before X + {% if 'X' in params %} + {% set home_x = True %} + {% endif %} + + {% if 'Y' in params %} + {% set home_y = True %} + {% endif %} + + {% if 'Z' in params %} + {% set home_z = True %} + {% endif %} + + {% if 'X' in params + and 'Y' in params + and 'Z' in params %} + # reset homing state variables + # if homing all axes + _Homing_Variables reset=1 + {% endif %} + + {% endif %} + + _entry_point function=homing_override + + # if Z is not homed, do not move the bed if it goes down + {% if 'z' not in printer.toolhead.homed_axes %} + {% if not enable_z_hop %} # Disables safe_z + {% set safe_z = 0 %} + {% endif %} + {% endif %} + + {% if home_z %} + {% if 'z' in printer.toolhead.homed_axes %} + {% if printer.toolhead.position.z < safe_z %} + {% if verbose %} + { action_respond_info("Z too low, performing ZHOP") } + {% endif %} + G0 Z{safe_z} F{z_drop_feedrate} + {% endif %} + {% else %} + {% if verbose %} + { action_respond_info("Z not homed, forcing full G28") } + {% endif %} + SET_KINEMATIC_POSITION X=0 Y=0 Z=0 + G0 Z{safe_z} F{z_drop_feedrate} + {% set home_x, home_y, home_z = True, True, True %} + {% endif %} + {% endif %} + + # if the dock is oriented on the Y, first do Y endstop + {% if attachmove_y == 0 %} + # Home y + {% if home_y %} + {% if verbose %} + { action_respond_info("Homing Y") } + {% endif %} + G28 Y0 + {% endif %} + {% set home_y = False %} + {% endif %} + + + # Home x + {% if home_x %} + {% if verbose %} + { action_respond_info("Homing X") } + {% endif %} + G28 X0 + {% endif %} + + # Home y + {% if home_y %} + {% if verbose %} + { action_respond_info("Homing Y") } + {% endif %} + G28 Y0 + {% endif %} + # Home z + {% if home_z %} + {% if verbose %} + { action_respond_info("Homing Z") } + {% endif %} + + # if probe is configured as endstop, attach it, else dock the probe if attached + {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} + Attach_Probe + # if PROBE_LOCK parameter is given, Attach Probe and lock until it´s unlocked + {% if leave_probe_attached %} + _Probe_Lock + {% endif %} + {% else %} + Dock_Probe + {% endif %} + + _Home_Z + + # if probe is configured as endstop, dock it + {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} + Dock_Probe + {% endif %} + {% endif %} + _CheckProbe action=query + + # park the toolhead + _Park_Toolhead + + _exit_point function=homing_override + +# Umbilical path setup +[gcode_macro _Umbilical_Path] +gcode: + {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} + {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} + {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} + {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} + {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} + + {% if umbilical %} + # Used to give the umbilical a better path to follow and coil properly if dock is tight in space + _entry_point function=Umbilical_Path + + G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} + + _exit_point function=Umbilical_Path + {% endif %} + +# Home Z Routine +[gcode_macro _Home_Z] +gcode: + {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} + {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} + {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} + {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} + {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} + {% set verbose = printer["gcode_macro _User_Variables"].verbose %} + + _entry_point function=Home_Z + + # if x and y are not homed yet, raise error + {% if not 'xy' in printer.toolhead.homed_axes %} + { action_raise_error("Must Home X and Y Axis First!") } + {% else %} + {% if not 'z' in printer.toolhead.homed_axes %} + {% if verbose %} + { action_respond_info("Resetting Z position to zero") } + {% endif %} + SET_KINEMATIC_POSITION Z=0 + {% endif %} + + # Move tool to safe homing position and home Z axis + # location of z endstop + G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} + G28 Z0 + G0 Z{safe_z} F{z_drop_feedrate} + {% endif %} + + _exit_point function=Home_Z + +# Check to see if probe is where it is supposed to be after +# attaching/docking maneuver and set homing error or shutdown +[gcode_macro _CheckProbe] +variable_probe_state: 0 +gcode: + Query_Probe + _SetProbeState action={ params.ACTION } + +# Due to how templates are evaluated, we have query endstops in one +# macro and call another macro to make decisions based on the result +[gcode_macro _SetProbeState] +gcode: + {% set query_probe_triggered = printer.probe.last_query %} + {% set action = params.ACTION|default('') %} + + # If triggered (true), probe not attached + {% if query_probe_triggered %} + SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } + {% else %} + # If not triggered (false), probe attached + SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } + {% endif %} + + {% if action == 'query' %} + SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } + {% endif %} + + # If probe fails to attach/detach + + # If not docked + {% if not query_probe_triggered and action == 'dock' %} + { action_raise_error("Probe dock failed!") } + {% endif %} + + # If not attached + {% if query_probe_triggered and action == 'attach' %} + { action_raise_error("Probe attach failed!") } + {% endif %} + +# Park Toolhead Routine +[gcode_macro _Park_Toolhead] +gcode: + {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} + {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} + {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} + {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} + {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} + {% set verbose = printer["gcode_macro _User_Variables"].verbose %} + + _entry_point function=Park_Toolhead + + {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} + {% if verbose %} + { action_respond_info("Parking Toolhead") } + {% endif %} + G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} + {% endif %} + _exit_point function=Park_Toolhead + diff --git a/klicky/klicky-probe.cfg b/klicky/klicky-probe.cfg new file mode 100644 index 0000000..6fc1860 --- /dev/null +++ b/klicky/klicky-probe.cfg @@ -0,0 +1,10 @@ +#Simple way to include all the various klicky macros and configurations +# the current home for this configuration is https://github.com/jlas1/Klicky-Probe, please check it + +# [include ./klicky-specific.cfg] #place to put other configurations specific to your printer +[include ./klicky-variables.cfg] #Requires +[include ./klicky-macros.cfg] #Required +[include ./klicky-bed-mesh-calibrate.cfg] #bed mesh, requires klipper configuration +#[include ./klicky-screws-tilt-calculate.cfg] #help adjust bed screws automatically +#[include ./klicky-quad-gantry-level.cfg] #level 4 Z motors +[include ./klicky-z-tilt-adjust.cfg] #level 2 or 3 Z motors diff --git a/klicky/klicky-specific.cfg b/klicky/klicky-specific.cfg new file mode 100644 index 0000000..08778d7 --- /dev/null +++ b/klicky/klicky-specific.cfg @@ -0,0 +1 @@ +{\rtf1} \ No newline at end of file diff --git a/klicky/klicky-variables.cfg b/klicky/klicky-variables.cfg new file mode 100644 index 0000000..5008ed4 --- /dev/null +++ b/klicky/klicky-variables.cfg @@ -0,0 +1,81 @@ +# This macro was provided by discord user Garrettwp to whom i give my thanks for sharing it with me. +# I have tweaked it a lot. +# They are based on the great Annex magprobe dockable probe macros "#Originally developed by Mental, +# modified for better use on K-series printers by RyanG and Trails", kudos to them. +# That macro as since evolved into a klipper plugin that currently is pending inclusion in klipper, +# more information here, https://github.com/Annex-Engineering/Quickdraw_Probe/tree/main/Klipper_Macros +# User richardjm revised the macro variables and added some functions, thanks a lot +# by standing on the shoulders of giants, lets see if we can see further +# +# the current home for this version is https://github.com/jlas1/Klicky-Probe +# the 1000 values below is to give an error instead of doing something wrong, hopefully, this won't be used is a printer larger than 1 meter + +[gcode_macro _User_Variables] +variable_verbose: True # Enable verbose output +variable_travel_speed: 200 # how fast all other travel moves will be performed when running these macros +variable_move_accel: 1000 # how fast should the toolhead accelerate when moving +variable_dock_speed: 50 # how fast should the toolhead move when docking the probe for the final movement +variable_release_speed: 75 # how fast should the toolhead move to release the hold of the magnets after docking +variable_z_drop_speed: 20 # how fast the z will lower when moving to the z location to clear the probe + +variable_safe_z: 15 # Minimum Z for attach/dock and homing functions +# if true it will move the bed away from the nozzle when Z is not homed +variable_enable_z_hop: True # set this to false for beds that fall significantly under gravity (almost to Z max) + +variable_max_bed_y: 250 # maximum Bed size avoids doing a probe_accuracy outside the bed +variable_max_bed_x: 250 # maximum Bed size avoids doing a probe_accuracy outside the bed + +# if a separate Z endstop switch is in +# use, specify the coordinates of the switch here (Voron). +# Set to 0 to have the probe move to center of bed +variable_z_endstop_x: 147 +variable_z_endstop_y: 257 + +#Check the documentation on klipper Dock/Undock configuration, these are dummy values +#dock location +variable_docklocation_x: 38 # X Dock position +variable_docklocation_y: 258 # Y Dock position +variable_docklocation_z: -128 # Z dock position (-128 for a gantry/frame mount) + +#Dock move, final toolhead movement to release the probe on the dock +#it's a relative move +Variable_dockmove_x: 40 +Variable_dockmove_y: 0 +Variable_dockmove_z: 0 +#Attach move. final toolhead movement to attach the probe on the mount +#it's a relative move +Variable_attachmove_x: 0 +Variable_attachmove_y: 30 +Variable_attachmove_z: 0 + +#Umbilical to help untangle the umbilical in difficult situations +variable_umbilical: False # should we untabgle the umbilical +variable_umbilical_x: 15 # X umbilical position +variable_umbilical_y: 15 # Y umbilical position + +# location to park the toolhead +variable_park_toolhead: False # Enable toolhead parking +variable_parkposition_x: 125 +variable_parkposition_y: 125 +variable_parkposition_z: 30 + +variable_version: 1 # Helps users to update the necessary variables, do not update if the variables above are not updated + +# Do not modify below +gcode: + {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} + {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} + {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} + {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} + {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} + + # If x, y coordinates are set for z endstop, assign them + {% if z_endstop_x != 0 or z_endstop_y != 0 %} + SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } + SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } + + # if no x, y coordinates for z endstop, assume probe is endstop and move toolhead to center of bed + {% else %} + SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } + SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } + {% endif %} \ No newline at end of file diff --git a/klicky/klicky-z-calibration.cfg b/klicky/klicky-z-calibration.cfg new file mode 100644 index 0000000..fd2287f --- /dev/null +++ b/klicky/klicky-z-calibration.cfg @@ -0,0 +1,92 @@ +[z_calibration] + +## update these variable according to the documentation here https://github.com/protoloft/klipper_z_calibration +## you then should call CALIBRATE_Z as one of the last lines on your PRINT_START to set the Z offset dinamically + +# The X and Y coordinates (in mm) for clicking the nozzle on the +# Z endstop. +probe_nozzle_x: 147 +probe_nozzle_y: 257 +# The X and Y coordinates (in mm) for clicking the probe's switch body +# on the Z endstop. +probe_switch_x: 140 +probe_switch_y: 238 +# The X and Y coordinates (in mm) for probing on the print surface +# (e.g. the center point) These coordinates will be adapted by the +# probe's X and Y offsets. The default is the relative_reference_index +# of the configured bed_mesh. It will raise an error if there is no +# probe_bed site and no bed_mesh with a relative_reference_index +# configured. +# probe_bed_x: 125 +# probe_bed_y: 125 +# The trigger point offset of the used switch. +# This needs to be fined out manually. For more details go to +# https://github.com/protoloft/klipper_z_calibration#switch-offset +# "So, with a smaller offset value, the nozzle is more away from the +# bed! The value cannot be negative." +switch_offset: 0.42 +# The maximum allowed deviation of the calculated offset. +# If the offset exceeds this value, it will stop! +# The default is 1.0 mm. +# max_deviation: 1.0 +# The number of times to probe each point. The probed z-values +# will be averaged. The default is from the probe's configuration. +#samples: default from "probe:samples" section +# The maximum Z distance (in mm) that a sample may differ from other +# samples. The default is from the probe's configuration. +#samples_tolerance: default from "probe:samples_tolerance" section +# The number of times to retry if a sample is found that exceeds +# samples_tolerance. The default is from the probe's configuration. +#samples_tolerance_retries: default from "probe:samples_tolerance_retries" section +# The calculation method when sampling more than once - either +# "median" or "average". The default is from the probe's configuration. +#samples_result: default from "probe:samples_result" section +# The distance in mm to move up before moving to the next +# position. The default is two times the z_offset from the probe's +# configuration. +clearance: 7.5 +#position_min: default from "stepper_z:position_min" section. +# The moving speed in X and Y. The default is 50 mm/s. +speed: 200 +# Speed (in mm/s) of the Z axis when lifting the probe between +# samples and clearance moves. The default is from the probe's +# configuration. +#lift_speed: default from "probe:lift_speed" section +# The fast probing speed (in mm/s) used, when probing_first_fast +# is activated. The default is from the Z rail configuration. +#probing_speed: default from "stepper_z:homing_speed" section. +# The slower speed (in mm/s) for probing the recorded samples. +# The default is second_homing_speed of the Z rail configuration. +#probing_second_speed: default from "stepper_z:second_homing_speed" section. +# Distance to back off (in mm) before probing the next sample. +# The default is homing_retract_dist from the Z rail configuration. +#probing_retract_dist: default from "stepper_z:homing_retract_dist" section. +# If true, the first probing is done faster by the probing speed. +# This is to get faster down and the result is not recorded as a +# probing sample. The default is false. +probing_first_fast: true +# If true, the first probing is done faster by the probing speed. +# This is to get faster down and the result is not recorded as a +# probing sample. The default is false. + +start_gcode: Dock_Probe_Unlock +# A list of G-Code commands to execute prior to each calibration command. +# See docs/Command_Templates.md for G-Code format. This can be used to +# attach the probe. +before_switch_gcode: Attach_Probe +# A list of G-Code commands to execute prior to each probing on the +# mag-probe. See docs/Command_Templates.md for G-Code format. This can be +# used to attach the probe after probing on the nozzle and before probing +# on the mag-probe. +end_gcode: Dock_Probe +# A list of G-Code commands to execute after each calibration command. +# See docs/Command_Templates.md for G-Code format. This can be used to +# detach the probe afterwards. + +[gcode_macro CALIBRATE_Z] +rename_existing: BASE_CALIBRATE_Z +gcode: + M117 Z-Calibration.. + SET_GCODE_OFFSET Z=0 + BASE_CALIBRATE_Z + M117 \ No newline at end of file diff --git a/klicky/klicky-z-tilt-adjust.cfg b/klicky/klicky-z-tilt-adjust.cfg new file mode 100644 index 0000000..b2ed4d5 --- /dev/null +++ b/klicky/klicky-z-tilt-adjust.cfg @@ -0,0 +1,31 @@ +# This macro was provided by discord user Garrettwp to whom i give my thanks for sharing it with me. +# I have tweaked it a lot. +# +# this macro is based on the great Annex magprobe dockable probe macros "#Originally developed by Mental, modified for better use on K-series printers by RyanG and Trails" +# that macro as since evolved into a klipper plugin that currently is pending inclusion in klipper +# more information here https://github.com/Annex-Engineering/Quickdraw_Probe/tree/main/Klipper_Macros +# +# by standing on the shoulders of giants, lets see if we can see further +# User richardjm revised the macro variables and added some functions, thanks a lot +# This macro home is https://github.com/jlas1/Klicky-Probe + +################### +## Z Tilt Adjust +[gcode_macro Z_TILT_ADJUST] +rename_existing: _Z_TILT_ADJUST +description: +gcode: + {% set V = printer["gcode_macro _User_Variables"].verbose %} + {% if V %} + { action_respond_info("Z Tilt Adjust") } + {% endif %} + + _CheckProbe action=query + G90 + Attach_Probe + + _Z_TILT_ADJUST {% for p in params + %}{'%s=%s ' % (p, params[p])}{% + endfor %} + Dock_Probe + G28 Z0 \ No newline at end of file diff --git a/moonraker.conf b/moonraker.conf new file mode 100644 index 0000000..1d68996 --- /dev/null +++ b/moonraker.conf @@ -0,0 +1,47 @@ +[server] +host: 0.0.0.0 +port: 7125 +enable_debug_logging: False + +[file_manager] +config_path: /home/pi/klipper_config +log_path: /home/pi/klipper_logs +queue_gcode_uploads: True + +[authorization] +cors_domains: + *.local + *.lan + *://app.fluidd.xyz + +trusted_clients: + 10.0.0.0/8 + 127.0.0.0/8 + 169.254.0.0/16 + 172.16.0.0/12 + 192.168.0.0/16 + FE80::/10 + ::1/128 + +# enables history +[history] + +# enables support for slicer uploads via partial Octoprint API impl +[octoprint_compat] + +# enables update manager +[update_manager] +enable_auto_refresh: True + +# enables fluidd updates +[update_manager client fluidd] +type: web +repo: cadriel/fluidd +path: ~/fluidd + +[update_manager client z_calibration] +type: git_repo +path: ~/klipper_z_calibration +origin: https://github.com/protoloft/klipper_z_calibration.git +install_script: install.sh +managed_services: klipper \ No newline at end of file diff --git a/printer-jabbasnot.cfg b/printer-jabbasnot.cfg new file mode 100644 index 0000000..bc7720d --- /dev/null +++ b/printer-jabbasnot.cfg @@ -0,0 +1,361 @@ +# Jabba Snot - Voron Trident 250 Klipper Config +# Documentation: https://os.ratrig.com + +# The first thing you'll need to do is go through this file and comment out / uncomment +# the files and/or settings you need. +# You'll be able to print just fine with this config as it is, but it is recommended +# that you follow these steps to properly calibrate your printer: +# 0) Sanity check and PID Tuning: https://www.klipper3d.org/Config_checks.html +# 1) Pressure Advance: https://www.klipper3d.org/Pressure_Advance.html +# 2) Skew Correction: https://www.klipper3d.org/Skew_Correction.html +# 3) Resonance Compensation: https://www.klipper3d.org/Resonance_Compensation.html + +# Read more about klipper here: https://www.klipper3d.org/Overview.html + +############################################################################################################# +### CONTROL BOARD +### Pick the board you have installed and wired in your printer. +############################################################################################################# +#[include config/boards/btt-skr-pro-12/config.cfg] +#[include config/boards/btt-octopus-11/config.cfg] +#[include config/boards/btt-octopus-pro-446/config.cfg] +#[include config/boards/btt-octopus-pro-429/config.cfg] +[include config/boards/fysetc-spider/v1.1.cfg] +[include config/boards/rpi/config.cfg] + + +############################################################################################################# +### BASE SETUP +############################################################################################################# +[include config/printers/trident/trident.cfg] + +############################################################################################################# +### STEPPER MOTORS, DRIVERS & SPEED LIMITS +### Pick the drivers and stepper motors you're using. See the RatOS documentation for custom combinations. +############################################################################################################# +[include config/printers/trident/steppers.cfg] + +# UNCOOLED TMC 2209 + LDO-42STH48-2504AC +# [include config/printers/trident/speed-limits-basic.cfg] +# [include config/printers/trident/tmc2209.cfg] +# [include config/steppers/ldo/42sth48-2504ac/2209/24v-1.1a-x.cfg] +# [include config/steppers/ldo/42sth48-2504ac/2209/24v-1.1a-y.cfg] +# [include config/steppers/ldo/42sth40-1684ac/2209/24v-0.8a-z*.cfg] + +# COOLED TMC 2209 + LDO-42STH48-2504AC +# This increases motor torque, positional accuracy and speed limits. +# don't enable this before your printer is fully configured and you have a fan blowing on your stepper drivers. +[include config/printers/trident/speed-limits-performance.cfg] +[include config/printers/trident/tmc2209-performance.cfg] +[include config/steppers/ldo/42sth48-2504ac/2209/24v-1.6a-x.cfg] +[include config/steppers/ldo/42sth48-2504ac/2209/24v-1.6a-y.cfg] +[include config/steppers/ldo/42sth40-1684ac/2209/24v-0.8a-z*.cfg] + +# STEALTH MODE (Enables stealthchop and limits velocity and acceleration) +# NOTE: You still need to include one of the above stepper motor definitions. +# NOTE: This will make your printer quiter but less accurate, it's an inherent side effect of stealthchop. +#[include config/printers/trident/speed-limits-stealth.cfg] +#[include config/printers/trident/tmc2209-stealth.cfg] + +############################################################################################################# +### HOMING +### Pick your probe and endstops +############################################################################################################# +# BL Touch +# [include config/z-probe/bltouch.cfg] +# Inductive/Capacitive probe +[include config/z-probe/probe.cfg] + +# Physical endstops +[include config/printers/trident/physical-endstops.cfg] +# Sensorless homing (Beware: this requires manual tinkering and does not work if your x/y stepper drivers +# have clipped DIAG pins). It is strongly encouraged to use physical endstops if you're a beginner. +# If you still wish to proceed, copy config/templates/sensorless-homing-tmc2209.cfg to the root directory and +# remove the # from the line below. +#[include sensorless-homing-tmc2209.cfg] + + +############################################################################################################# +### PHYSICAL DIMENSIONS +### Pick your printer size +############################################################################################################# +[include config/printers/trident/250.cfg] + + +############################################################################################################# +### INPUT SHAPER +### Enable/disable input shaper calibration +############################################################################################################# +[include config/sensors/rpi-adxl345.cfg] +[include config/printers/trident/input-shaper.cfg] + +############################################################################################################# +### TOOLHEAD +### Pick your extruder and hotend +############################################################################################################# +# Extruder +#[include config/extruders/bmg.cfg] +#[include config/extruders/lgx.cfg] +[include config/extruders/lgx-lite.cfg] +#[include config/extruders/orbiter.cfg] +#[include config/extruders/orbiter-1004.cfg] # Use this with the LDO-36STH20-1004AHG motor +#[include config/extruders/hemera.cfg] +#[include config/extruders/titan.cfg] + +# Hotend +# [include config/hotends/v6.cfg] +#[include config/hotends/dragonfly.cfg] +#[include config/hotends/rapido.cfg] +#[include config/hotends/copperhead.cfg] +#[include config/hotends/mosquito.cfg] +[include config/hotends/mosquito-magnum.cfg] +#[include config/hotends/dragon-standard-flow.cfg] +#[include config/hotends/dragon-high-flow.cfg] + + +############################################################################################################# +### MACROS +############################################################################################################# +[include config/macros.cfg] +[include config/shell-macros.cfg] +[include config/printers/trident/macros.cfg] +[include klicky/klicky-probe.cfg] + + +############################################################################################################# +### MACRO CONFIGURATION +### Configure the behavior of RatOS macros +############################################################################################################# +[gcode_macro RatOS] +# Use absolute extrusion mode +# Set to True to use relative extrusion mode +variable_relative_extrusion: True +# Wait for extruder to reach 150 so an inductive probe (if present) is at a predictable temp. +# Also allows the bed heat to spread a little, and softens any plastic that might be stuck to the nozzle. +# Set to False to disable +variable_preheat_extruder: True +# Calibrate the bed mesh in the START_PRINT macro. +# Set to false to skip BED_MESH_CALIBRATE, it will still load the BED_MESH +# with the name "ratos", be sure to save your bed_mesh profile with that name. +# or override the _START_PRINT_BED_MESH macro to implement your own mesh handling logic. +variable_calibrate_bed_mesh: False +# Print a prime line or blob at the end of the START_PRINT macro +# set to "primeline" or "primeblob", or False to disable nozzle_priming. +variable_nozzle_priming: "primeblob" +# Park in the back when waiting for the extruder to heat up +# set to "front" to park in the front, or "center" to park in the center. +variable_start_print_park_in: "front" +# Height to park it when waiting for extruder to heat. +variable_start_print_park_z_height: 30 +# Skew profile to load before starting the print +# uncomment this to use your calibrated skew correction profile. +variable_skew_profile: "my_skew_profile" +# Park in the back after the print has ended or was cancelled. +# set to "front" to park in the front, or "center" to park in the center. +variable_end_print_park_in: "back" +# Park in the back when the print is paused. +# set to "front" to park in the front, or "center" to park in the center. +variable_pause_print_park_in: "front" +# Set the speed for travel moves in RatOS Macros in mm/s. +variable_macro_travel_speed: 200 +# Offset to be applied after Z calibration when using a textured sheet. +# Will be applied if the START_PRINT macro params includes TEXTUREDPLATE=true +variable_textured_plate_offset: -0.04 +# Should the motors be turned off after a print. +# If set to False then some time-consuming actions (e.g. homing, z-tilt) can be skipped on next print. +variable_end_print_motors_off: False + +############################################################################################################# +### PRINTER CONFIGURATION +### Customize the defaults to your specific build +############################################################################################################# +[stepper_x] +dir_pin: !x_dir_pin # Add ! in front of pin name to reverse X stepper direction +rotation_distance: 40 # 40 for 20 tooth 2GT pulleys, 32 for 16 tooth 2GT pulleys +position_endstop: 250 # Adjust this to your setup +position_max: 250 + +[stepper_y] +dir_pin: !y_dir_pin # Add ! in front of pin name to reverse Y stepper direction +rotation_distance: 40 # 40 for 20 tooth 2GT pulleys, 32 for 16 tooth 2GT pulleys +position_endstop: 257 # 250mm printer +position_max: 258 + +[stepper_z] +dir_pin: z0_dir_pin # Add ! in front of pin name to reverse Z stepper direction +rotation_distance: 4 # 4 for TR8*4 lead screws +position_max: 232 +position_min: -2.5 + +[stepper_z1] +dir_pin: z1_dir_pin # Add ! in front of pin name to reverse Z1 direction +rotation_distance: 4 # 4 for TR8*4 lead screws + +[stepper_z2] +dir_pin: z2_dir_pin # Add ! in front of pin name to reverse Z2 direction +rotation_distance: 4 # 4 for TR8*4 lead screws + +# Z Probe configuration +[probe] +x_offset: 0 +y_offset: 19.75 +z_offset: 6.42 +pin: ^probe_pin # For NPN NC probes such as the Super Pinda / Vinda / SupCR / Decoprobe probes. +#pin: ^!probe_pin # NPN NO (refer to the specs on your probe) +#pin: probe_pin # PNP NO (refer to the specs on your probe) +#pin: !probe_pin # PNP NC (refer to the specs on your probe) + +[z_calibration] +# The X and Y coordinates (in mm) for clicking the nozzle on the +# Z endstop. +nozzle_xy_position: 147, 257 +switch_xy_position: 140, 238 +probing_first_fast: true +speed: 200 +clearance: 7.5 +start_gcode: Dock_Probe_Unlock +before_switch_gcode: Attach_Probe +end_gcode: Dock_Probe +max_deviation: 1.5 +# The trigger point offset of the used switch. +# This needs to be fined out manually. For more details go to +# https://github.com/protoloft/klipper_z_calibration#switch-offset +# "So, with a smaller offset value, the nozzle is more away from the +# bed! The value cannot be negative." +switch_offset: 0.52 + +[gcode_macro CALIBRATE_Z] +rename_existing: BASE_CALIBRATE_Z +gcode: + M117 Z-Calibration.. + SET_GCODE_OFFSET Z=0 + BASE_CALIBRATE_Z + M117 + +[gcode_macro _User_Variables] +variable_z_endstop_x: 147 +variable_z_endstop_y: 257 +# variable_docklocation_x: 38 +variable_docklocation_x: 0 +variable_docklocation_y: 258 + +[extruder] +# Check https://www.klipper3d.org/Pressure_Advance.html for pressure advance tuning. +pressure_advance: 0.065 +nozzle_diameter: 0.4 # Remember to change this if you change nozzle diameter. +dir_pin: e_dir_pin +control: pid + +[heater_bed] +heater_pin: PB3 +sensor_type: NTC 100K MGB18-104F39050L32 +max_power: 0.6 +control: pid + +# Chamber thermistor on Hartk 3.2 toolhead PCB +[thermistor chamber_temp] +temperature1: 25 +resistance1: 10000 +beta: 3950 +[temperature_sensor enclosure_temp] +sensor_type: chamber_temp +sensor_pin: temperature_sensor1_pin +min_temp: -100 +max_temp: 100 +gcode_id: C + +[output_pin caselight] +# Chamber Lighting +pin: PB7 +pwm: true +shutdown_value: 0 +value: 1 +cycle_time: 0.01 + +[resonance_tester] +probe_points: 125,125,20 + +############################################################################################################# +### USER OVERRIDES +### Anything custom you want to add, or RatOS configuration you want to override, do it here. +############################################################################################################# +[mcu] +serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_1F0013001050563046363120-if00 + +[printer] +max_velocity: 900 +max_accel: 15000 +max_accel_to_decel: 7500 + +[input_shaper] +shaper_freq_x: 67.4 +shaper_type_x: mzv +shaper_freq_y: 88.8 +shaper_type_y: 2hump_ei + +# [extruder] +# min_temp: -100 + +# [heater_bed] +# min_temp: -100 + +# [include TEST_SPEED.cfg] + +#*# <---------------------- SAVE_CONFIG ----------------------> +#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. +#*# +#*# [heater_bed] +#*# pid_kp = 41.205 +#*# pid_ki = 1.321 +#*# pid_kd = 321.402 +#*# +#*# [extruder] +#*# pid_kp = 24.791 +#*# pid_ki = 1.366 +#*# pid_kd = 112.491 +#*# +#*# [stepper_z] +#*# position_endstop = -0.516 +#*# +#*# [bed_mesh default] +#*# version = 1 +#*# points = +#*# -0.049062, 0.001563, -0.020937, 0.010938, -0.056250 +#*# 0.007500, 0.072500, 0.052188, 0.035000, -0.031875 +#*# -0.022500, 0.044688, 0.000000, 0.005312, -0.069063 +#*# -0.044375, -0.001250, -0.003438, -0.044063, -0.100625 +#*# -0.075625, -0.044375, -0.063125, -0.087188, -0.125625 +#*# tension = 0.2 +#*# min_x = 40.0 +#*# algo = bicubic +#*# y_count = 5 +#*# mesh_y_pps = 2 +#*# min_y = 40.0 +#*# x_count = 5 +#*# max_y = 210.0 +#*# mesh_x_pps = 2 +#*# max_x = 210.0 +#*# +#*# [bed_mesh ratos] +#*# version = 1 +#*# points = +#*# -0.049062, 0.001563, -0.020937, 0.010938, -0.056250 +#*# 0.007500, 0.072500, 0.052188, 0.035000, -0.031875 +#*# -0.022500, 0.044688, 0.000000, 0.005312, -0.069063 +#*# -0.044375, -0.001250, -0.003438, -0.044063, -0.100625 +#*# -0.075625, -0.044375, -0.063125, -0.087188, -0.125625 +#*# tension = 0.2 +#*# min_x = 40.0 +#*# algo = bicubic +#*# y_count = 5 +#*# mesh_y_pps = 2 +#*# min_y = 40.0 +#*# x_count = 5 +#*# max_y = 210.0 +#*# mesh_x_pps = 2 +#*# max_x = 210.0 +#*# +#*# [skew_correction my_skew_profile] +#*# xy_skew = -0.00110637146687 +#*# xz_skew = 0.0 +#*# yz_skew = 0.0