mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 02:07:51 -06:00
Remove convex hull for meshes that don't print geometry
Anti-overhang, Infill and Cutting meshes don't print geometry, so they don't need to push other objects away.
This commit is contained in:
parent
b0144c7f10
commit
ff14db9133
1 changed files with 10 additions and 0 deletions
|
@ -14,6 +14,13 @@ import numpy
|
||||||
## The convex hull decorator is a scene node decorator that adds the convex hull functionality to a scene node.
|
## The convex hull decorator is a scene node decorator that adds the convex hull functionality to a scene node.
|
||||||
# If a scene node has a convex hull decorator, it will have a shadow in which other objects can not be printed.
|
# If a scene node has a convex hull decorator, it will have a shadow in which other objects can not be printed.
|
||||||
class ConvexHullDecorator(SceneNodeDecorator):
|
class ConvexHullDecorator(SceneNodeDecorator):
|
||||||
|
## Meshes that don't need a convex hull
|
||||||
|
#
|
||||||
|
# If these settings are True for any mesh, the mesh does not need to push other meshes away.
|
||||||
|
# Note that Support Mesh is not in here because it actually generates
|
||||||
|
# g-code in the volume of the mesh.
|
||||||
|
_not_printed_mesh_settings = {"anti_overhang_mesh", "infill_mesh", "cutting_mesh"}
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
|
@ -56,6 +63,9 @@ class ConvexHullDecorator(SceneNodeDecorator):
|
||||||
if self._node is None:
|
if self._node is None:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
if (self._node.callDecoration("getStack") and any(self._node.callDecoration("getStack").getProperty(setting, "value") for setting in self._not_printed_mesh_settings)):
|
||||||
|
return None
|
||||||
|
|
||||||
hull = self._compute2DConvexHull()
|
hull = self._compute2DConvexHull()
|
||||||
|
|
||||||
if self._global_stack and self._node:
|
if self._global_stack and self._node:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue