Fixing issue #9 infill density was greater than 1 and no error.
This commit is contained in:
parent
263e2325f5
commit
30da1bd503
2 changed files with 22 additions and 1 deletions
|
|
@ -581,10 +581,15 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
}
|
||||
|
||||
void generateButton_Click(object sender, MouseEventArgs mouseEvent)
|
||||
{
|
||||
UiThread.RunOnIdle(DoGenerateButton_Click, sender);
|
||||
}
|
||||
|
||||
void DoGenerateButton_Click(object state)
|
||||
{
|
||||
if (ActiveSliceSettings.Instance.IsValid())
|
||||
{
|
||||
((Button)sender).Visible = false;
|
||||
((Button)state).Visible = false;
|
||||
SlicingQueue.Instance.QueuePartForSlicing(printItem);
|
||||
startedSliceFromGenerateButton = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -200,6 +200,14 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
}
|
||||
}
|
||||
|
||||
public double FillDensity
|
||||
{
|
||||
get
|
||||
{
|
||||
return ParseDouble(GetActiveValue("fill_density"));
|
||||
}
|
||||
}
|
||||
|
||||
public double MinFanSpeed
|
||||
{
|
||||
get
|
||||
|
|
@ -610,6 +618,14 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
StyledMessageBox.ShowMessageBox(string.Format("{0}\n\n{1}\n\n{2}", error, details, location), "Slice Error");
|
||||
return false;
|
||||
}
|
||||
if (FillDensity < 0 || FillDensity > 1)
|
||||
{
|
||||
string error = "The Fill Density must be between 0 and 1 inclusive.";
|
||||
string details = string.Format("It is currently set to {0}.", FillDensity);
|
||||
string location = "Location: 'Advanced Controls' -> 'Slice Settings' -> 'Print' -> 'Infill'";
|
||||
StyledMessageBox.ShowMessageBox(string.Format("{0}\n\n{1}\n\n{2}", error, details, location), "Slice Error");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue