Git Product home page Git Product logo

Comments (2)

Frix-x avatar Frix-x commented on September 27, 2024

Hello,

Thanks for raising an issue about this. You're right: we want to get the RRI at the same position where the Z homing was done.

That's why my adaptive mesh macro can be called in two parts:

  • COMPUTE_MESH_PARAMETERS can just "compute" and define the mesh. This will also compute the RRI if needed (always in the center of the mesh)
  • Then you can use this mesh_center variable like I'm doing in any Z homing process. On my side I use the z automatic calibration plugin. But this can also work without it if you can do the Z homing on the bed like with a Voron TAP or BLTouch. So the homing can be done on the center point of the mesh, even if it's not on the middle of the bed.
  • Then ADAPTIVE_BED_MESH will effectively do the mesh as it was calculated at step one

Does this answer your question ?

from klippain.

JanB97 avatar JanB97 commented on September 27, 2024

Yes but it's not what I meant.
This is what I came up with to approximate the reference point for people using a seperate z endstop.:

`
{% set steps_x = (area_max_x - area_min_x)/(meshPointX -1) %}
{% set steps_y = (area_max_y - area_min_y)/(meshPointY -1) %}

    {% set mesh_vals = namespace(index=-1, reference=0) %}
    {% set mesh_temp_vals = namespace(x=9999, y=9999) %}

    {% for y in range(1,meshPointY+1) %}
        {% for x in range(1,meshPointX+1) %}

            {% set mesh_vals.index = mesh_vals.index+1  %} #Setting Index

            {% if (y % 2 == 0) %}                          #Calc X Value
              {% set calcX = area_max_x-(steps_x*(x-1))  %} 
            {% else %}
              {% set calcX = area_min_x+(steps_x*(x-1))  %}        
            {% endif %}

            {% set calcY = area_min_y+(steps_y*(y-1))  %} #Calc Y Value
            
            {% set diffX = (midX-calcX)*(1 if midX-calcX >= 0 else -1) %} #Calculate Differences
            {% set diffY = (midY-calcY)*(1 if midY-calcY >= 0 else -1) %}

            {% if (diffX <= mesh_temp_vals.x) and  (diffY <= mesh_temp_vals.y) %} #Setting Reference Value and Temp Data
                {% set mesh_temp_vals.x = diffX %}
                {% set mesh_temp_vals.y = diffY %}
                {% set mesh_vals.reference = mesh_vals.index %}
                #{action_respond_info("Ref Set!")} 
            {% endif %}

            #{action_respond_info("Diff: ------ X: %i | Y: %i" | format(diffX,diffY))} 
            #{action_respond_info("Index: %i --> X: %i | Y: %i" | format(mesh_vals.index, calcX, calcY))} 
        {% endfor %}
    {% endfor %}
    
    #{action_respond_info("Ref:     %i" | format(mesh_vals.reference))} 
    #{action_respond_info("Points:  %i" | format(meshPointY*meshPointX))} 
   ### Probe ###
   BED_MESH_CALIBRATE_BASE mesh_min={area_min_x},{area_min_y} mesh_max={area_max_x},{area_max_y} probe_count={meshPointX},{meshPointY} relative_reference_index={mesh_vals.reference}`

I'll close this, because I got it to work good enough for me. Thanks. :)

from klippain.

Related Issues (20)

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

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

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.