Skip to content

Instantly share code, notes, and snippets.

@BrendaIT
Forked from ChipCE/readme.md
Created May 1, 2022 01:30
Show Gist options
  • Select an option

  • Save BrendaIT/8c57c03ef350a2f6a7903be091d68d5c to your computer and use it in GitHub Desktop.

Select an option

Save BrendaIT/8c57c03ef350a2f6a7903be091d68d5c to your computer and use it in GitHub Desktop.

Revisions

  1. @ChipCE ChipCE revised this gist Feb 24, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -109,7 +109,7 @@ Cura slicer

    *(Cura slicer plugin) To make the macro to work in Cura slicer, you need to install the [post process plugin by frankbags](https://gist.github.com/frankbags/c85d37d9faff7bce67b6d18ec4e716ff)
    - In cura menu <code>Help</code> -> <code>Show configuration folder</code>.
    - Copy the python script from the above link in to <code>plugins</code> folder.
    - Copy the python script from the above link in to <code>scripts</code> folder.
    - Restart Cura
    - In cura menu <code>Extensions</code> -> <code>Post processing</code> -> <code>Modify G-Code</code> and select <code>Mesh Print Size</code>

  2. @ChipCE ChipCE revised this gist Jan 31, 2022. 1 changed file with 8 additions and 3 deletions.
    11 changes: 8 additions & 3 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -34,9 +34,14 @@ gcode:
    {% set area_max_x = params.AREA_END.split(",")[0]|float %}
    {% set area_max_y = params.AREA_END.split(",")[1]|float %}

    {% set meshPointX = bedMeshConfig.probe_count.split(",")[0]|int %}
    {% set meshPointY = bedMeshConfig.probe_count.split(",")[1]|int %}

    {% if bedMeshConfig.probe_count.split(",")|length == 2 %}
    {% set meshPointX = bedMeshConfig.probe_count.split(",")[0]|int %}
    {% set meshPointY = bedMeshConfig.probe_count.split(",")[1]|int %}
    {% else %}
    {% set meshPointX = bedMeshConfig.probe_count.split(",")[0]|int %}
    {% set meshPointY = bedMeshConfig.probe_count.split(",")[0]|int %}
    {% endif %}

    {% set meshMaxPointX = meshPointX %}
    {% set meshMaxPointY = meshPointY %}

  3. @ChipCE ChipCE revised this gist Dec 25, 2021. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -128,5 +128,4 @@ gcode:
    And you will need to change Slicer start gcode to this

    - Cura: <code>START_PRINT EXTRUDER_TEMP={material_print_temperature_layer_0} BED_TEMP={material_bed_temperature_layer_0} AREA_START=%MINX%,%MINY% AREA_END=%MAXX%,%MAXY%</code>
    - Prusa slicer: <code>START_PRINT EXTRUDER_TEMP=[first_layer_temperature] BED_TEMP=[first_layer_bed_temperature] AREA_START={first_layer_print_min[0]},{first_layer_print_min[1]} AREA_END={first_layer_print_max[0]},{first_layer_print_max[1]}
    </code>
    - Prusa slicer: <code>START_PRINT EXTRUDER_TEMP=[first_layer_temperature] BED_TEMP=[first_layer_bed_temperature] AREA_START={first_layer_print_min[0]},{first_layer_print_min[1]} AREA_END={first_layer_print_max[0]},{first_layer_print_max[1]}</code>
  4. @ChipCE ChipCE revised this gist Dec 25, 2021. 1 changed file with 4 additions and 3 deletions.
    7 changes: 4 additions & 3 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -125,7 +125,8 @@ gcode:
    # the rest of your start macro here
    </pre>

    - And you will need to change Slicer start gcode to this
    - Cura: <code>START_PRINT EXTRUDER_TEMP={material_print_temperature_layer_0} BED_TEMP={material_bed_temperature_layer_0} AREA_START=%MINX%,%MINY% AREA_END=%MAXX%,%MAXY%</code>
    - Prusa slicer: <code>START_PRINT EXTRUDER_TEMP=[first_layer_temperature] BED_TEMP=[first_layer_bed_temperature] AREA_START={first_layer_print_min[0]},{first_layer_print_min[1]} AREA_END={first_layer_print_max[0]},{first_layer_print_max[1]}
    And you will need to change Slicer start gcode to this

    - Cura: <code>START_PRINT EXTRUDER_TEMP={material_print_temperature_layer_0} BED_TEMP={material_bed_temperature_layer_0} AREA_START=%MINX%,%MINY% AREA_END=%MAXX%,%MAXY%</code>
    - Prusa slicer: <code>START_PRINT EXTRUDER_TEMP=[first_layer_temperature] BED_TEMP=[first_layer_bed_temperature] AREA_START={first_layer_print_min[0]},{first_layer_print_min[1]} AREA_END={first_layer_print_max[0]},{first_layer_print_max[1]}
    </code>
  5. @ChipCE ChipCE revised this gist Dec 25, 2021. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -126,6 +126,6 @@ gcode:
    </pre>

    - And you will need to change Slicer start gcode to this
    Cura: <code>a</code>
    Prusa slicer: <code>b</code>
    Super slicer: <code>c</code>
    - Cura: <code>START_PRINT EXTRUDER_TEMP={material_print_temperature_layer_0} BED_TEMP={material_bed_temperature_layer_0} AREA_START=%MINX%,%MINY% AREA_END=%MAXX%,%MAXY%</code>
    - Prusa slicer: <code>START_PRINT EXTRUDER_TEMP=[first_layer_temperature] BED_TEMP=[first_layer_bed_temperature] AREA_START={first_layer_print_min[0]},{first_layer_print_min[1]} AREA_END={first_layer_print_max[0]},{first_layer_print_max[1]}
    </code>
  6. @ChipCE ChipCE revised this gist Dec 25, 2021. 1 changed file with 8 additions and 3 deletions.
    11 changes: 8 additions & 3 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -107,7 +107,9 @@ Cura slicer
    - Copy the python script from the above link in to <code>plugins</code> folder.
    - Restart Cura
    - In cura menu <code>Extensions</code> -> <code>Post processing</code> -> <code>Modify G-Code</code> and select <code>Mesh Print Size</code>


    ## For user using single command START_PRINT

    - (*) If you use single command start gcode like <code>START_PRINT BED_TEMP={material_bed_temperature_layer_0} EXTRUDER_TEMP={material_print_temperature_layer_0}</code> .You might need to add parameter parsing to BED_MESH_CALIBRATE inside START_PRINT. This is an example, also check [my macro sample](https://github.com/ChipCE/Slicer-profile/blob/master/klipper/snakeoilxy-180/macro.cfg)

    <pre>
    @@ -121,6 +123,9 @@ gcode:
    # preheat, homing, etc
    BED_MESH_CALIBRATE AREA_START={params.AREA_START|default("0,0")} AREA_END={params.AREA_END|default("0,0")}
    # the rest of your start macro here
    <pre>
    </pre>

    Slicer config
    - And you will need to change Slicer start gcode to this
    Cura: <code>a</code>
    Prusa slicer: <code>b</code>
    Super slicer: <code>c</code>
  7. @ChipCE ChipCE revised this gist Dec 25, 2021. 1 changed file with 16 additions and 1 deletion.
    17 changes: 16 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -108,4 +108,19 @@ Cura slicer
    - Restart Cura
    - In cura menu <code>Extensions</code> -> <code>Post processing</code> -> <code>Modify G-Code</code> and select <code>Mesh Print Size</code>

    - (*) If you use single command start gcode like <code>START_PRINT BED_TEMP={material_bed_temperature_layer_0} EXTRUDER_TEMP={material_print_temperature_layer_0}</code> .You might need to add parameter parsing to BED_MESH_CALIBRATE inside START_PRINT. This is an example [example macro](https://github.com/ChipCE/Slicer-profile/blob/master/klipper/snakeoilxy-180/macro.cfg)
    - (*) If you use single command start gcode like <code>START_PRINT BED_TEMP={material_bed_temperature_layer_0} EXTRUDER_TEMP={material_print_temperature_layer_0}</code> .You might need to add parameter parsing to BED_MESH_CALIBRATE inside START_PRINT. This is an example, also check [my macro sample](https://github.com/ChipCE/Slicer-profile/blob/master/klipper/snakeoilxy-180/macro.cfg)

    <pre>
    [gcode_macro START_PRINT]
    variable_parameter_EXTRUDER_TEMP: 190
    variable_parameter_BED_TEMP: 60
    ; gcode parameters for area bed mesh
    variable_parameter_AREA_START : 0,0
    variable_parameter_AREA_END : 0,0
    gcode:
    # preheat, homing, etc
    BED_MESH_CALIBRATE AREA_START={params.AREA_START|default("0,0")} AREA_END={params.AREA_END|default("0,0")}
    # the rest of your start macro here
    <pre>

    Slicer config
  8. @ChipCE ChipCE revised this gist Dec 2, 2021. 1 changed file with 9 additions and 7 deletions.
    16 changes: 9 additions & 7 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,6 @@ variable_mesh_area_offset : 5.0
    variable_probe_samples : 2
    ; minimum probe count
    variable_min_probe_count : 3
    variable_max_probe_count : 6
    ; scale up the probe count, should be 1.0 ~ < variable_max_probe_count/variable_min_probe_count
    variable_probe_count_scale_factor : 1.0
    gcode:
    @@ -35,8 +34,11 @@ gcode:
    {% set area_max_x = params.AREA_END.split(",")[0]|float %}
    {% set area_max_y = params.AREA_END.split(",")[1]|float %}

    {% set meshPointX = bedMeshConfig.probe_count.split(",")[0]|float %}
    {% set meshPointY = bedMeshConfig.probe_count.split(",")[1]|float %}
    {% set meshPointX = bedMeshConfig.probe_count.split(",")[0]|int %}
    {% set meshPointY = bedMeshConfig.probe_count.split(",")[1]|int %}

    {% set meshMaxPointX = meshPointX %}
    {% set meshMaxPointY = meshPointY %}


    {% if (area_min_x < area_max_x) and (area_min_y < area_max_y) %}
    @@ -68,16 +70,16 @@ gcode:
    {% if meshPointX < min_probe_count %}
    {% set meshPointX = min_probe_count %}
    {% endif %}
    {% if meshPointX > max_probe_count %}
    {% set meshPointX = max_probe_count %}
    {% if meshPointX > meshMaxPointX %}
    {% set meshPointX = meshMaxPointX %}
    {% endif %}

    {% set meshPointY = (meshPointY * (area_max_y -area_min_y ) / (safe_max_y - safe_min_y) * probe_count_scale_factor )|round(0)|int %}
    {% if meshPointY < min_probe_count %}
    {% set meshPointY = min_probe_count %}
    {% endif %}
    {% if meshPointY > max_probe_count %}
    {% set meshPointY = max_probe_count %}
    {% if meshPointY > meshMaxPointY %}
    {% set meshPointY = meshMaxPointY %}
    {% endif %}

    BED_MESH_CALIBRATE_BASE mesh_min={area_min_x},{area_min_y} mesh_max={area_max_x},{area_max_y} probe_count={meshPointX},{meshPointY} samples={probe_samples|int}
  9. @ChipCE ChipCE revised this gist Dec 2, 2021. 1 changed file with 11 additions and 2 deletions.
    13 changes: 11 additions & 2 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -19,6 +19,9 @@ variable_mesh_area_offset : 5.0
    variable_probe_samples : 2
    ; minimum probe count
    variable_min_probe_count : 3
    variable_max_probe_count : 6
    ; scale up the probe count, should be 1.0 ~ < variable_max_probe_count/variable_min_probe_count
    variable_probe_count_scale_factor : 1.0
    gcode:
    {% if params.AREA_START and params.AREA_END %}
    {% set bedMeshConfig = printer["configfile"].config["bed_mesh"] %}
    @@ -61,15 +64,21 @@ gcode:
    {% set area_max_y = safe_max_y %}
    {% endif %}

    {% set meshPointX = (meshPointX * (area_max_x - area_min_x) / (safe_max_x - safe_min_x))|int %}
    {% set meshPointX = (meshPointX * (area_max_x - area_min_x) / (safe_max_x - safe_min_x) * probe_count_scale_factor)|round(0)|int %}
    {% if meshPointX < min_probe_count %}
    {% set meshPointX = min_probe_count %}
    {% endif %}
    {% if meshPointX > max_probe_count %}
    {% set meshPointX = max_probe_count %}
    {% endif %}

    {% set meshPointY = (meshPointY * (area_max_y -area_min_y ) / (safe_max_y - safe_min_y))|int %}
    {% set meshPointY = (meshPointY * (area_max_y -area_min_y ) / (safe_max_y - safe_min_y) * probe_count_scale_factor )|round(0)|int %}
    {% if meshPointY < min_probe_count %}
    {% set meshPointY = min_probe_count %}
    {% endif %}
    {% if meshPointY > max_probe_count %}
    {% set meshPointY = max_probe_count %}
    {% endif %}

    BED_MESH_CALIBRATE_BASE mesh_min={area_min_x},{area_min_y} mesh_max={area_max_x},{area_max_y} probe_count={meshPointX},{meshPointY} samples={probe_samples|int}
    {% else %}
  10. @ChipCE ChipCE revised this gist Nov 22, 2021. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -37,8 +37,6 @@ gcode:


    {% if (area_min_x < area_max_x) and (area_min_y < area_max_y) %}
    {% set max_mesh_area = (safe_max_x - safe_min_x)*(safe_max_y - safe_min_y) %}

    {% if area_min_x - mesh_area_offset >= safe_min_x %}
    {% set area_min_x = area_min_x - mesh_area_offset %}
    {% else %}
  11. @ChipCE ChipCE revised this gist Nov 22, 2021. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -28,9 +28,9 @@ gcode:
    {% set safe_max_y = bedMeshConfig.mesh_max.split(",")[1]|float %}

    {% set area_min_x = params.AREA_START.split(",")[0]|float %}
    {% set area_min_y = params.AREA_START.split(",")[1]|float %}
    {% set area_max_x = params.AREA_END.split(",")[0]|float %}
    {% set area_max_y = params.AREA_END.split(",")[1]|float %}
    {% set area_min_y = params.AREA_START.split(",")[1]|float %}
    {% set area_max_x = params.AREA_END.split(",")[0]|float %}
    {% set area_max_y = params.AREA_END.split(",")[1]|float %}

    {% set meshPointX = bedMeshConfig.probe_count.split(",")[0]|float %}
    {% set meshPointY = bedMeshConfig.probe_count.split(",")[1]|float %}
  12. @ChipCE ChipCE revised this gist Nov 22, 2021. 1 changed file with 0 additions and 9 deletions.
    9 changes: 0 additions & 9 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -63,8 +63,6 @@ gcode:
    {% set area_max_y = safe_max_y %}
    {% endif %}

    PRINT MSG="Set custom mesh area to ({area_min_x},{area_min_y}),({area_max_x},{area_max_y})" OUTPUT_TARGET=1

    {% set meshPointX = (meshPointX * (area_max_x - area_min_x) / (safe_max_x - safe_min_x))|int %}
    {% if meshPointX < min_probe_count %}
    {% set meshPointX = min_probe_count %}
    @@ -75,18 +73,11 @@ gcode:
    {% set meshPointY = min_probe_count %}
    {% endif %}

    PRINT MSG="Set custom mesh matrix to {meshPointX}x{meshPointY}" OUTPUT_TARGET=1
    PRINT MSG="Mesh: {meshPointX}x{meshPointY}" OUTPUT_TARGET=2

    BED_MESH_CALIBRATE_BASE mesh_min={area_min_x},{area_min_y} mesh_max={area_max_x},{area_max_y} probe_count={meshPointX},{meshPointY} samples={probe_samples|int}
    {% else %}
    PRINT MSG="Invalid custom mesh parameters, probe using default setting" OUTPUT_TARGET=1
    PRINT MSG="Mesh: default" OUTPUT_TARGET=2
    BED_MESH_CALIBRATE_BASE
    {% endif %}
    {% else %}
    PRINT MSG="Invalid custom mesh parameters, probe using default setting" OUTPUT_TARGET=1
    PRINT MSG="Mesh: default" OUTPUT_TARGET=2
    BED_MESH_CALIBRATE_BASE
    {% endif %}
    </pre>
  13. @ChipCE ChipCE revised this gist Nov 22, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -106,6 +106,6 @@ Cura slicer
    - In cura menu <code>Help</code> -> <code>Show configuration folder</code>.
    - Copy the python script from the above link in to <code>plugins</code> folder.
    - Restart Cura
    - In cura menu <code>Extensions</code> -> <code>Post processing</code> and select <code>Mesh Print Size</code>
    - In cura menu <code>Extensions</code> -> <code>Post processing</code> -> <code>Modify G-Code</code> and select <code>Mesh Print Size</code>

    - (*) If you use single command start gcode like <code>START_PRINT BED_TEMP={material_bed_temperature_layer_0} EXTRUDER_TEMP={material_print_temperature_layer_0}</code> .You might need to add parameter parsing to BED_MESH_CALIBRATE inside START_PRINT. This is an example [example macro](https://github.com/ChipCE/Slicer-profile/blob/master/klipper/snakeoilxy-180/macro.cfg)
  14. @ChipCE ChipCE revised this gist Nov 22, 2021. 1 changed file with 67 additions and 40 deletions.
    107 changes: 67 additions & 40 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -6,79 +6,106 @@

    ## Setup guide

    - (1) Add the following macrro to your printer config and set the parameters to match you bed_mesh setting
    - (1) Add the following macrro to your printer config, this will replace the default <code>BED_MESH_CALIBRATE</code> command.
    <pre>
    [gcode_macro BED_MESH_PRINT_AREA]
    [gcode_macro BED_MESH_CALIBRATE]
    rename_existing: BED_MESH_CALIBRATE_BASE
    ; gcode parameters
    variable_parameter_AREA_START_X : 0
    variable_parameter_AREA_START_Y : 0
    variable_parameter_AREA_END_X : 150
    variable_parameter_AREA_END_Y : 180
    ; the "safe" area that the probe can reach, use value in config->[bed_mesh]
    variable_mesh_min_x :0
    variable_mesh_min_y :0
    variable_mesh_max_x :150
    variable_mesh_max_y :180
    variable_parameter_AREA_START : 0,0
    variable_parameter_AREA_END : 0,0
    ; the clearance between print area and probe area
    variable_mesh_area_offset : 5
    variable_mesh_area_offset : 5.0
    ; number of sample per probe point
    variable_probe_samples : 2
    ; mesh matrix size
    variable_mesh_size : 6
    ; minimum probe count
    variable_min_probe_count : 3
    gcode:
    {% if (params.AREA_START_X|default(0)|float < params.AREA_END_X|default(0)|float) and (params.AREA_START_Y|default(0)|float < params.AREA_END_Y|default(0)|float) %}
    {% set max_mesh_area = (mesh_max_x|float - mesh_min_x|float)*(mesh_max_y|float - mesh_min_y|float) %}
    {% if params.AREA_START and params.AREA_END %}
    {% set bedMeshConfig = printer["configfile"].config["bed_mesh"] %}
    {% set safe_min_x = bedMeshConfig.mesh_min.split(",")[0]|float %}
    {% set safe_min_y = bedMeshConfig.mesh_min.split(",")[1]|float %}
    {% set safe_max_x = bedMeshConfig.mesh_max.split(",")[0]|float %}
    {% set safe_max_y = bedMeshConfig.mesh_max.split(",")[1]|float %}

    {% if params.AREA_START_X|default(0)|float - mesh_area_offset >= mesh_min_x %}
    {% set mesh_min_x = params.AREA_START_X|default(0)|float - mesh_area_offset %}
    {% set area_min_x = params.AREA_START.split(",")[0]|float %}
    {% set area_min_y = params.AREA_START.split(",")[1]|float %}
    {% set area_max_x = params.AREA_END.split(",")[0]|float %}
    {% set area_max_y = params.AREA_END.split(",")[1]|float %}

    {% set meshPointX = bedMeshConfig.probe_count.split(",")[0]|float %}
    {% set meshPointY = bedMeshConfig.probe_count.split(",")[1]|float %}


    {% if (area_min_x < area_max_x) and (area_min_y < area_max_y) %}
    {% set max_mesh_area = (safe_max_x - safe_min_x)*(safe_max_y - safe_min_y) %}

    {% if area_min_x - mesh_area_offset >= safe_min_x %}
    {% set area_min_x = area_min_x - mesh_area_offset %}
    {% else %}
    {% set area_min_x = safe_min_x %}
    {% endif %}

    {% if params.AREA_START_Y|default(0)|float - mesh_area_offset >= mesh_min_y %}
    {% set mesh_min_y = params.AREA_START_Y|default(0)|float - mesh_area_offset %}
    {% if area_min_y - mesh_area_offset >= safe_min_y %}
    {% set area_min_y = area_min_y - mesh_area_offset %}
    {% else %}
    {% set area_min_y = safe_min_y %}
    {% endif %}

    {% if params.AREA_END_X|default(0)|float + mesh_area_offset <= mesh_max_x %}
    {% set mesh_max_x = params.AREA_END_X|default(0)|float + mesh_area_offset %}
    {% if area_max_x + mesh_area_offset <= safe_max_x %}
    {% set area_max_x = area_max_x + mesh_area_offset %}
    {% else %}
    {% set area_max_x = safe_max_x %}
    {% endif %}

    {% if params.AREA_END_Y|default(0)|float + mesh_area_offset <= mesh_max_y %}
    {% set mesh_max_y = params.AREA_END_Y|default(0)|float + mesh_area_offset %}
    {% if area_max_y + mesh_area_offset <= safe_max_y %}
    {% set area_max_y = area_max_y + mesh_area_offset %}
    {% else %}
    {% set area_max_y = safe_max_y %}
    {% endif %}

    PRINT MSG="Set custom mesh area to ({mesh_min_x},{mesh_min_y}),({mesh_max_x},{mesh_max_y})"
    PRINT MSG="Set custom mesh area to ({area_min_x},{area_min_y}),({area_max_x},{area_max_y})" OUTPUT_TARGET=1

    {% if (params.AREA_END_X|float - params.AREA_START_X|float)*(params.AREA_END_Y|float - params.AREA_START_Y|float) < (max_mesh_area * 0.85) %}
    {% set mesh_size = 5 %}
    {% elif (params.AREA_END_X|float - params.AREA_START_X|float)*(params.AREA_END_Y|float - params.AREA_START_Y|float) < (max_mesh_area * 0.65) %}
    {% set mesh_size = 4 %}
    {% elif (params.AREA_END_X|float - params.AREA_START_X|float)*(params.AREA_END_Y|float - params.AREA_START_Y|float) < (max_mesh_area * 0.50) %}
    {% set mesh_size = 3 %}
    {% set meshPointX = (meshPointX * (area_max_x - area_min_x) / (safe_max_x - safe_min_x))|int %}
    {% if meshPointX < min_probe_count %}
    {% set meshPointX = min_probe_count %}
    {% endif %}
    PRINT MSG="Set custom mesh matrix to {mesh_size}x{mesh_size}"

    BED_MESH_CALIBRATE mesh_min={mesh_min_x|float},{mesh_min_y|float} mesh_max={mesh_max_x|float},{mesh_max_y|float} probe_count={mesh_size|int},{mesh_size|int} samples={probe_samples|int}
    {% set meshPointY = (meshPointY * (area_max_y -area_min_y ) / (safe_max_y - safe_min_y))|int %}
    {% if meshPointY < min_probe_count %}
    {% set meshPointY = min_probe_count %}
    {% endif %}

    PRINT MSG="Set custom mesh matrix to {meshPointX}x{meshPointY}" OUTPUT_TARGET=1
    PRINT MSG="Mesh: {meshPointX}x{meshPointY}" OUTPUT_TARGET=2

    BED_MESH_CALIBRATE_BASE mesh_min={area_min_x},{area_min_y} mesh_max={area_max_x},{area_max_y} probe_count={meshPointX},{meshPointY} samples={probe_samples|int}
    {% else %}
    PRINT MSG="Invalid custom mesh parameters, probe using default setting"
    BED_MESH_CALIBRATE
    PRINT MSG="Invalid custom mesh parameters, probe using default setting" OUTPUT_TARGET=1
    PRINT MSG="Mesh: default" OUTPUT_TARGET=2
    BED_MESH_CALIBRATE_BASE
    {% endif %}

    {% else %}
    PRINT MSG="Invalid custom mesh parameters, probe using default setting" OUTPUT_TARGET=1
    PRINT MSG="Mesh: default" OUTPUT_TARGET=2
    BED_MESH_CALIBRATE_BASE
    {% endif %}
    </pre>

    - (2) Go to slicer setting and replace the old bed mesh gcode the following command.

    Prusa Slicer
    <code>BED_MESH_PRINT_AREA AREA_START_X={first_layer_print_min[0]} AREA_START_Y={first_layer_print_min[1]} AREA_END_X={first_layer_print_max[0]} AREA_END_Y={first_layer_print_max[1]}</code>
    <code>BED_MESH_CALIBRATE AREA_START={first_layer_print_min[0]},{first_layer_print_min[1]} AREA_END={first_layer_print_max[0]},{first_layer_print_max[1]}</code>

    Ideal maker
    <code>BED_MESH_PRINT_AREA AREA_START_X={print_pos_min_x} AREA_START_Y={print_pos_min_y} AREA_END_X={print_pos_max_x} AREA_END_Y={print_pos_max_y}</code>
    <code>BED_MESH_CALIBRATE AREA_START={print_pos_min_x},{print_pos_min_y} AREA_END={print_pos_max_x},{print_pos_max_y}</code>

    Cura slicer
    <code>BED_MESH_PRINT_AREA AREA_START_X=%MINX% AREA_START_Y=%MINY% AREA_END_X=%MAXX% AREA_END_Y=%MAXY%</code>
    <code>BED_MESH_CALIBRATE AREA_START=%MINX%,%MINY% AREA_END=%MAXX%,%MAXY%</code>

    *(Cura slicer plugin) To make the macro to work in Cura slicer, you need to install the [post process plugin by frankbags](https://gist.github.com/frankbags/c85d37d9faff7bce67b6d18ec4e716ff)
    - In cura menu <code>Help</code> -> <code>Show configuration folder</code>.
    - Copy the python script from the above link in to <code>plugins</code> folder.
    - Restart Cura
    - In cura menu <code>Extensions</code> -> <code>Post processing</code> and select <code>Mesh Print Size</code>

    - (*) If you use single command start gcode like <code>START_PRINT BED_TEMP={material_bed_temperature_layer_0} EXTRUDER_TEMP={material_print_temperature_layer_0}</code> .You might need to add parameter parsing to BED_MESH_PRINT_AREA inside START_PRINT. This is an example [example macro](https://github.com/ChipCE/Slicer-profile/blob/master/klipper/snakeoilxy-180/macro.cfg)
    - (*) If you use single command start gcode like <code>START_PRINT BED_TEMP={material_bed_temperature_layer_0} EXTRUDER_TEMP={material_print_temperature_layer_0}</code> .You might need to add parameter parsing to BED_MESH_CALIBRATE inside START_PRINT. This is an example [example macro](https://github.com/ChipCE/Slicer-profile/blob/master/klipper/snakeoilxy-180/macro.cfg)
  15. @ChipCE ChipCE revised this gist Nov 21, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -72,7 +72,7 @@ Prusa Slicer
    Ideal maker
    <code>BED_MESH_PRINT_AREA AREA_START_X={print_pos_min_x} AREA_START_Y={print_pos_min_y} AREA_END_X={print_pos_max_x} AREA_END_Y={print_pos_max_y}</code>

    Cura slicer
    Cura slicer
    <code>BED_MESH_PRINT_AREA AREA_START_X=%MINX% AREA_START_Y=%MINY% AREA_END_X=%MAXX% AREA_END_Y=%MAXY%</code>

    *(Cura slicer plugin) To make the macro to work in Cura slicer, you need to install the [post process plugin by frankbags](https://gist.github.com/frankbags/c85d37d9faff7bce67b6d18ec4e716ff)
  16. @ChipCE ChipCE revised this gist Nov 21, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -64,7 +64,7 @@ gcode:

    </pre>

    - (2) Go to slicer setting and change the start gcode to
    - (2) Go to slicer setting and replace the old bed mesh gcode the following command.

    Prusa Slicer
    <code>BED_MESH_PRINT_AREA AREA_START_X={first_layer_print_min[0]} AREA_START_Y={first_layer_print_min[1]} AREA_END_X={first_layer_print_max[0]} AREA_END_Y={first_layer_print_max[1]}</code>
  17. @ChipCE ChipCE revised this gist Nov 21, 2021. 1 changed file with 8 additions and 19 deletions.
    27 changes: 8 additions & 19 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -64,32 +64,21 @@ gcode:

    </pre>

    - (2) Edit your START_PRINT macro and add the following parameter under [gcode_macro START_PRINT]. The start and end xy position should match the bed_mesh setting

    <pre>
    variable_parameter_AREA_START_X : 0
    variable_parameter_AREA_START_Y : 0
    variable_parameter_AREA_END_X : 150
    variable_parameter_AREA_END_Y : 180
    </pre>

    - (3) Add the following line into you START_MACRO print. The position should be after G28 and Z_TILT_ADJUST/QUAD_GANTRY_LEVEL
    <code>BED_MESH_PRINT_AREA AREA_START_X={params.AREA_START_X|float} AREA_START_Y={params.AREA_START_Y|float} AREA_END_X={params.AREA_END_X|float} AREA_END_Y={params.AREA_END_Y|float}</code>
    - (4) Go to slicer setting and change the start gcode to
    - (2) Go to slicer setting and change the start gcode to

    Prusa Slicer
    <code>START_PRINT T_BED=[first_layer_bed_temperature] T_EXTRUDER=[first_layer_temperature] AREA_START_X={first_layer_print_min[0]} AREA_START_Y={first_layer_print_min[1]} AREA_END_X={first_layer_print_max[0]} AREA_END_Y={first_layer_print_max[1]}</code>
    <code>BED_MESH_PRINT_AREA AREA_START_X={first_layer_print_min[0]} AREA_START_Y={first_layer_print_min[1]} AREA_END_X={first_layer_print_max[0]} AREA_END_Y={first_layer_print_max[1]}</code>

    Ideal maker
    <code>START_PRINT T_BED=[first_layer_bed_temperature] T_EXTRUDER=[first_layer_temperature] AREA_START_X={print_pos_min_x} AREA_START_Y={print_pos_min_y} AREA_END_X={print_pos_max_x} AREA_END_Y={print_pos_max_y}</code>
    <code>BED_MESH_PRINT_AREA AREA_START_X={print_pos_min_x} AREA_START_Y={print_pos_min_y} AREA_END_X={print_pos_max_x} AREA_END_Y={print_pos_max_y}</code>

    Cura slicer
    <code>START_PRINT BED_TEMP={material_bed_temperature_layer_0} EXTRUDER_TEMP={material_print_temperature_layer_0} AREA_START_X=%MINX% AREA_START_Y=%MINY% AREA_END_X=%MAXX% AREA_END_Y=%MAXY%</code>

    - (5) You might need to adjust your START_PRINT macro if it not in the same style as mine. This is an example [example macro](https://github.com/ChipCE/Slicer-profile/blob/master/klipper/snakeoilxy-180/macro.cfg)
    <code>BED_MESH_PRINT_AREA AREA_START_X=%MINX% AREA_START_Y=%MINY% AREA_END_X=%MAXX% AREA_END_Y=%MAXY%</code>

    - (Cura slicer plugin) To make the macro to work in Cura slicer, you need to install the [post process plugin by frankbags](https://gist.github.com/frankbags/c85d37d9faff7bce67b6d18ec4e716ff)
    *(Cura slicer plugin) To make the macro to work in Cura slicer, you need to install the [post process plugin by frankbags](https://gist.github.com/frankbags/c85d37d9faff7bce67b6d18ec4e716ff)
    - In cura menu <code>Help</code> -> <code>Show configuration folder</code>.
    - Copy the python script from the above link in to <code>plugins</code> folder.
    - Restart Cura
    - In cura menu <code>Extensions</code> -> <code>Post processing</code> and select <code>Mesh Print Size</code>
    - In cura menu <code>Extensions</code> -> <code>Post processing</code> and select <code>Mesh Print Size</code>

    - (*) If you use single command start gcode like <code>START_PRINT BED_TEMP={material_bed_temperature_layer_0} EXTRUDER_TEMP={material_print_temperature_layer_0}</code> .You might need to add parameter parsing to BED_MESH_PRINT_AREA inside START_PRINT. This is an example [example macro](https://github.com/ChipCE/Slicer-profile/blob/master/klipper/snakeoilxy-180/macro.cfg)
  18. @ChipCE ChipCE revised this gist Nov 21, 2021. 1 changed file with 10 additions and 1 deletion.
    11 changes: 10 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -83,4 +83,13 @@ Prusa Slicer
    Ideal maker
    <code>START_PRINT T_BED=[first_layer_bed_temperature] T_EXTRUDER=[first_layer_temperature] AREA_START_X={print_pos_min_x} AREA_START_Y={print_pos_min_y} AREA_END_X={print_pos_max_x} AREA_END_Y={print_pos_max_y}</code>

    - (5) You might need to adjust your START_PRINT macro if it not in the same style as mine. This is an example [example macro](https://github.com/ChipCE/Slicer-profile/blob/master/klipper/snakeoilxy-180/macro.cfg)
    Cura slicer
    <code>START_PRINT BED_TEMP={material_bed_temperature_layer_0} EXTRUDER_TEMP={material_print_temperature_layer_0} AREA_START_X=%MINX% AREA_START_Y=%MINY% AREA_END_X=%MAXX% AREA_END_Y=%MAXY%</code>

    - (5) You might need to adjust your START_PRINT macro if it not in the same style as mine. This is an example [example macro](https://github.com/ChipCE/Slicer-profile/blob/master/klipper/snakeoilxy-180/macro.cfg)

    - (Cura slicer plugin) To make the macro to work in Cura slicer, you need to install the [post process plugin by frankbags](https://gist.github.com/frankbags/c85d37d9faff7bce67b6d18ec4e716ff)
    - In cura menu <code>Help</code> -> <code>Show configuration folder</code>.
    - Copy the python script from the above link in to <code>plugins</code> folder.
    - Restart Cura
    - In cura menu <code>Extensions</code> -> <code>Post processing</code> and select <code>Mesh Print Size</code>
  19. @ChipCE ChipCE revised this gist Nov 20, 2021. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -27,7 +27,7 @@ variable_probe_samples : 2
    variable_mesh_size : 6
    gcode:
    {% if (params.AREA_START_X|default(0)|float < params.AREA_END_X|default(0)|float) and (params.AREA_START_Y|default(0)|float < params.AREA_END_Y|default(0)|float) %}
    {% set max_mesh_area = (mesh_max_x|float - mesh_min_x|float)*(pmesh_max_y|float - mesh_min_y|float) %}
    {% set max_mesh_area = (mesh_max_x|float - mesh_min_x|float)*(mesh_max_y|float - mesh_min_y|float) %}

    {% if params.AREA_START_X|default(0)|float - mesh_area_offset >= mesh_min_x %}
    {% set mesh_min_x = params.AREA_START_X|default(0)|float - mesh_area_offset %}
    @@ -61,6 +61,7 @@ gcode:
    PRINT MSG="Invalid custom mesh parameters, probe using default setting"
    BED_MESH_CALIBRATE
    {% endif %}

    </pre>

    - (2) Edit your START_PRINT macro and add the following parameter under [gcode_macro START_PRINT]. The start and end xy position should match the bed_mesh setting
  20. @ChipCE ChipCE revised this gist Nov 20, 2021. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -82,5 +82,4 @@ Prusa Slicer
    Ideal maker
    <code>START_PRINT T_BED=[first_layer_bed_temperature] T_EXTRUDER=[first_layer_temperature] AREA_START_X={print_pos_min_x} AREA_START_Y={print_pos_min_y} AREA_END_X={print_pos_max_x} AREA_END_Y={print_pos_max_y}</code>

    - (5) You might need to adjust your START_PRINT macro if it not in the same style as mine. This is an example [example macro](https://github.com/ChipCE/Slicer-profile/blob/master/klipper/snakeoilxy-180/macro.cfg)
    - (optional) In the macro, there is a section to auto scale down the number of probe points based on the size of the print. You can change the number <code>20250.0</code> and <code>13500.0</code> to match your need. The value is in mm^2
    - (5) You might need to adjust your START_PRINT macro if it not in the same style as mine. This is an example [example macro](https://github.com/ChipCE/Slicer-profile/blob/master/klipper/snakeoilxy-180/macro.cfg)
  21. @ChipCE ChipCE revised this gist Nov 20, 2021. 1 changed file with 8 additions and 3 deletions.
    11 changes: 8 additions & 3 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -21,10 +21,14 @@ variable_mesh_max_x :150
    variable_mesh_max_y :180
    ; the clearance between print area and probe area
    variable_mesh_area_offset : 5
    ; number of sample per probe point
    variable_probe_samples : 2
    ; mesh matrix size
    variable_mesh_size : 6
    gcode:
    {% if (params.AREA_START_X|default(0)|float < params.AREA_END_X|default(0)|float) and (params.AREA_START_Y|default(0)|float < params.AREA_END_Y|default(0)|float) %}
    {% set max_mesh_area = (mesh_max_x|float - mesh_min_x|float)*(pmesh_max_y|float - mesh_min_y|float) %}

    {% if params.AREA_START_X|default(0)|float - mesh_area_offset >= mesh_min_x %}
    {% set mesh_min_x = params.AREA_START_X|default(0)|float - mesh_area_offset %}
    {% endif %}
    @@ -43,9 +47,11 @@ gcode:

    PRINT MSG="Set custom mesh area to ({mesh_min_x},{mesh_min_y}),({mesh_max_x},{mesh_max_y})"

    {% if (params.AREA_END_X|float - params.AREA_START_X|float)*(params.AREA_END_Y|float - params.AREA_START_Y|float) < 20250.0 %}
    {% if (params.AREA_END_X|float - params.AREA_START_X|float)*(params.AREA_END_Y|float - params.AREA_START_Y|float) < (max_mesh_area * 0.85) %}
    {% set mesh_size = 5 %}
    {% elif (params.AREA_END_X|float - params.AREA_START_X|float)*(params.AREA_END_Y|float - params.AREA_START_Y|float) < (max_mesh_area * 0.65) %}
    {% set mesh_size = 4 %}
    {% elif (params.AREA_END_X|float - params.AREA_START_X|float)*(params.AREA_END_Y|float - params.AREA_START_Y|float) < 13500.0 %}
    {% elif (params.AREA_END_X|float - params.AREA_START_X|float)*(params.AREA_END_Y|float - params.AREA_START_Y|float) < (max_mesh_area * 0.50) %}
    {% set mesh_size = 3 %}
    {% endif %}
    PRINT MSG="Set custom mesh matrix to {mesh_size}x{mesh_size}"
    @@ -55,7 +61,6 @@ gcode:
    PRINT MSG="Invalid custom mesh parameters, probe using default setting"
    BED_MESH_CALIBRATE
    {% endif %}

    </pre>

    - (2) Edit your START_PRINT macro and add the following parameter under [gcode_macro START_PRINT]. The start and end xy position should match the bed_mesh setting
  22. @ChipCE ChipCE revised this gist Nov 19, 2021. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -71,10 +71,10 @@ variable_parameter_AREA_END_Y : 180
    <code>BED_MESH_PRINT_AREA AREA_START_X={params.AREA_START_X|float} AREA_START_Y={params.AREA_START_Y|float} AREA_END_X={params.AREA_END_X|float} AREA_END_Y={params.AREA_END_Y|float}</code>
    - (4) Go to slicer setting and change the start gcode to

    Prusa Slicer
    Prusa Slicer
    <code>START_PRINT T_BED=[first_layer_bed_temperature] T_EXTRUDER=[first_layer_temperature] AREA_START_X={first_layer_print_min[0]} AREA_START_Y={first_layer_print_min[1]} AREA_END_X={first_layer_print_max[0]} AREA_END_Y={first_layer_print_max[1]}</code>

    Ideal maker
    Ideal maker
    <code>START_PRINT T_BED=[first_layer_bed_temperature] T_EXTRUDER=[first_layer_temperature] AREA_START_X={print_pos_min_x} AREA_START_Y={print_pos_min_y} AREA_END_X={print_pos_max_x} AREA_END_Y={print_pos_max_y}</code>

    - (5) You might need to adjust your START_PRINT macro if it not in the same style as mine. This is an example [example macro](https://github.com/ChipCE/Slicer-profile/blob/master/klipper/snakeoilxy-180/macro.cfg)
  23. @ChipCE ChipCE revised this gist Nov 19, 2021. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -69,7 +69,13 @@ variable_parameter_AREA_END_Y : 180

    - (3) Add the following line into you START_MACRO print. The position should be after G28 and Z_TILT_ADJUST/QUAD_GANTRY_LEVEL
    <code>BED_MESH_PRINT_AREA AREA_START_X={params.AREA_START_X|float} AREA_START_Y={params.AREA_START_Y|float} AREA_END_X={params.AREA_END_X|float} AREA_END_Y={params.AREA_END_Y|float}</code>
    - (4) Go to prusa slicer config, printer setting -> Custom G-code -> Start G-code and change the start gcode to
    - (4) Go to slicer setting and change the start gcode to

    Prusa Slicer
    <code>START_PRINT T_BED=[first_layer_bed_temperature] T_EXTRUDER=[first_layer_temperature] AREA_START_X={first_layer_print_min[0]} AREA_START_Y={first_layer_print_min[1]} AREA_END_X={first_layer_print_max[0]} AREA_END_Y={first_layer_print_max[1]}</code>

    Ideal maker
    <code>START_PRINT T_BED=[first_layer_bed_temperature] T_EXTRUDER=[first_layer_temperature] AREA_START_X={print_pos_min_x} AREA_START_Y={print_pos_min_y} AREA_END_X={print_pos_max_x} AREA_END_Y={print_pos_max_y}</code>

    - (5) You might need to adjust your START_PRINT macro if it not in the same style as mine. This is an example [example macro](https://github.com/ChipCE/Slicer-profile/blob/master/klipper/snakeoilxy-180/macro.cfg)
    - (optional) In the macro, there is a section to auto scale down the number of probe points based on the size of the print. You can change the number <code>20250.0</code> and <code>13500.0</code> to match your need. The value is in mm^2
  24. @ChipCE ChipCE revised this gist Nov 19, 2021. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,11 @@
    # Klipper mesh on print area only install guide

    ## What this macro do

    - This macro will dymanic change the bed_mesh area based on the size of the printed part. The fw will only probe on the area that the part will be printed (plus mesh_area_offset value)

    ## Setup guide

    - (1) Add the following macrro to your printer config and set the parameters to match you bed_mesh setting
    <pre>
    [gcode_macro BED_MESH_PRINT_AREA]
  25. @ChipCE ChipCE revised this gist Nov 19, 2021. 1 changed file with 51 additions and 1 deletion.
    52 changes: 51 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,56 @@
    # Klipper mesh on print area only install guide

    - (1) Add the following macrro to your printer config and set the parameters to match you bed_mesh setting https://gist.github.com/ChipCE/7a6379ce8a7743366699c5e983b051a5
    - (1) Add the following macrro to your printer config and set the parameters to match you bed_mesh setting
    <pre>
    [gcode_macro BED_MESH_PRINT_AREA]
    ; gcode parameters
    variable_parameter_AREA_START_X : 0
    variable_parameter_AREA_START_Y : 0
    variable_parameter_AREA_END_X : 150
    variable_parameter_AREA_END_Y : 180
    ; the "safe" area that the probe can reach, use value in config->[bed_mesh]
    variable_mesh_min_x :0
    variable_mesh_min_y :0
    variable_mesh_max_x :150
    variable_mesh_max_y :180
    ; the clearance between print area and probe area
    variable_mesh_area_offset : 5
    variable_probe_samples : 2
    variable_mesh_size : 6
    gcode:
    {% if (params.AREA_START_X|default(0)|float < params.AREA_END_X|default(0)|float) and (params.AREA_START_Y|default(0)|float < params.AREA_END_Y|default(0)|float) %}
    {% if params.AREA_START_X|default(0)|float - mesh_area_offset >= mesh_min_x %}
    {% set mesh_min_x = params.AREA_START_X|default(0)|float - mesh_area_offset %}
    {% endif %}

    {% if params.AREA_START_Y|default(0)|float - mesh_area_offset >= mesh_min_y %}
    {% set mesh_min_y = params.AREA_START_Y|default(0)|float - mesh_area_offset %}
    {% endif %}

    {% if params.AREA_END_X|default(0)|float + mesh_area_offset <= mesh_max_x %}
    {% set mesh_max_x = params.AREA_END_X|default(0)|float + mesh_area_offset %}
    {% endif %}

    {% if params.AREA_END_Y|default(0)|float + mesh_area_offset <= mesh_max_y %}
    {% set mesh_max_y = params.AREA_END_Y|default(0)|float + mesh_area_offset %}
    {% endif %}

    PRINT MSG="Set custom mesh area to ({mesh_min_x},{mesh_min_y}),({mesh_max_x},{mesh_max_y})"

    {% if (params.AREA_END_X|float - params.AREA_START_X|float)*(params.AREA_END_Y|float - params.AREA_START_Y|float) < 20250.0 %}
    {% set mesh_size = 4 %}
    {% elif (params.AREA_END_X|float - params.AREA_START_X|float)*(params.AREA_END_Y|float - params.AREA_START_Y|float) < 13500.0 %}
    {% set mesh_size = 3 %}
    {% endif %}
    PRINT MSG="Set custom mesh matrix to {mesh_size}x{mesh_size}"

    BED_MESH_CALIBRATE mesh_min={mesh_min_x|float},{mesh_min_y|float} mesh_max={mesh_max_x|float},{mesh_max_y|float} probe_count={mesh_size|int},{mesh_size|int} samples={probe_samples|int}
    {% else %}
    PRINT MSG="Invalid custom mesh parameters, probe using default setting"
    BED_MESH_CALIBRATE
    {% endif %}

    </pre>

    - (2) Edit your START_PRINT macro and add the following parameter under [gcode_macro START_PRINT]. The start and end xy position should match the bed_mesh setting

  26. @ChipCE ChipCE revised this gist Nov 19, 2021. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -15,4 +15,5 @@ variable_parameter_AREA_END_Y : 180
    <code>BED_MESH_PRINT_AREA AREA_START_X={params.AREA_START_X|float} AREA_START_Y={params.AREA_START_Y|float} AREA_END_X={params.AREA_END_X|float} AREA_END_Y={params.AREA_END_Y|float}</code>
    - (4) Go to prusa slicer config, printer setting -> Custom G-code -> Start G-code and change the start gcode to
    <code>START_PRINT T_BED=[first_layer_bed_temperature] T_EXTRUDER=[first_layer_temperature] AREA_START_X={first_layer_print_min[0]} AREA_START_Y={first_layer_print_min[1]} AREA_END_X={first_layer_print_max[0]} AREA_END_Y={first_layer_print_max[1]}</code>
    - (5) You might need to adjust your START_PRINT macro if it not in the same style as mine. This is an example [example macro](https://github.com/ChipCE/Slicer-profile/blob/master/klipper/snakeoilxy-180/macro.cfg)
    - (5) You might need to adjust your START_PRINT macro if it not in the same style as mine. This is an example [example macro](https://github.com/ChipCE/Slicer-profile/blob/master/klipper/snakeoilxy-180/macro.cfg)
    - (optional) In the macro, there is a section to auto scale down the number of probe points based on the size of the print. You can change the number <code>20250.0</code> and <code>13500.0</code> to match your need. The value is in mm^2
  27. @ChipCE ChipCE revised this gist Nov 19, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # Klipper mesh on print area only install guide

    - (1) Add the following macrro to your printer config ans set the parameters to match you bed_mesh setting https://gist.github.com/ChipCE/7a6379ce8a7743366699c5e983b051a5
    - (1) Add the following macrro to your printer config and set the parameters to match you bed_mesh setting https://gist.github.com/ChipCE/7a6379ce8a7743366699c5e983b051a5

    - (2) Edit your START_PRINT macro and add the following parameter under [gcode_macro START_PRINT]. The start and end xy position should match the bed_mesh setting

  28. @ChipCE ChipCE revised this gist Nov 19, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    - (1) Add the following macrro to your printer config ans set the parameters to match you bed_mesh setting https://gist.github.com/ChipCE/7a6379ce8a7743366699c5e983b051a5

    - (2) Edit your START_PRINT macro and add the following parameter under [gcode_macro START_PRINT]
    - (2) Edit your START_PRINT macro and add the following parameter under [gcode_macro START_PRINT]. The start and end xy position should match the bed_mesh setting

    <pre>
    variable_parameter_AREA_START_X : 0
  29. @ChipCE ChipCE revised this gist Nov 19, 2021. 1 changed file with 6 additions and 5 deletions.
    11 changes: 6 additions & 5 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,18 @@
    # Klipper mesh on print area only install guide

    - (1) Add the following macrro to your printer config : https://gist.github.com/ChipCE/7a6379ce8a7743366699c5e983b051a5
    - (1) Add the following macrro to your printer config ans set the parameters to match you bed_mesh setting https://gist.github.com/ChipCE/7a6379ce8a7743366699c5e983b051a5

    - (2) Edit your START_PRINT macro and add the following parameter under [gcode_macro START_PRINT]

    <pre>
    variable_parameter_AREA_START_X : 0
    variable_parameter_AREA_START_Y : 0
    variable_parameter_AREA_END_X : 150
    variable_parameter_AREA_END_Y : 180
    variable_parameter_AREA_START_X : 0
    variable_parameter_AREA_START_Y : 0
    variable_parameter_AREA_END_X : 150
    variable_parameter_AREA_END_Y : 180
    </pre>

    - (3) Add the following line into you START_MACRO print. The position should be after G28 and Z_TILT_ADJUST/QUAD_GANTRY_LEVEL
    <code>BED_MESH_PRINT_AREA AREA_START_X={params.AREA_START_X|float} AREA_START_Y={params.AREA_START_Y|float} AREA_END_X={params.AREA_END_X|float} AREA_END_Y={params.AREA_END_Y|float}</code>
    - (4) Go to prusa slicer config, printer setting -> Custom G-code -> Start G-code and change the start gcode to
    <code>START_PRINT T_BED=[first_layer_bed_temperature] T_EXTRUDER=[first_layer_temperature] AREA_START_X={first_layer_print_min[0]} AREA_START_Y={first_layer_print_min[1]} AREA_END_X={first_layer_print_max[0]} AREA_END_Y={first_layer_print_max[1]}</code>
    - (5) You might need to adjust your START_PRINT macro if it not in the same style as mine. This is an example [example macro](https://github.com/ChipCE/Slicer-profile/blob/master/klipper/snakeoilxy-180/macro.cfg)
  30. @ChipCE ChipCE revised this gist Nov 19, 2021. 1 changed file with 13 additions and 6 deletions.
    19 changes: 13 additions & 6 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,17 @@
    # (1) Add the following macrro to your printer config : https://gist.github.com/ChipCE/7a6379ce8a7743366699c5e983b051a5
    # (2) Edit your START_PRINT macro and add the following parameter under [gcode_macro START_PRINT]
    # Klipper mesh on print area only install guide

    - (1) Add the following macrro to your printer config : https://gist.github.com/ChipCE/7a6379ce8a7743366699c5e983b051a5

    - (2) Edit your START_PRINT macro and add the following parameter under [gcode_macro START_PRINT]

    <pre>
    variable_parameter_AREA_START_X : 0
    variable_parameter_AREA_START_Y : 0
    variable_parameter_AREA_END_X : 150
    variable_parameter_AREA_END_Y : 180
    # (3) Add the following line into you START_MACRO print. The position should be after G28 and Z_TILT_ADJUST/QUAD_GANTRY_LEVEL
    # (4) Go to slicer start gcode and change the start gcode to
    START_PRINT T_BED=[first_layer_bed_temperature] T_EXTRUDER=[first_layer_temperature] AREA_START_X={first_layer_print_min[0]} AREA_START_Y={first_layer_print_min[1]} AREA_END_X={first_layer_print_max[0]} AREA_END_Y={first_layer_print_max[1]}
    # (5) You might need to adjust your START_PRINT macro if it not in the same style as mine. This is an example https://github.com/ChipCE/Slicer-profile/blob/master/klipper/snakeoilxy-180/macro.cfg
    </pre>

    - (3) Add the following line into you START_MACRO print. The position should be after G28 and Z_TILT_ADJUST/QUAD_GANTRY_LEVEL
    - (4) Go to prusa slicer config, printer setting -> Custom G-code -> Start G-code and change the start gcode to
    <code>START_PRINT T_BED=[first_layer_bed_temperature] T_EXTRUDER=[first_layer_temperature] AREA_START_X={first_layer_print_min[0]} AREA_START_Y={first_layer_print_min[1]} AREA_END_X={first_layer_print_max[0]} AREA_END_Y={first_layer_print_max[1]}</code>
    - (5) You might need to adjust your START_PRINT macro if it not in the same style as mine. This is an example [example macro](https://github.com/ChipCE/Slicer-profile/blob/master/klipper/snakeoilxy-180/macro.cfg)