mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 00:16:04 +08:00
Fix merge conflicts with master
This commit is contained in:
commit
6199e8e15a
@ -202,8 +202,6 @@ class PrintInformation(QObject):
|
|||||||
if global_stack is None:
|
if global_stack is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
# Material amount is sent as an amount of mm^3, so calculate length from that
|
|
||||||
radius = Application.getInstance().getGlobalContainerStack().getProperty("material_diameter", "value") / 2
|
|
||||||
self._material_lengths[build_plate_number] = []
|
self._material_lengths[build_plate_number] = []
|
||||||
self._material_weights[build_plate_number] = []
|
self._material_weights[build_plate_number] = []
|
||||||
self._material_costs[build_plate_number] = []
|
self._material_costs[build_plate_number] = []
|
||||||
@ -221,6 +219,7 @@ class PrintInformation(QObject):
|
|||||||
# list comprehension filtering to solve this for us.
|
# list comprehension filtering to solve this for us.
|
||||||
density = extruder_stack.getMetaDataEntry("properties", {}).get("density", 0)
|
density = extruder_stack.getMetaDataEntry("properties", {}).get("density", 0)
|
||||||
material = extruder_stack.findContainer({"type": "material"})
|
material = extruder_stack.findContainer({"type": "material"})
|
||||||
|
radius = extruder_stack.getProperty("material_diameter", "value") / 2
|
||||||
|
|
||||||
weight = float(amount) * float(density) / 1000
|
weight = float(amount) * float(density) / 1000
|
||||||
cost = 0
|
cost = 0
|
||||||
@ -239,6 +238,7 @@ class PrintInformation(QObject):
|
|||||||
else:
|
else:
|
||||||
cost = 0
|
cost = 0
|
||||||
|
|
||||||
|
# Material amount is sent as an amount of mm^3, so calculate length from that
|
||||||
if radius != 0:
|
if radius != 0:
|
||||||
length = round((amount / (math.pi * radius ** 2)) / 1000, 2)
|
length = round((amount / (math.pi * radius ** 2)) / 1000, 2)
|
||||||
else:
|
else:
|
||||||
|
@ -515,15 +515,12 @@ Rectangle
|
|||||||
weights = ["0"];
|
weights = ["0"];
|
||||||
costs = ["0.00"];
|
costs = ["0.00"];
|
||||||
}
|
}
|
||||||
|
var result = lengths.join(" + ") + "m / ~ " + weights.join(" + ") + "g";
|
||||||
if(someCostsKnown)
|
if(someCostsKnown)
|
||||||
{
|
{
|
||||||
return catalog.i18nc("@label Print estimates: m for meters, g for grams, %4 is currency and %3 is print cost", "%1m / ~ %2g / ~ %4 %3").arg(lengths.join(" + "))
|
result += " / ~ " + costs.join(" + ") + " " + UM.Preferences.getValue("cura/currency");
|
||||||
.arg(weights.join(" + ")).arg(costs.join(" + ")).arg(UM.Preferences.getValue("cura/currency"));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return catalog.i18nc("@label Print estimates: m for meters, g for grams", "%1m / ~ %2g").arg(lengths.join(" + ")).arg(weights.join(" + "));
|
|
||||||
}
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
MouseArea
|
MouseArea
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user