Made the gcode 3d view recreate the bed correctly
Made the printer separate position tracking from bed leveling re-write
This commit is contained in:
parent
9e623a2f4a
commit
4a481fb867
3 changed files with 37 additions and 6 deletions
|
|
@ -93,6 +93,26 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
this.printItem = printItem;
|
||||
|
||||
CreateAndAddChildren(null);
|
||||
|
||||
SliceSettingsWidget.PartPreviewSettingsChanged.RegisterEvent(RecreateBedAndPartPosition, ref unregisterEvents);
|
||||
ActivePrinterProfile.Instance.ActivePrinterChanged.RegisterEvent(RecreateBedAndPartPosition, ref unregisterEvents);
|
||||
}
|
||||
|
||||
void RecreateBedAndPartPosition(object sender, EventArgs e)
|
||||
{
|
||||
viewerVolume = new Vector3(ActiveSliceSettings.Instance.BedSize, ActiveSliceSettings.Instance.BuildHeight);
|
||||
bedShape = ActiveSliceSettings.Instance.BedShape;
|
||||
bedCenter = ActiveSliceSettings.Instance.BedCenter;
|
||||
|
||||
double buildHeight = ActiveSliceSettings.Instance.BuildHeight;
|
||||
|
||||
UiThread.RunOnIdle((state) =>
|
||||
{
|
||||
meshViewerWidget.CreatePrintBed(
|
||||
viewerVolume,
|
||||
bedCenter,
|
||||
bedShape);
|
||||
});
|
||||
}
|
||||
|
||||
void CreateAndAddChildren(object state)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue