mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-19 20:57:49 -06:00
Don't offset hull if offset is 0
This might speed things up a bit.
This commit is contained in:
parent
0abf455084
commit
b25a6423df
1 changed files with 10 additions and 7 deletions
|
@ -258,6 +258,7 @@ class ConvexHullDecorator(SceneNodeDecorator):
|
||||||
# influences the collision area.
|
# influences the collision area.
|
||||||
def _offsetHull(self, convex_hull):
|
def _offsetHull(self, convex_hull):
|
||||||
horizontal_expansion = self._getSettingProperty("xy_offset", "value")
|
horizontal_expansion = self._getSettingProperty("xy_offset", "value")
|
||||||
|
if horizontal_expansion != 0:
|
||||||
expansion_polygon = Polygon(numpy.array([
|
expansion_polygon = Polygon(numpy.array([
|
||||||
[-horizontal_expansion, -horizontal_expansion],
|
[-horizontal_expansion, -horizontal_expansion],
|
||||||
[-horizontal_expansion, horizontal_expansion],
|
[-horizontal_expansion, horizontal_expansion],
|
||||||
|
@ -265,6 +266,8 @@ class ConvexHullDecorator(SceneNodeDecorator):
|
||||||
[horizontal_expansion, -horizontal_expansion]
|
[horizontal_expansion, -horizontal_expansion]
|
||||||
], numpy.float32))
|
], numpy.float32))
|
||||||
return convex_hull.getMinkowskiHull(expansion_polygon)
|
return convex_hull.getMinkowskiHull(expansion_polygon)
|
||||||
|
else:
|
||||||
|
return convex_hull
|
||||||
|
|
||||||
def _onChanged(self, *args):
|
def _onChanged(self, *args):
|
||||||
self._raft_thickness = self._build_volume.getRaftThickness()
|
self._raft_thickness = self._build_volume.getRaftThickness()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue