mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 12:39:04 +08:00
Use cheaper convexhull function when not using raft
CURA-7106
This commit is contained in:
parent
1dc688dd4a
commit
1900b0841a
@ -57,13 +57,20 @@ 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):
|
||||
|
||||
if hull_mesh_builder.addConvexPolygonExtrusion(
|
||||
self._hull.getPoints()[::-1], # bottom layer is reversed
|
||||
self._mesh_height - thickness, 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):
|
||||
|
||||
hull_mesh = hull_mesh_builder.build()
|
||||
self.setMeshData(hull_mesh)
|
||||
hull_mesh = hull_mesh_builder.build()
|
||||
self.setMeshData(hull_mesh)
|
||||
|
||||
def getHull(self):
|
||||
return self._hull
|
||||
|
Loading…
x
Reference in New Issue
Block a user