diff --git a/MatterControlLib/ApplicationView/BedConfig.cs b/MatterControlLib/ApplicationView/BedConfig.cs index 6c881df1c..f0d395afd 100644 --- a/MatterControlLib/ApplicationView/BedConfig.cs +++ b/MatterControlLib/ApplicationView/BedConfig.cs @@ -497,6 +497,19 @@ namespace MatterHackers.MatterControl public bool EditableScene => this.EditContext?.FreezeGCode != true; public string ContentType { get; private set; } + public RectangleDouble Bounds + { + get + { + var bedSize = Printer.Settings.GetValue(SettingsKey.bed_size); + var printCenter = Printer.Settings.GetValue(SettingsKey.print_center); + + return new RectangleDouble(printCenter.X - bedSize.X / 2, + printCenter.Y - bedSize.Y / 2, + printCenter.X + bedSize.X / 2, + printCenter.Y + bedSize.Y / 2); + } + } internal void RenderGCode3D(DrawEventArgs e) { diff --git a/MatterControlLib/CustomWidgets/NozzleOffsetCalibrationPage.cs b/MatterControlLib/CustomWidgets/NozzleOffsetCalibrationPage.cs index 07a206202..ee9756e31 100644 --- a/MatterControlLib/CustomWidgets/NozzleOffsetCalibrationPage.cs +++ b/MatterControlLib/CustomWidgets/NozzleOffsetCalibrationPage.cs @@ -139,6 +139,10 @@ namespace MatterHackers.MatterControl else { printer.Connection.MoveRelative(PrinterConnection.Axis.Z, 20, printer.Settings.Helpers.ManualMovementSpeeds().Z); + + printer.Connection.MoveAbsolute(PrinterConnection.Axis.Y, + printer.Bed.Bounds.Top, + printer.Settings.Helpers.ManualMovementSpeeds().Y); } });