mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-17 17:36:40 +08:00
Merge branch 'master' into master-1
This commit is contained in:
commit
002aaacf0e
@ -1,16 +0,0 @@
|
||||
image: registry.gitlab.com/ultimaker/cura/cura-build-environment:centos7
|
||||
|
||||
stages:
|
||||
- build
|
||||
|
||||
build and test linux:
|
||||
stage: build
|
||||
tags:
|
||||
- cura
|
||||
- docker
|
||||
- linux
|
||||
script:
|
||||
- docker/build.sh
|
||||
artifacts:
|
||||
paths:
|
||||
- build
|
@ -162,6 +162,7 @@ class MachineNode(ContainerNode):
|
||||
container_registry = ContainerRegistry.getInstance()
|
||||
if not self.has_variants:
|
||||
self.variants["empty"] = VariantNode("empty_variant", machine = self)
|
||||
self.variants["empty"].materialsChanged.connect(self.materialsChanged)
|
||||
else:
|
||||
# Find all the variants for this definition ID.
|
||||
variants = container_registry.findInstanceContainersMetadata(type = "variant", definition = self.container_id, hardware_type = "nozzle")
|
||||
|
@ -167,15 +167,21 @@ class VariantNode(ContainerNode):
|
||||
# Search for any submaterials from that base file that are still left.
|
||||
materials_same_base_file = ContainerRegistry.getInstance().findContainersMetadata(base_file = base_file)
|
||||
if materials_same_base_file:
|
||||
most_specific_submaterial = materials_same_base_file[0]
|
||||
most_specific_submaterial = None
|
||||
for submaterial in materials_same_base_file:
|
||||
if submaterial["definition"] == self.machine.container_id:
|
||||
if most_specific_submaterial["definition"] == "fdmprinter":
|
||||
if submaterial.get("variant_name", "empty") == self.variant_name:
|
||||
most_specific_submaterial = submaterial
|
||||
if most_specific_submaterial.get("variant_name", "empty") == "empty" and submaterial.get("variant_name", "empty") == self.variant_name:
|
||||
break # most specific match possible
|
||||
if submaterial.get("variant_name", "empty") == "empty":
|
||||
most_specific_submaterial = submaterial
|
||||
self.materials[base_file] = MaterialNode(most_specific_submaterial["id"], variant = self)
|
||||
self.materialsChanged.emit(self.materials[base_file])
|
||||
|
||||
if most_specific_submaterial is None:
|
||||
Logger.log("w", "Material %s removed, but no suitable replacement found", base_file)
|
||||
else:
|
||||
Logger.log("i", "Material %s (%s) overridden by %s", base_file, self.variant_name, most_specific_submaterial.get("id"))
|
||||
self.materials[base_file] = MaterialNode(most_specific_submaterial["id"], variant = self)
|
||||
self.materialsChanged.emit(self.materials[base_file])
|
||||
|
||||
if not self.materials: # The last available material just got deleted and there is nothing with the same base file to replace it.
|
||||
self.materials["empty_material"] = MaterialNode("empty_material", variant = self)
|
||||
|
@ -298,9 +298,7 @@ class PrintInformation(QObject):
|
||||
|
||||
# Only update the job name when it's not user-specified.
|
||||
if not self._is_user_specified_job_name:
|
||||
if self._pre_sliced:
|
||||
self._job_name = catalog.i18nc("@label", "Pre-sliced file {0}", base_name)
|
||||
elif self._application.getInstance().getPreferences().getValue("cura/jobname_prefix"):
|
||||
if self._application.getInstance().getPreferences().getValue("cura/jobname_prefix") and not self._pre_sliced:
|
||||
# Don't add abbreviation if it already has the exact same abbreviation.
|
||||
if base_name.startswith(self._abbr_machine + "_"):
|
||||
self._job_name = base_name
|
||||
|
@ -2073,6 +2073,36 @@
|
||||
"settable_per_mesh": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"skin_edge_support_thickness":
|
||||
{
|
||||
"label": "Skin Edge Support Thickness",
|
||||
"description": "The thickness of the extra infill that supports skin edges.",
|
||||
"unit": "mm",
|
||||
"default_value": 0.8,
|
||||
"minimum_value": "0",
|
||||
"maximum_value": "machine_height",
|
||||
"type": "float",
|
||||
"value": "0",
|
||||
"comment": "This was put at 0 to keep the default behaviour the same, but in the original PR the 'value' was: resolveOrValue('infill_sparse_thickness') * (4 if infill_sparse_density < 12.5 else (3 if infill_sparse_density < 25 else (2 if infill_sparse_density < 50 else 1)))",
|
||||
"limit_to_extruder": "infill_extruder_nr",
|
||||
"enabled": "infill_sparse_density > 0",
|
||||
"settable_per_mesh": true,
|
||||
"children":
|
||||
{
|
||||
"skin_edge_support_layers":
|
||||
{
|
||||
"label": "Skin Edge Support Layers",
|
||||
"description": "The number of infill layers that supports skin edges.",
|
||||
"default_value": 4,
|
||||
"minimum_value": "0",
|
||||
"type": "int",
|
||||
"value": "math.ceil(round(skin_edge_support_thickness / resolveOrValue('infill_sparse_thickness'), 4))",
|
||||
"limit_to_extruder": "infill_extruder_nr",
|
||||
"enabled": "infill_sparse_density > 0",
|
||||
"settable_per_mesh": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -101,6 +101,8 @@ bottom_skin_expand_distance
|
||||
max_skin_angle_for_expansion
|
||||
min_skin_width_for_expansion
|
||||
infill_randomize_start_location
|
||||
skin_edge_support_thickness
|
||||
skin_edge_support_layers
|
||||
|
||||
[material]
|
||||
default_material_print_temperature
|
||||
|
Loading…
x
Reference in New Issue
Block a user