Raise exception when encountering unknown bed adhesion

This fails explicitly when the bed adhesion is unknown, so that any programmer who adds bed adhesion or changes existing bed adhesion enum values will get notified as quickly as possible that this build volume calculation should be updated as well.

Contributes to issue CURA-2407.
This commit is contained in:
Ghostkeeper 2016-09-27 15:34:57 +02:00
parent c4d3fa7fc7
commit 1daa71c0ec
No known key found for this signature in database
GPG key ID: 701948C5954A7385

View file

@ -507,6 +507,8 @@ class BuildVolume(SceneNode):
elif adhesion_type == "raft":
border_size = self._getSettingProperty("raft_margin", "value")
else:
raise Exception("Unknown bed adhesion type. Did you forget to update the build volume calculations for your new bed adhesion type?")
if self._getSettingProperty("xy_offset", "value"):
border_size += self._getSettingProperty("xy_offset", "value")