Atax Posté(e) Juin 5, 2024 Posté(e) Juin 5, 2024 (modifié) Bonjours j'ai une wanhao D12 300 Promax avec un BL touch j'ai installer un smartPad de wanhao recement et j'ai des difficulté avec le ADAPTATIVE_BED_MESH c'est parce que le print_start se lance avant le setting du EXCLUDE_OBJECT_DEFINE voici les logs de ma tentative d'impression: No objects detected! Check your gcode and make sure that EXCLUDE_OBJECT_DEFINE is happening before BED_MESH_CALIBRATE is called. Defaulting to regular meshing. 09:02 Adaptive bed mesh: MESH_MIN=116,20 MESH_MAX=183,260 PROBE_COUNT=5,9 ALGORITHM=bicubic 09:02 Computed mesh parameters: MESH_MIN=116,20 MESH_MAX=183,260 PROBE_COUNT=5,9 ALGORITHM=bicubic 09:02 Got a SIZE parameter for the adaptive bed mesh 09:02 Adaptive bed mesh: parameters not already computed, automatically calling the COMPUTE_MESH_PARAMETERS macro prior to the mesh Voici mon PRINT_START [gcode_macro PRINT_START] gcode: {% set BED = params.BED|default("60")|float %} {% set EXTRUDER = params.EXTRUDER|default("200")|float %} {% set FL_SIZE = params.SIZE|default("0_0_0_0")|string %} M117 Heating... M140 S{BED} ; set bed temp M105 ;report temperatures M190 S{BED} ;Wait bed temp to be reached M104 S{EXTRUDER} ; set extruder temp M105 ;report temperatures M109 S{EXTRUDER|int} ;Attendre que l'extruder atteigne la température requise M117 ALL Temperatures OK M107 ; start with fan off G90 ;absolute positioning G28 X0 Y0 ;move X/Y to min endstops G28 Z0 ;move Z to min endstops ADAPTIVE_BED_MESH SIZE={FL_SIZE} M117 CHECK Temperatures M140 S{BED} ; set bed temp M105 ;report temperatures M190 S{BED} ;Wait bed temp to be reached M104 S{EXTRUDER} ; set extruder temp M105 ;report temperatures M109 S{EXTRUDER|int} ;Attendre que l'extruder atteigne la température requise M117 BED And EXTRUDERS ARE HOTS PURGE_LINE M117 Printing... [gcode_macro PURGE_LINE] gcode: M117 Purge extruder G92 E0 ; reset extruder G1 Z1.0 F3000 ; move z up little to prevent scratching of surface G1 X2 Y20 Z0.3 F5000.0 ; move to start-line position G1 X2 Y200.0 Z0.3 F1500.0 E15 ; draw 1st line G1 X2 Y200.0 Z0.4 F5000.0 ; move to side a little G1 X2 Y20 Z0.4 F1500.0 E30 ; draw 2nd line G92 E0 ; reset extruder G1 Z1.0 F3000 ; move z up little to prevent scratching of surface Et Voici mon start GCODE dans CURA 5.7, profil wanhao D12 300 Promax M117 PRINT_START BED={material_bed_temperature_layer_0} EXTRUDER={material_print_temperature_layer_0} AREA_START_X=%MINX% AREA_START_Y=%MINY% AREA_END_X=%MAXX% AREA_END_Y=%MAXY% SIZE=%MINX%_%MINY%_%MAXX%_%MAXY% Comment faire pour que le adaptative_bed_mesh soit bien pris en compte ? on m'a dit qu'il fallais faire un M117 avant le print_start pour laisser le temps au start de SET le EXCLUDE_OBJECT_DEFINE mais ca n'a pas fonctionné Modifié (le) Juin 5, 2024 par Atax
Savate Posté(e) Juin 5, 2024 Posté(e) Juin 5, 2024 il y a 33 minutes, Atax a dit : ADAPTATIVE_BED_MESH tu utilises lequel ? celui de klipper ou de kamp ? fais nous voir la macro ADAPTATIVE_BED_MESH (ou le klippy.log)
Atax Posté(e) Juin 5, 2024 Auteur Posté(e) Juin 5, 2024 C'est celui de la vidéo de. tom's basement: ######################################### ########## ADAPTIVE BED MESH ############ ######################################### # Written by Frix_x#0161 # # @version: 4.0 # CHANGELOG: # v4.0: - patched and re-simplified the macro to work with latest Klipper changes: zero_reference_position is much more constrained and all the fancy stuff # that was used in the past for homing over the RRI with virtual probe or Z calibration plugin is not possible anymore. Now homing must be done at # fixed zero_reference_poisition and can't be dynamic anymore (but it's also simpler) # - this change also allow the mesh to have even probe point now for more flexibility # v3.0: - added the use of [exclude_object] tags to extract the first layer bounding box (many thanks to Kyleisah for the excellent idea and inspiration) # the macro is still fully compatible with the old way using the SIZE parameter: it will use it if specified, or else # fallback to the [exclude_object] method and if both are not available, it will do a full and normal bed mesh as usual. # - also added a FORCE_MESH parameter to mesh even for very small parts # - removed the RRI that was always added put in the BED_MESH_CALIBRATE call. Now it's added only when there is one defined in the [bed_mesh] section # v2.3: moved the install notes into a proper markdown file in: docs > features > adaptive_bed_mesh.md # v2.2: removed the requirement to set mesh_pps in the [bed_mesh] section. It's now again optional as it should be # v2.1: fix for the nominal mesh (when no SIZE parameter is used or SIZE=0_0_0_0) # v2.0: split in multple macros to be able to use the center point in the z calibration bed probing position before doing the mesh # v1.1: fix for a bug when parsing string when using uppercase letters in the [bed_mesh] section # v1.0: first adaptive bed mesh macro # ------------------------------------------------------------------------------------------------------------------------- # If you want to use it into your own config, please install it as a standalone macro as described in the # installation section of this file: docs > features > adaptive_bed_mesh.md # ------------------------------------------------------------------------------------------------------------------------- ### 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. So this is where the adaptive bed mesh is helping: # 1. It get the corners coordinates of the fisrt layer surface either from the slicer or the [exclude_object] tags # 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. To go further, it 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) # Feel free to ping me on Discord (Frix_x#0161) if you need help or have any comments to improve it :) # =========================================================================================================== # DO NOT MODIFY THOSE VARIABLES (they are used internaly by the adaptive bed mesh macro) [gcode_macro _ADAPTIVE_MESH_VARIABLES] variable_ready: False variable_do_mesh: False variable_do_nominal: False variable_mesh_min: 0,0 variable_mesh_max: 0,0 variable_probe_count: 0,0 variable_algo: "bicubic" gcode: [gcode_macro COMPUTE_MESH_PARAMETERS] description: Compute the mesh parameters and store them for later use 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"]|lower %} {% set xMeshPPS, yMeshPPS = (printer["configfile"].config["bed_mesh"]["mesh_pps"]|default('2,2')).split(',')|map('trim')|map('int') %} {% set margin = params.MARGIN|default(5)|int %} # additional margin to mesh around the first layer {% set force_mesh = params.FORCE_MESH|default(False) %} # force the mesh even if it's a small part (ie. computed less than 3x3) # 2 ----- GET FIRST LAYER COORDINATES and SIZE ------------------------------------- # If the SIZE parameter is defined and not a dummy placeholder, we use it to do the adaptive bed mesh logic {% set coordinatesFound = false %} {% if params.SIZE is defined and params.SIZE != "0_0_0_0" %} RESPOND MSG="Got a SIZE parameter for the adaptive bed mesh" {% set xMinSpec, yMinSpec, xMaxSpec, yMaxSpec = params.SIZE.split('_')|map('trim')|map('int') %} {% set coordinatesFound = true %} {% elif printer.exclude_object is defined %} {% if printer.exclude_object.objects %} # Else if SIZE is not defined, we fallback to use the [exclude_object] tags # This method is derived from Kyleisah KAMP repository: https://github.com/kyleisah/Klipper-Adaptive-Meshing-Purging) RESPOND MSG="No SIZE parameter, using the [exclude_object] tags for the adaptive bed mesh" {% set eo_points = printer.exclude_object.objects|map(attribute='polygon')|sum(start=[]) %} {% set xMinSpec = eo_points|map(attribute=0)|min %} {% set yMinSpec = eo_points|map(attribute=1)|min %} {% set xMaxSpec = eo_points|map(attribute=0)|max %} {% set yMaxSpec = eo_points|map(attribute=1)|max %} {% set coordinatesFound = true %} {% endif %} {% endif %} {% if not coordinatesFound %} # If no SIZE parameter and no [exclude_object] tags, then we want to do a nominal bed mesh # so nothing to do here... RESPOND MSG="No info about the first layer coordinates, doing a nominal bed mesh instead of adaptive" {% endif %} # If the first layer size was correctly retrieved, we can do the adaptive bed mesh logic, else we # fallback to the original and nominal BED_MESH_CALIBRATE function (full bed probing) {% if xMinSpec and yMinSpec and xMaxSpec and yMaxSpec %} # 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 (if not forced). # 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 probing 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 %} {% if force_mesh %} RESPOND MSG="Bed mesh forced (small part detected): meshing 3x3..." {% set xProbeCnt = 3 %} {% set yProbeCnt = 3 %} {% set algo = "lagrange" %} {% 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="Computed mesh parameters: MESH_MIN={mesh_min} MESH_MAX={mesh_max} PROBE_COUNT={probe_count} ALGORITHM={algo}" SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=do_mesh VALUE={True} SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=do_nominal VALUE={False} SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=mesh_min VALUE='"{mesh_min}"' SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=mesh_max VALUE='"{mesh_max}"' SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=probe_count VALUE='"{probe_count}"' SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=algo VALUE='"{algo}"' {% else %} RESPOND MSG="Computed mesh parameters: none, bed mesh not needed for very small parts" SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=do_mesh VALUE={False} {% endif %} {% else %} {% set xProbeCnt = [3, xProbeCnt]|max %} {% set yProbeCnt = [3, yProbeCnt]|max %} # 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 ----- FORMAT THE PARAMETERS AND SAVE THEM --------------------------- {% 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="Computed mesh parameters: MESH_MIN={mesh_min} MESH_MAX={mesh_max} PROBE_COUNT={probe_count} ALGORITHM={algo}" SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=do_mesh VALUE={True} SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=do_nominal VALUE={False} SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=mesh_min VALUE='"{mesh_min}"' SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=mesh_max VALUE='"{mesh_max}"' SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=probe_count VALUE='"{probe_count}"' SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=algo VALUE='"{algo}"' {% endif %} {% else %} SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=do_mesh VALUE={True} SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=do_nominal VALUE={True} {% endif %} # Finaly save in the variables that we already computed the values SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=ready VALUE={True} [gcode_macro ADAPTIVE_BED_MESH] description: Perform a bed mesh, but only where and when it's needed gcode: {% set ready = printer["gcode_macro _ADAPTIVE_MESH_VARIABLES"].ready %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home printer first!") } {% endif %} # If the parameters where computed, we can do the mesh by calling the _DO_ADAPTIVE_MESH {% if ready %} _DO_ADAPTIVE_MESH # If the parameters where not computed prior to the ADAPTIVE_BED_MESH call, we call the COMPUTE_MESH_PARAMETERS # macro first and then call the _DO_ADAPTIVE_MESH macro after it {% else %} RESPOND MSG="Adaptive bed mesh: parameters not already computed, automatically calling the COMPUTE_MESH_PARAMETERS macro prior to the mesh" COMPUTE_MESH_PARAMETERS {rawparams} M400 # mandatory to flush the gcode buffer and be sure to use the last computed parameters _DO_ADAPTIVE_MESH {% endif %} [gcode_macro _DO_ADAPTIVE_MESH] gcode: # 1 ----- POPULATE BEDMESH PARAMS FROM SAVED VARIABLES ---------------------- {% set do_mesh = printer["gcode_macro _ADAPTIVE_MESH_VARIABLES"].do_mesh %} {% set do_nominal = printer["gcode_macro _ADAPTIVE_MESH_VARIABLES"].do_nominal %} {% set mesh_min = printer["gcode_macro _ADAPTIVE_MESH_VARIABLES"].mesh_min %} {% set mesh_max = printer["gcode_macro _ADAPTIVE_MESH_VARIABLES"].mesh_max %} {% set probe_count = printer["gcode_macro _ADAPTIVE_MESH_VARIABLES"].probe_count %} {% set algo = printer["gcode_macro _ADAPTIVE_MESH_VARIABLES"].algo %} # 2 --------- ADAPTIVE_BED_MESH LOGIC -------------------------------------- # If it's necessary to do a mesh {% if do_mesh %} # If it's a standard bed_mesh to be done {% if do_nominal %} RESPOND MSG="Adaptive bed mesh: nominal bed mesh" BED_MESH_CALIBRATE {% else %} RESPOND MSG="Adaptive bed mesh: MESH_MIN={mesh_min} MESH_MAX={mesh_max} PROBE_COUNT={probe_count} ALGORITHM={algo}" BED_MESH_CALIBRATE MESH_MIN={mesh_min} MESH_MAX={mesh_max} PROBE_COUNT={probe_count} ALGORITHM={algo} {% endif %} {% else %} RESPOND MSG="Adaptive bed mesh: no mesh to be done" {% endif %} # Set back the 'ready' parameter to false SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=ready VALUE={False}
Savate Posté(e) Juin 5, 2024 Posté(e) Juin 5, 2024 il y a 26 minutes, Atax a dit : C'est celui de la vidéo de. tom's basement: Est-ce que tu as bien mis la section [exclude_object] dans ton fichier de configuration ? Référence de configuration - Documentation Klipper (klipper3d.org) Dans Cura il faut utiliser le exclude_object (sur la 4.xx il fallait rajouter un plugin, je ne sais pas pour la 5.xx) 1
Atax Posté(e) Juin 5, 2024 Auteur Posté(e) Juin 5, 2024 (modifié) Alors oui il fallais rajouter sur CURA une extension qui fournit les dimension du print, c'est "mesh print size" dans les plugin de post traitement c'est bien rajouté ! et le [exclude_object] est bien present dans mon printer.cfg je vais le poster si ca peut servir. ######### NOT REMOVE START ################################## [include plr.cfg] [include mainsail.cfg] [include timelapse.cfg] [include smartpad-adxl345.cfg] [include smartpad-cpu-temp.cfg] [include moonraker_obico_macros.cfg] [include adaptive_bed_mesh.cfg] [exclude_object] [save_variables] filename: ~/printer_data/config/variables.cfg [gcode_arcs] resolution: 0.1 [respond] default_type: echo default_prefix: echo: [display_status] [pause_resume] ######### NOT REMOVE END ################################## #YUMI SMART PAD use OPEN SOURCE CODE #all documentation about klipper is available here : https://www.klipper3d.org/ #all documentation about Moonraker is available here : https://moonraker.readthedocs.io/ #all documentation about KlipperScreen is avaialble here : https://klipperscreen.readthedocs.io/ #all documentation about Mainsail is available here : https://docs.mainsail.xyz/ #all documentation about Crowsnest is available here : https://crowsnest.mainsail.xyz/ #all documentation about YUMI-LAB is available here : https://wiki.yumi-lab.com/ ###################################################### ################## Wanhao D12 #################### ###################################################### [mcu] #serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0 #NANO V3.2 serial: /dev/ttyACM0 #NANO V3.0 & V3.1 restart_method: command ###################################################### ############### Stockage PI ############## ###################################################### [virtual_sdcard] path: ~/printer_data/gcodes [stepper_x] step_pin: PE3 dir_pin: PE2 enable_pin: !PE4 microsteps: 16 rotation_distance: 40 endstop_pin: !PA15 position_endstop: 0 position_max: 350 position_min:-30 homing_speed: 100 [stepper_y] step_pin: PE0 dir_pin: !PB9 enable_pin: !PE1 microsteps: 16 rotation_distance: 40 endstop_pin: !PD2 position_endstop: 0 position_max: 310 position_min: 0 homing_speed: 100 [stepper_z] step_pin: PB5 dir_pin: PB4 #!PB4 pour A4988 et PB4 pour TMC2209 enable_pin: !PB8 microsteps: 16 rotation_distance: 8 endstop_pin:probe:z_virtual_endstop position_max: 400 position_min: -2 [extruder] step_pin: PD6 dir_pin: PD3 enable_pin: !PB3 rotation_distance: 7.3260211128 #gear_ratio: 50:17 microsteps: 16 full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree nozzle_diameter: 0.400 filament_diameter: 1.750 heater_pin: PE5 sensor_type: ATC Semitec 104GT-2 sensor_pin: PC1 #control: pid #pid_Kp: 29.871 #pid_Ki: 1.185 #pid_Kd: 188.184 min_temp: 0 max_temp: 250 max_extrude_only_velocity: 60 max_extrude_only_distance: 500 max_extrude_cross_section: 10 [heater_bed] heater_pin: PA0 sensor_type: EPCOS 100K B57560G104F sensor_pin: PC0 #control: pid #pid_Kp: 66.717 #pid_Ki: 0.847 #pid_Kd: 1313.487 min_temp: 0 max_temp: 100 [screws_tilt_adjust] screw1: 90, 65 screw1_name: front left screw screw2: 290, 65 screw2_name: front right screw screw3: 290, 265 screw3_name: rear right screw screw4: 90, 265 screw4_name: rear left screw horizontal_move_z: 10 speed: 250 screw_thread: CW-M4 [fan] pin: PC14 # fan1 ######################### FAN ######################## [heater_fan hotend_fan] pin: PB1 max_power: 1.0 kick_start_time: 0.5 heater: extruder heater_temp: 50.0 ## If you are experiencing back flow, you can reduce fan_speed fan_speed: 1.0 shutdown_speed: 1.0 [printer] kinematics: cartesian max_velocity: 500 max_accel: 5500 max_z_velocity: 25 max_z_accel: 100 [filament_switch_sensor filament_sensor0] switch_pin: PA4 pause_on_runout: True runout_gcode: M117 Filament Runout M600 insert_gcode: M117 Filament inserted [filament_switch_sensor filament_sensor1] switch_pin: PE6 pause_on_runout: True runout_gcode: M117 Filament Runout M600 insert_gcode: M117 Filament inserted [bltouch] sensor_pin: ^PC8 control_pin: PA8 x_offset: -30 y_offset: -0.47 #z_offset: 0 pin_move_time: 0.4 speed: 10 samples: 2 sample_retract_dist: 3.0 samples_result: median samples_tolerance: 0.050 samples_tolerance_retries: 20 pin_up_reports_not_triggered: True pin_up_touch_mode_reports_triggered: False [bed_mesh] speed: 250 horizontal_move_z: 10 mesh_min: 20,20 mesh_max: 260, 260 algorithm: bicubic probe_count: 9, 9 fade_start: 0.6 fade_end: 10 fade_target: 0.0 zero_reference_position: 150, 150 [safe_z_home] home_xy_position: 180,150 speed: 150.0 z_hop: 10.0 z_hop_speed: 10.0 [verify_heater extruder] max_error : 120 check_gain_time : 20 hysteresis : 5 Heating_gain : 2 ##################################################################### #MACRO ##################################################################### [gcode_macro PRINT_START] gcode: {% set BED = params.BED|default("60")|float %} {% set EXTRUDER = params.EXTRUDER|default("200")|float %} {% set FL_SIZE = params.SIZE|default("0_0_0_0")|string %} M117 Heating... M140 S{BED} ; set bed temp M105 ;report temperatures M190 S{BED} ;Wait bed temp to be reached M104 S{EXTRUDER} ; set extruder temp M105 ;report temperatures M109 S{EXTRUDER|int} ;Attendre que l'extruder atteigne la température requise M117 ALL Temperatures OK M107 ; start with fan off G90 ;absolute positioning G28 X0 Y0 ;move X/Y to min endstops G28 Z0 ;move Z to min endstops ADAPTIVE_BED_MESH SIZE={FL_SIZE} M117 CHECK Temperatures M140 S{BED} ; set bed temp M105 ;report temperatures M190 S{BED} ;Wait bed temp to be reached M104 S{EXTRUDER} ; set extruder temp M105 ;report temperatures M109 S{EXTRUDER|int} ;Attendre que l'extruder atteigne la température requise M117 BED And EXTRUDERS ARE HOTS PURGE_LINE M117 Printing... [gcode_macro PRINT_END] gcode: SAVE_VARIABLE VARIABLE=was_interrupted VALUE=False clear_last_file RUN_SHELL_COMMAND CMD=clear_plr G1 X0 Y0 M104 S0 ; Turn off extruder M140 S0 ; Turn off heated bed M106 S0 ; Turn off extruder fan M107 ; Turn off chamber fan M84 ; Disable motors [gcode_macro PURGE_LINE] gcode: M117 Purge extruder G92 E0 ; reset extruder G1 Z1.0 F3000 ; move z up little to prevent scratching of surface G1 X2 Y20 Z0.3 F5000.0 ; move to start-line position G1 X2 Y200.0 Z0.3 F1500.0 E15 ; draw 1st line G1 X2 Y200.0 Z0.4 F5000.0 ; move to side a little G1 X2 Y20 Z0.4 F1500.0 E30 ; draw 2nd line G92 E0 ; reset extruder G1 Z1.0 F3000 ; move z up little to prevent scratching of surface [gcode_macro PAUSE] description: Pause the actual running print rename_existing: PAUSE_BASE # change this if you need more or less extrusion variable_extrude: 1.0 gcode: ##### read E from pause macro ##### {% set E = printer["gcode_macro PAUSE"].extrude|float %} ##### set park positon for x and y ##### # default is your max posion from your printer.cfg {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} ##### calculate save lift position ##### {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} ##### end of definitions ##### PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description: Resume the actual running print rename_existing: RESUME_BASE gcode: ##### read E from pause macro ##### {% set E = printer["gcode_macro PAUSE"].extrude|float %} #### get VELOCITY parameter if specified #### {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} ##### end of definitions ##### {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} [gcode_macro CANCEL_PRINT] description: Cancel the actual running print rename_existing: CANCEL_PRINT_BASE gcode: SAVE_VARIABLE VARIABLE=was_interrupted VALUE=False RUN_SHELL_COMMAND CMD=clear_plr clear_last_file PRINT_END SET_IDLE_TIMEOUT TIMEOUT={printer.configfile.settings.idle_timeout.timeout} #SDCARD_RESET_FILE M400 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-10.0 F1200 ; retract filament M106 S0 TURN_OFF_HEATERS CANCEL_PRINT_BASE G91 M107 ; turn off fan G1 Z10 F3000 G90 G0 X0 Y0 F6000 M84 [gcode_macro G29] gcode: BED_MESH_CLEAR G28 BED_MESH_CALIBRATE G0 X117 Y126 Z5 F3000 G0 Z0 F300 [gcode_macro PID_EXTRUDER] gcode: G28 M106 S255 PID_CALIBRATE HEATER=extruder TARGET=190 SAVE_CONFIG [gcode_macro PID_BED] gcode: G28 M106 S255 PID_CALIBRATE HEATER=heater_bed TARGET=60 SAVE_CONFIG [gcode_macro M109] rename_existing: M99109 gcode: #Parameters {% set s = params.S|float %} M104 {% for p in params %}{'%s%s' % (p, params[p])}{% endfor %} {% if s != 0 %} TEMPERATURE_WAIT SENSOR=extruder MINIMUM={s} MAXIMUM={s+1} {% endif %} [gcode_macro M84] rename_existing:M84.1 gcode: SET_STEPPER_ENABLE STEPPER=stepper_x enable=0 SET_STEPPER_ENABLE STEPPER=stepper_y enable=0 SET_STEPPER_ENABLE STEPPER=stepper_z enable=0 SET_STEPPER_ENABLE STEPPER=extruder enable=0 SET_KINEMATIC_POSITION [gcode_macro M205] description: Sets square corner velocity. Usage: M205 [X<velocity>] [Y<velocity>] gcode: {% if 'X' in params or 'Y' in params %} SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY="{ (params.X|default(0)|float, params.Y|default(0)|float)|min}" {% else %} SET_VELOCITY_LIMIT {% endif %} [gcode_macro M204] description: Sets maximum accelleration. Usage: M204 [S<accel>] [P<accel> T<accel>] rename_existing: M204.1 gcode: {% set f = params.F|default(0.5)|float %} {% if 'S' in params %} {% set s = params.S|float %} SET_VELOCITY_LIMIT ACCEL={s} ACCEL_TO_DECEL={ s * f } {% else %} {% if 'P' in params %} {% set p = params.P|float %} {% if 'T' in params %} {% set t = params.T|float %} {% if p < t %} SET_VELOCITY_LIMIT ACCEL={p} ACCEL_TO_DECEL={ p * f } {% else %} SET_VELOCITY_LIMIT ACCEL={t} ACCEL_TO_DECEL={ t * f } {% endif %} {% else %} SET_VELOCITY_LIMIT ACCEL={p} ACCEL_TO_DECEL={ p * f } {% endif %} {% elif 'T' in params %} {% set t = params.T|float %} SET_VELOCITY_LIMIT ACCEL={t} ACCEL_TO_DECEL={ t * f } {% endif %} {% endif %} [gcode_macro M203] description: Sets maximum velocity. Usage: M203 [X<velocity>] [Y<velocity>] gcode: {% if 'X' in params or 'Y' in params %} {% set velocity = (params.X|default(params.Y)|float, params.Y|default(params.X)|float)|min %} SET_VELOCITY_LIMIT VELOCITY="{velocity}" {% else %} SET_VELOCITY_LIMIT {% endif %} [gcode_macro M201] description: Sets maximum accelleration. Usage: M201 [X<accel>] [Y<accel>] gcode: {% if 'X' in params or 'Y' in params %} {% set accel = (params.X|default(params.Y)|float, params.Y|default(params.X)|float)|min %} SET_VELOCITY_LIMIT ACCEL={accel} ACCEL_TO_DECEL={accel * 0.5} {% else %} SET_VELOCITY_LIMIT {% endif %} [gcode_macro M191] gcode: {% set s = params.S|float %} {% if params.S is defined %} SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={params.S|int} TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={s-4} MAXIMUM={s+10} {% endif %} [gcode_macro M600] gcode: PAUSE [gcode_macro M601] gcode: CHANGE_FILAMENT [gcode_macro M900] gcode: {% if 'K' in params %} {% if 'E' in params %} SET_PRESSURE_ADVANCE EXTRUDER={params.E} ADVANCE={params.K} {% else %} SET_PRESSURE_ADVANCE ADVANCE={params.K} {% endif %} {% endif %} [gcode_macro SAUVEGARDER] description: Sauvegarder la configuration gcode: SAVE_CONFIG [gcode_macro UNLOAD_FILAMENT] gcode: SAVE_GCODE_STATE NAME=unload_state G91 {% if params.TEMP is defined or printer.extruder.can_extrude|lower == 'false' %} M117 Heating... # Heat up hotend to provided temp or 220 as default as that should work OK with most filaments. M109 S{params.TEMP|default(220, true)} {% endif %} M117 Unloading filament... G92 E0.0 G91 G1 E-45 F5000 G1 E-15 F1000 G1 E-20 F1000 G90 G92 E0.0 M400 M117 Remove Filament Now! M300 S300 P1000 M117 Filament unloaded! RESTORE_GCODE_STATE NAME=unload_state [gcode_macro LOAD_FILAMENT] gcode: SAVE_GCODE_STATE NAME=load_state G91 # Heat up hotend to provided temp or 220 as default as that should work OK with most filaments. {% if params.TEMP is defined or printer.extruder.can_extrude|lower == 'false' %} M117 Heating... M109 S{params.TEMP|default(220, true)} {% endif %} M117 Loading filament... # Load the filament into the hotend area. G92 E0.0 G91 G1 E70 F400 G1 E40 F100 G90 G92 E0.0 M400 M117 Filament loaded! RESTORE_GCODE_STATE NAME=load_state [gcode_macro _KAMP_Settings] description: This macro contains all adjustable settings for KAMP # The following variables are settings for KAMP as a whole. variable_verbose_enable: True # Set to True to enable KAMP information output when running. This is useful for debugging. # The following variables are for adjusting adaptive mesh settings for KAMP. variable_mesh_margin: 0 # Expands the mesh size in millimeters if desired. Leave at 0 to disable. variable_fuzz_amount: 0 # Slightly randomizes mesh points to spread out wear from nozzle-based probes. Leave at 0 to disable. # The following variables are for those with a dockable probe like Klicky, Euclid, etc. # ---------------- Attach Macro | Detach Macro variable_probe_dock_enable: False # Set to True to enable the usage of a dockable probe. # --------------------------------------------- variable_attach_macro: 'Attach_Probe' # The macro that is used to attach the probe. # Klicky Probe: 'Attach_Probe' | 'Dock_Probe' variable_detach_macro: 'Dock_Probe' # The macro that is used to store the probe. # Euclid Probe: 'Deploy_Probe' | 'Stow_Probe' # Legacy Gcode: 'M401' | 'M402' # The following variables are for adjusting adaptive purge settings for KAMP. variable_purge_height: 0.8 # Z position of nozzle during purge, default is 0.8. variable_tip_distance: 0 # Distance between tip of filament and nozzle before purge. Should be similar to PRINT_END final retract amount. variable_purge_margin: 10 # Distance the purge will be in front of the print area, default is 10. variable_purge_amount: 30 # Amount of filament to be purged prior to printing. variable_flow_rate: 12 # Flow rate of purge in mm3/s. Default is 12. # The following variables are for adjusting the Smart Park feature for KAMP, which will park the printhead near the print area at a specified height. variable_smart_park_height: 10 # Z position for Smart Park, default is 10. gcode: # Gcode section left intentionally blank. Do not disturb. {action_respond_info(" Running the KAMP_Settings macro does nothing, it is only used for storing KAMP settings. ")} [gcode_macro BED_MESH_CALIBRATE] rename_existing: _BED_MESH_CALIBRATE gcode: {% set all_points = printer.exclude_object.objects | map(attribute='polygon') | sum(start=[]) %} # Gather all object points {% set bed_mesh_min = printer.configfile.settings.bed_mesh.mesh_min %} # Get bed mesh min from printer.cfg {% set bed_mesh_max = printer.configfile.settings.bed_mesh.mesh_max %} # Get bed mesh max from printer.cfg {% set probe_count = printer.configfile.settings.bed_mesh.probe_count %} # Get probe count from printer.cfg {% set kamp_settings = printer["gcode_macro _KAMP_Settings"] %} # Pull variables from _KAMP_Settings {% set verbose_enable = kamp_settings.verbose_enable | abs %} # Pull verbose setting from _KAMP_Settings {% set probe_dock_enable = kamp_settings.probe_dock_enable | abs %} # Pull probe dockable probe settings from _KAMP_Settings {% set attach_macro = kamp_settings.attach_macro | string %} # Pull attach probe command from _KAMP_Settings {% set detach_macro = kamp_settings.detach_macro | string %} # Pull detach probe command from _KAMP_Settings {% set mesh_margin = kamp_settings.mesh_margin | float %} # Pull mesh margin setting from _KAMP_Settings {% set fuzz_amount = kamp_settings.fuzz_amount | float %} # Pull fuzz amount setting from _KAMP_Settings {% set probe_count = probe_count if probe_count|length > 1 else probe_count * 2 %} # If probe count is only a single number, convert it to 2. E.g. probe_count:7 = 7,7 {% set max_probe_point_distance_x = ( bed_mesh_max[0] - bed_mesh_min[0] ) / (probe_count[0] - 1) %} # Determine max probe point distance {% set max_probe_point_distance_y = ( bed_mesh_max[1] - bed_mesh_min[1] ) / (probe_count[1] - 1) %} # Determine max probe point distance {% set x_min = all_points | map(attribute=0) | min | default(bed_mesh_min[0]) %} # Set x_min from smallest object x point {% set y_min = all_points | map(attribute=1) | min | default(bed_mesh_min[1]) %} # Set y_min from smallest object y point {% set x_max = all_points | map(attribute=0) | max | default(bed_mesh_max[0]) %} # Set x_max from largest object x point {% set y_max = all_points | map(attribute=1) | max | default(bed_mesh_max[1]) %} # Set y_max from largest object y point {% set fuzz_range = range((0) | int, (fuzz_amount * 100) | int + 1) %} # Set fuzz_range between 0 and fuzz_amount {% set adapted_x_min = x_min - mesh_margin - (fuzz_range | random / 100.0) %} # Adapt x_min to margin and fuzz constraints {% set adapted_y_min = y_min - mesh_margin - (fuzz_range | random / 100.0) %} # Adapt y_min to margin and fuzz constraints {% set adapted_x_max = x_max + mesh_margin + (fuzz_range | random / 100.0) %} # Adapt x_max to margin and fuzz constraints {% set adapted_y_max = y_max + mesh_margin + (fuzz_range | random / 100.0) %} # Adapt y_max to margin and fuzz constraints {% set adapted_x_min = [adapted_x_min , bed_mesh_min[0]] | max %} # Compare adjustments to defaults and choose max {% set adapted_y_min = [adapted_y_min , bed_mesh_min[1]] | max %} # Compare adjustments to defaults and choose max {% set adapted_x_max = [adapted_x_max , bed_mesh_max[0]] | min %} # Compare adjustments to defaults and choose min {% set adapted_y_max = [adapted_y_max , bed_mesh_max[1]] | min %} # Compare adjustments to defaults and choose min {% set points_x = (((adapted_x_max - adapted_x_min) / max_probe_point_distance_x) | round(method='ceil') | int) + 1 %} # Define probe_count's x point count and round up {% set points_y = (((adapted_y_max - adapted_y_min) / max_probe_point_distance_y) | round(method='ceil') | int) + 1 %} # Define probe_count's y point count and round up {% if (([points_x, points_y]|max) > 6) %} # {% set algorithm = "bicubic" %} # {% set min_points = 4 %} # {% else %} # Calculate if algorithm should be bicubic or lagrange {% set algorithm = "bicubic" %} # {% set min_points = 3 %} # {% endif %} # {% set points_x = [points_x , min_points]|max %} # Set probe_count's x points to fit the calculated algorithm {% set points_y = [points_y , min_points]|max %} # Set probe_count's y points to fit the calculated algorithm {% set points_x = [points_x , probe_count[0]]|min %} {% set points_y = [points_y , probe_count[1]]|min %} {% if verbose_enable == True %} # If verbose is enabled, print information about KAMP's calculations {% if printer.exclude_object.objects != [] %} { action_respond_info( "Algorithm: {}.".format( (algorithm), )) } { action_respond_info("Default probe count: {},{}.".format( (probe_count[0]), (probe_count[1]), )) } { action_respond_info("Adapted probe count: {},{}.".format( (points_x), (points_y), )) } {action_respond_info("Default mesh bounds: {}, {}.".format( (bed_mesh_min[0],bed_mesh_min[1]), (bed_mesh_max[0],bed_mesh_max[1]), )) } {% if mesh_margin > 0 %} {action_respond_info("Mesh margin is {}, mesh bounds extended by {}mm.".format( (mesh_margin), (mesh_margin), )) } {% else %} {action_respond_info("Mesh margin is 0, margin not increased.")} {% endif %} {% if fuzz_amount > 0 %} {action_respond_info("Mesh point fuzzing enabled, points fuzzed up to {}mm.".format( (fuzz_amount), )) } {% else %} {action_respond_info("Fuzz amount is 0, mesh points not fuzzed.")} {% endif %} { action_respond_info("Adapted mesh bounds: {}, {}.".format( (adapted_x_min, adapted_y_min), (adapted_x_max, adapted_y_max), )) } {action_respond_info("KAMP adjustments successful. Happy KAMPing!")} {% else %} {action_respond_info("No objects detected! Check your gcode and make sure that EXCLUDE_OBJECT_DEFINE is happening before BED_MESH_CALIBRATE is called. Defaulting to regular meshing.")} G4 P5000 # Wait 5 seconds to make error more visible {% endif %} {% endif %} {% if probe_dock_enable == True %} {attach_macro} # Attach/deploy a probe if the probe is stored somewhere outside of the print area {% endif %} _BED_MESH_CALIBRATE mesh_min={adapted_x_min},{adapted_y_min} mesh_max={adapted_x_max},{adapted_y_max} ALGORITHM={algorithm} PROBE_COUNT={points_x},{points_y} {% if probe_dock_enable == True %} {detach_macro} # Detach/stow a probe if the probe is stored somewhere outside of the print area {% endif %} ################################################## # Verifications and Measurements with ADXL ################################################## [gcode_macro ADXL_TEST] description: ADXL Test gcode: ACCELEROMETER_QUERY [gcode_macro ADXL_NOISE] description: Measure Accelerometer Noise gcode: MEASURE_AXES_NOISE [gcode_macro ADXL_AXE_X] description: Measure X axis resonances gcode: G28 M400 SHAPER_CALIBRATE AXIS=X [gcode_macro ADXL_AXE_Y] description: Measure Y axis resonances gcode: G28 M400 SHAPER_CALIBRATE AXIS=Y [gcode_macro SECURITY_OFFSET] description: Apply a 2mm Safety Offset gcode: SET_GCODE_OFFSET Z=+2 RESPOND MSG="Safety Offset applied!" #*# <---------------------- SAVE_CONFIG ----------------------> #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. #*# #*# [bltouch] #*# z_offset = 2.369 #*# #*# [input_shaper] #*# shaper_type_x = mzv #*# shaper_freq_x = 39.6 #*# shaper_type_y = mzv #*# shaper_freq_y = 28.8 #*# #*# [heater_bed] #*# control = pid #*# pid_kp = 63.403 #*# pid_ki = 1.537 #*# pid_kd = 653.848 #*# #*# [extruder] #*# control = pid #*# pid_kp = 24.142 #*# pid_ki = 0.697 #*# pid_kd = 209.132 #*# #*# [bed_mesh default] #*# version = 1 #*# points = #*# -0.460401, -0.454151, -0.377901, -0.417901, -0.404151, -0.330401, -0.319151, -0.222901, -0.180401 #*# -0.257901, -0.236651, -0.215401, -0.250401, -0.235401, -0.184151, -0.145401, -0.164151, -0.120401 #*# -0.186651, -0.136651, -0.127901, -0.059151, -0.076651, -0.124151, -0.067901, -0.097901, -0.057901 #*# -0.054151, -0.065401, -0.007901, -0.057901, -0.027901, -0.061651, -0.032901, -0.044151, -0.015401 #*# -0.031651, 0.032099, -0.032901, -0.007901, -0.007901, 0.008349, 0.004599, -0.031651, 0.017099 #*# 0.030849, 0.060849, 0.035849, 0.022099, 0.005849, 0.012099, 0.029599, 0.018349, 0.062099 #*# 0.015849, 0.028349, 0.033349, 0.048349, 0.038349, 0.022099, 0.039599, 0.000849, 0.038349 #*# 0.027099, -0.001651, 0.000849, 0.003349, -0.042901, -0.006651, 0.005849, -0.021651, -0.000401 #*# -0.055401, -0.055401, -0.046651, -0.064151, -0.097901, -0.097901, -0.096651, -0.116651, -0.091651 #*# x_count = 9 #*# y_count = 9 #*# mesh_x_pps = 2 #*# mesh_y_pps = 2 #*# algo = bicubic #*# tension = 0.2 #*# min_x = 20.0 #*# max_x = 260.0 #*# min_y = 20.01 #*# max_y = 260.0 Modifié (le) Juin 5, 2024 par Atax
Savate Posté(e) Juin 5, 2024 Posté(e) Juin 5, 2024 il y a une heure, Atax a dit : c'est "mesh print size" ça c'est un script, pas un plugin, le plugin c'est pour gérer les exclude_object (et ça s'installe via le marketplace)
Atax Posté(e) Juin 5, 2024 Auteur Posté(e) Juin 5, 2024 (modifié) Bon je viens regardé et j'ai fouillé sur le net aucune mention d'un plugging exclude object ou rien qui y ressemble d'après le tuto ya pas et dans le readme des source git du adaptative_bed_mesh non plus, il ne parle que du script a importé, cela pourrait venir du fait que je suis sur la derniere version de cura... peut etre devrais-je essayé de passer sur orca-slicer Modifié (le) Juin 5, 2024 par Atax
Atax Posté(e) Juin 6, 2024 Auteur Posté(e) Juin 6, 2024 un amis maker qui viens de m'expliquer qu'il y avait une option exclude object a activé dans le slicer, pas un pluggin mais une option a coché je vais aller voir ça et si cela fonctionne je marquerais cette page comme résolut
fran6p Posté(e) Juin 6, 2024 Posté(e) Juin 6, 2024 Pour les trancheurs basés sur Prusaslicer, cette page (Mainsail) explique comment activer l'exclusion d'objets durant l'impression.
Messages recommandés
Créer un compte ou se connecter pour commenter
Vous devez être membre afin de pouvoir déposer un commentaire
Créer un compte
Créez un compte sur notre communauté. C’est facile !
Créer un nouveau compteSe connecter
Vous avez déjà un compte ? Connectez-vous ici.
Connectez-vous maintenant