Closed aeropic closed 6 years ago
The way in which the points are stored matters. The finalize() function expects the points to return in a zig-zag fashion so that it can correctly organize the table of z-values used to generate the mesh. This is why I chose to procedurally generate the points, so that the user didn't enter invalid points that would confuse mesh generation.
Thanks Eric, I'll see if it still worths the extra effort ;-)
@Arksine , well, I tried but I must say I'm stuck very quickly ;-( (did I mention I am a fully noob in python ?)
I cannot even add one simple line in your code, just trying to insert a log line stalls everything eg : replacing this line logging.info('bed_mesh: generated points') by this one is OK logging.info('bed_mesh: my generated points')
but duplicating it does not work... logging.info('bed_mesh: my generated points') logging.info('bed_mesh: my generated points') ==> It compiles but it does not run anymore...
What do I do wrong ? I admire you, fluent people in python !!!!
@aeropic Most likely its a formatting issue. For example, if your editor is inserting tabs instead of spaces for indentation the interpreter won't like mixing them.
Bingo, the editor replaced the 4 spaces by one tab! And I've now learnt my first lesson of Python ;-) Thanks, now the fun will begin ... I keep you informed!
Just for the fun , I eventually did it which helped me to better understand the mesh levelling code ;-).
It is working like a charm with, to my eyes, the advantages to both minimize the traject of the probe and exit at the point (0,0) which is easier to clean the noozle on the fly ...
Fell free to keep it and merge it in the product if you thibnk it worths. (Mind the G28 line which is commented)
Thanks again for the great work done here. Alain
As this post is referenced in #681, I suggest we can close it !
I just would want to modify the bed_mesh.py in order to follow a spiral pattern from the center of the bed plate instead of the zig zag one. (As the homing point, in my case, is the center of the bed, I want to suppress an initial move to the corner and also to finish by the front left corner of the bed to allow better access to the head for a cleaning at that location...)
It seems this could be a very simple mod, but before doing it I would want to be confirmed that the order the probe locations are stored into the "points" array does not matter ? I mean can I store my points in spiral rather than in zig zag with the points.append((posx, posy)) instruction?
Thanks
points = [] for i in range(y_cnt): for j in range(x_cnt): if not i % 2:
move in positive directon