Skip to content

Commit

Permalink
Merge pull request #5 from Ultimaker/master
Browse files Browse the repository at this point in the history
update
  • Loading branch information
maukcc authored May 18, 2017
2 parents aabf260 + 18dd8dc commit 21cf47b
Show file tree
Hide file tree
Showing 201 changed files with 4,941 additions and 587 deletions.
18 changes: 10 additions & 8 deletions cura/BuildVolume.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,8 @@ def _updateRaftThickness(self):
self._global_container_stack.getProperty("raft_interface_thickness", "value") +
self._global_container_stack.getProperty("raft_surface_layers", "value") *
self._global_container_stack.getProperty("raft_surface_thickness", "value") +
self._global_container_stack.getProperty("raft_airgap", "value"))
self._global_container_stack.getProperty("raft_airgap", "value") -
self._global_container_stack.getProperty("layer_0_z_overlap", "value"))

# Rounding errors do not matter, we check if raft_thickness has changed at all
if old_raft_thickness != self._raft_thickness:
Expand Down Expand Up @@ -562,7 +563,7 @@ def _updateDisallowedAreas(self):
used_extruders = [self._global_container_stack]

result_areas = self._computeDisallowedAreasStatic(disallowed_border_size, used_extruders) #Normal machine disallowed areas can always be added.
prime_areas = self._computeDisallowedAreasPrime(disallowed_border_size, used_extruders)
prime_areas = self._computeDisallowedAreasPrimeBlob(disallowed_border_size, used_extruders)
prime_disallowed_areas = self._computeDisallowedAreasStatic(0, used_extruders) #Where the priming is not allowed to happen. This is not added to the result, just for collision checking.

#Check if prime positions intersect with disallowed areas.
Expand Down Expand Up @@ -658,7 +659,7 @@ def _computeDisallowedAreasPrinted(self, used_extruders):

return result

## Computes the disallowed areas for the prime locations.
## Computes the disallowed areas for the prime blobs.
#
# These are special because they are not subject to things like brim or
# travel avoidance. They do get a dilute with the border size though
Expand All @@ -669,17 +670,18 @@ def _computeDisallowedAreasPrinted(self, used_extruders):
# \param used_extruders The extruder stacks to generate disallowed areas
# for.
# \return A dictionary with for each used extruder ID the prime areas.
def _computeDisallowedAreasPrime(self, border_size, used_extruders):
def _computeDisallowedAreasPrimeBlob(self, border_size, used_extruders):
result = {}

machine_width = self._global_container_stack.getProperty("machine_width", "value")
machine_depth = self._global_container_stack.getProperty("machine_depth", "value")
for extruder in used_extruders:
prime_blob_enabled = extruder.getProperty("prime_blob_enable", "value")
prime_x = extruder.getProperty("extruder_prime_pos_x", "value")
prime_y = - extruder.getProperty("extruder_prime_pos_y", "value")

#Ignore extruder prime position if it is not set
if prime_x == 0 and prime_y == 0:
#Ignore extruder prime position if it is not set or if blob is disabled
if (prime_x == 0 and prime_y == 0) or not prime_blob_enabled:
result[extruder.getId()] = []
continue

Expand Down Expand Up @@ -950,9 +952,9 @@ def _clamp(self, value, min_value, max_value):
return max(min(value, max_value), min_value)

_skirt_settings = ["adhesion_type", "skirt_gap", "skirt_line_count", "skirt_brim_line_width", "brim_width", "brim_line_count", "raft_margin", "draft_shield_enabled", "draft_shield_dist"]
_raft_settings = ["adhesion_type", "raft_base_thickness", "raft_interface_thickness", "raft_surface_layers", "raft_surface_thickness", "raft_airgap"]
_raft_settings = ["adhesion_type", "raft_base_thickness", "raft_interface_thickness", "raft_surface_layers", "raft_surface_thickness", "raft_airgap", "layer_0_z_overlap"]
_extra_z_settings = ["retraction_hop_enabled", "retraction_hop"]
_prime_settings = ["extruder_prime_pos_x", "extruder_prime_pos_y", "extruder_prime_pos_z"]
_prime_settings = ["extruder_prime_pos_x", "extruder_prime_pos_y", "extruder_prime_pos_z", "prime_blob_enable"]
_tower_settings = ["prime_tower_enable", "prime_tower_size", "prime_tower_position_x", "prime_tower_position_y"]
_ooze_shield_settings = ["ooze_shield_enabled", "ooze_shield_dist"]
_distance_settings = ["infill_wipe_dist", "travel_avoid_distance", "support_offset", "support_enable", "travel_avoid_other_parts"]
Expand Down
3 changes: 1 addition & 2 deletions cura/ConvexHullDecorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,7 @@ def __isDescendant(self, root, node):
return self.__isDescendant(root, node.getParent())

