diff --git a/ConfigurationPage/CalibrationSettings/CalibrationControls.cs b/ConfigurationPage/CalibrationSettings/CalibrationControls.cs index fd0251cfd..421bc64d3 100644 --- a/ConfigurationPage/CalibrationSettings/CalibrationControls.cs +++ b/ConfigurationPage/CalibrationSettings/CalibrationControls.cs @@ -59,7 +59,7 @@ namespace MatterHackers.MatterControl.PrinterControls { UiThread.RunOnIdle(() => { - LevelWizardBase.ShowPrintLevelWizard(printer, LevelWizardBase.RuningState.UserRequestedCalibration); + LevelWizardBase.ShowPrintLevelWizard(printer, LevelWizardBase.RunningState.UserRequestedCalibration); }); }; diff --git a/ConfigurationPage/PrintLeveling/LevelWizard13PointRadial.cs b/ConfigurationPage/PrintLeveling/LevelWizard13PointRadial.cs index 11d3a497f..bf707d448 100644 --- a/ConfigurationPage/PrintLeveling/LevelWizard13PointRadial.cs +++ b/ConfigurationPage/PrintLeveling/LevelWizard13PointRadial.cs @@ -36,7 +36,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling { public class LevelWizard13PointRadial : LevelWizardBase { - public LevelWizard13PointRadial(PrinterConfig printer, LevelWizardBase.RuningState runningState) + public LevelWizard13PointRadial(PrinterConfig printer, LevelWizardBase.RunningState runningState) : base(printer, runningState) { } diff --git a/ConfigurationPage/PrintLeveling/LevelWizard3Point.cs b/ConfigurationPage/PrintLeveling/LevelWizard3Point.cs index 6b6cd4d5c..7b19ec5d2 100644 --- a/ConfigurationPage/PrintLeveling/LevelWizard3Point.cs +++ b/ConfigurationPage/PrintLeveling/LevelWizard3Point.cs @@ -40,7 +40,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling { public class LevelWizard3Point : LevelWizardBase { - public LevelWizard3Point(PrinterConfig printer, LevelWizardBase.RuningState runningState) + public LevelWizard3Point(PrinterConfig printer, LevelWizardBase.RunningState runningState) : base(printer, runningState) { } diff --git a/ConfigurationPage/PrintLeveling/LevelWizard3x3Mesh.cs b/ConfigurationPage/PrintLeveling/LevelWizard3x3Mesh.cs index 9d5e3e819..1f29ab934 100644 --- a/ConfigurationPage/PrintLeveling/LevelWizard3x3Mesh.cs +++ b/ConfigurationPage/PrintLeveling/LevelWizard3x3Mesh.cs @@ -37,7 +37,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling { public class LevelWizard3x3Mesh : LevelWizardBase { - public LevelWizard3x3Mesh(PrinterConfig printer, LevelWizardBase.RuningState runningState) + public LevelWizard3x3Mesh(PrinterConfig printer, LevelWizardBase.RunningState runningState) : base(printer, runningState) { } diff --git a/ConfigurationPage/PrintLeveling/LevelWizard5x5Mesh.cs b/ConfigurationPage/PrintLeveling/LevelWizard5x5Mesh.cs index 99193adc0..7cc81a9b1 100644 --- a/ConfigurationPage/PrintLeveling/LevelWizard5x5Mesh.cs +++ b/ConfigurationPage/PrintLeveling/LevelWizard5x5Mesh.cs @@ -37,7 +37,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling { public class LevelWizard5x5Mesh : LevelWizardBase { - public LevelWizard5x5Mesh(PrinterConfig printer, LevelWizardBase.RuningState runningState) + public LevelWizard5x5Mesh(PrinterConfig printer, LevelWizardBase.RunningState runningState) : base(printer, runningState) { } diff --git a/ConfigurationPage/PrintLeveling/LevelWizard7PointRadial.cs b/ConfigurationPage/PrintLeveling/LevelWizard7PointRadial.cs index ba2275dbc..a8187453e 100644 --- a/ConfigurationPage/PrintLeveling/LevelWizard7PointRadial.cs +++ b/ConfigurationPage/PrintLeveling/LevelWizard7PointRadial.cs @@ -36,7 +36,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling { public class LevelWizard7PointRadial : LevelWizardBase { - public LevelWizard7PointRadial(PrinterConfig printer, LevelWizardBase.RuningState runningState) + public LevelWizard7PointRadial(PrinterConfig printer, LevelWizardBase.RunningState runningState) : base(printer, runningState) { } diff --git a/ConfigurationPage/PrintLeveling/LevelWizardBase.cs b/ConfigurationPage/PrintLeveling/LevelWizardBase.cs index 243b4ee7c..d0943cdb8 100644 --- a/ConfigurationPage/PrintLeveling/LevelWizardBase.cs +++ b/ConfigurationPage/PrintLeveling/LevelWizardBase.cs @@ -45,7 +45,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling private static SystemWindow printLevelWizardWindow; private LevelingStrings levelingStrings; - public LevelWizardBase(PrinterConfig printer, RuningState runningState) + public LevelWizardBase(PrinterConfig printer, RunningState runningState) : base(500, 370) { levelingStrings = new LevelingStrings(printer.Settings); @@ -65,7 +65,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling printLevelWizard = new WizardControl(); AddChild(printLevelWizard); - if (runningState == LevelWizardBase.RuningState.InitialStartupCalibration) + if (runningState == LevelWizardBase.RunningState.InitialStartupCalibration) { string part1 = "Congratulations on connecting to your new printer. Before starting your first print we need to run a simple calibration procedure.".Localize(); string part2 = "The next few screens will walk your through the print leveling wizard.".Localize(); @@ -82,8 +82,8 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling var secondsPerAutomaticSpot = 3 * zProbeSamples; var secondsToCompleteWizard = ProbeCount * (useZProbe ? secondsPerAutomaticSpot : secondsPerManualSpot); secondsToCompleteWizard += (hasHeatedBed ? 60 * 3 : 0); - printLevelWizard.AddPage(new FirstPageInstructions(printer, - "Print Leveling Overview".Localize(), + printLevelWizard.AddPage(new FirstPageInstructions(printer, + "Print Leveling Overview".Localize(), levelingStrings.WelcomeText(ProbeCount, (int)Math.Round(secondsToCompleteWizard / 60.0)))); if (!useZProbe) @@ -99,7 +99,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling printLevelWizard.AddPage(new HomePrinterPage(printer, printLevelWizard, levelingStrings.HomingPageStepText, - levelingStrings.HomingPageInstructions(useZProbe, hasHeatedBed), + levelingStrings.HomingPageInstructions(useZProbe, hasHeatedBed), useZProbe)); if (hasHeatedBed) @@ -138,37 +138,37 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling printLevelWizard.AddPage(new LastPagelInstructions(printer, printLevelWizard, "Done".Localize(), levelingStrings.DoneInstructions, probePositions)); } - public enum RuningState { InitialStartupCalibration, UserRequestedCalibration } + public enum RunningState { InitialStartupCalibration, UserRequestedCalibration } public abstract int ProbeCount { get; } public int TotalSteps => ProbeCount * 3; public static void ShowPrintLevelWizard(PrinterConfig printer) { - LevelWizardBase.RuningState runningState = LevelWizardBase.RuningState.UserRequestedCalibration; + LevelWizardBase.RunningState runningState = LevelWizardBase.RunningState.UserRequestedCalibration; if (printer.Settings.GetValue(SettingsKey.print_leveling_required_to_print)) { // run in the first run state - runningState = LevelWizardBase.RuningState.InitialStartupCalibration; + runningState = LevelWizardBase.RunningState.InitialStartupCalibration; } ShowPrintLevelWizard(printer, runningState); } - public static void ShowPrintLevelWizard(PrinterConfig printer, LevelWizardBase.RuningState runningState) + public static void ShowPrintLevelWizard(PrinterConfig printer, LevelWizardBase.RunningState runningState) { if (printLevelWizardWindow == null) { // turn off print leveling - PrintLevelingStream.AlowLeveling = false; + PrintLevelingStream.AllowLeveling = false; printLevelWizardWindow = LevelWizardBase.CreateAndShowWizard(printer, runningState); printLevelWizardWindow.Closed += (sender, e) => { // If leveling was on when we started, make sure it is on when we are done. - PrintLevelingStream.AlowLeveling = true; + PrintLevelingStream.AllowLeveling = true; printLevelWizardWindow = null; @@ -191,7 +191,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling public abstract IEnumerable GetPrintLevelPositionToSample(); - private static LevelWizardBase CreateAndShowWizard(PrinterConfig printer, LevelWizardBase.RuningState runningState) + private static LevelWizardBase CreateAndShowWizard(PrinterConfig printer, LevelWizardBase.RunningState runningState) { // clear any data that we are going to be acquiring (sampled positions, after z home offset) PrintLevelingData levelingData = new PrintLevelingData() @@ -239,15 +239,15 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling { var probeOffset = printer.Settings.GetValue(SettingsKey.z_probe_xy_offset); var actualNozzlePosition = probePosition - probeOffset; - + // clamp this to the bed bounds Vector2 bedSize = printer.Settings.GetValue(SettingsKey.bed_size); Vector2 printCenter = printer.Settings.GetValue(SettingsKey.print_center); RectangleDouble bedBounds = new RectangleDouble(printCenter - bedSize/2, printCenter + bedSize/2); - Vector2 adjustedPostion = bedBounds.Clamp(actualNozzlePosition); + Vector2 adjustedPosition = bedBounds.Clamp(actualNozzlePosition); // and push it back into the probePosition - probePosition = adjustedPostion + probeOffset; + probePosition = adjustedPosition + probeOffset; } return probePosition; diff --git a/ConfigurationPage/PrintLeveling/PrintLevelPages.cs b/ConfigurationPage/PrintLeveling/PrintLevelPages.cs index 824c56b4b..8ec8210ba 100644 --- a/ConfigurationPage/PrintLeveling/PrintLevelPages.cs +++ b/ConfigurationPage/PrintLeveling/PrintLevelPages.cs @@ -226,7 +226,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling // Invoke setter forcing persistence of leveling data printer.Settings.Helpers.SetPrintLevelingData(levelingData, true); - PrintLevelingStream.AlowLeveling = true; + PrintLevelingStream.AllowLeveling = true; printer.Settings.Helpers.DoPrintLeveling(true); if (printer.Settings.GetValue(SettingsKey.z_homes_to_max)) @@ -451,7 +451,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling public override void PageIsBecomingActive() { // always make sure we don't have print leveling turned on - PrintLevelingStream.AlowLeveling = false; + PrintLevelingStream.AllowLeveling = false; base.PageIsBecomingActive(); this.Parents().First().KeyDown += TopWindowKeyDown; @@ -563,7 +563,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling { probePositions[probePositionsBeingEditedIndex].position.X = probeStartPosition.X; probePositions[probePositionsBeingEditedIndex].position.Y = probeStartPosition.Y; - // smoothie returns the position relative to the start postion + // smoothie returns the position relative to the start position double reportedProbeZ = 0; GCodeFile.GetFirstNumberAfter("Z:", currentEvent.Data, ref reportedProbeZ); sampleRead = probeStartPosition.Z - reportedProbeZ; @@ -602,7 +602,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling public override void PageIsBecomingActive() { // always make sure we don't have print leveling turned on - PrintLevelingStream.AlowLeveling = false; + PrintLevelingStream.AllowLeveling = false; base.PageIsBecomingActive(); diff --git a/ConfigurationPage/PrintLeveling/ProbeCalibrationWizard.cs b/ConfigurationPage/PrintLeveling/ProbeCalibrationWizard.cs index 5005dbd06..f64e14cd1 100644 --- a/ConfigurationPage/PrintLeveling/ProbeCalibrationWizard.cs +++ b/ConfigurationPage/PrintLeveling/ProbeCalibrationWizard.cs @@ -121,7 +121,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling if (probeCalibrationWizardWindow == null) { // turn off print leveling - PrintLevelingStream.AlowLeveling = false; + PrintLevelingStream.AllowLeveling = false; probeCalibrationWizardWindow = new ProbeCalibrationWizard(printer); @@ -130,7 +130,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling probeCalibrationWizardWindow.Closed += (s, e) => { // If leveling was on when we started, make sure it is on when we are done. - PrintLevelingStream.AlowLeveling = true; + PrintLevelingStream.AllowLeveling = true; probeCalibrationWizardWindow = null; diff --git a/DesignTools/Operations/Object3DExtensions.cs b/DesignTools/Operations/Object3DExtensions.cs index 5d8edb188..d814d9784 100644 --- a/DesignTools/Operations/Object3DExtensions.cs +++ b/DesignTools/Operations/Object3DExtensions.cs @@ -180,11 +180,11 @@ namespace MatterHackers.MatterControl.DesignTools.Operations return ApplyAtPosition(currentTransform, transformToApply, boundsToApplyTo.Center); } - public static Matrix4X4 ApplyAtPosition(Matrix4X4 currentTransform, Matrix4X4 transformToApply, Vector3 postionToApplyAt) + public static Matrix4X4 ApplyAtPosition(Matrix4X4 currentTransform, Matrix4X4 transformToApply, Vector3 positionToApplyAt) { - currentTransform *= Matrix4X4.CreateTranslation(-postionToApplyAt); + currentTransform *= Matrix4X4.CreateTranslation(-positionToApplyAt); currentTransform *= transformToApply; - currentTransform *= Matrix4X4.CreateTranslation(postionToApplyAt); + currentTransform *= Matrix4X4.CreateTranslation(positionToApplyAt); return currentTransform; } diff --git a/PartPreviewWindow/PrinterTabPage.cs b/PartPreviewWindow/PrinterTabPage.cs index c9c6158b9..fbfe676d8 100644 --- a/PartPreviewWindow/PrinterTabPage.cs +++ b/PartPreviewWindow/PrinterTabPage.cs @@ -325,7 +325,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow layerRenderRatioSlider.TotalWidthInPixels = view3DWidget.InteractionLayer.Width - 32; } - private double lastPostion = 0; + private double lastPosition = 0; private TumbleCubeControl tumbleCubeControl; private bool SetAnimationPosition() @@ -335,10 +335,10 @@ namespace MatterHackers.MatterControl.PartPreviewWindow double currentPosition = printer.Connection.RatioIntoCurrentLayer; layerRenderRatioSlider.FirstValue = 0; - if (lastPostion != currentPosition) + if (lastPosition != currentPosition) { layerRenderRatioSlider.SecondValue = currentPosition; - lastPostion = currentPosition; + lastPosition = currentPosition; return true; } @@ -467,7 +467,6 @@ namespace MatterHackers.MatterControl.PartPreviewWindow "Printer".Localize(), new ConfigurePrinterWidget(sliceSettingsWidget.settingsContext, printer, theme) { - BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor, HAnchor = HAnchor.Stretch, VAnchor = VAnchor.Stretch, }); diff --git a/PartPreviewWindow/View3D/View3DWidget.cs b/PartPreviewWindow/View3D/View3DWidget.cs index 9d9e3e386..89d8988b3 100644 --- a/PartPreviewWindow/View3D/View3DWidget.cs +++ b/PartPreviewWindow/View3D/View3DWidget.cs @@ -471,7 +471,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow && this.DragDropObject != null) { // Move the DropDropObject the target item - DragSelectedObject(localMousePostion: this.TransformFromParentSpace(topMostParent, screenSpaceMousePosition)); + DragSelectedObject(localMousePosition: this.TransformFromParentSpace(topMostParent, screenSpaceMousePosition)); } } @@ -925,9 +925,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow return CurrentSelectInfo.HitPlane.GetClosestIntersection(ray); } - public void DragSelectedObject(Vector2 localMousePostion) + public void DragSelectedObject(Vector2 localMousePosition) { - Vector2 meshViewerWidgetScreenPosition = meshViewerWidget.TransformFromParentSpace(this, localMousePostion); + Vector2 meshViewerWidgetScreenPosition = meshViewerWidget.TransformFromParentSpace(this, localMousePosition); Ray ray = this.World.GetRayForLocalBounds(meshViewerWidgetScreenPosition); IntersectInfo info = CurrentSelectInfo.HitPlane.GetClosestIntersection(ray); diff --git a/PrinterCommunication/Io/PrintLevelingStream.cs b/PrinterCommunication/Io/PrintLevelingStream.cs index eb4963341..585dd8036 100644 --- a/PrinterCommunication/Io/PrintLevelingStream.cs +++ b/PrinterCommunication/Io/PrintLevelingStream.cs @@ -44,12 +44,12 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io : base(internalStream) { // always reset this when we construct - AlowLeveling = true; + AllowLeveling = true; this.printerSettings = printerSettings; this.activePrinting = activePrinting; } - public static bool AlowLeveling { get; set; } + public static bool AllowLeveling { get; set; } public PrinterMove LastDestination { get { return lastDestination; } } @@ -57,7 +57,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io { get { - return AlowLeveling + return AllowLeveling && printerSettings.GetValue(SettingsKey.print_leveling_enabled) && !printerSettings.GetValue(SettingsKey.has_hardware_leveling); } diff --git a/PrinterCommunication/Io/PrintRecoveryStream.cs b/PrinterCommunication/Io/PrintRecoveryStream.cs index e7a9b0601..94e73bb93 100644 --- a/PrinterCommunication/Io/PrintRecoveryStream.cs +++ b/PrinterCommunication/Io/PrintRecoveryStream.cs @@ -118,7 +118,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io // remove it from the part case RecoveryState.Raising: // We don't know where the printer is for sure (it make have been turned off). Disable leveling until we know where it is. - PrintLevelingStream.AlowLeveling = false; + PrintLevelingStream.AllowLeveling = false; queuedCommands.Add("M114 ; get current position"); queuedCommands.Add("G91 ; move relative"); queuedCommands.Add("G1 Z10 F{0}".FormatWith(printer.Settings.ZSpeed())); @@ -145,7 +145,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io queuedCommands.Add("G28 Z0"); } // We now know where the printer is re-enable print leveling - PrintLevelingStream.AlowLeveling = true; + PrintLevelingStream.AllowLeveling = true; RecoveryState = RecoveryState.FindingRecoveryLayer; return ""; diff --git a/PrinterCommunication/PrinterConnection.cs b/PrinterCommunication/PrinterConnection.cs index 4d927296c..08b0de272 100644 --- a/PrinterCommunication/PrinterConnection.cs +++ b/PrinterCommunication/PrinterConnection.cs @@ -2072,7 +2072,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication PrintingCanContinue(this, null); } - private void KeepTrackOfAbsolutePostionAndDestination(string lineBeingSent) + private void KeepTrackOfAbsolutePositionAndDestination(string lineBeingSent) { if (lineBeingSent.StartsWith("G0 ") || lineBeingSent.StartsWith("G1 ") @@ -2494,7 +2494,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication // remove the comment if any lineToWrite = RemoveCommentIfAny(lineToWrite); - KeepTrackOfAbsolutePostionAndDestination(lineToWrite); + KeepTrackOfAbsolutePositionAndDestination(lineToWrite); if (this.SendWithChecksum && sendLineWithChecksum) { diff --git a/Tests/MatterControl.Tests/MatterControl/SettingsParseTests.cs b/Tests/MatterControl.Tests/MatterControl/SettingsParseTests.cs index 0a54fa2ef..679406b85 100644 --- a/Tests/MatterControl.Tests/MatterControl/SettingsParseTests.cs +++ b/Tests/MatterControl.Tests/MatterControl/SettingsParseTests.cs @@ -20,7 +20,7 @@ namespace MatterControl.Tests.MatterControl { AggContext.StaticData = new FileSystemStaticData(TestContext.CurrentContext.ResolveProjectPath(4, "StaticData")); MatterControlUtilities.OverrideAppDataLocation(TestContext.CurrentContext.ResolveProjectPath(4)); - LevelWizard3Point levelingSolution = new LevelWizard3Point(ActiveSliceSettings.Instance.printer, LevelWizardBase.RuningState.InitialStartupCalibration); + LevelWizard3Point levelingSolution = new LevelWizard3Point(ActiveSliceSettings.Instance.printer, LevelWizardBase.RunningState.InitialStartupCalibration); var printerSettings = ActiveSliceSettings.Instance; {