Use cheaper convexhull function when not using raft

CURA-7106
This commit is contained in:
Jaime van Kessel 2020-06-23 12:03:15 +02:00
parent 1dc688dd4a
commit 1900b0841a
No known key found for this signature in database
GPG key ID: 3710727397403C91

View file

@ -57,7 +57,14 @@ class ConvexHullNode(SceneNode):
self._hull = hull
if self._hull:
hull_mesh_builder = MeshBuilder()
if self._thickness == 0:
if hull_mesh_builder.addConvexPolygon(
self._hull.getPoints()[::], # bottom layer is reversed
self._mesh_height, color = self._color):
hull_mesh = hull_mesh_builder.build()
self.setMeshData(hull_mesh)
else:
if hull_mesh_builder.addConvexPolygonExtrusion(
self._hull.getPoints()[::-1], # bottom layer is reversed
self._mesh_height - thickness, self._mesh_height, color = self._color):