_affected_settings = [
"adhesion_type", "raft_base_thickness", "raft_interface_thickness", "raft_surface_layers",
"raft_surface_thickness", "raft_airgap", "raft_margin", "print_sequence",
"adhesion_type", "raft_margin", "print_sequence",
"skirt_gap", "skirt_line_count", "skirt_brim_line_width", "skirt_distance", "brim_line_count"]

## Settings that change the convex hull.
Expand Down
13 changes: 10 additions & 3 deletions cura/CuraApplication.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@


class CuraApplication(QtApplication):
# SettingVersion represents the set of settings available in the machine/extruder definitions.
# You need to make sure that this version number needs to be increased if there is any non-backwards-compatible
# changes of the settings.
SettingVersion = 1

class ResourceTypes:
QmlFiles = Resources.UserType + 1
Firmware = Resources.UserType + 2
Expand Down Expand Up @@ -169,11 +174,11 @@ def __init__(self):

UM.VersionUpgradeManager.VersionUpgradeManager.getInstance().setCurrentVersions(
{
("quality", InstanceContainer.Version): (self.ResourceTypes.QualityInstanceContainer, "application/x-uranium-instancecontainer"),
("quality_changes", InstanceContainer.Version * 1000000 + self.SettingVersion): (self.ResourceTypes.QualityInstanceContainer, "application/x-uranium-instancecontainer"),
("machine_stack", ContainerStack.Version): (self.ResourceTypes.MachineStack, "application/x-uranium-containerstack"),
("extruder_train", ContainerStack.Version): (self.ResourceTypes.ExtruderStack, "application/x-uranium-extruderstack"),
("preferences", Preferences.Version): (Resources.Preferences, "application/x-uranium-preferences"),
("user", InstanceContainer.Version): (self.ResourceTypes.UserInstanceContainer, "application/x-uranium-instancecontainer")
("user", InstanceContainer.Version * 1000000 + self.SettingVersion): (self.ResourceTypes.UserInstanceContainer, "application/x-uranium-instancecontainer")
}
)

Expand Down Expand Up @@ -620,7 +625,9 @@ def run(self):
camera.lookAt(Vector(0, 0, 0))
controller.getScene().setActiveCamera("3d")

self.getController().getTool("CameraTool").setOrigin(Vector(0, 100, 0))
camera_tool = self.getController().getTool("CameraTool")
camera_tool.setOrigin(Vector(0, 100, 0))
camera_tool.setZoomRange(0.1, 200000)

self._camera_animation = CameraAnimation.CameraAnimation()
self._camera_animation.setCameraTool(self.getController().getTool("CameraTool"))
Expand Down
4 changes: 2 additions & 2 deletions cura/PrintInformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
# - This triggers a new slice with the current settings - this is the "current settings pass".
# - When the slice is done, we update the current print time and material amount.
# - If the source of the slice was not a Setting change, we start the second slice pass, the "low quality settings pass". Otherwise we stop here.
# - When that is done, we update the minimum print time and start the final slice pass, the "high quality settings pass".
# - When the high quality pass is done, we update the maximum print time.
# - When that is done, we update the minimum print time and start the final slice pass, the "Extra Fine settings pass".
# - When the Extra Fine pass is done, we update the maximum print time.
#
# This class also mangles the current machine name and the filename of the first loaded mesh into a job name.
# This job name is requested by the JobSpecs qml file.
Expand Down
Loading

0 comments on commit 21cf47b

Please sign in to comment.