Merge pull request #1 from MatterHackers/master
Updated code from Master
This commit is contained in:
commit
d880d3c4ac
44 changed files with 3710 additions and 3549 deletions
|
|
@ -56,20 +56,37 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
addButton.tooltipText = new LocalizedString("Add a file to be printed").Translated;
|
||||
addButton.Margin = new BorderDouble(0, 6, 6, 3);
|
||||
|
||||
startButton = (TooltipButton)textImageButtonFactory.GenerateTooltipButton("Start", "icon_play_32x32.png");
|
||||
startButton.tooltipText = "Begin printing the selected item.";
|
||||
startButton = (TooltipButton)textImageButtonFactory.GenerateTooltipButton(new LocalizedString("Start").Translated, "icon_play_32x32.png");
|
||||
startButton.tooltipText = new LocalizedString("Begin printing the selected item.").Translated;
|
||||
startButton.Margin = new BorderDouble(0, 6, 6, 3);
|
||||
|
||||
skipButton = makeButton("Skip", "Skip the current item and move to the next in queue");
|
||||
removeButton = makeButton("Remove", "Remove current item from queue");
|
||||
string skipButtonTxt = new LocalizedString("Skip").Translated;
|
||||
string skipButtonMessage = new LocalizedString("Skip the current item and move to the next in queue").Translated;
|
||||
skipButton = makeButton(skipButtonTxt, skipButtonMessage);
|
||||
|
||||
pauseButton = makeButton("Pause", "Pause the current print");
|
||||
cancelButton = makeButton("Cancel", "Stop the current print");
|
||||
string removeButtonTxt = new LocalizedString("Remove").Translated;
|
||||
string removeButtonMessage = new LocalizedString("Remove current item from queue").Translated;
|
||||
removeButton = makeButton(removeButtonTxt, removeButtonMessage);
|
||||
|
||||
resumeButton = makeButton("Resume", "Resume the current print");
|
||||
string pauseButtonTxt = new LocalizedString("Pause").Translated;
|
||||
string pauseButtonMessage = new LocalizedString("Pause the current print").Translated;
|
||||
pauseButton = makeButton(pauseButtonTxt, pauseButtonMessage);
|
||||
|
||||
reprintButton = makeButton("Reprint", "Print current item again");
|
||||
doneWithCurrentPartButton = makeButton("Done", "Move to next print in queue");
|
||||
string cancelButtonTxt = new LocalizedString("Cancel").Translated;
|
||||
string cancelButtonMessage = new LocalizedString("Stop the current print").Translated;
|
||||
cancelButton = makeButton(cancelButtonTxt, cancelButtonMessage);
|
||||
|
||||
string resumeButtonTxt = new LocalizedString("Resume").Translated;
|
||||
string resumeButtonMessage = new LocalizedString ("Resume the current print").Translated;
|
||||
resumeButton = makeButton(resumeButtonTxt, resumeButtonMessage);
|
||||
|
||||
string reprintButtonTxt = new LocalizedString("Reprint").Translated;
|
||||
string reprintButtonMessage = new LocalizedString ("Print current item again").Translated;
|
||||
reprintButton = makeButton(reprintButtonTxt, reprintButtonMessage);
|
||||
|
||||
string doneCurrentPartButtonTxt = new LocalizedString ("Done").Translated;
|
||||
string doenCurrentPartButtonMessage = new LocalizedString ("Move to next print in queue").Translated;
|
||||
doneWithCurrentPartButton = makeButton(doneCurrentPartButtonTxt, doenCurrentPartButtonMessage);
|
||||
|
||||
this.AddChild(addButton);
|
||||
allPrintButtons.Add(addButton);
|
||||
|
|
|
|||
|
|
@ -116,14 +116,16 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
topRow.Name = "PrintStatusRow.ActivePrinterInfo.TopRow";
|
||||
topRow.HAnchor = HAnchor.ParentLeftRight;
|
||||
|
||||
activePrintLabel = getPrintStatusLabel(new LocalizedString("Next Print:").Translated, pointSize: 11);
|
||||
string nextPrintLbl = new LocalizedString("Next Print").Translated;
|
||||
string nextPrintLblFull = string.Format("{0}:", nextPrintLbl);
|
||||
activePrintLabel = getPrintStatusLabel(nextPrintLblFull, pointSize: 11);
|
||||
activePrintLabel.VAnchor = VAnchor.ParentTop;
|
||||
|
||||
topRow.AddChild(activePrintLabel);
|
||||
|
||||
activePrintName = getPrintStatusLabel("this is the biggest name we will allow", pointSize: 14);
|
||||
activePrintName = getPrintStatusLabel(new LocalizedString("this is the biggest name we will allow").Translated, pointSize: 14);
|
||||
activePrintName.AutoExpandBoundsToText = false;
|
||||
activePrintStatus = getPrintStatusLabel("this is the biggest label we will allow - bigger", pointSize: 11);
|
||||
activePrintStatus = getPrintStatusLabel(new LocalizedString("this is the biggest label we will allow - bigger").Translated, pointSize: 11);
|
||||
activePrintStatus.AutoExpandBoundsToText = false;
|
||||
activePrintStatus.Text = "";
|
||||
activePrintStatus.Margin = new BorderDouble(top: 3);
|
||||
|
|
@ -204,16 +206,20 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
string timePrintedText;
|
||||
if (hoursPrinted > 0)
|
||||
{
|
||||
timePrintedText = string.Format("Print Time: {0}:{1:00}:{2:00}",
|
||||
string printTimeLbl = new LocalizedString ("Print Time").Translated;
|
||||
timePrintedText = string.Format("{3}: {0}:{1:00}:{2:00}",
|
||||
hoursPrinted,
|
||||
minutesPrinted,
|
||||
secondsPrinted);
|
||||
secondsPrinted,
|
||||
printTimeLbl);
|
||||
}
|
||||
else
|
||||
{
|
||||
timePrintedText = string.Format("Print Time: {0:00}:{1:00}",
|
||||
string printTimeLbl = new LocalizedString ("Print Time").Translated;
|
||||
timePrintedText = string.Format("{2}: {0:00}:{1:00}",
|
||||
minutesPrinted,
|
||||
secondsPrinted);
|
||||
secondsPrinted,
|
||||
printTimeLbl);
|
||||
}
|
||||
|
||||
int secondsRemaining = PrinterCommunication.Instance.SecondsRemaining;
|
||||
|
|
@ -225,16 +231,20 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
{
|
||||
if (hoursRemaining > 0)
|
||||
{
|
||||
timeRemainingText = string.Format("Remaining (est): {0}:{1:00}:{2:00}",
|
||||
string timeRemainingLbl = new LocalizedString ("Remaining").Translated;
|
||||
timeRemainingText = string.Format("{3} (est): {0}:{1:00}:{2:00}",
|
||||
hoursRemaining,
|
||||
minutesRemaining,
|
||||
secondsRemaining);
|
||||
secondsRemaining,
|
||||
timeRemainingLbl);
|
||||
}
|
||||
else
|
||||
{
|
||||
timeRemainingText = string.Format("Remaining (est): {0:00}:{1:00}",
|
||||
string timeRemainingLbl = new LocalizedString ("Remaining").Translated;
|
||||
timeRemainingText = string.Format("{2} (est): {0:00}:{1:00}",
|
||||
minutesRemaining,
|
||||
secondsRemaining);
|
||||
secondsRemaining,
|
||||
timeRemainingLbl);
|
||||
}
|
||||
}
|
||||
else if (PrinterCommunication.Instance.PrintIsFinished)
|
||||
|
|
@ -243,7 +253,9 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
}
|
||||
else
|
||||
{
|
||||
timeRemainingText = string.Format("Remaining (est): --:--",
|
||||
string timeRemainingLbl = new LocalizedString ("Remaining").Translated;
|
||||
timeRemainingText = string.Format("{0} (est): --:--",
|
||||
timeRemainingLbl,
|
||||
secondsPrinted / 60,
|
||||
secondsPrinted % 60);
|
||||
}
|
||||
|
|
@ -256,12 +268,15 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
//GC.WaitForFullGCComplete();
|
||||
|
||||
string printPercentRemainingText;
|
||||
printPercentRemainingText = string.Format("{0:0.0}% complete", PrinterCommunication.Instance.PercentComplete);
|
||||
string printPercentCompleteTxt = new LocalizedString("complete").Translated;
|
||||
printPercentRemainingText = string.Format("{0:0.0}% {1}", PrinterCommunication.Instance.PercentComplete,printPercentCompleteTxt);
|
||||
|
||||
switch (PrinterCommunication.Instance.CommunicationState)
|
||||
{
|
||||
case PrinterCommunication.CommunicationStates.PreparingToPrint:
|
||||
activePrintLabel.Text = "Preparing To Print:";
|
||||
case PrinterCommunication.CommunicationStates.PreparingToPrint:
|
||||
string preparingPrintLbl = new LocalizedString("Preparing To Print").Translated;
|
||||
string preparingPrintLblFull = string.Format("{0}:", preparingPrintLbl);
|
||||
activePrintLabel.Text = preparingPrintLblFull;
|
||||
//ActivePrintStatusText = ""; // set by slicer
|
||||
activePrintInfo.Text = "";
|
||||
break;
|
||||
|
|
@ -276,14 +291,18 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
|
||||
case PrinterCommunication.CommunicationStates.Paused:
|
||||
{
|
||||
activePrintLabel.Text = "Printing Paused:";
|
||||
string activePrintLblTxt = new LocalizedString ("Printing Paused").Translated;
|
||||
string activePrintLblTxtFull = string.Format("{0}:", activePrintLblTxt);
|
||||
activePrintLabel.Text = activePrintLblTxtFull;
|
||||
ActivePrintStatusText = printPercentRemainingText;
|
||||
activePrintInfo.Text = printTimeInfoText;
|
||||
}
|
||||
break;
|
||||
|
||||
case PrinterCommunication.CommunicationStates.FinishedPrint:
|
||||
activePrintLabel.Text = "Done Printing:";
|
||||
case PrinterCommunication.CommunicationStates.FinishedPrint:
|
||||
string donePrintingTxt = new LocalizedString ("Done Printing").Translated;
|
||||
string donePrintingTxtFull = string.Format ("{0}:", donePrintingTxt);
|
||||
activePrintLabel.Text = donePrintingTxtFull;
|
||||
ActivePrintStatusText = printPercentRemainingText;
|
||||
activePrintInfo.Text = printTimeInfoText;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ using MatterHackers.Agg;
|
|||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.Agg.Image;
|
||||
using MatterHackers.Agg.Font;
|
||||
using MatterHackers.Localizations;
|
||||
|
||||
namespace MatterHackers.MatterControl
|
||||
{
|
||||
|
|
@ -75,14 +76,14 @@ namespace MatterHackers.MatterControl
|
|||
FlowLayoutWidget yesNoButtonsFlow = new FlowLayoutWidget();
|
||||
yesNoButtonsFlow.HAnchor |= HAnchor.ParentCenter;
|
||||
|
||||
Button yesButton = textImageButtonFactory.Generate("Yes", centerText:true);
|
||||
Button yesButton = textImageButtonFactory.Generate(new LocalizedString("Yes").Translated, centerText:true);
|
||||
yesButton.Click += new ButtonBase.ButtonEventHandler(okButton_Click);
|
||||
yesNoButtonsFlow.AddChild(yesButton);
|
||||
|
||||
GuiWidget buttonSpacer = new GuiWidget(10, 10);
|
||||
yesNoButtonsFlow.AddChild(buttonSpacer);
|
||||
|
||||
Button noButton = textImageButtonFactory.Generate("No", centerText: true);
|
||||
Button noButton = textImageButtonFactory.Generate(new LocalizedString("No").Translated, centerText: true);
|
||||
noButton.Click += new ButtonBase.ButtonEventHandler(noButton_Click);
|
||||
yesNoButtonsFlow.AddChild(noButton);
|
||||
|
||||
|
|
@ -92,7 +93,7 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
case MessageType.OK:
|
||||
{
|
||||
Button okButton = textImageButtonFactory.Generate("Ok", centerText: true);
|
||||
Button okButton = textImageButtonFactory.Generate(new LocalizedString("Ok").Translated, centerText: true);
|
||||
//okButton.DebugShowBounds = true;
|
||||
okButton.Click += new ButtonBase.ButtonEventHandler(okButton_Click);
|
||||
okButton.HAnchor = HAnchor.ParentCenter;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ using System.Text;
|
|||
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.Localizations;
|
||||
|
||||
namespace MatterHackers.MatterControl
|
||||
{
|
||||
|
|
@ -64,7 +65,7 @@ namespace MatterHackers.MatterControl
|
|||
// TODO: This hack needs a unit test and then pass and then remove this line.
|
||||
this.MinimumSize = new VectorMath.Vector2(0, numberInputField.Height);
|
||||
|
||||
setButton = textImageButtonFactory.Generate("SET");
|
||||
setButton = textImageButtonFactory.Generate("SET");
|
||||
setButton.VAnchor = VAnchor.ParentCenter;
|
||||
setButton.Margin = new BorderDouble(left: 6);
|
||||
setButton.Visible = false;
|
||||
|
|
|
|||
|
|
@ -111,6 +111,11 @@ namespace MatterHackers.MatterControl
|
|||
}
|
||||
|
||||
void exportGCode_Click(object sender, MouseEventArgs mouseEvent)
|
||||
{
|
||||
UiThread.RunOnIdle(DoExportGCode_Click);
|
||||
}
|
||||
|
||||
void DoExportGCode_Click(object state)
|
||||
{
|
||||
SaveFileDialogParams saveParams = new SaveFileDialogParams("Export GCode|*.gcode", title: "Export GCode");
|
||||
saveParams.Title = "MatterControl: Export File";
|
||||
|
|
@ -178,6 +183,11 @@ namespace MatterHackers.MatterControl
|
|||
}
|
||||
|
||||
void exportSTL_Click(object sender, MouseEventArgs mouseEvent)
|
||||
{
|
||||
UiThread.RunOnIdle(DoExportSTL_Click);
|
||||
}
|
||||
|
||||
void DoExportSTL_Click(object state)
|
||||
{
|
||||
SaveFileDialogParams saveParams = new SaveFileDialogParams("Save as STL|*.stl");
|
||||
saveParams.Title = "MatterControl: Export File";
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ namespace MatterHackers.MatterControl
|
|||
double maxSize = Math.Max(aabb.XSize, aabb.YSize);
|
||||
double scale = thumbnailWidget.image.Width / (maxSize * 1.2);
|
||||
RectangleDouble bounds2D = new RectangleDouble(aabb.minXYZ.x, aabb.minXYZ.y, aabb.maxXYZ.x, aabb.maxXYZ.y);
|
||||
PolygonMesh.Processors.OrthographicZProjection.DrawTo(partGraphics2D, loadedMesh,
|
||||
PolygonMesh.Rendering.OrthographicZProjection.DrawTo(partGraphics2D, loadedMesh,
|
||||
new Vector2((thumbnailWidget.image.Width / scale - bounds2D.Width) / 2 - bounds2D.Left,
|
||||
(thumbnailWidget.image.Height / scale - bounds2D.Height) / 2 - bounds2D.Bottom),
|
||||
scale,
|
||||
|
|
|
|||
|
|
@ -1,70 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.Font;
|
||||
using MatterHackers.Agg.Image;
|
||||
using MatterHackers.Agg.ImageProcessing;
|
||||
using MatterHackers.Agg.OpenGlGui;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.Agg.VertexSource;
|
||||
using MatterHackers.MarchingSquares;
|
||||
using MatterHackers.MatterControl;
|
||||
using MatterHackers.MatterControl.DataStorage;
|
||||
using MatterHackers.MatterControl.PartPreviewWindow;
|
||||
using MatterHackers.MatterControl.PrintLibrary;
|
||||
using MatterHackers.MatterControl.PrintQueue;
|
||||
using MatterHackers.MeshVisualizer;
|
||||
using MatterHackers.PolygonMesh;
|
||||
using MatterHackers.PolygonMesh.Csg;
|
||||
using MatterHackers.PolygonMesh.Processors;
|
||||
using MatterHackers.RayTracer;
|
||||
using MatterHackers.RayTracer.Traceable;
|
||||
using MatterHackers.RenderOpenGl;
|
||||
using MatterHackers.VectorMath;
|
||||
|
||||
namespace MatterHackers.Agg.UI
|
||||
{
|
||||
public class PerformanceFeedbackWindow : SystemWindow
|
||||
{
|
||||
string timingString;
|
||||
StyledTypeFace boldFont;
|
||||
|
||||
public PerformanceFeedbackWindow()
|
||||
: base(700, 480)
|
||||
{
|
||||
BackgroundColor = RGBA_Bytes.White;
|
||||
ShowAsSystemWindow();
|
||||
|
||||
string staticDataPath = ApplicationDataStorage.Instance.ApplicationStaticDataPath;
|
||||
string fontPath = Path.Combine(staticDataPath, "Fonts", "LiberationMono.svg");
|
||||
TypeFace boldTypeFace = TypeFace.LoadSVG(fontPath);
|
||||
boldFont = new StyledTypeFace(boldTypeFace, 12);
|
||||
}
|
||||
|
||||
public override void OnDraw(Graphics2D graphics2D)
|
||||
{
|
||||
TypeFacePrinter stringPrinter = new TypeFacePrinter(timingString, boldFont, new Vector2(0, Height - 16));
|
||||
stringPrinter.DrawFromHintedCache = true;
|
||||
|
||||
stringPrinter.Render(graphics2D, RGBA_Bytes.Black);
|
||||
|
||||
base.OnDraw(graphics2D);
|
||||
}
|
||||
|
||||
void SetDisplay(string timingString)
|
||||
{
|
||||
this.timingString = timingString;
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
public void ShowResults(double totalTimeTracked)
|
||||
{
|
||||
string timingString = ExecutionTimer.Instance.GetResults(totalTimeTracked);
|
||||
SetDisplay(timingString);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -5,6 +5,7 @@ using System.Text;
|
|||
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.Localizations;
|
||||
|
||||
namespace MatterHackers.MatterControl
|
||||
{
|
||||
|
|
@ -56,13 +57,13 @@ namespace MatterHackers.MatterControl
|
|||
FlowLayoutWidget buttonBar = new FlowLayoutWidget();
|
||||
|
||||
textImageButtonFactory.FixedWidth = 60;
|
||||
backButton = textImageButtonFactory.Generate("Back", centerText: true);
|
||||
backButton = textImageButtonFactory.Generate(new LocalizedString("Back").Translated, centerText: true);
|
||||
backButton.Click += new ButtonBase.ButtonEventHandler(back_Click);
|
||||
|
||||
nextButton = textImageButtonFactory.Generate("Next", centerText: true);
|
||||
nextButton = textImageButtonFactory.Generate(new LocalizedString("Next").Translated, centerText: true);
|
||||
nextButton.Click += new ButtonBase.ButtonEventHandler(next_Click);
|
||||
|
||||
doneButton = textImageButtonFactory.Generate("Done", centerText: true);
|
||||
doneButton = textImageButtonFactory.Generate(new LocalizedString("Done").Translated, centerText: true);
|
||||
doneButton.Click += new ButtonBase.ButtonEventHandler(done_Click);
|
||||
|
||||
textImageButtonFactory.FixedWidth = 0;
|
||||
|
|
@ -82,7 +83,7 @@ namespace MatterHackers.MatterControl
|
|||
UiThread.RunOnIdle(CloseOnIdle);
|
||||
}
|
||||
|
||||
void CloseOnIdle(object state)
|
||||
void CloseOnIdle(object state)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,6 @@
|
|||
<Compile Include="ActionBar\PrintStatusRow.cs" />
|
||||
<Compile Include="CustomWidgets\ExportQueueItemWindow.cs" />
|
||||
<Compile Include="CustomWidgets\ExportToFolderFeedbackWindow.cs" />
|
||||
<Compile Include="CustomWidgets\PerformanceFeedbackWindow.cs" />
|
||||
<Compile Include="FieldValidation.cs" />
|
||||
<Compile Include="PartPreviewWindow\CreateDiscreteMeshes.cs" />
|
||||
<Compile Include="CustomWidgets\EditableNumberDisplay.cs" />
|
||||
|
|
@ -126,7 +125,6 @@
|
|||
<Compile Include="PartPreviewWindow\PartPreviewMainWindow.cs" />
|
||||
<Compile Include="PartsSheet.cs" />
|
||||
<Compile Include="JsonResponseDictionary.cs" />
|
||||
<Compile Include="OrthographicZProjection.cs" />
|
||||
<Compile Include="PrinterCommunication.cs" />
|
||||
<Compile Include="PrinterControls\PrintLeveling.cs" />
|
||||
<Compile Include="PrinterControls\OutputScrollWindow.cs" />
|
||||
|
|
|
|||
|
|
@ -1,18 +1,11 @@
|
|||
<Properties>
|
||||
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
|
||||
<MonoDevelop.Ide.Workbench ActiveDocument="SliceConfiguration\SliceSettingsWidget.cs">
|
||||
<MonoDevelop.Ide.Workbench ActiveDocument="PrintLevelWizard.cs">
|
||||
<Files>
|
||||
<File FileName="MatterControlApplication.cs" Line="1" Column="1" />
|
||||
<File FileName="..\agg-sharp\OpenGlGui\TrackballTumbleWidget.cs" Line="1" Column="1" />
|
||||
<File FileName="Localizations\LocalizedString.cs" Line="1" Column="1" />
|
||||
<File FileName="MainSlidePanel.cs" Line="1" Column="1" />
|
||||
<File FileName="WidescreenPanel.cs" Line="1" Column="1" />
|
||||
<File FileName="SliceConfiguration\SettingsControlBar.cs" Line="34" Column="10" />
|
||||
<File FileName="SliceConfiguration\ActiveSliceSettings.cs" Line="514" Column="109" />
|
||||
<File FileName="SliceConfiguration\SliceSettingsLayerSelector.cs" Line="1" Column="1" />
|
||||
<File FileName="SliceConfiguration\SliceSettingsOrganizer.cs" Line="286" Column="36" />
|
||||
<File FileName="SliceConfiguration\SliceSettingsWidget.cs" Line="449" Column="118" />
|
||||
<File FileName="PartPreviewWindow\GcodeViewBasic.cs" Line="1" Column="1" />
|
||||
<File FileName="c:\Users\Matter Hackers 1\Development\agg-sharp\Gui\GUIWidget.cs" Line="2116" Column="1" />
|
||||
<File FileName="PrintLevelWizard.cs" Line="392" Column="40" />
|
||||
</Files>
|
||||
</MonoDevelop.Ide.Workbench>
|
||||
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ using MatterHackers.MatterControl.PrintQueue;
|
|||
using MatterHackers.MatterControl.DataStorage;
|
||||
using MatterHackers.MatterControl.VersionManagement;
|
||||
using MatterHackers.MatterControl.PluginSystem;
|
||||
using MatterHackers.MatterControl.PartPreviewWindow;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
|
@ -63,14 +64,16 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
public class MatterControlApplication : SystemWindow
|
||||
{
|
||||
string[] commandLineArgs = null;
|
||||
bool firstDraw = true;
|
||||
|
||||
public MatterControlApplication(double width, double height)
|
||||
: base(width, height)
|
||||
{
|
||||
this.commandLineArgs = Environment.GetCommandLineArgs();;
|
||||
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
|
||||
|
||||
//GCodeForPerformanceTest();
|
||||
//WriteTestGCodeFile();
|
||||
if (File.Exists("RunUnitTests.txt"))
|
||||
{
|
||||
GuiHalWidget.SetClipboardFunctions(System.Windows.Forms.Clipboard.GetText, System.Windows.Forms.Clipboard.SetText, System.Windows.Forms.Clipboard.ContainsText);
|
||||
|
|
@ -118,6 +121,43 @@ namespace MatterHackers.MatterControl
|
|||
ShowAsSystemWindow();
|
||||
}
|
||||
|
||||
private static void WriteMove(StringBuilder gcodeStringBuilder, Vector2 center)
|
||||
{
|
||||
gcodeStringBuilder.AppendLine("G1 X" + center.x.ToString() + " Y" + center.y.ToString());
|
||||
}
|
||||
|
||||
public static void WriteTestGCodeFile()
|
||||
{
|
||||
StringBuilder gcodeStringBuilder = new StringBuilder();
|
||||
|
||||
int loops = 5;
|
||||
int steps = 200;
|
||||
double radius = 40;
|
||||
Vector2 center = new Vector2(50, 50);
|
||||
|
||||
gcodeStringBuilder.AppendLine("G28 ; home all axes");
|
||||
gcodeStringBuilder.AppendLine("G90 ; use absolute coordinates");
|
||||
gcodeStringBuilder.AppendLine("G21 ; set units to millimeters");
|
||||
gcodeStringBuilder.AppendLine("G92 E0");
|
||||
gcodeStringBuilder.AppendLine("G1 F7800.000");
|
||||
gcodeStringBuilder.AppendLine("G1 Z" + (30).ToString());
|
||||
WriteMove(gcodeStringBuilder, center);
|
||||
|
||||
for (int loop = 0; loop < loops; loop++)
|
||||
{
|
||||
for (int step = 0; step < steps; step++)
|
||||
{
|
||||
Vector2 nextPosition = new Vector2(radius, 0);
|
||||
nextPosition.Rotate(MathHelper.Tau / steps * step);
|
||||
WriteMove(gcodeStringBuilder, center + nextPosition);
|
||||
}
|
||||
}
|
||||
|
||||
gcodeStringBuilder.AppendLine("M84 ; disable motors");
|
||||
|
||||
System.IO.File.WriteAllText("PerformanceTest.gcode", gcodeStringBuilder.ToString());
|
||||
}
|
||||
|
||||
void CheckOnPrinter(object state)
|
||||
{
|
||||
PrinterCommunication.Instance.OnIdle();
|
||||
|
|
@ -224,7 +264,12 @@ namespace MatterHackers.MatterControl
|
|||
#if false
|
||||
if (timingWindow == null)
|
||||
{
|
||||
timingWindow = new PerformanceFeedbackWindow();
|
||||
string staticDataPath = ApplicationDataStorage.Instance.ApplicationStaticDataPath;
|
||||
string fontPath = Path.Combine(staticDataPath, "Fonts", "LiberationMono.svg");
|
||||
TypeFace boldTypeFace = TypeFace.LoadSVG(fontPath);
|
||||
typeFaceToUse = new StyledTypeFace(boldTypeFace, 12);
|
||||
|
||||
timingWindow = new PerformanceFeedbackWindow();
|
||||
}
|
||||
{
|
||||
if (totalDrawTime.Elapsed.TotalSeconds > .05)
|
||||
|
|
@ -239,6 +284,13 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
Parent.MinimumSize = new Vector2(590, 540);
|
||||
firstDraw = false;
|
||||
foreach (string arg in commandLineArgs)
|
||||
{
|
||||
if (Path.GetExtension(arg).ToUpper() == ".STL")
|
||||
{
|
||||
new PartPreviewMainWindow(new PrintItemWrapper(new DataStorage.PrintItem(Path.GetFileName(arg), Path.GetFullPath(arg))));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -251,13 +303,8 @@ namespace MatterHackers.MatterControl
|
|||
base.OnMouseMove(mouseEvent);
|
||||
}
|
||||
|
||||
private static void WriteMove(StringBuilder gcodeStringBuilder, Vector2 center)
|
||||
{
|
||||
gcodeStringBuilder.AppendLine("G1 X" + center.x.ToString() + " Y" + center.y.ToString());
|
||||
}
|
||||
|
||||
[STAThread]
|
||||
public static void Main(string[] args)
|
||||
public static void Main()
|
||||
{
|
||||
Datastore.Instance.Initialize();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,77 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2013, Lars Brubaker
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
The views and conclusions contained in the software and documentation are those
|
||||
of the authors and should not be interpreted as representing official policies,
|
||||
either expressed or implied, of the FreeBSD Project.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using MatterHackers.PolygonMesh;
|
||||
using MatterHackers.VectorMath;
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.Image;
|
||||
using MatterHackers.Agg.VertexSource;
|
||||
|
||||
namespace MatterHackers.PolygonMesh.Processors
|
||||
{
|
||||
public static class OrthographicZProjection
|
||||
{
|
||||
public static void DrawTo(Graphics2D graphics2D, Mesh meshToDraw, Vector2 offset, double scale, RGBA_Bytes silhouetteColor)
|
||||
{
|
||||
graphics2D.Rasterizer.gamma(new gamma_power(.3));
|
||||
PathStorage polygonProjected = new PathStorage();
|
||||
foreach (Face face in meshToDraw.Faces)
|
||||
{
|
||||
if (face.normal.z > 0)
|
||||
{
|
||||
polygonProjected.remove_all();
|
||||
bool first = true;
|
||||
foreach (FaceEdge faceEdge in face.FaceEdgeIterator())
|
||||
{
|
||||
Vector2 position = new Vector2(faceEdge.vertex.Position.x, faceEdge.vertex.Position.y);
|
||||
position += offset;
|
||||
position *= scale;
|
||||
if (first)
|
||||
{
|
||||
polygonProjected.MoveTo(position.x, position.y);
|
||||
first = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
polygonProjected.LineTo(position.x, position.y);
|
||||
}
|
||||
}
|
||||
graphics2D.Render(polygonProjected, silhouetteColor);
|
||||
}
|
||||
}
|
||||
graphics2D.Rasterizer.gamma(new gamma_none());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -39,7 +39,6 @@ using MatterHackers.Agg.ImageProcessing;
|
|||
using MatterHackers.Agg.VertexSource;
|
||||
using MatterHackers.MarchingSquares;
|
||||
using MatterHackers.PolygonMesh;
|
||||
using MatterHackers.PolygonMesh.Processors;
|
||||
using MatterHackers.VectorMath;
|
||||
|
||||
using ClipperLib;
|
||||
|
|
@ -67,7 +66,7 @@ namespace MatterHackers.MatterControl
|
|||
double scaleFactor = 5;
|
||||
ImageBuffer partPlate = new ImageBuffer((int)(buildVolume.x * scaleFactor), (int)(buildVolume.y * scaleFactor), 32, new BlenderBGRA());
|
||||
Vector2 renderOffset = new Vector2(buildVolume.x / 2, buildVolume.y / 2) - new Vector2(partBounds.Center.x, partBounds.Center.y);
|
||||
PolygonMesh.Processors.OrthographicZProjection.DrawTo(partPlate.NewGraphics2D(), meshToSplit, renderOffset, scaleFactor, RGBA_Bytes.White);
|
||||
PolygonMesh.Rendering.OrthographicZProjection.DrawTo(partPlate.NewGraphics2D(), meshToSplit, renderOffset, scaleFactor, RGBA_Bytes.White);
|
||||
|
||||
if (backgroundWorker != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
}
|
||||
else
|
||||
{
|
||||
startingMessage = "Press 'generate' to view layers";
|
||||
startingMessage = new LocalizedString("Press 'generate' to view layers").Translated;
|
||||
}
|
||||
|
||||
if (File.Exists(gcodePathAndFileName) && gcodeFileIsComplete)
|
||||
|
|
@ -208,7 +208,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
{
|
||||
BorderDouble buttonMargin = new BorderDouble(top: 3);
|
||||
|
||||
expandModelOptions = expandMenuOptionFactory.GenerateCheckBoxButton("Model", "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png");
|
||||
expandModelOptions = expandMenuOptionFactory.GenerateCheckBoxButton(new LocalizedString("Model").Translated, "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png");
|
||||
expandModelOptions.Margin = new BorderDouble(bottom: 2);
|
||||
buttonRightPanel.AddChild(expandModelOptions);
|
||||
expandModelOptions.Checked = true;
|
||||
|
|
@ -218,7 +218,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
//modelOptionsContainer.Visible = false;
|
||||
buttonRightPanel.AddChild(modelOptionsContainer);
|
||||
|
||||
expandLayerOptions = expandMenuOptionFactory.GenerateCheckBoxButton("Layer", "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png");
|
||||
expandLayerOptions = expandMenuOptionFactory.GenerateCheckBoxButton(new LocalizedString("Layer").Translated, "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png");
|
||||
expandLayerOptions.Margin = new BorderDouble(bottom: 2);
|
||||
//buttonRightPanel.AddChild(expandLayerOptions);
|
||||
|
||||
|
|
@ -227,7 +227,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
layerOptionsContainer.Visible = false;
|
||||
buttonRightPanel.AddChild(layerOptionsContainer);
|
||||
|
||||
expandDisplayOptions = expandMenuOptionFactory.GenerateCheckBoxButton("Display", "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png");
|
||||
expandDisplayOptions = expandMenuOptionFactory.GenerateCheckBoxButton(new LocalizedString("Display").Translated, "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png");
|
||||
expandDisplayOptions.Margin = new BorderDouble(bottom: 2);
|
||||
buttonRightPanel.AddChild(expandDisplayOptions);
|
||||
expandDisplayOptions.Checked = true;
|
||||
|
|
@ -265,8 +265,10 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
modelInfoContainer.HAnchor = HAnchor.ParentLeftRight;
|
||||
modelInfoContainer.Padding = new BorderDouble(5);
|
||||
|
||||
string printTimeLbl = new LocalizedString ("Print Time").Translated;
|
||||
string printTimeLblFull = string.Format ("{0}:", printTimeLbl);
|
||||
// put in the print time
|
||||
modelInfoContainer.AddChild(new TextWidget("Print Time:", textColor: RGBA_Bytes.White));
|
||||
modelInfoContainer.AddChild(new TextWidget(printTimeLblFull, textColor: RGBA_Bytes.White));
|
||||
{
|
||||
string timeRemainingText = "---";
|
||||
|
||||
|
|
@ -294,8 +296,10 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
|
||||
//modelInfoContainer.AddChild(new TextWidget("Size:", textColor: RGBA_Bytes.White));
|
||||
|
||||
string filamentLengthLbl = new LocalizedString ("Filament Length").Translated;
|
||||
string filamentLengthLblFull = string.Format ("{0}:", filamentLengthLbl);
|
||||
// show the filament used
|
||||
modelInfoContainer.AddChild(new TextWidget("Filament Length:", textColor: RGBA_Bytes.White));
|
||||
modelInfoContainer.AddChild(new TextWidget(filamentLengthLblFull, textColor: RGBA_Bytes.White));
|
||||
{
|
||||
double filamentUsed = gcodeViewWidget.LoadedGCode.GetFilamentUsedMm(ActiveSliceSettings.Instance.NozzleDiameter);
|
||||
|
||||
|
|
@ -305,7 +309,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
modelInfoContainer.AddChild(estimatedPrintTime);
|
||||
}
|
||||
|
||||
modelInfoContainer.AddChild(new TextWidget("Filament Volume:", textColor: RGBA_Bytes.White));
|
||||
string filamentVolumeLbl = new LocalizedString ("Filament Volume").Translated;
|
||||
string filamentVolumeLblFull = string.Format("{0}:", filamentVolumeLbl);
|
||||
modelInfoContainer.AddChild(new TextWidget(filamentVolumeLblFull, textColor: RGBA_Bytes.White));
|
||||
{
|
||||
var density = 1.0;
|
||||
string filamentType = "PLA";
|
||||
|
|
@ -326,7 +332,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
modelInfoContainer.AddChild(estimatedPrintTime);
|
||||
}
|
||||
|
||||
modelInfoContainer.AddChild(new TextWidget("Weight:", textColor: RGBA_Bytes.White));
|
||||
string weightLbl = new LocalizedString("Weight").Translated;
|
||||
string weightLblFull = string.Format("{0}:", weightLbl);
|
||||
modelInfoContainer.AddChild(new TextWidget(weightLblFull, textColor: RGBA_Bytes.White));
|
||||
{
|
||||
var density = 1.0;
|
||||
string filamentType = "PLA";
|
||||
|
|
@ -386,7 +394,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
layerInfoContainer.Padding = new BorderDouble(5);
|
||||
|
||||
// put in a show grid check box
|
||||
CheckBox showGrid = new CheckBox("Show Grid", textColor: RGBA_Bytes.White);
|
||||
CheckBox showGrid = new CheckBox(new LocalizedString("Show Grid").Translated, textColor: RGBA_Bytes.White);
|
||||
showGrid.Checked = gcodeViewWidget.RenderGrid;
|
||||
showGrid.CheckedStateChanged += (sender, e) =>
|
||||
{
|
||||
|
|
@ -395,7 +403,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
layerInfoContainer.AddChild(showGrid);
|
||||
|
||||
// put in a show moves checkbox
|
||||
CheckBox showMoves = new CheckBox("Show Moves", textColor: RGBA_Bytes.White);
|
||||
CheckBox showMoves = new CheckBox(new LocalizedString("Show Moves").Translated, textColor: RGBA_Bytes.White);
|
||||
showMoves.Checked = gcodeViewWidget.RenderMoves;
|
||||
showMoves.CheckedStateChanged += (sender, e) =>
|
||||
{
|
||||
|
|
@ -625,7 +633,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
this.AddChild(editCurrentLayerIndex);
|
||||
gcodeViewWidget.ActiveLayerChanged += new EventHandler(gcodeViewWidget_ActiveLayerChanged);
|
||||
|
||||
setLayerButton = textImageButtonFactory.Generate("Go");
|
||||
setLayerButton = textImageButtonFactory.Generate(new LocalizedString("Go").Translated);
|
||||
setLayerButton.VAnchor = Agg.UI.VAnchor.ParentCenter;
|
||||
setLayerButton.Click += new Button.ButtonEventHandler(layerCountTextWidget_EditComplete);
|
||||
this.AddChild(setLayerButton);
|
||||
|
|
|
|||
|
|
@ -28,22 +28,15 @@ either expressed or implied, of the FreeBSD Project.
|
|||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Diagnostics;
|
||||
|
||||
using System.IO;
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.Image;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.Agg.OpenGlGui;
|
||||
using MatterHackers.PolygonMesh;
|
||||
using MatterHackers.RenderOpenGl;
|
||||
using MatterHackers.VectorMath;
|
||||
using MatterHackers.Agg.Font;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.DataStorage;
|
||||
using MatterHackers.MatterControl.PrintQueue;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.VectorMath;
|
||||
|
||||
namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||
{
|
||||
|
|
@ -69,7 +62,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
string part3DViewLblBeg = ("3D");
|
||||
string part3DViewLblEnd = new LocalizedString ("View").Translated;
|
||||
string part3DViewLblFull = string.Format("{0} {1} ", part3DViewLblBeg, part3DViewLblEnd);
|
||||
part3DView = new View3DTransformPart(printItem, new Vector3(ActiveSliceSettings.Instance.BedSize, buildHeight));
|
||||
part3DView = new View3DTransformPart(printItem, new Vector3(ActiveSliceSettings.Instance.BedSize, buildHeight), ActiveSliceSettings.Instance.BedShape);
|
||||
TabPage partPreview3DView = new TabPage(part3DView, part3DViewLblFull);
|
||||
|
||||
partGcodeView = new GcodeViewBasic(printItem, ActiveSliceSettings.Instance.GetBedSize, ActiveSliceSettings.Instance.GetBedCenter);
|
||||
|
|
@ -116,9 +109,12 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
#if false
|
||||
if (timingWindow == null)
|
||||
{
|
||||
timingWindow = new PerformanceFeedbackWindow();
|
||||
}
|
||||
{
|
||||
string staticDataPath = ApplicationDataStorage.Instance.ApplicationStaticDataPath;
|
||||
string fontPath = Path.Combine(staticDataPath, "Fonts", "LiberationMono.svg");
|
||||
TypeFace boldTypeFace = TypeFace.LoadSVG(fontPath);
|
||||
timingWindow = new PerformanceFeedbackWindow(new StyledTypeFace(boldTypeFace, 12));
|
||||
//}
|
||||
//{
|
||||
timingWindow.ShowResults(totalDrawTime.Elapsed.TotalSeconds);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
base.OnMouseUp(mouseEvent);
|
||||
}
|
||||
|
||||
public View3DTransformPart(PrintItemWrapper printItemWrapper, Vector3 viewerVolume)
|
||||
public View3DTransformPart(PrintItemWrapper printItemWrapper, Vector3 viewerVolume, MeshViewerWidget.BedShape bedShape)
|
||||
{
|
||||
MeshExtraData = new List<PlatingMeshData>();
|
||||
MeshExtraData.Add(new PlatingMeshData());
|
||||
|
|
@ -281,7 +281,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
GuiWidget viewArea = new GuiWidget();
|
||||
viewArea.AnchorAll();
|
||||
{
|
||||
meshViewerWidget = new MeshViewerWidget(viewerVolume, 1);
|
||||
meshViewerWidget = new MeshViewerWidget(viewerVolume, 1, bedShape);
|
||||
SetMeshViewerDisplayTheme();
|
||||
meshViewerWidget.AnchorAll();
|
||||
}
|
||||
|
|
@ -419,7 +419,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
{
|
||||
if (Meshes.Count > 0)
|
||||
{
|
||||
processingProgressControl.textWidget.Text = new LocalizedString("Making Copy:").Translated;
|
||||
string makingCopyLabel = new LocalizedString("Making Copy").Translated;
|
||||
string makingCopyLabelFull = string.Format ("{0}:", makingCopyLabel);
|
||||
processingProgressControl.textWidget.Text = makingCopyLabelFull;
|
||||
processingProgressControl.Visible = true;
|
||||
processingProgressControl.PercentComplete = 0;
|
||||
LockEditControls();
|
||||
|
|
@ -587,7 +589,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
{
|
||||
if (Meshes.Count > 0)
|
||||
{
|
||||
processingProgressControl.textWidget.Text = "Loading Parts:";
|
||||
string loadingPartLabel = new LocalizedString("Loading Parts").Translated;
|
||||
string loadingPartLabelFull = string.Format("{0}:", loadingPartLabel);
|
||||
processingProgressControl.textWidget.Text = loadingPartLabelFull;
|
||||
processingProgressControl.Visible = true;
|
||||
processingProgressControl.PercentComplete = 0;
|
||||
LockEditControls();
|
||||
|
|
@ -938,7 +942,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
// put in the part info display
|
||||
if(false)
|
||||
{
|
||||
CheckBox expandPartInfoOptions = expandMenuOptionFactory.GenerateCheckBoxButton("Part Info", "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png");
|
||||
CheckBox expandPartInfoOptions = expandMenuOptionFactory.GenerateCheckBoxButton(new LocalizedString("Part Info").Translated, "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png");
|
||||
expandPartInfoOptions.Margin = new BorderDouble(bottom: 2);
|
||||
buttonRightPanel.AddChild(expandPartInfoOptions);
|
||||
|
||||
|
|
@ -953,7 +957,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
};
|
||||
|
||||
PartInfoOptionContainer.Margin = new BorderDouble(8, 3);
|
||||
TextWidget sizeInfo = new TextWidget("Size:", textColor: RGBA_Bytes.White);
|
||||
string sizeInfoLbl = new LocalizedString("Size").Translated;
|
||||
string sizeInfoLblFull = string.Format("{0}:", sizeInfoLbl);
|
||||
TextWidget sizeInfo = new TextWidget(sizeInfoLblFull, textColor: RGBA_Bytes.White);
|
||||
PartInfoOptionContainer.AddChild(sizeInfo);
|
||||
TextWidget xSizeInfo = new TextWidget(" x 10.1", pointSize: 10, textColor: RGBA_Bytes.White);
|
||||
xSizeInfo.AutoExpandBoundsToText = true;
|
||||
|
|
@ -1039,7 +1045,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
scaleRatioContainer.HAnchor = HAnchor.ParentLeftRight;
|
||||
scaleRatioContainer.Padding = new BorderDouble(5);
|
||||
|
||||
TextWidget scaleRatioLabel = new TextWidget(new LocalizedString("Ratio:").Translated, textColor: RGBA_Bytes.White);
|
||||
string scaleRatioLblTxt = new LocalizedString("Ratio").Translated;
|
||||
string scaleRatioLblTxtFull = string.Format("{0}:", scaleRatioLblTxt);
|
||||
TextWidget scaleRatioLabel = new TextWidget(scaleRatioLblTxtFull, textColor: RGBA_Bytes.White);
|
||||
scaleRatioLabel.VAnchor = VAnchor.ParentCenter;
|
||||
scaleRatioContainer.AddChild(scaleRatioLabel);
|
||||
|
||||
|
|
@ -1114,7 +1122,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
|
||||
buttonPanel.AddChild(presetScaleMenu);
|
||||
|
||||
applyScaleButton = whiteButtonFactory.Generate("Apply Scale", centerText: true);
|
||||
applyScaleButton = whiteButtonFactory.Generate(new LocalizedString("Apply Scale").Translated, centerText: true);
|
||||
applyScaleButton.Visible = false;
|
||||
applyScaleButton.Cursor = Cursors.Hand;
|
||||
buttonPanel.AddChild(applyScaleButton);
|
||||
|
|
@ -1178,7 +1186,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
GuiWidget horizontalSpacer = new GuiWidget();
|
||||
horizontalSpacer.HAnchor = HAnchor.ParentLeftRight;
|
||||
|
||||
TextWidget degreesLabel = new TextWidget(new LocalizedString("Degrees:").Translated, textColor: RGBA_Bytes.White);
|
||||
string degreesLabelTxt = new LocalizedString("Degrees").Translated;
|
||||
string degreesLabelTxtFull = string.Format("{0}:", degreesLabelTxt);
|
||||
TextWidget degreesLabel = new TextWidget(degreesLabelTxt, textColor: RGBA_Bytes.White);
|
||||
degreesContainer.AddChild(degreesLabel);
|
||||
degreesContainer.AddChild(horizontalSpacer);
|
||||
|
||||
|
|
@ -1385,9 +1395,6 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
processingProgressControl.PercentComplete = 0;
|
||||
LockEditControls();
|
||||
|
||||
// we sent the data to the asynch lists but we will not pull it back out (only use it as a temp holder).
|
||||
PushMeshDataToAsynchLists(true);
|
||||
|
||||
BackgroundWorker mergeAndSavePartsBackgroundWorker = new BackgroundWorker();
|
||||
mergeAndSavePartsBackgroundWorker.WorkerReportsProgress = true;
|
||||
|
||||
|
|
@ -1401,6 +1408,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
|
||||
void mergeAndSavePartsBackgroundWorker_DoWork(object sender, DoWorkEventArgs e)
|
||||
{
|
||||
// we sent the data to the asynch lists but we will not pull it back out (only use it as a temp holder).
|
||||
PushMeshDataToAsynchLists(true);
|
||||
|
||||
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
|
||||
BackgroundWorker backgroundWorker = (BackgroundWorker)sender;
|
||||
try
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ namespace MatterHackers.MatterControl
|
|||
Stroke rectOutline = new Stroke(rect, strokeWidth);
|
||||
partGraphics2D.Render(rectOutline, RGBA_Bytes.DarkGray);
|
||||
|
||||
PolygonMesh.Processors.OrthographicZProjection.DrawTo(partGraphics2D, loadedMesh, new Vector2(-bounds2D.Left + PartMarginMM, -bounds2D.Bottom + textSpaceMM + PartMarginMM), PixelPerMM, RGBA_Bytes.Black);
|
||||
PolygonMesh.Rendering.OrthographicZProjection.DrawTo(partGraphics2D, loadedMesh, new Vector2(-bounds2D.Left + PartMarginMM, -bounds2D.Bottom + textSpaceMM + PartMarginMM), PixelPerMM, RGBA_Bytes.Black);
|
||||
partGraphics2D.Render(typeFacePrinter, RGBA_Bytes.Black);
|
||||
|
||||
partImagesToPrint.Add(new PartImage(imageOfPart));
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
Copyright (c) 2013, Lars Brubaker
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -37,6 +37,7 @@ using MatterHackers.Agg;
|
|||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.VectorMath;
|
||||
using MatterHackers.Agg.Font;
|
||||
using MatterHackers.Localizations;
|
||||
|
||||
namespace MatterHackers.MatterControl
|
||||
{
|
||||
|
|
@ -205,8 +206,15 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
public class GetCoarseBedHeight : FindBedHeight
|
||||
{
|
||||
static string setZHeightCoarseInstruction1 = "Using the [Z] controls on this screen, we will now take a coarse measurement of the extruder height at this position.";
|
||||
static string setZHeightCoarseInstruction2 = "\t• Place the paper under the extruder\n\t• Using the above contols\n\t• Press [Z-] until there is resistance to moving the paper\n\t• Press [Z+] once to release the paper\n\nFinally click 'Next' to continue.";
|
||||
static string setZHeightCoarseInstruction1 = new LocalizedString("Using the [Z] controls on this screen, we will now take a coarse measurement of the extruder height at this position.").Translated;
|
||||
|
||||
static string setZHeightCourseInstructTxtOne = new LocalizedString("Place the paper under the extruder").Translated;
|
||||
static string setZHeightCourseInstructTxtTwo = new LocalizedString("Using the above contols").Translated;
|
||||
static string setZHeightCourseInstructTxtThree = new LocalizedString("Press [Z-] until there is resistance to moving the paper").Translated;
|
||||
static string setZHeightCourseInstructTxtFour = new LocalizedString("Press [Z+] once to release the paper").Translated;
|
||||
static string setZHeightCourseInstructTxtFive = new LocalizedString("Finally click 'Next' to continue.").Translated;
|
||||
static string setZHeightCoarseInstruction2 = string.Format("\t• {0}\n\t• {1}\n\t• {2}\n\t• {3}\n\n{4}", setZHeightCourseInstructTxtOne, setZHeightCourseInstructTxtTwo, setZHeightCourseInstructTxtThree,setZHeightCourseInstructTxtFour, setZHeightCourseInstructTxtFive);
|
||||
|
||||
Vector3 probeStartPosition;
|
||||
WizardControl container;
|
||||
|
||||
|
|
@ -244,8 +252,11 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
public class GetFineBedHeight : FindBedHeight
|
||||
{
|
||||
static string setZHeightFineInstruction1 = "We will now refine our measurement of the extruder height at this position.";
|
||||
static string setZHeightFineInstruction2 = "\t• Press [Z-] until there is resistance to moving the paper\n\t• Press [Z+] once to release the paper\n\nFinally click 'Next' to continue.";
|
||||
static string setZHeightFineInstruction1 = new LocalizedString("We will now refine our measurement of the extruder height at this position.").Translated;
|
||||
static string setZHeightFineInstructionTxtOne = new LocalizedString("Press [Z-] until there is resistance to moving the paper").Translated;
|
||||
static string setZHeightFineInstructionTxtTwo = new LocalizedString("Press [Z+] once to release the paper").Translated;
|
||||
static string setZHeightFineInstructionTxtThree = new LocalizedString("Finally click 'Next' to continue.").Translated;
|
||||
static string setZHeightFineInstruction2 = string.Format("\t• {0}\n\t• {1}\n\n{2}",setZHeightFineInstructionTxtOne, setZHeightFineInstructionTxtTwo, setZHeightFineInstructionTxtThree);
|
||||
|
||||
public GetFineBedHeight(string instructionsText, ProbePosition whereToWriteProbePosition)
|
||||
: base(instructionsText, setZHeightFineInstruction1, setZHeightFineInstruction2, .1, whereToWriteProbePosition)
|
||||
|
|
@ -255,8 +266,10 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
public class GetUltraFineBedHeight : FindBedHeight
|
||||
{
|
||||
static string setZHeightFineInstruction1 = "We will now finalize our measurement of the extruder height at this position.";
|
||||
static string setZHeightFineInstruction2 = "\t• Press [Z-] one click PAST the first hint of resistance\n\n\nFinally click 'Next' to continue.";
|
||||
static string setZHeightFineInstruction1 = new LocalizedString("We will now finalize our measurement of the extruder height at this position.").Translated;
|
||||
static string setHeightFineInstructionTxtOne = new LocalizedString("Press [Z-] one click PAST the first hint of resistance").Translated;
|
||||
static string setHeightFineInstructionTxtTwo = new LocalizedString("Finally click 'Next' to continue.").Translated;
|
||||
static string setZHeightFineInstruction2 = string.Format("\t• {0}\n\n\n{1}", setHeightFineInstructionTxtOne, setHeightFineInstructionTxtTwo);
|
||||
|
||||
public GetUltraFineBedHeight(string instructionsText, ProbePosition whereToWriteProbePosition)
|
||||
: base(instructionsText, setZHeightFineInstruction1, setZHeightFineInstruction2, .02, whereToWriteProbePosition)
|
||||
|
|
@ -285,17 +298,36 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
public class PrintLevelWizardWindow : SystemWindow
|
||||
{
|
||||
string pageOneInstructions = "Welcome to the print leveling wizard. Here is a quick overview on what we are going to do.\n\n\t• 'Home' the printer\n\t• Sample the bed at three points\n\t• Turn auto leveling on\n\nYou should be done in about 3 minutes.\n\nClick 'Next' to continue.";
|
||||
string pageOneInstructionsTxtOne = new LocalizedString("Welcome to the print leveling wizard. Here is a quick overview on what we are going to do.").Translated;
|
||||
string pageOneInstructionsTxtTwo = new LocalizedString("'Home' the printer").Translated;
|
||||
string pageOneInstructionsTxtThree = new LocalizedString("Sample the bed at three points").Translated;
|
||||
string pageOneInstructionsTxtFour = new LocalizedString("Turn auto leveling on").Translated;
|
||||
string pageOneInstructionsTxtFive = new LocalizedString("You should be done in about 3 minutes.").Translated;
|
||||
string pageOneInstructionsTxtSix = new LocalizedString("Click 'Next' to continue.").Translated;
|
||||
string pageOneInstructions;
|
||||
|
||||
string homingPageInstructions = "The printer should now be 'homing'. Once it is finished homing we will move it to the first point to sample.\n\nTo complete the next few steps you will need:\n\n\t• A standard sheet of paper\n\nWe will use this paper to measure the distance between the extruder and the bed.\n\nClick 'Next' to continue.";
|
||||
|
||||
string doneInstructions = "Congratulations!\n\nAuto Print Leveling is now configured and enabled.\n\n\t• Remove the paper\n\nIf in the future you wish to turn Auto Print Leveling off, you can uncheck the 'Enabled' button found in 'Advanced Settings'->'Printer Controls'.\n\nClick 'Done' to close this window.";
|
||||
string homingPageInstructionsTxtOne = new LocalizedString("The printer should now be 'homing'. Once it is finished homing we will move it to the first point to sample.\n\nTo complete the next few steps you will need").Translated;
|
||||
string homingPageInstructionsTxtTwo = new LocalizedString("A standard sheet of paper").Translated;
|
||||
string homingPageInstructionsTxtThree = new LocalizedString("We will use this paper to measure the distance between the extruder and the bed.\n\nClick 'Next' to continue.").Translated;
|
||||
string homingPageInstructions;
|
||||
|
||||
string doneInstructionsTxt = new LocalizedString("Congratulations!\n\nAuto Print Leveling is now configured and enabled.").Translated;
|
||||
string doneInstructionsTxtTwo = new LocalizedString("Remove the paper").Translated;
|
||||
string doneInstructionsTxtThree = new LocalizedString("If in the future you wish to turn Auto Print Leveling off, you can uncheck the 'Enabled' button found in 'Advanced Settings'->'Printer Controls'.\n\nClick 'Done' to close this window.").Translated;
|
||||
string doneInstructions;
|
||||
|
||||
WizardControl printLevelWizard;
|
||||
public PrintLevelWizardWindow()
|
||||
: base(500, 370)
|
||||
{
|
||||
Title = "MatterControl - Print Leveling Wizard";
|
||||
{
|
||||
pageOneInstructions = string.Format("{0}\n\n\t• {1}\n\t• {2}\n\t• {3}\n\n{4}\n\n{5}",pageOneInstructionsTxtOne, pageOneInstructionsTxtTwo, pageOneInstructionsTxtThree, pageOneInstructionsTxtFour, pageOneInstructionsTxtFive, pageOneInstructionsTxtSix);
|
||||
homingPageInstructions = string.Format("{0}:\n\n\t• {1}\n\n{2}", homingPageInstructionsTxtOne, homingPageInstructionsTxtTwo, homingPageInstructionsTxtThree);
|
||||
doneInstructions = string.Format("{0}\n\n\t• {1}\n\n{2}",doneInstructionsTxt, doneInstructionsTxtTwo, doneInstructionsTxtThree);
|
||||
|
||||
|
||||
string printLevelWizardTitle = new LocalizedString("MatterControl").Translated;
|
||||
string printLevelWizardTitleFull = new LocalizedString ("Print Leveling Wizard").Translated;
|
||||
Title = string.Format("{0} - {1}",printLevelWizardTitle, printLevelWizardTitleFull);
|
||||
ProbePosition[] probePositions = new ProbePosition[3];
|
||||
probePositions[0] = new ProbePosition();
|
||||
probePositions[1] = new ProbePosition();
|
||||
|
|
@ -309,30 +341,60 @@ namespace MatterHackers.MatterControl
|
|||
printLevelWizard.AddPage(new HomePrinterPage(homingPageInstructions));
|
||||
|
||||
Vector2 probeBackCenter = ActiveSliceSettings.Instance.GetPrintLevelSamplePosition(0);
|
||||
printLevelWizard.AddPage(new GetCoarseBedHeight(printLevelWizard, new Vector3(probeBackCenter, 10), string.Format("{0} Position 1 - Low Precision", Step()), probePositions[0]));
|
||||
printLevelWizard.AddPage(new GetFineBedHeight(string.Format("{0} Position 1 - Medium Precision", Step()), probePositions[0]));
|
||||
printLevelWizard.AddPage(new GetUltraFineBedHeight(string.Format("{0} Position 1 - High Precision", Step()), probePositions[0]));
|
||||
|
||||
string lowPrecisionPositionLbl = new LocalizedString ("Position").Translated;
|
||||
string lowPrecisionLbl = new LocalizedString ("Low Precision").Translated;
|
||||
GetCoarseBedHeight getCourseBedHeight = new GetCoarseBedHeight (printLevelWizard,
|
||||
new Vector3 (probeBackCenter, 10),
|
||||
string.Format ("{0} {1} 1 - {2}", Step (),lowPrecisionPositionLbl, lowPrecisionLbl),
|
||||
probePositions [0]);
|
||||
|
||||
printLevelWizard.AddPage(getCourseBedHeight);
|
||||
string precisionPositionLbl = new LocalizedString("Position").Translated;
|
||||
string medPrecisionLbl = new LocalizedString("Medium Precision").Translated;
|
||||
printLevelWizard.AddPage(new GetFineBedHeight(string.Format("{0} {1} 1 - {2}", Step(), precisionPositionLbl, medPrecisionLbl), probePositions[0]));
|
||||
string highPrecisionLbl = new LocalizedString("High Precision").Translated;
|
||||
printLevelWizard.AddPage(new GetUltraFineBedHeight(string.Format("{0} {1} 1 - {2}", Step(), precisionPositionLbl, highPrecisionLbl), probePositions[0]));
|
||||
|
||||
Vector2 probeFrontLeft = ActiveSliceSettings.Instance.GetPrintLevelSamplePosition(1);
|
||||
printLevelWizard.AddPage(new GetCoarseBedHeight(printLevelWizard, new Vector3(probeFrontLeft, 10), string.Format("{0} Position 2 - Low Precision", Step()), probePositions[1]));
|
||||
printLevelWizard.AddPage(new GetFineBedHeight(string.Format("{0} Position 2 - Medium Precision", Step()), probePositions[1]));
|
||||
printLevelWizard.AddPage(new GetUltraFineBedHeight(string.Format("{0} Position 2 - High Precision", Step()), probePositions[1]));
|
||||
string positionLblTwo = new LocalizedString("Position").Translated;
|
||||
string lowPrecisionTwoLbl = new LocalizedString("Low Precision").Translated;
|
||||
string medPrecisionTwoLbl = new LocalizedString("Medium Precision").Translated;
|
||||
string highPrecisionTwoLbl = new LocalizedString("High Precision").Translated;
|
||||
printLevelWizard.AddPage(new GetCoarseBedHeight(printLevelWizard, new Vector3(probeFrontLeft, 10), string.Format("{0} {1} 2 - {2}", Step(), positionLblTwo, lowPrecisionTwoLbl ), probePositions[1]));
|
||||
printLevelWizard.AddPage(new GetFineBedHeight(string.Format("{0} {1} 2 - {2}", Step(), positionLblTwo,medPrecisionTwoLbl), probePositions[1]));
|
||||
printLevelWizard.AddPage(new GetUltraFineBedHeight(string.Format("{0} {1} 2 - {2}", Step(), positionLblTwo,highPrecisionTwoLbl), probePositions[1]));
|
||||
|
||||
Vector2 probeFrontRight = ActiveSliceSettings.Instance.GetPrintLevelSamplePosition(2);
|
||||
printLevelWizard.AddPage(new GetCoarseBedHeight(printLevelWizard, new Vector3(probeFrontRight, 10), string.Format("{0} Position 3 - Low Precision", Step()), probePositions[2]));
|
||||
printLevelWizard.AddPage(new GetFineBedHeight(string.Format("{0} Position 3 - Medium Precision", Step()), probePositions[2]));
|
||||
printLevelWizard.AddPage(new GetUltraFineBedHeight(string.Format("{0} Position 3 - High Precision", Step()), probePositions[2]));
|
||||
string positionLabelThree = new LocalizedString("Position").Translated;
|
||||
string lowPrecisionLblThree = new LocalizedString("Low Precision").Translated;
|
||||
string medPrecisionLblThree = new LocalizedString("Medium Precision").Translated;
|
||||
string highPrecisionLblThree = new LocalizedString("High Precision").Translated;
|
||||
printLevelWizard.AddPage(new GetCoarseBedHeight(printLevelWizard, new Vector3(probeFrontRight, 10), string.Format("{0} {1} 3 - {2}", Step(), positionLabelThree, lowPrecisionLblThree), probePositions[2]));
|
||||
printLevelWizard.AddPage(new GetFineBedHeight(string.Format("{0} {1} 3 - {2}", Step(),positionLabelThree, medPrecisionLblThree ), probePositions[2]));
|
||||
printLevelWizard.AddPage(new GetUltraFineBedHeight(string.Format("{0} {1} 3 - {2}", Step(), positionLabelThree, highPrecisionLblThree ), probePositions[2]));
|
||||
|
||||
printLevelWizard.AddPage(new LastPageInstructions(doneInstructions, probePositions));
|
||||
}
|
||||
|
||||
int step = 1;
|
||||
string stepTextBeg = new LocalizedString("Step").Translated;
|
||||
string stepTextEnd = new LocalizedString("of").Translated;
|
||||
string Step()
|
||||
{
|
||||
return string.Format("Step {0} of 9:", step++);
|
||||
return string.Format("{0} {1} {2} 9:",stepTextBeg, step++, stepTextEnd);
|
||||
}
|
||||
|
||||
void DoneButton_Click(object sender, MouseEventArgs mouseEvent)
|
||||
{
|
||||
UiThread.RunOnIdle (DoDoneButton_Click);
|
||||
}
|
||||
void DoDoneButton_Click(object state)
|
||||
{
|
||||
UiThread.RunOnIdle(DoDoneButton_Click);
|
||||
}
|
||||
|
||||
void DoDoneButton_Click(object state)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,6 +98,11 @@ namespace MatterHackers.MatterControl.PrintLibrary
|
|||
}
|
||||
|
||||
void exportGCode_Click(object sender, MouseEventArgs mouseEvent)
|
||||
{
|
||||
UiThread.RunOnIdle(DoExportGCode_Click);
|
||||
}
|
||||
|
||||
void DoExportGCode_Click(object state)
|
||||
{
|
||||
SaveFileDialogParams saveParams = new SaveFileDialogParams("Export GCode|*.gcode", title: "Export GCode");
|
||||
saveParams.Title = "MatterControl: Export File";
|
||||
|
|
@ -165,6 +170,11 @@ namespace MatterHackers.MatterControl.PrintLibrary
|
|||
}
|
||||
|
||||
void exportSTL_Click(object sender, MouseEventArgs mouseEvent)
|
||||
{
|
||||
UiThread.RunOnIdle(DoExportSTL_Click);
|
||||
}
|
||||
|
||||
void DoExportSTL_Click(object state)
|
||||
{
|
||||
SaveFileDialogParams saveParams = new SaveFileDialogParams("Save as STL|*.stl");
|
||||
saveParams.Title = "MatterControl: Export File";
|
||||
|
|
|
|||
|
|
@ -71,7 +71,9 @@ namespace MatterHackers.MatterControl.PrintLibrary
|
|||
headerRow.Padding = new BorderDouble(0, 3, 0, 3);
|
||||
|
||||
{
|
||||
string elementHeaderLbl = new LocalizedString ("Select a Design Tool:").Translated;
|
||||
string elementHeaderLblBeg = new LocalizedString("Select a Design Tool").Translated;
|
||||
string elementHeaderLblFull = string.Format("{0}:", elementHeaderLblBeg);
|
||||
string elementHeaderLbl = elementHeaderLblFull;
|
||||
TextWidget elementHeader = new TextWidget(string.Format(elementHeaderLbl), pointSize: 14);
|
||||
elementHeader.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||
elementHeader.HAnchor = HAnchor.ParentLeftRight;
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ namespace MatterHackers.MatterControl.PrintLibrary
|
|||
double maxSize = Math.Max(aabb.XSize, aabb.YSize);
|
||||
double scale = thumbnailWidget.image.Width / (maxSize * 1.2);
|
||||
RectangleDouble bounds2D = new RectangleDouble(aabb.minXYZ.x, aabb.minXYZ.y, aabb.maxXYZ.x, aabb.maxXYZ.y);
|
||||
PolygonMesh.Processors.OrthographicZProjection.DrawTo(partGraphics2D, loadedMesh,
|
||||
PolygonMesh.Rendering.OrthographicZProjection.DrawTo(partGraphics2D, loadedMesh,
|
||||
new Vector2((thumbnailWidget.image.Width / scale - bounds2D.Width) / 2 - bounds2D.Left,
|
||||
(thumbnailWidget.image.Height / scale - bounds2D.Height) / 2 - bounds2D.Bottom),
|
||||
scale,
|
||||
|
|
|
|||
|
|
@ -370,8 +370,11 @@ namespace MatterHackers.MatterControl.PrintQueue
|
|||
string end = maxLengthName.Substring(maxLengthName.Length - amountRemaining, amountRemaining);
|
||||
maxLengthName = start + end;
|
||||
}
|
||||
string message = String.Format("Oops! Could not find this file:\n'{0}'\n\nWould you like to remove it from the queue?", maxLengthName);
|
||||
if (StyledMessageBox.ShowMessageBox(message, "Item not found", StyledMessageBox.MessageType.YES_NO))
|
||||
string notFoundMessage = new LocalizedString("Oops! Could not find this file").Translated;
|
||||
string notFoundMessageEnd = new LocalizedString("Would you like to remove it from the queue").Translated;
|
||||
string message = String.Format("{0}:\n'{1}'\n\n{2}?",notFoundMessage, maxLengthName,notFoundMessageEnd);
|
||||
string titleLbl = new LocalizedString("Item not Found").Translated;
|
||||
if (StyledMessageBox.ShowMessageBox(message, titleLbl, StyledMessageBox.MessageType.YES_NO))
|
||||
{
|
||||
PrintQueueControl.Instance.RemoveIndex(PrintQueueControl.Instance.GetIndex(printItem));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,6 +139,8 @@ namespace MatterHackers.MatterControl
|
|||
public enum CommunicationStates { Disconnected, AttemptingToConnect, FailedToConnect, Connected, PreparingToPrint, Printing, Paused, FinishedPrint, Disconnecting, ConnectionLost };
|
||||
CommunicationStates communicationState = CommunicationStates.Disconnected;
|
||||
|
||||
bool ForceImmediateWrites = false;
|
||||
|
||||
public CommunicationStates CommunicationState
|
||||
{
|
||||
get
|
||||
|
|
@ -1494,17 +1496,27 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
// Get the temperature during print.
|
||||
if (printerCommandQueueIndex > 0
|
||||
&& printerCommandQueueIndex < loadedGCode.GCodeCommandQueue.Count
|
||||
&& loadedGCode.GCodeCommandQueue[printerCommandQueueIndex].Line != lineToWrite)
|
||||
&& printerCommandQueueIndex < loadedGCode.GCodeCommandQueue.Count -1)
|
||||
{
|
||||
loadedGCode.GCodeCommandQueue.Insert(printerCommandQueueIndex + 1, new PrinterMachineInstruction(lineToWrite, loadedGCode.GCodeCommandQueue[printerCommandQueueIndex]));
|
||||
if (loadedGCode.GCodeCommandQueue[printerCommandQueueIndex+1].Line != lineToWrite)
|
||||
{
|
||||
loadedGCode.GCodeCommandQueue.Insert(printerCommandQueueIndex + 1, new PrinterMachineInstruction(lineToWrite, loadedGCode.GCodeCommandQueue[printerCommandQueueIndex]));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (LinesToWriteQueue.Count == 0 || LinesToWriteQueue[LinesToWriteQueue.Count - 1] != lineToWrite)
|
||||
// sometimes we need to send code without buffering (like when we are closing the program).
|
||||
if (ForceImmediateWrites)
|
||||
{
|
||||
LinesToWriteQueue.Add(lineToWrite);
|
||||
WriteToPrinter(lineToWrite + "\r\n", lineToWrite);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (LinesToWriteQueue.Count == 0 || LinesToWriteQueue[LinesToWriteQueue.Count - 1] != lineToWrite)
|
||||
{
|
||||
LinesToWriteQueue.Add(lineToWrite);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1574,10 +1586,16 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
if (PrinterIsConnected)
|
||||
{
|
||||
// Make sure we send this without waiting for the printer to respond. We want to try and turn off the heaters.
|
||||
// It may be possible in the future to make this go into the printer queue for assured sending but it means
|
||||
// the program has to be smart about closing an able to wait until the printer has agreed that it shut off
|
||||
// the motors and heaters (a good idea ane something for the future).
|
||||
ForceImmediateWrites = true;
|
||||
ReleaseMotors();
|
||||
TargetExtruderTemperature = 0;
|
||||
TargetBedTemperature = 0;
|
||||
FanSpeed = 0;
|
||||
ForceImmediateWrites = false;
|
||||
|
||||
CommunicationState = CommunicationStates.Disconnecting;
|
||||
if (readFromPrinterThread != null)
|
||||
|
|
@ -1608,10 +1626,13 @@ namespace MatterHackers.MatterControl
|
|||
timeSinceLastWrite.Restart();
|
||||
if (PrinterIsConnected)
|
||||
{
|
||||
bool forceResendInCaseOfOKError = false;
|
||||
//bool forceResendInCaseOfOKError = false;
|
||||
// wait until the printer responds from the last command with an ok OR we waited to long
|
||||
while (PrinterIsPrinting && timeHaveBeenWaitingForOK.IsRunning && !forceResendInCaseOfOKError)
|
||||
while (PrinterIsPrinting && timeHaveBeenWaitingForOK.IsRunning)// && !forceResendInCaseOfOKError)
|
||||
{
|
||||
#if false
|
||||
// this is a bunch of code to try and make sure the printer does not stop on transmission errors.
|
||||
// It is not working and is currently disabled. It would be great to debug this and get it working. Lars.
|
||||
// It has been more than 5 seconds since the printer responded anything
|
||||
// and it was not ok, and it's been more than 10 second since we sent the command
|
||||
if (timeSinceLastReadAnything.Elapsed.Seconds > 5 && timeSinceLastWrite.Elapsed.Seconds > 10)
|
||||
|
|
@ -1621,10 +1642,9 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
// the last instruction was a move
|
||||
PrinterMachineInstruction lastInstruction = loadedGCode.GCodeCommandQueue[printerCommandQueueIndex - 1];
|
||||
bool isMove = lastInstruction.Line.StartsWith("G1") || lastInstruction.Line.StartsWith("G0");
|
||||
if (isMove && firstLineToResendIndex == allCheckSumLinesSent.Count)
|
||||
if (firstLineToResendIndex == allCheckSumLinesSent.Count)
|
||||
{
|
||||
// Basically we got some response but it did not contain on OK.
|
||||
// Basically we got some response but it did not contain an OK.
|
||||
// The theory is that we may have recieved a transmission error (like 'OP' rather than 'OK')
|
||||
// and in that event we don't want the print to just stop and wait forever.
|
||||
forceResendInCaseOfOKError = true;
|
||||
|
|
@ -1633,6 +1653,13 @@ namespace MatterHackers.MatterControl
|
|||
}
|
||||
}
|
||||
|
||||
bool printerWantsResend = firstLineToResendIndex < allCheckSumLinesSent.Count;
|
||||
if (printerWantsResend)
|
||||
{
|
||||
forceResendInCaseOfOKError = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
// we are waiting for ok so wait some time
|
||||
System.Threading.Thread.Sleep(1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ using MatterHackers.VectorMath;
|
|||
using MatterHackers.Agg.Image;
|
||||
using MatterHackers.MatterControl.DataStorage;
|
||||
using MatterHackers.MatterControl.FieldValidation;
|
||||
using MatterHackers.Localizations;
|
||||
|
||||
namespace MatterHackers.MatterControl
|
||||
{
|
||||
|
|
@ -73,7 +74,9 @@ namespace MatterHackers.MatterControl
|
|||
headerRow.Padding = new BorderDouble(0, 3, 0, 3);
|
||||
|
||||
{
|
||||
TextWidget elementHeader = new TextWidget(string.Format("Edit Macro:"), pointSize: 14);
|
||||
string editMacroLabel = new LocalizedString("Edit Macro").Translated;
|
||||
string editMacroLabelFull = string.Format("{0}:", editMacroLabel);
|
||||
TextWidget elementHeader = new TextWidget(editMacroLabelFull, pointSize: 14);
|
||||
elementHeader.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||
elementHeader.HAnchor = HAnchor.ParentLeftRight;
|
||||
elementHeader.VAnchor = Agg.UI.VAnchor.ParentBottom;
|
||||
|
|
@ -97,10 +100,10 @@ namespace MatterHackers.MatterControl
|
|||
presetsFormContainer.AddChild(createMacroCommandContainer());
|
||||
|
||||
|
||||
Button addMacroButton = textImageButtonFactory.Generate("Save");
|
||||
Button addMacroButton = textImageButtonFactory.Generate(new LocalizedString("Save").Translated);
|
||||
addMacroButton.Click += new ButtonBase.ButtonEventHandler(saveMacro_Click);
|
||||
|
||||
Button cancelPresetsButton = textImageButtonFactory.Generate("Cancel");
|
||||
Button cancelPresetsButton = textImageButtonFactory.Generate(new LocalizedString("Cancel").Translated);
|
||||
cancelPresetsButton.Click += (sender, e) =>
|
||||
{
|
||||
UiThread.RunOnIdle((state) =>
|
||||
|
|
@ -131,7 +134,9 @@ namespace MatterHackers.MatterControl
|
|||
container.Margin = new BorderDouble(0, 5);
|
||||
BorderDouble elementMargin = new BorderDouble(top: 3);
|
||||
|
||||
TextWidget macroNameLabel = new TextWidget("Macro Name:", 0, 0, 12);
|
||||
string macroNameLabelTxt = new LocalizedString("Macro Name").Translated;
|
||||
string macroNameLabelTxtFull = string.Format("{0}:", macroNameLabelTxt);
|
||||
TextWidget macroNameLabel = new TextWidget( macroNameLabelTxtFull, 0, 0, 12);
|
||||
macroNameLabel.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||
macroNameLabel.HAnchor = HAnchor.ParentLeftRight;
|
||||
macroNameLabel.Margin = new BorderDouble(0, 0, 0, 1);
|
||||
|
|
@ -139,7 +144,9 @@ namespace MatterHackers.MatterControl
|
|||
macroNameInput = new MHTextEditWidget(windowController.ActiveMacro.Name);
|
||||
macroNameInput.HAnchor = HAnchor.ParentLeftRight;
|
||||
|
||||
macroNameError = new TextWidget("Give your macro a name.", 0, 0, 10);
|
||||
string giveMacroANameLbl = new LocalizedString("Give your macro a name").Translated;
|
||||
string giveMacroANameLblFull = string.Format ("{0}.", giveMacroANameLbl);
|
||||
macroNameError = new TextWidget(giveMacroANameLblFull, 0, 0, 10);
|
||||
macroNameError.TextColor = RGBA_Bytes.White;
|
||||
macroNameError.HAnchor = HAnchor.ParentLeftRight;
|
||||
macroNameError.Margin = elementMargin;
|
||||
|
|
@ -157,7 +164,9 @@ namespace MatterHackers.MatterControl
|
|||
container.Margin = new BorderDouble(0, 5);
|
||||
BorderDouble elementMargin = new BorderDouble(top: 3);
|
||||
|
||||
TextWidget macroCommandLabel = new TextWidget("Macro Commands:", 0, 0, 12);
|
||||
string macroCommandLblTxt = new LocalizedString("Macro Commands").Translated;
|
||||
string macroCommandLblTxtFull = string.Format ("{0}:", macroCommandLblTxt);
|
||||
TextWidget macroCommandLabel = new TextWidget(macroCommandLblTxtFull, 0, 0, 12);
|
||||
macroCommandLabel.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||
macroCommandLabel.HAnchor = HAnchor.ParentLeftRight;
|
||||
macroCommandLabel.Margin = new BorderDouble(0, 0, 0, 1);
|
||||
|
|
@ -165,7 +174,9 @@ namespace MatterHackers.MatterControl
|
|||
macroCommandInput = new MHTextEditWidget(windowController.ActiveMacro.Value, pixelHeight: 120, multiLine: true);
|
||||
macroCommandInput.HAnchor = HAnchor.ParentLeftRight;
|
||||
|
||||
macroCommandError = new TextWidget("This should be in 'Gcode'.", 0, 0, 10);
|
||||
string shouldBeGCodeLbl = new LocalizedString("This should be in 'Gcode'").Translated;
|
||||
string shouldBeGCodeLblFull = string.Format("{0}.", shouldBeGCodeLbl);
|
||||
macroCommandError = new TextWidget(shouldBeGCodeLblFull, 0, 0, 10);
|
||||
macroCommandError.TextColor = RGBA_Bytes.White;
|
||||
macroCommandError.HAnchor = HAnchor.ParentLeftRight;
|
||||
macroCommandError.Margin = elementMargin;
|
||||
|
|
@ -259,7 +270,9 @@ namespace MatterHackers.MatterControl
|
|||
headerRow.Padding = new BorderDouble(0, 3, 0, 3);
|
||||
|
||||
{
|
||||
TextWidget elementHeader = new TextWidget(string.Format("Macro Presets:"), pointSize: 14);
|
||||
string macroPresetsLabel = new LocalizedString("Macro Presets").Translated;
|
||||
string macroPresetsLabelFull = string.Format("{0}:", macroPresetsLabel);
|
||||
TextWidget elementHeader = new TextWidget(macroPresetsLabelFull, pointSize: 14);
|
||||
elementHeader.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||
elementHeader.HAnchor = HAnchor.ParentLeftRight;
|
||||
elementHeader.VAnchor = Agg.UI.VAnchor.ParentBottom;
|
||||
|
|
@ -296,7 +309,7 @@ namespace MatterHackers.MatterControl
|
|||
hSpacer.HAnchor = Agg.UI.HAnchor.ParentLeftRight;
|
||||
macroRow.AddChild(hSpacer);
|
||||
|
||||
Button editLink = linkButtonFactory.Generate("edit");
|
||||
Button editLink = linkButtonFactory.Generate(new LocalizedString("edit").Translated);
|
||||
editLink.Margin = new BorderDouble(right: 5);
|
||||
editLink.Click += (sender, e) =>
|
||||
{
|
||||
|
|
@ -304,7 +317,7 @@ namespace MatterHackers.MatterControl
|
|||
};
|
||||
macroRow.AddChild(editLink);
|
||||
|
||||
Button removeLink = linkButtonFactory.Generate("remove");
|
||||
Button removeLink = linkButtonFactory.Generate(new LocalizedString("remove").Translated);
|
||||
removeLink.Click += (sender, e) =>
|
||||
{
|
||||
m.Delete();
|
||||
|
|
@ -318,10 +331,10 @@ namespace MatterHackers.MatterControl
|
|||
}
|
||||
|
||||
|
||||
Button addMacroButton = textImageButtonFactory.Generate("Add", "icon_circle_plus.png");
|
||||
Button addMacroButton = textImageButtonFactory.Generate(new LocalizedString("Add").Translated, "icon_circle_plus.png");
|
||||
addMacroButton.Click += new ButtonBase.ButtonEventHandler(addMacro_Click);
|
||||
|
||||
Button cancelPresetsButton = textImageButtonFactory.Generate("Close");
|
||||
Button cancelPresetsButton = textImageButtonFactory.Generate(new LocalizedString("Close").Translated);
|
||||
cancelPresetsButton.Click += (sender, e) => { this.windowController.Close(); };
|
||||
|
||||
FlowLayoutWidget buttonRow = new FlowLayoutWidget();
|
||||
|
|
@ -369,7 +382,7 @@ namespace MatterHackers.MatterControl
|
|||
public EditMacrosWindow(IEnumerable<DataStorage.CustomCommands> macros, EventHandler functionToCallOnSave)
|
||||
: base(360, 420)
|
||||
{
|
||||
Title = "Macro Editor";
|
||||
Title = new LocalizedString("Macro Editor").Translated;
|
||||
this.functionToCallOnSave = functionToCallOnSave;
|
||||
BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
||||
ChangeToMacroList();
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ using MatterHackers.Agg.UI;
|
|||
using MatterHackers.VectorMath;
|
||||
using MatterHackers.Agg.Image;
|
||||
using MatterHackers.MatterControl.DataStorage;
|
||||
using MatterHackers.Localizations;
|
||||
|
||||
namespace MatterHackers.MatterControl
|
||||
{
|
||||
|
|
@ -62,7 +63,9 @@ namespace MatterHackers.MatterControl
|
|||
headerRow.Padding = new BorderDouble(0, 3, 0, 3);
|
||||
|
||||
{
|
||||
TextWidget elementHeader = new TextWidget(string.Format("Temperature Shortcut Presets:"), pointSize: 14);
|
||||
string tempShortcutPresetLbl = new LocalizedString("Temperature Shortcut Presets").Translated;
|
||||
string tempShortcutPresetLblFull = string.Format ("{0}:", tempShortcutPresetLbl);
|
||||
TextWidget elementHeader = new TextWidget(tempShortcutPresetLblFull, pointSize: 14);
|
||||
elementHeader.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||
elementHeader.HAnchor = HAnchor.ParentLeftRight;
|
||||
elementHeader.VAnchor = Agg.UI.VAnchor.ParentBottom;
|
||||
|
|
@ -108,7 +111,8 @@ namespace MatterHackers.MatterControl
|
|||
labelLabelContainer.Height = 16;
|
||||
labelLabelContainer.Margin = new BorderDouble(3, 0);
|
||||
|
||||
TextWidget labelLabel = new TextWidget(string.Format("Label"), textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 10);
|
||||
string labelLabelTxt = new LocalizedString("Label").Translated;
|
||||
TextWidget labelLabel = new TextWidget(string.Format(labelLabelTxt), textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 10);
|
||||
labelLabel.HAnchor = HAnchor.ParentLeft;
|
||||
labelLabel.VAnchor = VAnchor.ParentCenter;
|
||||
|
||||
|
|
@ -120,13 +124,13 @@ namespace MatterHackers.MatterControl
|
|||
tempLabelContainer.Height = 16;
|
||||
tempLabelContainer.Margin = new BorderDouble(3, 0);
|
||||
|
||||
TextWidget tempLabel = new TextWidget(string.Format("Temp (C)"), textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 10);
|
||||
TextWidget tempLabel = new TextWidget(string.Format("Temp (C)"), textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 10);
|
||||
tempLabel.HAnchor = HAnchor.ParentLeft;
|
||||
tempLabel.VAnchor = VAnchor.ParentCenter;
|
||||
|
||||
tempLabelContainer.AddChild(tempLabel);
|
||||
|
||||
leftRightLabels.AddChild(hLabelSpacer);
|
||||
leftRightLabels.AddChild(hLabelSpacer);
|
||||
leftRightLabels.AddChild(labelLabelContainer);
|
||||
leftRightLabels.AddChild(tempLabelContainer);
|
||||
|
||||
|
|
@ -141,7 +145,8 @@ namespace MatterHackers.MatterControl
|
|||
FlowLayoutWidget leftRightEdit = new FlowLayoutWidget();
|
||||
leftRightEdit.Padding = new BorderDouble(3);
|
||||
leftRightEdit.HAnchor |= Agg.UI.HAnchor.ParentLeftRight;
|
||||
TextWidget label = new TextWidget(string.Format("Preset {0}.", preset_count), textColor: ActiveTheme.Instance.PrimaryTextColor);
|
||||
string presetLabelTxt = new LocalizedString ("Preset").Translated;
|
||||
TextWidget label = new TextWidget(string.Format("{1} {0}.", preset_count,presetLabelTxt ), textColor: ActiveTheme.Instance.PrimaryTextColor);
|
||||
label.VAnchor = VAnchor.ParentCenter;
|
||||
leftRightEdit.AddChild(label);
|
||||
|
||||
|
|
@ -176,7 +181,7 @@ namespace MatterHackers.MatterControl
|
|||
GuiWidget hSpacer = new GuiWidget();
|
||||
hSpacer.HAnchor = HAnchor.ParentLeftRight;
|
||||
|
||||
TextWidget maxWidgetLabel = new TextWidget("Max Temp.", textColor: ActiveTheme.Instance.PrimaryTextColor);
|
||||
TextWidget maxWidgetLabel = new TextWidget(new LocalizedString("Max Temp.").Translated, textColor: ActiveTheme.Instance.PrimaryTextColor);
|
||||
maxWidgetLabel.VAnchor = VAnchor.ParentCenter;
|
||||
leftRightEdit.AddChild(maxWidgetLabel);
|
||||
leftRightEdit.AddChild(hSpacer);
|
||||
|
|
@ -195,10 +200,10 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
ShowAsSystemWindow();
|
||||
|
||||
Button savePresetsButton = textImageButtonFactory.Generate("Save");
|
||||
Button savePresetsButton = textImageButtonFactory.Generate(new LocalizedString("Save").Translated);
|
||||
savePresetsButton.Click += new ButtonBase.ButtonEventHandler(save_Click);
|
||||
|
||||
Button cancelPresetsButton = textImageButtonFactory.Generate("Cancel");
|
||||
Button cancelPresetsButton = textImageButtonFactory.Generate(new LocalizedString("Cancel").Translated);
|
||||
cancelPresetsButton.Click += (sender, e) => { CloseOnIdle(); };
|
||||
|
||||
FlowLayoutWidget buttonRow = new FlowLayoutWidget();
|
||||
|
|
|
|||
|
|
@ -17,7 +17,9 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
public PrinterChooser(string selectedMake = null)
|
||||
{
|
||||
ManufacturerDropList = new StyledDropDownList(new LocalizedString("- Select Make -").Translated);
|
||||
string defaultManufacturerLbl = new LocalizedString ("Select Make").Translated;
|
||||
string defaultManufacturerLblFull = string.Format ("- {0} -", defaultManufacturerLbl);
|
||||
ManufacturerDropList = new StyledDropDownList(defaultManufacturerLblFull);
|
||||
bool addOther = false;
|
||||
string pathToWhitelist = Path.Combine(ApplicationDataStorage.Instance.ApplicationStaticDataPath, "OEMSettings", "PrinterSettingsWhitelist.txt");
|
||||
string[] folderWhitelist = File.ReadAllLines(pathToWhitelist);
|
||||
|
|
@ -80,7 +82,9 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
public ModelChooser(string manufacturer)
|
||||
{
|
||||
ModelDropList = new StyledDropDownList(new LocalizedString("- Select Model -").Translated);
|
||||
string defaultModelDropDownLbl = new LocalizedString("Select Model").Translated;
|
||||
string defaultModelDropDownLblFull = string.Format("- {0} -", defaultModelDropDownLbl);
|
||||
ModelDropList = new StyledDropDownList(defaultModelDropDownLblFull);
|
||||
string pathToModels = Path.Combine(ApplicationDataStorage.Instance.ApplicationStaticDataPath, "PrinterSettings", manufacturer);
|
||||
if (Directory.Exists(pathToModels))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -161,7 +161,9 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
{
|
||||
try
|
||||
{
|
||||
printerDriverMessage.Text = new LocalizedString("Installing...").Translated;
|
||||
string printerDriverMessageLbl = new LocalizedString("Installing").Translated;
|
||||
string printerDriverMessageLblFull = string.Format("{0}...", printerDriverMessageLbl);
|
||||
printerDriverMessage.Text = printerDriverMessageLblFull;
|
||||
InstallDriver(this.printerDriverFilePath);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,7 +77,9 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
container.Margin = new BorderDouble(0, 5);
|
||||
BorderDouble elementMargin = new BorderDouble(top: 3);
|
||||
|
||||
TextWidget printerNameLabel = new TextWidget(new LocalizedString("Printer Name:").Translated, 0, 0, 12);
|
||||
string printerNameLabelTxt = new LocalizedString("Printer Name").Translated;
|
||||
string printerNameLabelTxtFull = string.Format ("{0}:", printerNameLabelTxt);
|
||||
TextWidget printerNameLabel = new TextWidget(printerNameLabelTxtFull, 0, 0, 12);
|
||||
printerNameLabel.TextColor = this.defaultTextColor;
|
||||
printerNameLabel.HAnchor = HAnchor.ParentLeftRight;
|
||||
printerNameLabel.Margin = new BorderDouble(0, 0, 0, 1);
|
||||
|
|
@ -103,7 +105,9 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
container.Margin = new BorderDouble(0, 5);
|
||||
BorderDouble elementMargin = new BorderDouble(top: 3);
|
||||
|
||||
TextWidget printerManufacturerLabel = new TextWidget(new LocalizedString("Select Make:").Translated, 0, 0, 12);
|
||||
string printerManufacturerLabelTxt = new LocalizedString("Select Make").Translated;
|
||||
string printerManufacturerLabelTxtFull = string.Format("{0}:", printerManufacturerLabelTxt);
|
||||
TextWidget printerManufacturerLabel = new TextWidget(printerManufacturerLabelTxtFull, 0, 0, 12);
|
||||
printerManufacturerLabel.TextColor = this.defaultTextColor;
|
||||
printerManufacturerLabel.HAnchor = HAnchor.ParentLeftRight;
|
||||
printerManufacturerLabel.Margin = elementMargin;
|
||||
|
|
@ -132,7 +136,9 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
container.Margin = new BorderDouble(0, 5);
|
||||
BorderDouble elementMargin = new BorderDouble(top: 3);
|
||||
|
||||
TextWidget printerModelLabel = new TextWidget(new LocalizedString("Select Model:").Translated, 0, 0, 12);
|
||||
string printerModelLabelTxt = new LocalizedString("Select Model").Translated;
|
||||
string printerModelLabelTxtFull = string.Format ("{0}:", printerModelLabelTxt);
|
||||
TextWidget printerModelLabel = new TextWidget(printerModelLabelTxtFull, 0, 0, 12);
|
||||
printerModelLabel.TextColor = this.defaultTextColor;
|
||||
printerModelLabel.HAnchor = HAnchor.ParentLeftRight;
|
||||
printerModelLabel.Margin = elementMargin;
|
||||
|
|
@ -399,7 +405,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
else
|
||||
{
|
||||
this.printerNameError.TextColor = RGBA_Bytes.Red;
|
||||
this.printerNameError.Text = "Printer name cannot be blank";
|
||||
this.printerNameError.Text = "Printer name cannot be blank";
|
||||
this.printerNameError.Visible = true;
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
Copyright (c) 2013, Lars Brubaker
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -295,7 +295,7 @@ namespace MatterHackers.MatterControl
|
|||
string sliderLabelDefinitions = GetTemperaturePresets();
|
||||
|
||||
SortedDictionary<double, string> labels = new SortedDictionary<double, string>() {};
|
||||
labels.Add(0.0,new LocalizedString("OFF").Translated);
|
||||
labels.Add(0.0,"OFF");
|
||||
|
||||
string[] labelItems = sliderLabelDefinitions.Split(',');
|
||||
for (int i = 0; i < labelItems.Length / 2; i++)
|
||||
|
|
@ -404,7 +404,7 @@ namespace MatterHackers.MatterControl
|
|||
public class ExtruderTemperatureControlWidget : TemperatureControlBase
|
||||
{
|
||||
public ExtruderTemperatureControlWidget()
|
||||
: base("Extruder Temperature Override", "Extruder Temperature Settings")
|
||||
: base("Extruder Temperature Override", "Extruder Temperature Settings")
|
||||
{
|
||||
AddHandlers();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,16 +89,36 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
Vector2 bedSize = ActiveSliceSettings.Instance.BedSize;
|
||||
Vector2 printCenter = ActiveSliceSettings.Instance.PrintCenter;
|
||||
switch (index)
|
||||
|
||||
switch (BedShape)
|
||||
{
|
||||
case 0:
|
||||
return new Vector2(printCenter.x, printCenter.y + (bedSize.y / 2) * .8);
|
||||
case 1:
|
||||
return new Vector2(printCenter.x - (bedSize.x / 2) * .8, printCenter.y - (bedSize.y / 2) * .8);
|
||||
case 2:
|
||||
return new Vector2(printCenter.x + (bedSize.x / 2) * .8, printCenter.y - (bedSize.y / 2) * .8);
|
||||
case MeshVisualizer.MeshViewerWidget.BedShape.Circular:
|
||||
Vector2 firstPosition = new Vector2(printCenter.x, printCenter.y + (bedSize.y / 2) * .8);
|
||||
switch (index)
|
||||
{
|
||||
case 0:
|
||||
return firstPosition;
|
||||
case 1:
|
||||
return Vector2.Rotate(firstPosition, MathHelper.Tau / 3);
|
||||
case 2:
|
||||
return Vector2.Rotate(firstPosition, MathHelper.Tau * 2 / 3);
|
||||
default:
|
||||
throw new IndexOutOfRangeException();
|
||||
}
|
||||
|
||||
case MeshVisualizer.MeshViewerWidget.BedShape.Rectangular:
|
||||
default:
|
||||
throw new IndexOutOfRangeException();
|
||||
switch (index)
|
||||
{
|
||||
case 0:
|
||||
return new Vector2(printCenter.x, printCenter.y + (bedSize.y / 2) * .8);
|
||||
case 1:
|
||||
return new Vector2(printCenter.x - (bedSize.x / 2) * .8, printCenter.y - (bedSize.y / 2) * .8);
|
||||
case 2:
|
||||
return new Vector2(printCenter.x + (bedSize.x / 2) * .8, printCenter.y - (bedSize.y / 2) * .8);
|
||||
default:
|
||||
throw new IndexOutOfRangeException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -195,6 +215,7 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
return BedSize;
|
||||
}
|
||||
|
||||
public Vector2 BedSize
|
||||
{
|
||||
get
|
||||
|
|
@ -203,6 +224,24 @@ namespace MatterHackers.MatterControl
|
|||
}
|
||||
}
|
||||
|
||||
public MeshVisualizer.MeshViewerWidget.BedShape BedShape
|
||||
{
|
||||
get
|
||||
{
|
||||
switch(GetActiveValue("bed_shape"))
|
||||
{
|
||||
case "rectangular":
|
||||
return MeshVisualizer.MeshViewerWidget.BedShape.Rectangular;
|
||||
|
||||
case "circular":
|
||||
return MeshVisualizer.MeshViewerWidget.BedShape.Circular;
|
||||
|
||||
default:
|
||||
throw new NotImplementedException(string.Format("'{0}' is not a known bed_shape.", GetActiveValue("bed_shape")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Vector2 GetBedCenter()
|
||||
{
|
||||
return BedCenter;
|
||||
|
|
@ -509,15 +548,15 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
if (LayerHeight > NozzleDiameter)
|
||||
{
|
||||
string error = "'Layer Height' must be less than or equal to the 'Nozzle Diameter'.";
|
||||
string error = new LocalizedString("'Layer Height' must be less than or equal to the 'Nozzle Diameter'.").Translated;
|
||||
string details = string.Format("Layer Height = {0}\nNozzle Diameter = {1}", LayerHeight, NozzleDiameter);
|
||||
string location = "Location: 'Advanced Controls' -> 'Slice Settings' -> 'Print' -> 'Layers/Perimeters'";
|
||||
string location = new LocalizedString("Location: 'Advanced Controls' -> 'Slice Settings' -> 'Print' -> 'Layers/Perimeters'").Translated;
|
||||
StyledMessageBox.ShowMessageBox(string.Format("{0}\n\n{1}\n\n{2}", error, details, location), "Slice Error");
|
||||
return false;
|
||||
}
|
||||
else if (FirstLayerHeight > NozzleDiameter)
|
||||
{
|
||||
string error = "First Layer Height' must be less than or equal to the 'Nozzle Diameter'.";
|
||||
string error = new LocalizedString("First Layer Height' must be less than or equal to the 'Nozzle Diameter'.").Translated;
|
||||
string details = string.Format("First Layer Height = {0}\nNozzle Diameter = {1}", FirstLayerHeight, NozzleDiameter);
|
||||
string location = "Location: 'Advanced Controls' -> 'Slice Settings' -> 'Print' -> 'Layers/Perimeters'";
|
||||
StyledMessageBox.ShowMessageBox(string.Format("{0}\n\n{1}\n\n{2}", error, details, location), "Slice Error");
|
||||
|
|
|
|||
|
|
@ -36,11 +36,12 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
new NotPassedItem("", "temperature"),
|
||||
new NotPassedItem("", "bed_temperature"),
|
||||
new NotPassedItem("", "bed_shape"),
|
||||
|
||||
new MapItem("insetCount", "perimeters"),
|
||||
|
||||
new MapItem("skirtLineCount", "skirts"),
|
||||
new MapItem("skirtMinLenght", "min_skirt_length"),
|
||||
new SkirtLengthMaping("skirtMinLength", "min_skirt_length"),
|
||||
new ScaledSingleNumber("skirtDistance", "skirt_distance", 1000),
|
||||
|
||||
new MapItem("fanSpeedMin", "max_fan_speed"),
|
||||
|
|
@ -50,6 +51,7 @@ namespace MatterHackers.MatterControl
|
|||
new MapItem("upSkinCount", "top_solid_layers"),
|
||||
|
||||
new FanTranslator("fanFullOnLayerNr", "disable_fan_first_layers"),
|
||||
new MapItem("coolHeadLift", "cool_extruder_lift"),
|
||||
|
||||
new ScaledSingleNumber("retractionAmount", "retract_length", 1000),
|
||||
new MapItem("retractionSpeed", "retract_speed"),
|
||||
|
|
@ -68,7 +70,7 @@ namespace MatterHackers.MatterControl
|
|||
new ScaledSingleNumber("supportLineDistance", "support_material_spacing", 1000),
|
||||
new SupportMatterial("supportAngle", "support_material"),
|
||||
new NotPassedItem("", "support_material_threshold"),
|
||||
//new ScaledSingleNumber(supportEverywhere);
|
||||
new MapItem("supportEverywhere", "support_material_create_internal_support"),
|
||||
new ScaledSingleNumber("supportXYDistance", "support_material_xy_distance", 1000),
|
||||
new ScaledSingleNumber("supportZDistance", "support_material_z_distance", 1000),
|
||||
|
||||
|
|
@ -101,7 +103,6 @@ namespace MatterHackers.MatterControl
|
|||
SETTING(raftInterfaceLinewidth);
|
||||
|
||||
SETTING(minimalFeedrate);
|
||||
SETTING(coolHeadLift);
|
||||
|
||||
fanFullOnLayerNr = 2;
|
||||
|
||||
|
|
@ -405,6 +406,28 @@ enableOozeShield = 0;
|
|||
}
|
||||
}
|
||||
|
||||
public class SkirtLengthMaping : MapItem
|
||||
{
|
||||
public SkirtLengthMaping(string curaKey, string defaultKey)
|
||||
: base(curaKey, defaultKey)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CuraValue
|
||||
{
|
||||
get
|
||||
{
|
||||
double lengthToExtrudeMm = double.Parse(base.CuraValue);
|
||||
// we need to convert mm of filament to mm of extrusion path
|
||||
double amountOfFilamentCubicMms = ActiveSliceSettings.Instance.FillamentDiameter * MathHelper.Tau * lengthToExtrudeMm;
|
||||
double extrusionSquareSize = ActiveSliceSettings.Instance.FirstLayerHeight * ActiveSliceSettings.Instance.NozzleDiameter;
|
||||
double lineLength = amountOfFilamentCubicMms / extrusionSquareSize;
|
||||
|
||||
return (lineLength * 1000).ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ScaledSingleNumber : MapItem
|
||||
{
|
||||
internal double scale;
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ namespace MatterHackers.MatterControl
|
|||
settingsStatusLabelContainer.VAnchor |= VAnchor.ParentTop;
|
||||
settingsStatusLabelContainer.Margin = new BorderDouble(0);
|
||||
{
|
||||
string activeSettingsLabelText = new LocalizedString ("Active Settings:").Translated;
|
||||
string activeSettingsLabelText = new LocalizedString ("Active Settings").Translated;
|
||||
string activeSettingsLabelTextFull = string.Format ("{0}:", activeSettingsLabelText);
|
||||
|
||||
|
||||
|
|
@ -64,7 +64,9 @@ namespace MatterHackers.MatterControl
|
|||
settingsStatusDescription.AutoExpandBoundsToText = true;
|
||||
settingsStatusDescription.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||
|
||||
unsavedChangesIndicator = new TextWidget("(unsaved changes)", pointSize: 10);
|
||||
string unsavedChangesTxtBeg = new LocalizedString("unsaved changes").Translated;
|
||||
string unsavedChangesTxtFull = string.Format ("({0})", unsavedChangesTxtBeg);
|
||||
unsavedChangesIndicator = new TextWidget(unsavedChangesTxtFull, pointSize: 10);
|
||||
unsavedChangesIndicator.AutoExpandBoundsToText = true;
|
||||
unsavedChangesIndicator.Visible = false;
|
||||
unsavedChangesIndicator.Margin = new BorderDouble(left: 4);
|
||||
|
|
@ -208,11 +210,15 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
void SetMenuItems()
|
||||
{
|
||||
string importTxt = new LocalizedString ("Import").Translated;
|
||||
string importTxtFull = string.Format ("{0}", importTxt);
|
||||
string exportTxt = new LocalizedString("Export").Translated;
|
||||
string exportTxtFull = string.Format ("{0}", exportTxt);
|
||||
//Set the name and callback function of the menu items
|
||||
slicerOptionsMenuItems = new TupleList<string, Func<bool>>
|
||||
{
|
||||
{"Import", ImportQueueMenu_Click},
|
||||
{"Export", ExportQueueMenu_Click},
|
||||
{importTxtFull, ImportQueueMenu_Click},
|
||||
{exportTxtFull, ExportQueueMenu_Click},
|
||||
};
|
||||
|
||||
//Add the menu items to the menu itself
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
public OrganizerSettingsData(string slicerConfigName, string presentationName, DataEditTypes dataEditType, string extraSettings = "", string helpText = "")
|
||||
{
|
||||
this.ExtraSettings = extraSettings;
|
||||
this.ExtraSettings = extraSettings;
|
||||
this.SlicerConfigName = slicerConfigName;
|
||||
this.PresentationName = presentationName;
|
||||
this.DataEditType = dataEditType;
|
||||
|
|
@ -86,7 +86,7 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
public OrganizerSubGroup(string groupName)
|
||||
{
|
||||
this.name = groupName;
|
||||
this.name = groupName;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +1,10 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
using Newtonsoft.Json.Utilities;
|
||||
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.VectorMath;
|
||||
using MatterHackers.Agg.Font;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.VectorMath;
|
||||
|
||||
namespace MatterHackers.MatterControl
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ using MatterHackers.Agg;
|
|||
using MatterHackers.MatterControl.DataStorage;
|
||||
using MatterHackers.MatterControl.PrintQueue;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.Localizations;
|
||||
|
||||
namespace MatterHackers.MatterControl
|
||||
{
|
||||
|
|
@ -47,7 +48,9 @@ namespace MatterHackers.MatterControl
|
|||
public void QueuePartForSlicing(PrintItemWrapper itemToQueue)
|
||||
{
|
||||
itemToQueue.DoneSlicing = false;
|
||||
itemToQueue.OnSlicingOutputMessage(new StringEventArgs("Preparing to slice model..."));
|
||||
string preparingToSliceModelTxt = new LocalizedString("Preparing to slice model").Translated;
|
||||
string peparingToSliceModelFull = string.Format ("{0}...", preparingToSliceModelTxt);
|
||||
itemToQueue.OnSlicingOutputMessage(new StringEventArgs(peparingToSliceModelFull));
|
||||
using (TimedLock.Lock(listOfSlicingItems, "QueuePartForSlicing"))
|
||||
{
|
||||
//Add to thumbnail generation queue
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@ SeeMeCNC
|
|||
Printrbot
|
||||
Deezmaker
|
||||
Blue Eagle Labs
|
||||
Robo 3D
|
||||
RoBo 3D
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,4 +1,5 @@
|
|||
avoid_crossing_perimeters = 1
|
||||
bed_shape = circular
|
||||
bed_size = 260,260
|
||||
bed_temperature = 70
|
||||
bottom_solid_layers = 5
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
avoid_crossing_perimeters = 1
|
||||
bed_shape = circular
|
||||
bed_size = 260,260
|
||||
bed_temperature = 70
|
||||
bottom_solid_layers = 5
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# generated by Slic3r 0.9.9 on Tue May 14 10:04:09 2013
|
||||
avoid_crossing_perimeters = 1
|
||||
bed_size = 280,280
|
||||
bed_shape = circular
|
||||
bed_temperature = 80
|
||||
bottom_solid_layers = 3
|
||||
bridge_acceleration = 0
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
avoid_crossing_perimeters = 0
|
||||
bed_shape = rectangular
|
||||
bed_size = 200,200
|
||||
bed_temperature = 70
|
||||
bottom_solid_layers = 3
|
||||
|
|
@ -9,6 +10,7 @@ bridge_speed = 60
|
|||
brim_width = 0
|
||||
build_height = 0
|
||||
complete_objects = 0
|
||||
cool_extruder_lift = 0
|
||||
cooling = 1
|
||||
default_acceleration = 0
|
||||
disable_fan_first_layers = 1
|
||||
|
|
@ -93,6 +95,7 @@ start_perimeters_at_concave_points = 0
|
|||
start_perimeters_at_non_overhang = 0
|
||||
support_material = 0
|
||||
support_material_angle = 0
|
||||
support_material_create_internal_support = 0
|
||||
support_material_enforce_layers = 0
|
||||
support_material_extruder = 1
|
||||
support_material_extrusion_width = 0
|
||||
|
|
|
|||
|
|
@ -111,6 +111,7 @@ Advanced
|
|||
support_material_interface_spacing
|
||||
support_material_xy_distance
|
||||
support_material_z_distance
|
||||
support_material_create_internal_support
|
||||
Notes
|
||||
Notes
|
||||
notes
|
||||
|
|
@ -163,6 +164,7 @@ Advanced
|
|||
Enable
|
||||
fan_always_on
|
||||
cooling
|
||||
cool_extruder_lift
|
||||
Fan Speed
|
||||
min_fan_speed
|
||||
max_fan_speed
|
||||
|
|
@ -179,6 +181,7 @@ Advanced
|
|||
print_center
|
||||
build_height
|
||||
z_offset
|
||||
bed_shape
|
||||
Firmware
|
||||
gcode_flavor
|
||||
use_relative_e_distances
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
avoid_crossing_perimeters|Avoid Crossing Perimeters|CHECK_BOX||Attempts to minimize the number of perimeter crossing. This can help with oozing or strings.
|
||||
bed_shape|Bed Shape|LIST|rectangular,circular|The shape of the physical print bed.
|
||||
bed_size|Bed Size|VECTOR2|mm|The size of the print bed.
|
||||
bed_temperature|Bed Other Layers|POSITVE_DOUBLE|degrees|The temperature to set the bed to after the first layer has been printed. Set to 0 to eliminate bed temperature commands.
|
||||
bottom_solid_layers|Number of Solid Layers\n on the Bottom:|INT||How many layers will be solid filled on the bottom surfaces of the object.
|
||||
|
|
@ -9,6 +10,7 @@ bridge_speed|Bridges|POSITVE_DOUBLE|mm/s|The speed to move when bridging between
|
|||
brim_width|Brim Width|POSITVE_DOUBLE|mm|The amount of brim that will be drawn around each object. This is useful to ensure that parts stay affixed to the bed.
|
||||
build_height|Build Height|POSITVE_DOUBLE|mm|The height of the printable area. If set to 0 the parts height will not be validated.
|
||||
complete_objects|Complete Individual Objects|CHECK_BOX||Each individual part is printed to completion then the extruder is lowered back to the bed and the next part is printed.
|
||||
cool_extruder_lift|Enable Extruder Lift|CHECK_BOX||Moves the extruder up off the part to allow cooling.
|
||||
cooling|Enable Auto Cooling|CHECK_BOX||Turns on and off all cooling settings (all settings below this one).
|
||||
default_acceleration|Default|POSITVE_DOUBLE|mm/s²|Acceleration to use on all moves not defined above. Set to 0 to disable changing the printer's acceleration.
|
||||
disable_fan_first_layers|Disable Fan For The First|INT|Layers|The number of layers for which the fan will be forced to remain off.
|
||||
|
|
@ -93,6 +95,7 @@ start_gcode|Start G-Code|MULTI_LINE_TEXT||This gcode will be inserted into the o
|
|||
start_perimeters_at_concave_points|Start At Concave Points|CHECK_BOX||Make sure the first point on a perimeter is a concave point.
|
||||
start_perimeters_at_non_overhang|Start At Non Overhang|CHECK_BOX||Make sure the first point on a perimeter is not an overhang.
|
||||
support_material_angle|Pattern Angle|POSITVE_DOUBLE|degrees|The starting angle of the supports.
|
||||
support_material_create_internal_support|Internal Support|CHECK_BOX||Create support where needed on internal features.
|
||||
support_material_enforce_layers|Enforce Support For First|INT|layers|Generate support material everywhere not touching the bed for n layers, regardless of angle.
|
||||
support_material_extruder|Support Material Extruder|INT||The index of the extruder to use for support material.
|
||||
support_material_extrusion_width|Support Material|DOUBLE_OR_PERCENT|mm or %\nleave 0 for default|Leave this as 0 to allow automatic calculation of extrusion width.
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ using MatterHackers.Agg.UI;
|
|||
using MatterHackers.VectorMath;
|
||||
using MatterHackers.MatterControl.DataStorage;
|
||||
using MatterHackers.MatterControl.PrintQueue;
|
||||
using MatterHackers.Localizations;
|
||||
|
||||
namespace MatterHackers.MatterControl.ToolsPage
|
||||
{
|
||||
|
|
@ -65,18 +66,18 @@ namespace MatterHackers.MatterControl.ToolsPage
|
|||
buttonPanel.HAnchor = HAnchor.ParentLeftRight;
|
||||
buttonPanel.Padding = new BorderDouble(0, 3);
|
||||
{
|
||||
Button addToLibrary = textImageButtonFactory.Generate("Import", "icon_import_white_32x32.png");
|
||||
Button addToLibrary = textImageButtonFactory.Generate(new LocalizedString("Import").Translated, "icon_import_white_32x32.png");
|
||||
buttonPanel.AddChild(addToLibrary);
|
||||
addToLibrary.Margin = new BorderDouble(0, 0, 3, 0);
|
||||
addToLibrary.Click += new ButtonBase.ButtonEventHandler(loadFile_Click);
|
||||
|
||||
deleteFromLibraryButton = textImageButtonFactory.Generate("Delete");
|
||||
deleteFromLibraryButton = textImageButtonFactory.Generate(new LocalizedString("Delete").Translated);
|
||||
deleteFromLibraryButton.Margin = new BorderDouble(3, 0);
|
||||
deleteFromLibraryButton.Click += new ButtonBase.ButtonEventHandler(deleteFromQueueButton_Click);
|
||||
deleteFromLibraryButton.Visible = false;
|
||||
buttonPanel.AddChild(deleteFromLibraryButton);
|
||||
|
||||
addToQueueButton = textImageButtonFactory.Generate("Add to Queue");
|
||||
addToQueueButton = textImageButtonFactory.Generate(new LocalizedString("Add to Queue").Translated);
|
||||
addToQueueButton.Margin = new BorderDouble(3, 0);
|
||||
addToQueueButton.Click += new ButtonBase.ButtonEventHandler(addToQueueButton_Click);
|
||||
addToQueueButton.Visible = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue