Design tools
This commit is contained in:
parent
69a77368b5
commit
907609b587
86 changed files with 4971 additions and 4664 deletions
|
|
@ -1,6 +1,7 @@
|
|||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.PlatformAbstract;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.DataConverters3D;
|
||||
using MatterHackers.GCodeVisualizer;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.ConfigurationPage.PrintLeveling;
|
||||
|
|
@ -128,8 +129,7 @@ namespace MatterHackers.MatterControl
|
|||
bool showExportGCodeButton = ActiveSliceSettings.Instance.PrinterSelected || partIsGCode;
|
||||
if (showExportGCodeButton)
|
||||
{
|
||||
string exportGCodeTextFull = string.Format("{0} G-Code", "Export as".Localize());
|
||||
Button exportGCode = textImageButtonFactory.Generate(exportGCodeTextFull);
|
||||
Button exportGCode = textImageButtonFactory.Generate(string.Format("{0} G-Code", "Export as".Localize()));
|
||||
exportGCode.Name = "Export as GCode Button";
|
||||
exportGCode.HAnchor = HAnchor.ParentLeft;
|
||||
exportGCode.Cursor = Cursors.Hand;
|
||||
|
|
@ -146,7 +146,6 @@ namespace MatterHackers.MatterControl
|
|||
if (plugin.EnabledForCurrentPart(printItemWrapper))
|
||||
{
|
||||
//Create export button for each Plugin found
|
||||
|
||||
string exportButtonText = plugin.GetButtonText().Localize();
|
||||
|
||||
Button exportButton = textImageButtonFactory.Generate(exportButtonText);
|
||||
|
|
@ -413,10 +412,12 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
UiThread.RunOnIdle(() =>
|
||||
{
|
||||
SaveFileDialogParams saveParams = new SaveFileDialogParams("Save as AMF|*.amf", initialDirectory: documentsPath);
|
||||
saveParams.Title = "MatterControl: Export File";
|
||||
saveParams.ActionButtonLabel = "Export";
|
||||
saveParams.FileName = printItemWrapper.Name;
|
||||
SaveFileDialogParams saveParams = new SaveFileDialogParams("Save as AMF|*.amf", initialDirectory: documentsPath)
|
||||
{
|
||||
Title = "MatterControl: Export File",
|
||||
ActionButtonLabel = "Export",
|
||||
FileName = printItemWrapper.Name
|
||||
};
|
||||
|
||||
Close();
|
||||
FileDialog.SaveFileDialog(saveParams, onExportAmfFileSelected);
|
||||
|
|
@ -449,13 +450,8 @@ namespace MatterHackers.MatterControl
|
|||
}
|
||||
else
|
||||
{
|
||||
List<MeshGroup> meshGroups = MeshFileIo.Load(printItemWrapper.FileLocation);
|
||||
if (!MeshFileIo.Save(meshGroups, filePathToSave))
|
||||
{
|
||||
UiThread.RunOnIdle (() => {
|
||||
StyledMessageBox.ShowMessageBox(null, "STL to AMF conversion failed", "Couldn't save file".Localize());
|
||||
});
|
||||
}
|
||||
IObject3D item = Object3D.Load(printItemWrapper.FileLocation);
|
||||
MeshFileIo.Save(item, filePathToSave);
|
||||
}
|
||||
ShowFileIfRequested(filePathToSave);
|
||||
}
|
||||
|
|
@ -509,8 +505,9 @@ namespace MatterHackers.MatterControl
|
|||
}
|
||||
else
|
||||
{
|
||||
List<MeshGroup> meshGroups = MeshFileIo.Load(printItemWrapper.FileLocation);
|
||||
if (!MeshFileIo.Save(meshGroups, filePathToSave))
|
||||
IObject3D loadedItem = Object3D.Load(printItemWrapper.FileLocation);
|
||||
|
||||
if (!MeshFileIo.Save(new List<MeshGroup> { loadedItem.Flatten() }, filePathToSave))
|
||||
{
|
||||
UiThread.RunOnIdle (() => {
|
||||
StyledMessageBox.ShowMessageBox(null, "AMF to STL conversion failed", "Couldn't save file".Localize());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue