diff options
author | Jack Ha <j.ha@ultimaker.com> | 2016-07-26 12:45:06 +0300 |
---|---|---|
committer | Jack Ha <j.ha@ultimaker.com> | 2016-07-26 12:45:06 +0300 |
commit | 3703ed9eb061caa4e2e0cf50bcafb6205b473b03 (patch) | |
tree | a9dfa1ad72841fce7335431ee4a2528f6743cc25 /cura/ConvexHullNode.py | |
parent | 76723c2412d33cc54000b970dcea12dffd7fe20c (diff) |
Fix overlapping object with raft/brim/skirt in one-at-a-time mode.
head_and_fans is extended by an extra margin to prevent overlapping.
CURA-1776
Also fixed: showing one-at-a-time head convex at start.
Diffstat (limited to 'cura/ConvexHullNode.py')
-rw-r--r-- | cura/ConvexHullNode.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/cura/ConvexHullNode.py b/cura/ConvexHullNode.py index f73db2a597..703dfb0bed 100644 --- a/cura/ConvexHullNode.py +++ b/cura/ConvexHullNode.py @@ -28,15 +28,16 @@ class ConvexHullNode(SceneNode): # The y-coordinate of the convex hull mesh. Must not be 0, to prevent z-fighting. self._mesh_height = 0.1 + self._thickness = thickness + # The node this mesh is "watching" self._node = node + self._convex_hull_head_mesh = None + self._node.decoratorsChanged.connect(self._onNodeDecoratorsChanged) self._onNodeDecoratorsChanged(self._node) - self._convex_hull_head_mesh = None - self._hull = hull - self._thickness = thickness if self._hull: hull_mesh_builder = MeshBuilder() @@ -46,11 +47,6 @@ class ConvexHullNode(SceneNode): hull_mesh = hull_mesh_builder.build() self.setMeshData(hull_mesh) - convex_hull_head = self._node.callDecoration("getConvexHullHead") - if convex_hull_head: - convex_hull_head_builder = MeshBuilder() - convex_hull_head_builder.addConvexPolygon(convex_hull_head.getPoints(), self._mesh_height-thickness) - self._convex_hull_head_mesh = convex_hull_head_builder.build() def getHull(self): return self._hull @@ -78,6 +74,12 @@ class ConvexHullNode(SceneNode): def _onNodeDecoratorsChanged(self, node): self._color = Color(35, 35, 35, 0.5) + convex_hull_head = self._node.callDecoration("getConvexHullHead") + if convex_hull_head: + convex_hull_head_builder = MeshBuilder() + convex_hull_head_builder.addConvexPolygon(convex_hull_head.getPoints(), self._mesh_height-self._thickness) + self._convex_hull_head_mesh = convex_hull_head_builder.build() + if not node: return |