mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-25 03:41:08 -07:00
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.
This commit is contained in:
parent
76723c2412
commit
3703ed9eb0
2 changed files with 55 additions and 15 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue