mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 11:58:58 +08:00
Prevent calculations with brim width larger than build-plate. [CURA-6094]
This commit is contained in:
parent
ccfa6ebb92
commit
aae06fe0fa
@ -1043,6 +1043,12 @@ class BuildVolume(SceneNode):
|
||||
else:
|
||||
raise Exception("Unknown bed adhesion type. Did you forget to update the build volume calculations for your new bed adhesion type?")
|
||||
|
||||
max_length_available = 0.5 * min(
|
||||
self._global_container_stack.getProperty("machine_width", "value"),
|
||||
self._global_container_stack.getProperty("machine_depth", "value")
|
||||
)
|
||||
bed_adhesion_size = min(bed_adhesion_size, max_length_available)
|
||||
|
||||
support_expansion = 0
|
||||
support_enabled = self._global_container_stack.getProperty("support_enable", "value")
|
||||
support_offset = self._global_container_stack.getProperty("support_offset", "value")
|
||||
|
@ -289,16 +289,21 @@ class ConvexHullDecorator(SceneNodeDecorator):
|
||||
# Add extra margin depending on adhesion type
|
||||
adhesion_type = self._global_stack.getProperty("adhesion_type", "value")
|
||||
|
||||
max_length_available = 0.5 * min(
|
||||
self._getSettingProperty("machine_width", "value"),
|
||||
self._getSettingProperty("machine_depth", "value")
|
||||
)
|
||||
|
||||
if adhesion_type == "raft":
|
||||
extra_margin = max(0, self._getSettingProperty("raft_margin", "value"))
|
||||
extra_margin = min(max_length_available, max(0, self._getSettingProperty("raft_margin", "value")))
|
||||
elif adhesion_type == "brim":
|
||||
extra_margin = max(0, self._getSettingProperty("brim_line_count", "value") * self._getSettingProperty("skirt_brim_line_width", "value"))
|
||||
extra_margin = min(max_length_available, max(0, self._getSettingProperty("brim_line_count", "value") * self._getSettingProperty("skirt_brim_line_width", "value")))
|
||||
elif adhesion_type == "none":
|
||||
extra_margin = 0
|
||||
elif adhesion_type == "skirt":
|
||||
extra_margin = max(
|
||||
extra_margin = min(max_length_available, max(
|
||||
0, self._getSettingProperty("skirt_gap", "value") +
|
||||
self._getSettingProperty("skirt_line_count", "value") * self._getSettingProperty("skirt_brim_line_width", "value"))
|
||||
self._getSettingProperty("skirt_line_count", "value") * self._getSettingProperty("skirt_brim_line_width", "value")))
|
||||
else:
|
||||
raise Exception("Unknown bed adhesion type. Did you forget to update the convex hull calculations for your new bed adhesion type?")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user