mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-10 08:17:49 -06:00
Fix LayerData to use the right indices for polygons
This commit is contained in:
parent
b751c90813
commit
924cbaaac5
1 changed files with 4 additions and 1 deletions
|
@ -37,7 +37,7 @@ class Polygon():
|
||||||
self._type = type
|
self._type = type
|
||||||
self._begin = mesh._vertex_count
|
self._begin = mesh._vertex_count
|
||||||
mesh.addVertices(data)
|
mesh.addVertices(data)
|
||||||
self._end = self._begin + len(data)
|
self._end = self._begin + len(data) - 1
|
||||||
|
|
||||||
color = None
|
color = None
|
||||||
if type == self.Inset0Type:
|
if type == self.Inset0Type:
|
||||||
|
@ -60,6 +60,9 @@ class Polygon():
|
||||||
for i in range(self._begin, self._end):
|
for i in range(self._begin, self._end):
|
||||||
indices.append(i)
|
indices.append(i)
|
||||||
indices.append(i + 1)
|
indices.append(i + 1)
|
||||||
|
|
||||||
|
indices.append(self._end)
|
||||||
|
indices.append(self._begin)
|
||||||
mesh.addIndices(numpy.array(indices, dtype=numpy.int32))
|
mesh.addIndices(numpy.array(indices, dtype=numpy.int32))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue