Fixed some problems with part sheet names and copies.
Made a warning if print leveling tries to go too low.
This commit is contained in:
parent
ae427550ce
commit
1e08d94eb1
5 changed files with 35 additions and 17 deletions
|
|
@ -46,13 +46,13 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
protected override void AddChildElements()
|
||||
{
|
||||
actionBarButtonFactory.invertImageLocation = false;
|
||||
string connectString = LocalizedString.Get("CONNECT");
|
||||
string connectString = "CONNECT".Localize();
|
||||
connectPrinterButton = actionBarButtonFactory.Generate(connectString, "icon_power_32x32.png");
|
||||
connectPrinterButton.Margin = new BorderDouble(0, 0, 3);
|
||||
connectPrinterButton.VAnchor = VAnchor.ParentCenter;
|
||||
connectPrinterButton.Cursor = Cursors.Hand;
|
||||
|
||||
string disconnectString = LocalizedString.Get("DISCONNECT");
|
||||
string disconnectString = "DISCONNECT".Localize();
|
||||
disconnectPrinterButton = actionBarButtonFactory.Generate(disconnectString, "icon_power_32x32.png");
|
||||
disconnectPrinterButton.Margin = new BorderDouble(0, 0, 3);
|
||||
disconnectPrinterButton.VAnchor = VAnchor.ParentCenter;
|
||||
|
|
|
|||
|
|
@ -192,8 +192,8 @@ namespace MatterHackers.MatterControl
|
|||
return zButtons;
|
||||
}
|
||||
|
||||
string zIsTooLowMessage = "You cannot move any lower. This position on your bed is too low for the extruder to reach. You need to raise your bed, or adjust your limits to allow the extruder to go lower.".Localize();
|
||||
string zTooLowTitle = "Waring Moving Too Low".Localize();
|
||||
static string zIsTooLowMessage = "You cannot move any lower. This position on your bed is too low for the extruder to reach. You need to raise your bed, or adjust your limits to allow the extruder to go lower.".Localize();
|
||||
static string zTooLowTitle = "Waring Moving Too Low".Localize();
|
||||
void zMinusControl_Click(object sender, MouseEventArgs mouseEvent)
|
||||
{
|
||||
if (PrinterCommunication.Instance.LastReportedPosition.z - moveAmount < 0)
|
||||
|
|
@ -219,8 +219,8 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
static string setZHeightCoarseInstruction1 = LocalizedString.Get("Using the [Z] controls on this screen, we will now take a coarse measurement of the extruder height at this position.");
|
||||
|
||||
static string setZHeightCourseInstructTxtOne = LocalizedString.Get("Place the paper under the extruder");
|
||||
static string setZHeightCourseInstructTxtTwo = LocalizedString.Get("Using the above contols");
|
||||
static string setZHeightCourseInstructTxtOne = "Place the paper under the extruder".Localize();
|
||||
static string setZHeightCourseInstructTxtTwo = "Using the above contols".Localize();
|
||||
static string setZHeightCourseInstructTxtThree = LocalizedString.Get("Press [Z-] until there is resistance to moving the paper");
|
||||
static string setZHeightCourseInstructTxtFour = LocalizedString.Get("Press [Z+] once to release the paper");
|
||||
static string setZHeightCourseInstructTxtFive = LocalizedString.Get("Finally click 'Next' to continue.");
|
||||
|
|
|
|||
|
|
@ -72,7 +72,19 @@ namespace MatterHackers.MatterControl
|
|||
public event EventHandler DoneSaving;
|
||||
public event EventHandler UpdateRemainingItems;
|
||||
|
||||
List<string> stlFilesToPrint;
|
||||
public class FileNameAndPresentationName
|
||||
{
|
||||
public string fileName;
|
||||
public string presentationName;
|
||||
|
||||
public FileNameAndPresentationName(string fileName, string presentationName)
|
||||
{
|
||||
this.fileName = fileName;
|
||||
this.presentationName = presentationName;
|
||||
}
|
||||
}
|
||||
|
||||
List<FileNameAndPresentationName> stlFilesToPrint;
|
||||
List<PartImage> partImagesToPrint = new List<PartImage>();
|
||||
const double inchesPerMm = 0.0393701;
|
||||
|
||||
|
|
@ -149,10 +161,10 @@ namespace MatterHackers.MatterControl
|
|||
SheetDpi = 300;
|
||||
SheetSizeInches = new Vector2(8.5, 11);
|
||||
// make sure we have our own list so it can't get stepped on while we output it.
|
||||
stlFilesToPrint = new List<string>();
|
||||
stlFilesToPrint = new List<FileNameAndPresentationName>();
|
||||
foreach(PrintItem stlToCopy in dataSource)
|
||||
{
|
||||
stlFilesToPrint.Add(stlToCopy.FileLocation);
|
||||
stlFilesToPrint.Add(new FileNameAndPresentationName(stlToCopy.FileLocation, stlToCopy.Name));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -182,9 +194,9 @@ namespace MatterHackers.MatterControl
|
|||
currentlySaving = true;
|
||||
countThatHaveBeenSaved = 0;
|
||||
// first create images for all the parts
|
||||
foreach (string stlFileName in stlFilesToPrint)
|
||||
foreach (FileNameAndPresentationName stlFileNames in stlFilesToPrint)
|
||||
{
|
||||
Mesh loadedMesh = StlProcessing.Load(stlFileName);
|
||||
Mesh loadedMesh = StlProcessing.Load(stlFileNames.fileName);
|
||||
if (loadedMesh != null)
|
||||
{
|
||||
AxisAlignedBoundingBox aabb = loadedMesh.GetAxisAlignedBoundingBox();
|
||||
|
|
@ -193,8 +205,7 @@ namespace MatterHackers.MatterControl
|
|||
double textSpaceMM = 5;
|
||||
double heightMM = textSpaceMM + bounds2D.Height + PartMarginMM * 2;
|
||||
|
||||
string partName = System.IO.Path.GetFileName(System.IO.Path.GetFileName(stlFileName));
|
||||
TypeFacePrinter typeFacePrinter = new TypeFacePrinter(partName, 28, Vector2.Zero, Justification.Center, Baseline.BoundsCenter);
|
||||
TypeFacePrinter typeFacePrinter = new TypeFacePrinter(stlFileNames.presentationName, 28, Vector2.Zero, Justification.Center, Baseline.BoundsCenter);
|
||||
double sizeOfNameX = typeFacePrinter.GetSize().x + PartMarginPixels * 2;
|
||||
Vector2 sizeOfRender = new Vector2(widthInMM * PixelPerMM, heightMM * PixelPerMM);
|
||||
|
||||
|
|
@ -219,7 +230,7 @@ namespace MatterHackers.MatterControl
|
|||
countThatHaveBeenSaved++;
|
||||
if (UpdateRemainingItems != null)
|
||||
{
|
||||
UpdateRemainingItems(this, new StringEventArgs(Path.GetFileName(stlFileName)));
|
||||
UpdateRemainingItems(this, new StringEventArgs(Path.GetFileName(stlFileNames.presentationName)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -231,7 +242,6 @@ namespace MatterHackers.MatterControl
|
|||
document.Info.Subject = "This is a list of the parts that are in a queue from MatterControl.";
|
||||
document.Info.Keywords = "MatterControl, STL, 3D Printing";
|
||||
|
||||
|
||||
int nextPartToPrintIndex = 0;
|
||||
int plateNumber = 1;
|
||||
bool done = false;
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ namespace MatterHackers.MatterControl
|
|||
TextWidget positionLabel;
|
||||
|
||||
string whichPositionText = LocalizedString.Get("Position");
|
||||
positionLabel = new TextWidget(string.Format("{0} {1,-14} x: {2,-10:0.00} y:{3,-10:0.00}", whichPositionText, preset_count, settingsArray[i], settingsArray[i + 1]), textColor: ActiveTheme.Instance.PrimaryTextColor);
|
||||
positionLabel = new TextWidget(string.Format("{0} {1,-14} x: {2,-10:0.00} y:{3,-10:0.00} z:", whichPositionText, preset_count, settingsArray[i], settingsArray[i + 1]), textColor: ActiveTheme.Instance.PrimaryTextColor);
|
||||
|
||||
positionLabel.VAnchor = VAnchor.ParentCenter;
|
||||
leftRightEdit.AddChild(positionLabel);
|
||||
|
|
@ -156,7 +156,6 @@ namespace MatterHackers.MatterControl
|
|||
leftRightEdit.AddChild(valueEdit);
|
||||
listWithValues.Add(valueEdit);
|
||||
|
||||
//leftRightEdit.AddChild(textImageButtonFactory.Generate("Delete"));
|
||||
presetsFormContainer.AddChild(leftRightEdit);
|
||||
preset_count += 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1794,3 +1794,12 @@ Translated:We will now finalize our measurement of the extruder height at this p
|
|||
English:Press [Z-] one click PAST the first hint of resistance
|
||||
Translated:Press [Z-] one click PAST the first hint of resistance
|
||||
|
||||
English:Save Parts Sheet
|
||||
Translated:Save Parts Sheet
|
||||
|
||||
English:MatterContol
|
||||
Translated:MatterContol
|
||||
|
||||
English:Saving to Parts Sheet
|
||||
Translated:Saving to Parts Sheet
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue