mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-10-04 20:16:32 +08:00
Add margins around infillmodel options, so an infill option is always selected
This commit is contained in:
parent
2f022244c1
commit
ccf53147b3
@ -162,7 +162,7 @@ Item
|
|||||||
var density = parseInt(UM.ActiveProfile.settingValues.infill_sparse_density);
|
var density = parseInt(UM.ActiveProfile.settingValues.infill_sparse_density);
|
||||||
for(var i = 0; i < infillModel.count; ++i)
|
for(var i = 0; i < infillModel.count; ++i)
|
||||||
{
|
{
|
||||||
if(infillModel.get(i).percentage == density)
|
if(density > infillModel.get(i).percentageMin && density <= infillModel.get(i).percentageMax )
|
||||||
{
|
{
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
@ -235,24 +235,32 @@ Item
|
|||||||
infillModel.append({
|
infillModel.append({
|
||||||
name: catalog.i18nc("@label", "Hollow"),
|
name: catalog.i18nc("@label", "Hollow"),
|
||||||
percentage: 0,
|
percentage: 0,
|
||||||
|
percentageMin: -1,
|
||||||
|
percentageMax: 0,
|
||||||
text: catalog.i18nc("@label", "No (0%) infill will leave your model hollow at the cost of low strength"),
|
text: catalog.i18nc("@label", "No (0%) infill will leave your model hollow at the cost of low strength"),
|
||||||
icon: "hollow"
|
icon: "hollow"
|
||||||
})
|
})
|
||||||
infillModel.append({
|
infillModel.append({
|
||||||
name: catalog.i18nc("@label", "Light"),
|
name: catalog.i18nc("@label", "Light"),
|
||||||
percentage: 20,
|
percentage: 20,
|
||||||
|
percentageMin: 0,
|
||||||
|
percentageMax: 30,
|
||||||
text: catalog.i18nc("@label", "Light (20%) infill will give your model an average strength"),
|
text: catalog.i18nc("@label", "Light (20%) infill will give your model an average strength"),
|
||||||
icon: "sparse"
|
icon: "sparse"
|
||||||
})
|
})
|
||||||
infillModel.append({
|
infillModel.append({
|
||||||
name: catalog.i18nc("@label", "Dense"),
|
name: catalog.i18nc("@label", "Dense"),
|
||||||
percentage: 50,
|
percentage: 50,
|
||||||
|
percentageMin: 30,
|
||||||
|
percentageMax: 70,
|
||||||
text: catalog.i18nc("@label", "Dense (50%) infill will give your model an above average strength"),
|
text: catalog.i18nc("@label", "Dense (50%) infill will give your model an above average strength"),
|
||||||
icon: "dense"
|
icon: "dense"
|
||||||
})
|
})
|
||||||
infillModel.append({
|
infillModel.append({
|
||||||
name: catalog.i18nc("@label", "Solid"),
|
name: catalog.i18nc("@label", "Solid"),
|
||||||
percentage: 100,
|
percentage: 100,
|
||||||
|
percentageMin: 70,
|
||||||
|
percentageMax: 100,
|
||||||
text: catalog.i18nc("@label", "Solid (100%) infill will make your model completely solid"),
|
text: catalog.i18nc("@label", "Solid (100%) infill will make your model completely solid"),
|
||||||
icon: "solid"
|
icon: "solid"
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user