mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 10:47:49 -06:00
Fix convex hull and other bits so they use the new API
This commit is contained in:
parent
a8c302a8ed
commit
792c3426f8
3 changed files with 4 additions and 4 deletions
|
@ -45,7 +45,7 @@ class ConvexHullJob(Job):
|
||||||
# Then, do a Minkowski hull with a simple 1x1 quad to outset and round the normal convex hull.
|
# 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.
|
# This is done because of rounding errors.
|
||||||
hull = hull.getMinkowskiHull(Polygon(numpy.array([[-1, -1], [-1, 1], [1, 1], [1, -1]], numpy.float32)))
|
hull = hull.getMinkowskiHull(Polygon(numpy.array([[-1, -1], [-1, 1], [1, 1], [1, -1]], numpy.float32)))
|
||||||
settings = Application.getInstance().getActiveMachine()
|
settings = Application.getInstance().getMachineManager().getActiveMachineInstance()
|
||||||
|
|
||||||
if settings.getSettingValueByKey("print_sequence") == "One at a time" and not self._node.getParent().callDecoration("isGroup"):
|
if settings.getSettingValueByKey("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
|
# Printing one at a time and it's not an object in a group
|
||||||
|
|
|
@ -53,7 +53,7 @@ class ConvexHullNode(SceneNode):
|
||||||
|
|
||||||
def render(self, renderer):
|
def render(self, renderer):
|
||||||
if not self._material:
|
if not self._material:
|
||||||
self._material = renderer.createMaterial(Resources.getPath(Resources.ShadersLocation, "basic.vert"), Resources.getPath(Resources.ShadersLocation, "color.frag"))
|
self._material = renderer.createMaterial(Resources.getPath(Resources.Shaders, "basic.vert"), Resources.getPath(Resources.Shaders, "color.frag"))
|
||||||
|
|
||||||
self._material.setUniformValue("u_color", Color(35, 35, 35, 128))
|
self._material.setUniformValue("u_color", Color(35, 35, 35, 128))
|
||||||
if self.getParent():
|
if self.getParent():
|
||||||
|
|
|
@ -17,7 +17,7 @@ class OneAtATimeIterator(Iterator.Iterator):
|
||||||
def _fillStack(self):
|
def _fillStack(self):
|
||||||
node_list = []
|
node_list = []
|
||||||
for node in self._scene_node.getChildren():
|
for node in self._scene_node.getChildren():
|
||||||
if node.getBoundingBox().height > Application.getInstance().getActiveMachine().getSettingValueByKey("gantry_height"):
|
if node.getBoundingBox().height > Application.getInstance().getMachineManager().getActiveMachineInstance().getSettingValueByKey("gantry_height"):
|
||||||
return
|
return
|
||||||
if node.callDecoration("getConvexHull"):
|
if node.callDecoration("getConvexHull"):
|
||||||
node_list.append(node)
|
node_list.append(node)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue