closer to building
This commit is contained in:
parent
777dc97527
commit
1e4b9400f0
4 changed files with 18 additions and 13 deletions
|
|
@ -92,6 +92,7 @@ namespace MatterHackers.MatterControl
|
|||
// **** Printer specific ****
|
||||
// *******************************************************
|
||||
event EventHandler ActiveLayerChanged;
|
||||
|
||||
event EventHandler LoadedGCodeChanged;
|
||||
|
||||
int ActiveLayerIndex { get; set; }
|
||||
|
|
@ -105,9 +106,13 @@ namespace MatterHackers.MatterControl
|
|||
double BuildHeight { get; }
|
||||
|
||||
Mesh BuildVolumeMesh { get; }
|
||||
|
||||
Mesh Mesh { get; }
|
||||
|
||||
PrinterConfig Printer { get; set; }
|
||||
|
||||
Mesh PrinterShape { get; }
|
||||
|
||||
View3DConfig RendererOptions { get; }
|
||||
|
||||
GCodeRenderInfo RenderInfo { get; set; }
|
||||
|
|
@ -115,6 +120,7 @@ namespace MatterHackers.MatterControl
|
|||
void InvalidateBedMesh();
|
||||
|
||||
void LoadGCode(Stream stream, CancellationToken cancellationToken, Action<double, string> progressReporter);
|
||||
|
||||
void LoadActiveSceneGCode(string filePath, CancellationToken cancellationToken, Action<double, string> progressReporter);
|
||||
|
||||
Task StashAndPrint(IEnumerable<ILibraryItem> selectedLibraryItems);
|
||||
|
|
|
|||
|
|
@ -73,24 +73,24 @@ namespace MatterHackers.MatterControl.Plugins.Lithophane
|
|||
public void Initialize()
|
||||
{
|
||||
ApplicationController.Instance.Graph.RegisterOperation(
|
||||
new Library.NodeOperation()
|
||||
new SceneOperation()
|
||||
{
|
||||
OperationID = "Lithophane".Localize(),
|
||||
Title = "Lithophane".Localize(),
|
||||
MappedTypes = new List<Type> { typeof(ImageObject3D) },
|
||||
TitleResolver = () => "Lithophane".Localize(),
|
||||
OperationType = typeof(ImageObject3D),
|
||||
ResultType = typeof(LithophaneObject3D),
|
||||
Operation = (sceneItem, scene) =>
|
||||
Action = (sceneContext) =>
|
||||
{
|
||||
var scene = sceneContext.Scene;
|
||||
var sceneItem = scene.SelectedItem;
|
||||
if (sceneItem is IObject3D imageObject)
|
||||
{
|
||||
WrapWith(sceneItem, new LithophaneObject3D(), scene);
|
||||
}
|
||||
|
||||
return Task.CompletedTask;
|
||||
},
|
||||
IsEnabled = (sceneItem) => true,
|
||||
IsVisible = (sceneItem) => true,
|
||||
IconCollector = (invertIcon) => AggContext.StaticData.LoadIcon("lithophane.png", 16, 16, invertIcon)
|
||||
Icon = (invertIcon) => AggContext.StaticData.LoadIcon("lithophane.png", 16, 16, invertIcon)
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ namespace MatterHackers.MatterControl.Library
|
|||
#if DEBUG
|
||||
new GeneratorItem(
|
||||
() => "XY Calibration".Localize(),
|
||||
async() => await XyCalibrationFaceObject3D.Create())
|
||||
async () => await XyCalibrationFaceObject3D.Create())
|
||||
{ DateCreated = new System.DateTime(index++) },
|
||||
#endif
|
||||
new GeneratorItem(
|
||||
|
|
@ -129,7 +129,7 @@ namespace MatterHackers.MatterControl.Library
|
|||
tempScene.SelectedItem = imageObject;
|
||||
|
||||
// Invoke ImageConverter operation, passing image and scene
|
||||
ApplicationController.Instance.Graph.Operations["ImageConverter"].Operation(imageObject, tempScene);
|
||||
ApplicationController.Instance.Graph.Operations["ImageConverter"].Action(imageObject, tempScene);
|
||||
|
||||
// Return replacement object constructed in ImageConverter operation
|
||||
var constructedComponent = tempScene.SelectedItem;
|
||||
|
|
@ -142,7 +142,6 @@ namespace MatterHackers.MatterControl.Library
|
|||
() => "Measure Tool".Localize(),
|
||||
async () => await MeasureToolObject3D.Create())
|
||||
{ DateCreated = new System.DateTime(index++) },
|
||||
|
||||
};
|
||||
|
||||
string title = "Primitive Shapes".Localize();
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
|
||||
if (sourceEvent.Button == MouseButtons.Right)
|
||||
{
|
||||
var popupMenu = ApplicationController.Instance.GetActionMenuForSceneItem((IObject3D)treeView.SelectedNode.Tag, Scene, true, this);
|
||||
var popupMenu = ApplicationController.Instance.GetActionMenuForSceneItem(true, this);
|
||||
popupMenu.ShowMenu(clickedWidget, sourceEvent);
|
||||
}
|
||||
}
|
||||
|
|
@ -1524,7 +1524,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
|
||||
private void ShowPartContextMenu(MouseEventArgs mouseEvent, IObject3D selectedItem)
|
||||
{
|
||||
var popupMenu = ApplicationController.Instance.GetActionMenuForSceneItem(selectedItem, Scene, true, this);
|
||||
var popupMenu = ApplicationController.Instance.GetActionMenuForSceneItem(true, this);
|
||||
popupMenu.ShowMenu(this, mouseEvent);
|
||||
}
|
||||
|
||||
|
|
@ -1639,7 +1639,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
treeView.SelectedNode = null;
|
||||
}
|
||||
|
||||
selectedObjectPanel.SetActiveItem(selectedItem);
|
||||
selectedObjectPanel.SetActiveItem(this.sceneContext);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue