mesh compensation too aggressive?
-
@gnydick I'm not really sure what you are expecting but RRF is very simple in this case the adjustment applied is based on the taper you requested:
https://github.com/Duet3D/RepRapFirmware/blob/e7571f7a887a45e6efe2dee2e3ea3dc90ccea034/src/Movement/Move.cpp#L703if (!useTaper || toolHeight < taperHeight) { const float zCorrection = ComputeHeightCorrection(xyzPoint, tool); xyzPoint[Z_AXIS] += (useTaper && zCorrection < taperHeight) ? (taperHeight - toolHeight) * recipTaperHeight * zCorrection : zCorrection; }
I'm not sure what the alternative would be, if you apply the "full correction" on the first layer then I would have thought you then going to have a problem with the second layer as you will now be applying the taper you currently have to that.
If the correction being applied is not enough at the layer height you are using then perhaps you need to increase the taper ( the recommendation you are following is for the minimum taper height to use, so going higher is not an issue).
-
@gloomyandy I'm not expecting anything. I didn't know where the code was for the taper control, so I haven't made any assessment. I just wanted to know what the coded behavior is so I can see if it matches what happens to me.
It looks as though, at least based on this small snippet, taper is applied at all layers until the taper end-height is reached.
If that's the case, why would you apply taper to the first layer? Shouldn't the first layer mesh-compensation offset be exactly what was measured by the probe?
-
@gnydick The current behaviour is as described in the documentation:
This command specifies that bed compensation should be tapered linearly over the specified height, so that full bed compensation is applied at Z=0 and no bed compensation is applied when Z is at or above that height.
This seems reasonable to me. I don't think there is any way for RRF to be sure what the first layer height is (it may even be different for some parts of the print, for instance a purge line may use a different height to the main print). If RRF did somehow apply the taper only from the 2nd layer wouldn't whatever problem you have just be moved to the second layer?
I suppose if you really wanted the full correction to be applied to the first layer you could use the slicer layer change code to apply the taper after the first layer (you might want/need to adjust the amount of taper if you do this).
-
@gloomyandy taper is imprecise anyways because it also doesn't compensate flow for any of the changes.
Personally, I haven't seen an overly aggressive mesh compensation on my various machines. If anything, taper applied at the first layer should lead to less compensation than the mesh does.
If I were to adjust for the taper compensation, I would modify my mesh so it is increased by the taper reduced factor applied, and then load the normal mesh on second layer. But that sounds like work, and since we practically are talking about 5 percent or less of something like 0.4 (so 0.02mm), I would assume my mechanical and extrusion precision is not good enough for an actual effect on the resulting part quality.
-
@gloomyandy whether or not the board can tell if it's the first layer or not is not my problem. It makes no sense not to track the exact measured offset for the first layer. That way you get the cleanest possible first layer.
Hi, would you like to save $0.50 on that $5.00 sandwich today? Ok, please pay me $4.75.
That is effectively what is happening. And although the documentation, in the fine details, does indicate that that is happening. It's wrong. You should be able to understand the documentation for this feature in one sentence.
It shouldn't be so complicated that the user has to calculate their own heatmap to offset for the taper adjustment on the first layer.
-
I think you will find that for a useful taper setting that the effect on the first layer is negligible.
Have you been having problems?
Frederick
-
@fcwilt yes, it smooshes too much in some areas, and I have a great bed.
But the point is, it is literally impossible to get a perfect first layer if it's not following the contour.
-
@gnydick said in mesh compensation too aggressive?:
@fcwilt yes, it smooshes too much in some areas, and I have a great bed.
But the point is, it is literally impossible to get a perfect first layer if it's not following the contour.
I am using 3.4.6 on five different printers and mesh comp works fine. I have verified that it follows the height map exactly.
Perhaps the problem lies in 3.5.x?
Do you set the Z=0 Datum at the same fixed XY position when creating the height map and loading the height map?
Frederick
-
@gnydick What happens if you run the same test print without a taper set? Is the first layer any better? Can you post a screenshot of the mesh display from DWC including the stats (min/max deviation etc.).
-
@fcwilt I'm not following what you mean about the z=0.
How are you confirming it's following it exactly, considering the source code and documentation show the first layer is subject to taper, making it impossible to follow the map exactly.
-
@gloomyandy I'll try it and let you know.
-
@gnydick said in mesh compensation too aggressive?:
I'm not following what you mean about the z=0.
When you use your Z probe by executing a G30 command at a fixed XY location (always the same) you are setting the Z=0 Datum.
How are you confirming it's following it exactly, considering the source code and documentation show the first layer is subject to taper, making it impossible to follow the map exactly.
I created a heightmap using a text editor that had deviations ranging from 0 at the left edge to 100mm at the center then back to 0 at the right edge. With these large values it was easy to move the nozzle to various X positions and measure the Z position of the nozzle.
In any case the amount of taper adjustment applied to the first layer is very little.
Frederick
-
@fcwilt I think you're asking me if I home my Z axis at the same place every time. Yes.
What I always do is home, then tram, and then use the printer. I don't home again after that. Maybe I should.
-
@gnydick yes, you need to rehome Z after tramming because the plane may have shifted and with that Z is out of whack.
-
@gnydick said in mesh compensation too aggressive?:
I think you're asking me if I home my Z axis at the same place every time. Yes.
Yes and no.
Since I don't home Z using the Z probe I always speak of setting the Z=0 Datum rather than homing Z.
Frederick
-
@gnydick It is also a good idea (assuming you use a probe to set Z=0) to home so that the probe is over one of the points in the bed mesh. If you do that then that point should read 0 in the mesh (or very close to it), if that is not the case then there may be a problem with the mesh (or possibly there is a problem with repeatability of Z homing).
-
@gloomyandy good advice
-
I was just thinking about this topic. I've followed all of the advice and things are better. But, I do still think there should be zero tapering applied at the first layer.
The question posed to me was, "how is it supposed to know which is the first layer?"
There are a number of ways, all of them are hinting it. Many of the gcode commands in RRF have hint-like parameters, so I think this would follow the general style.
Can we just add a param to
M376
?M376: Set bed compensation taper Parameters Hnnn Height (mm) over which to taper off the bed compensation Fnnn.nnn First layer height (mm) used to calculate when to start the taper. By providing this parameter, the taper will be deferred to any height above the first layer height. This will apply the mesh exactly as probed to theoretically follow the bed's contours exactly.
-
@gnydick said in mesh compensation too aggressive?:
I was just thinking about this topic. I've followed all of the advice and things are better. But, I do still think there should be zero tapering applied at the first layer.
As I understand it, there is zero compensation at Z=0
The first layer is always Z0 + first layer height, so it seems reasonable to me that a tiny amount of compensation taper will be applied.
However it would be relatively easy for you to use the layer change section of the slicer to only apply taper after the first layer. -
reasonable a tiny amount of taper will be applied: I don't think it's reasonable, which is why I'm proposing this. I think it's expected because it's just following the programming of the board.
... write some code ...: that's true, but then I have to code something that will have to be evaluated for every line of gcode.
If the condition is in the slicer, then it has to evaluate [layer_num] for every iteration of the loop, which is time/cpu wasted.
If the slicer just outputs
M376 S<calculated new offset>
then the same happens as the previous scenario and the duet controller has extra commands to process.Both of those sound clunky and inconvenient. Given it's reasonable that people will assume tapering isn't applied until the second layer, and the large number of "perfect first layer hunters" out there, combined with many people not wanting to be bothered with coding any more than they really have to, it just makes sense to add this parameter so it's a set and forget.
It would only need to go in the
START
gcode,M376 F[first_layer_height]
, of the slicer and nothing else is every emitted, calculated, or cpu/time wasted on.I would imagine this would be the most efficient and user-friendliest way to do things and adheres to the style of the gcode implementation.