Bringing in the work from unlimitedbacon #1026

Adding density setting to filament
Adding cost option to filament
This commit is contained in:
Lars Brubaker 2016-07-05 12:24:00 -07:00
parent c9b6e4762e
commit 7951b22044
4 changed files with 48 additions and 13 deletions

View file

@ -519,19 +519,19 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
string costLabel = "Estimated Cost".Localize();
string costLabelFull = string.Format("{0}:", costLabel);
modelInfoContainer.AddChild(new TextWidget(costLabelFull, pointSize: 9, textColor: ActiveTheme.Instance.PrimaryTextColor));
if (totalCost != 0)
{
string costText;
if (totalCost != 0) {
modelInfoContainer.AddChild(new TextWidget(costLabelFull, pointSize: 9, textColor: ActiveTheme.Instance.PrimaryTextColor));
{
string costText;
costText = string.Format("${0:0.00}", totalCost);
} else {
costText = "Unknown";
}
GuiWidget estimatedPrintTime = new TextWidget(costText, pointSize: 14, textColor: ActiveTheme.Instance.PrimaryTextColor);
//estimatedPrintTime.HAnchor = Agg.UI.HAnchor.ParentLeft;
estimatedPrintTime.Margin = new BorderDouble(0, 9, 0, 3);
modelInfoContainer.AddChild(estimatedPrintTime);
GuiWidget estimatedPrintTime = new TextWidget(costText, pointSize: 14, textColor: ActiveTheme.Instance.PrimaryTextColor);
//estimatedPrintTime.HAnchor = Agg.UI.HAnchor.ParentLeft;
estimatedPrintTime.Margin = new BorderDouble(0, 9, 0, 3);
modelInfoContainer.AddChild(estimatedPrintTime);
}
}
//modelInfoContainer.AddChild(new TextWidget("Layer Count:", textColor: ActiveTheme.Instance.PrimaryTextColor));

View file

@ -50,6 +50,8 @@ Intermediate
Filament
Filament
filament_diameter
filament_density
filament_cost
Extruder Temperatures
first_layer_temperature
temperature

View file

@ -546,10 +546,19 @@
"ShowAsOverride": true,
"ShowIfSet": null,
"ResetAtEndOfPrint": false,
"DefaultValue": "0.00"
"DefaultValue": "0"
},
{
"QuickMenuSettings": [],
"QuickMenuSettings": [
{
"MenuName": "PLA",
"Value": "1.24"
},
{
"MenuName": "ABS",
"Value": "1.04"
}
],
"SetSettingsOnChange": [],
"SlicerConfigName": "filament_density",
"PresentationName": "Density",
@ -559,7 +568,7 @@
"ShowAsOverride": true,
"ShowIfSet": null,
"ResetAtEndOfPrint": false,
"DefaultValue": "0.00"
"DefaultValue": "1.24"
},
{
"QuickMenuSettings": [],

View file

@ -5116,3 +5116,27 @@ Translated:Email Address
English:A password reset code will be sent to your email.
Translated:A password reset code will be sent to your email.
English:The price of one kilogram of filament. Used for estimating the cost of a print in the Layer View.
Translated:The price of one kilogram of filament. Used for estimating the cost of a print in the Layer View.
English:Material density. Only used for estimating mass in the Layer View.
Translated:Material density. Only used for estimating mass in the Layer View.
English:Estimated Cost
Translated:Estimated Cost
English:Density
Translated:Density
English:g/cm³
Translated:g/cm³
English:Cost
Translated:Cost
English:$/kg
Translated:$/kg
English:OEM Date Modified
Translated:OEM Date Modified