mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
Fix ConvexHull{Decorator,Job} to work with the new profile structure
This commit is contained in:
parent
712ec6acdf
commit
47e96a9e2a
2 changed files with 26 additions and 19 deletions
|
@ -46,14 +46,14 @@ class ConvexHullJob(Job):
|
|||
# Then, do a Minkowski hull with a simple 1x1 quad to outset and round the normal convex hull.
|
||||
# This is done because of rounding errors.
|
||||
hull = hull.getMinkowskiHull(Polygon(numpy.array([[-1, -1], [-1, 1], [1, 1], [1, -1]], numpy.float32)))
|
||||
settings = Application.getInstance().getMachineManager().getActiveMachineInstance()
|
||||
|
||||
if settings.getSettingValueByKey("print_sequence") == "One at a time" and not self._node.getParent().callDecoration("isGroup"):
|
||||
|
||||
profile = Application.getInstance().getMachineManager().getActiveProfile()
|
||||
if profile.getSettingValue("print_sequence") == "one_at_a_time" and not self._node.getParent().callDecoration("isGroup"):
|
||||
# Printing one at a time and it's not an object in a group
|
||||
self._node.callDecoration("setConvexHullBoundary", copy.deepcopy(hull))
|
||||
head_hull = hull.getMinkowskiHull(Polygon(numpy.array(settings.getSettingValueByKey("machine_head_with_fans_polygon"),numpy.float32)))
|
||||
head_hull = hull.getMinkowskiHull(Polygon(numpy.array(profile.getSettingValue("machine_head_with_fans_polygon"),numpy.float32)))
|
||||
self._node.callDecoration("setConvexHullHead", head_hull)
|
||||
hull = hull.getMinkowskiHull(Polygon(numpy.array(settings.getSettingValueByKey("machine_head_polygon"),numpy.float32)))
|
||||
hull = hull.getMinkowskiHull(Polygon(numpy.array(profile.getSettingValue("machine_head_polygon"),numpy.float32)))
|
||||
hull_node = ConvexHullNode.ConvexHullNode(self._node, hull, Application.getInstance().getController().getScene().getRoot())
|
||||
self._node.callDecoration("setConvexHullNode", hull_node)
|
||||
self._node.callDecoration("setConvexHull", hull)
|
||||
|
@ -67,4 +67,3 @@ class ConvexHullJob(Job):
|
|||
hull_node = self._node.getParent().callDecoration("getConvexHullNode")
|
||||
if hull_node:
|
||||
hull_node.setParent(None)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue