diff --git a/MatterControlLib/ConfigurationPage/PrintLeveling/SetupWizards/ZCalibrationWizard.cs b/MatterControlLib/ConfigurationPage/PrintLeveling/SetupWizards/ZCalibrationWizard.cs index dde2741a1..8d3c33b31 100644 --- a/MatterControlLib/ConfigurationPage/PrintLeveling/SetupWizards/ZCalibrationWizard.cs +++ b/MatterControlLib/ConfigurationPage/PrintLeveling/SetupWizards/ZCalibrationWizard.cs @@ -256,7 +256,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling this, ProbeStartPosition, "Conductive Probing".Localize(), - "Measure the nozzle to probe offset using the conductive pad.".Localize(), + "Measuring the nozzle to probe offset using the conductive pad.".Localize(), manualProbePositions[0]); yield return conductiveProbeFeedback; @@ -264,18 +264,27 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling if (conductiveProbeFeedback.MovedBelowMinZ) { // show an error message - yield return new WizardPage( + var errorPage = new WizardPage( this, "Error: Below Conductive Probe Min Z".Localize(), - "The printer moved below the minimum height set for conductive probing. Check that the nozzle is clean and there is continuity with the pad.".Localize()); - } + "The printer moved below the minimum height set for conductive probing.".Localize() + "\n" + + "Check that the nozzle is clean and there is continuity with the pad.".Localize() + "\n\n" + + "After cleaning the nozzle, run the wizard again.".Localize()); + + errorPage.Load += (s, e) => + { + errorPage.ShowWizardFinished(); + }; + + yield return errorPage; + } else // found a good probe height { SetExtruderOffset(autoProbePositions, manualProbePositions, 0); - } - // let the user know we are done with the automatic probing - yield return new ConductiveProbeCalibrateComplete(printer, this, PageTitle); + // let the user know we are done with the automatic probing + yield return new ConductiveProbeCalibrateComplete(printer, this, PageTitle); + } } else // collect the probe information manually { diff --git a/MatterControlLib/ConfigurationPage/PrintLeveling/WizardPages/ConductiveProbeFeedback.cs b/MatterControlLib/ConfigurationPage/PrintLeveling/WizardPages/ConductiveProbeFeedback.cs index d4658efa9..71107848d 100644 --- a/MatterControlLib/ConfigurationPage/PrintLeveling/WizardPages/ConductiveProbeFeedback.cs +++ b/MatterControlLib/ConfigurationPage/PrintLeveling/WizardPages/ConductiveProbeFeedback.cs @@ -114,6 +114,8 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling { probePositions[0].Position = nozzleCurrentPosition; + // make sure we are no longer listening for responses + printer.Connection.LineReceived -= PrinterLineRecieved; // move on to the next page of the wizard UiThread.RunOnIdle(() => NextButton.InvokeClick()); } @@ -134,6 +136,9 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling // we have gone down too far // abort with error this.MovedBelowMinZ = true; + // make sure we are no longer listening for responses + printer.Connection.LineReceived -= PrinterLineRecieved; + printer.Connection.MoveRelative(PrinterCommunication.PrinterConnection.Axis.Z, 10, printer.Settings.ZSpeed()); // move on to the next page of the wizard UiThread.RunOnIdle(() => NextButton.InvokeClick()); } diff --git a/MatterControlLib/ConfigurationPage/PrintLeveling/WizardPages/WizardPage.cs b/MatterControlLib/ConfigurationPage/PrintLeveling/WizardPages/WizardPage.cs index 361082fe4..db15411b5 100644 --- a/MatterControlLib/ConfigurationPage/PrintLeveling/WizardPages/WizardPage.cs +++ b/MatterControlLib/ConfigurationPage/PrintLeveling/WizardPages/WizardPage.cs @@ -146,7 +146,7 @@ namespace MatterHackers.MatterControl base.OnClosed(e); } - protected void ShowWizardFinished(Action doneClicked = null) + public void ShowWizardFinished(Action doneClicked = null) { var doneButton = new TextButton("Done".Localize(), theme) { diff --git a/MatterControlLib/PartPreviewWindow/View3D/Object3DControlsLayer.cs b/MatterControlLib/PartPreviewWindow/View3D/Object3DControlsLayer.cs index c51ee6c1c..5713b9559 100644 --- a/MatterControlLib/PartPreviewWindow/View3D/Object3DControlsLayer.cs +++ b/MatterControlLib/PartPreviewWindow/View3D/Object3DControlsLayer.cs @@ -1316,7 +1316,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow // Invoke all item Drawables foreach (var drawable in itemDrawables) { - if (drawable.Enabled) + var selectedItemDrawable = drawable as SelectedItemDrawable; + if ((selectedItemDrawable != null && isSelected) + || (selectedItemDrawable == null && drawable.Enabled)) { aabbs.Add(drawable.GetWorldspaceAABB(item, isSelected, this.World)); } diff --git a/MatterControlLib/PartPreviewWindow/View3D/TrackballTumbleWidgetExtended.cs b/MatterControlLib/PartPreviewWindow/View3D/TrackballTumbleWidgetExtended.cs index e15d0b91b..22bf75643 100644 --- a/MatterControlLib/PartPreviewWindow/View3D/TrackballTumbleWidgetExtended.cs +++ b/MatterControlLib/PartPreviewWindow/View3D/TrackballTumbleWidgetExtended.cs @@ -227,11 +227,6 @@ namespace MatterHackers.MatterControl.PartPreviewWindow base.OnDraw(graphics2D); } - public void OnBeforeDraw3D() - { - RecalculateProjection(); - } - public void OnDraw3D() { if (hitPlane != null) diff --git a/MatterControlLib/PartPreviewWindow/View3D/View3DWidget.cs b/MatterControlLib/PartPreviewWindow/View3D/View3DWidget.cs index 0ab12f566..6d0cc89a2 100644 --- a/MatterControlLib/PartPreviewWindow/View3D/View3DWidget.cs +++ b/MatterControlLib/PartPreviewWindow/View3D/View3DWidget.cs @@ -1344,7 +1344,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow } } - TrackballTumbleWidget.OnBeforeDraw3D(); + TrackballTumbleWidget.RecalculateProjection(); base.OnDraw(graphics2D); } diff --git a/MatterControlLib/PrinterCommunication/Drivers/Emulator/Emulator.cs b/MatterControlLib/PrinterCommunication/Drivers/Emulator/Emulator.cs index 944c2c063..028b9062e 100644 --- a/MatterControlLib/PrinterCommunication/Drivers/Emulator/Emulator.cs +++ b/MatterControlLib/PrinterCommunication/Drivers/Emulator/Emulator.cs @@ -67,6 +67,12 @@ namespace MatterHackers.PrinterEmulator return "ok\n"; } + string TurnOnConductive(string a) + { + this.ConductivePad = true; + return "ok\n"; + } + string ChangeToFast(string a) { this.RunSlow = false; @@ -77,6 +83,7 @@ namespace MatterHackers.PrinterEmulator { { "A", Echo }, { "FAST", ChangeToFast }, + { "CONDUCTIVE", TurnOnConductive }, { "G0", ParseMovmentCommand }, { "G1", ParseMovmentCommand }, { "G28", HomeAxis }, @@ -126,6 +133,19 @@ namespace MatterHackers.PrinterEmulator status += $"x_max: {xMaxOpen}\n"; status += $"y_min: open\n"; status += $"z_min: open\n"; + + if (ConductivePad) + { + if (conductivePadTriggerRegion.Contains(CurrentPosition)) + { + status += $"conductive: TRIGGERED\n"; + } + else + { + status += $"conductive: open\n"; + } + } + status += "ok\n"; return status; } @@ -752,6 +772,13 @@ ok public Vector3 XYZProbeOffset { get; set; } = new Vector3(0, 0, -5); + /// + /// The emulated printer has a conductive pad that can be used to probe the bed. + /// + public bool ConductivePad { get; set; } + + private AxisAlignedBoundingBox conductivePadTriggerRegion = new AxisAlignedBoundingBox(40, 210, -10, 60, 240, 0); + public void Close() { this.ShutDown(); diff --git a/StaticData/Translations/Master.txt b/StaticData/Translations/Master.txt index 0cd14d0d0..98c224d7f 100644 --- a/StaticData/Translations/Master.txt +++ b/StaticData/Translations/Master.txt @@ -265,6 +265,9 @@ Translated:Advanced English:Advanced Array Translated:Advanced Array +English:After cleaning the nozzle, run the wizard again. +Translated:After cleaning the nozzle, run the wizard again. + English:After Tool Change G-Code Translated:After Tool Change G-Code @@ -757,6 +760,9 @@ Translated:Check for Update English:Check For Update Translated:Check For Update +English:Check that the nozzle is clean and there is continuity with the pad. +Translated:Check that the nozzle is clean and there is continuity with the pad. + English:Checking Cloud Services Translated:Checking Cloud Services @@ -2833,6 +2839,9 @@ Translated:Measure the nozzle to probe offset using the conductive pad. English:Measure Tool Translated:Measure Tool +English:Measuring the nozzle to probe offset using the conductive pad. +Translated:Measuring the nozzle to probe offset using the conductive pad. + English:Mechanical Translated:Mechanical @@ -5377,6 +5386,9 @@ Translated:The printer has the ability to move each z motor independently and th English:The printer is now aliging the z-axis. It will do the following: Translated:The printer is now aliging the z-axis. It will do the following: +English:The printer moved below the minimum height set for conductive probing. +Translated:The printer moved below the minimum height set for conductive probing. + English:The printer moved below the minimum height set for conductive probing. Check that the nozzle is clean and there is continuity with the pad. Translated:The printer moved below the minimum height set for conductive probing. Check that the nozzle is clean and there is continuity with the pad.