Closed ManuelMcLure closed 5 years ago
You can remove the U option (and its code) and use that for 'Unlevel Beds'.
You can remove the U option (and its code) and use that for 'Unlevel Beds'.
That works. Now to get my head around the G26 code and see how to implement this.
And if you feel like it... You can change the 'circles' to use the G2 Arc command instead of being simulated with 12 line segments... That should make the 'circles' draw smoother, and it also will cut out a bunch of code (and the sin() cos() tables).
I'm working on using the arc command (calling plan_arc()
) and am seeing something that concerns me. It looks like plan_arc()
is calling planner.buffer_line_kinematic()
directly and unless I'm missing something planner.buffer_line_kinematic()
does not apply any leveling unless PLANNER_LEVELING
is set. PLANNER_LEVELING
is defined as
#define UBL_SEGMENTED (ENABLED(AUTO_BED_LEVELING_UBL) && (ENABLED(DELTA)))
#define ABL_PLANAR (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_3POINT))
#define ABL_GRID (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR))
#define OLDSCHOOL_ABL (ABL_PLANAR || ABL_GRID)
...
#define PLANNER_LEVELING (OLDSCHOOL_ABL || ENABLED(MESH_BED_LEVELING) || UBL_SEGMENTED || ENABLED(SKEW_CORRECTION))
so as far as I can tell PLANNER_LEVELING
is not set if using UBL on a cartesian printer and therefore it looks like leveling is not applied to arc moves. If I'm missing something please let me know.
Yikes! I think you are correct. It might be we should have a #if ENABLED() for the UBL non-segmented case to send it down the correct path.
THANK YOU for finding this!
Do you want me to enter an issue for this? I'm somewhat leery of attempting to fix this myself since I'm just learning the code and I'm not sure exactly what the interactions are involved between different levels and at what level the fix needs to be in.
It looks like bezier curves have the same issue.
Yes, please open an issue. (But in the Marlin/Firmware area... Otherwise it might not get the attention that it needs.)
I want to write a documentation section on how to use G26 to help physically level the bed by moving to each of the four corners and running a partial G26 (producing a 2x2 subgrid) at each corner, for example:
My first thought was to add this to the UBL doc, but this really applies to any of the leveling methods that can enable
G26_MESH_VALIDATION
so I'm not sure where the best place to put it is. Any suggestions?On a different note, I was thinking of possibly adding an option to G26 that would automate generating this pattern. I'm trying to figure out which letter would be the best for this option - it looks like E I M N T V W Z are still available. Do you think this would be a good addition to G26, and which letter would be the best? Unfortunately P for physical and C for corner are already used. Maybe T for tramming would work.