Apply suggestions from code review

Co-authored-by: Ghostkeeper <Ghostkeeper@users.noreply.github.com>
This commit is contained in:
Remco Burema 2021-10-31 21:21:24 +01:00 committed by GitHub
parent ce61f8ef60
commit acde6ae489
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -63,7 +63,7 @@ class LayerDataBuilder(MeshBuilder):
feedrates = numpy.empty((vertex_count), numpy.float32)
extruders = numpy.empty((vertex_count), numpy.float32)
line_types = numpy.empty((vertex_count), numpy.float32)
vertex_indices = numpy.arange(0, vertex_count, 1, dtype=numpy.float32)
vertex_indices = numpy.arange(0, vertex_count, 1, dtype = numpy.float32)
vertex_offset = 0
index_offset = 0

View file

@ -61,7 +61,7 @@ class LayerPolygon:
for i in range(0, len(self._cumulative_type_change_counts)):
if last_type != self.types[i]:
current_type_count += 1
last_type = self.types[i]
last_type = self.types[i]
self._cumulative_type_change_counts[i] = current_type_count
self._mesh_line_count = len(self._types) - self._jump_count
self._vertex_count = self._mesh_line_count + numpy.sum(self._types[1:] == self._types[:-1])