GRBL Auto-fill not working.

GRBL Auto-fill not working.

Auto-fill fuction does not work in the Auto Level widget in the GRBL version. The auto-fill function does work in the TinyG version.

The lower left X/Y location is correct, but the upper right point is too big.

I used the same Gcode to test the Grbl and TinyG versions.

@Bob_Turner you set the area you want to autofill in the widget.
it takes its information from the viewer.

the calculation is:

endX = stepDistance * (((maxX-minX)/500) + 1).

so if you have gcode with dimensions 200 * 200, with the origin at the bottom left hand corner; and you want to probe every 5mm, you’d expect the endX to be at 5 * (((200-0)/5) + 1) = 5 * 41 = 205.

this is consistent with what I see on my workspace (which uses the grbl autoleveller).

if you are seeing alternative results then possibly you have gcode which pushes beyond your dimension boundaries.

But in any event you can override it as you wish in the widget - just set the min/max x & y and press auto-fill.

(note that if you set the origin to bottom left hand corner of the dimensions, and the dimensions have width (because of the path inflation), the actual extent of the boundary will take the width into account - so you may see negative x/y start points; which in turn will effect the max X/Y end points.

Sorry I was snippy with the first comments. I created a very simple test case. Here is the Gcode. I added spaces to help me make sure I was reading the right numbers.

N00080 ; Circular Interpolation Plane Selection XY
N00090 G17
N00100 ; Select MM Units
N00110 G21
N00260 ; -------------------------------------------
N00270 G0 X-25.0000 Y-25.0000 Z5.0800
N00280 G1 Z-0.5000 F203.2000
N00290 G1 X25.0000 F508.0000
N00300 G1 Y25.0000
N00310 G1 X-25.0000
N00320 G1 Y-25.0000
N00330 G1 Z-1.0000 F203.2000
N00340 G1 X25.0000 F508.0000
N00350 G1 Y25.0000
N00360 G1 X-25.0000
N00370 G1 Y-25.0000
N00380 G0 Z5.0800

Below is a screen shot with http://chilipeppr.com/grbl running in Chrome. I editted the min and max coords before I clicked on Auto Fill. The numbers got updated, but the max values are wrong.

missing/deleted image from Google+

@Bob_Turner
You can still override the max X and y yourself. Or set arbitrary Mon/max coordinate limits as you want.

But I see the error in the original maths in that it does not cater for when the origin is not at a corner. The http://b.box.min.x and y need to be readded to the result.

I will push a fix to my workspace in a short while. That will not correct the grbl workspace - for that you will need to wait for Ray to update. But my workspace should be backwards compatible with old versions of grbl. But for some annoying gremlins with particular use cases and units.

@Bob_Turner
You can still override the max X and y yourself. Or set arbitrary Mon/max coordinate limits as you want.

But I see the error in the original maths in that it does not cater for when the origin is not at a corner. The http://b.box.min.x and y need to be readded to the result.

I will push a fix to my workspace in a short while. That will not correct the grbl workspace - for that you will need to wait for Ray to update. But my workspace should be backwards compatible with old versions of grbl. But for some annoying gremlins with particular use cases and units.

my workspace is updated (/jpadie).

I have also published a pull request on to @raykholo core repo which should merge three important fixes to the autolevelling code.

Hopefully he will post back here to let us know when/if he sees the pull request and merges the commits.

Thank you.