mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Revert "Merge branch 'bremco-graphics_buffer_update'"
This reverts commit5e60cc6208, reversing changes made toc9feace0fb.
This commit is contained in:
parent
0da37ae6e7
commit
41ebd593c5
8 changed files with 152 additions and 124 deletions
|
|
@ -55,14 +55,6 @@ class LayerPolygon:
|
|||
|
||||
self._jump_mask = self.__jump_map[self._types]
|
||||
self._jump_count = numpy.sum(self._jump_mask)
|
||||
self._cumulative_type_change_counts = numpy.zeros(len(self._types)) # See the comment on the 'cumulativeTypeChangeCounts' property below.
|
||||
last_type = self.types[0]
|
||||
current_type_count = 0
|
||||
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]
|
||||
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])
|
||||
|
||||
|
|
@ -187,10 +179,6 @@ class LayerPolygon:
|
|||
def data(self):
|
||||
return self._data
|
||||
|
||||
@property
|
||||
def vertexCount(self):
|
||||
return self._vertex_end - self._vertex_begin
|
||||
|
||||
@property
|
||||
def elementCount(self):
|
||||
return (self._index_end - self._index_begin) * 2 # The range of vertices multiplied by 2 since each vertex is used twice
|
||||
|
|
@ -219,17 +207,6 @@ class LayerPolygon:
|
|||
def jumpCount(self):
|
||||
return self._jump_count
|
||||
|
||||
@property
|
||||
def cumulativeTypeChangeCounts(self):
|
||||
""" This polygon class stores with a vertex the type of the line to the next vertex. However, in other contexts,
|
||||
other ways of representing this might be more suited to the task (for example, when a vertex can possibly only
|
||||
have _one_ type, it's unavoidable to duplicate vertices when the type is changed). In such situations it's might
|
||||
be useful to know how many times the type has changed, in order to keep the various vertex-indices aligned.
|
||||
|
||||
:return: The total times the line-type changes from one type to another within this LayerPolygon.
|
||||
"""
|
||||
return self._cumulative_type_change_counts
|
||||
|
||||
def getNormals(self) -> numpy.ndarray:
|
||||
"""Calculate normals for the entire polygon using numpy.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue