mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 02:37:49 -06:00
Use cheaper convexhull function when not using raft
CURA-7106
This commit is contained in:
parent
1dc688dd4a
commit
1900b0841a
1 changed files with 12 additions and 5 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue