mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-05 16:51:12 -07:00
Busy with layer_view options
This commit is contained in:
parent
0f2fb86cd9
commit
1217281727
7 changed files with 187 additions and 47 deletions
|
|
@ -38,7 +38,7 @@ class LayerPolygon:
|
|||
|
||||
# Buffering the colors shouldn't be necessary as it is not
|
||||
# re-used and can save alot of memory usage.
|
||||
self._color_map = self.__color_map * [1, 1, 1, self._extruder] # The alpha component is used to store the extruder nr
|
||||
self._color_map = self.__color_map # * [1, 1, 1, self._extruder] # The alpha component is used to store the extruder nr
|
||||
self._colors = self._color_map[self._types]
|
||||
|
||||
# When type is used as index returns true if type == LayerPolygon.InfillType or type == LayerPolygon.SkinType or type == LayerPolygon.SupportInfillType
|
||||
|
|
@ -67,7 +67,7 @@ class LayerPolygon:
|
|||
|
||||
## build
|
||||
# line_thicknesses: array with type as index and thickness as value
|
||||
def build(self, vertex_offset, index_offset, vertices, colors, line_dimensions, indices):
|
||||
def build(self, vertex_offset, index_offset, vertices, colors, line_dimensions, extruders, indices):
|
||||
if (self._build_cache_line_mesh_mask is None) or (self._build_cache_needed_points is None ):
|
||||
self.buildCache()
|
||||
|
||||
|
|
@ -94,6 +94,8 @@ class LayerPolygon:
|
|||
line_dimensions[self._vertex_begin:self._vertex_end, 0] = numpy.tile(self._line_widths, (1, 2)).reshape((-1, 1))[needed_points_list.ravel()][:, 0]
|
||||
line_dimensions[self._vertex_begin:self._vertex_end, 1] = numpy.tile(self._line_thicknesses, (1, 2)).reshape((-1, 1))[needed_points_list.ravel()][:, 0]
|
||||
|
||||
extruders[self._vertex_begin:self._vertex_end] = float(self._extruder)
|
||||
|
||||
# The relative values of begin and end indices have already been set in buildCache, so we only need to offset them to the parents offset.
|
||||
self._index_begin += index_offset
|
||||
self._index_end += index_offset
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue