Don't apply the probe offset if there is no probe being used

This commit is contained in:
Lars Brubaker 2019-05-22 13:31:33 -07:00
parent 8a81469429
commit 66f88536de

View file

@ -98,7 +98,13 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
var triangles = DelaunayTriangulation<DefaultVertex, DefaultTriangulationCell<DefaultVertex>>.Create(vertices, .001);
var probeZOffset = new Vector3(0, 0, printer.Settings.GetValue<Vector3>(SettingsKey.probe_offset).Z);
var probeZOffset = default(Vector3);
if (printer.Settings.Helpers.UseZProbe())
{
probeZOffset = new Vector3(0, 0, printer.Settings.GetValue<Vector3>(SettingsKey.probe_offset).Z);
}
// make all the triangle planes for these triangles
foreach (var triangle in triangles.Cells)
{