mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-04 11:14:21 +08:00
CURA-4869 Infill meshes influence layer count in layer view
If a layer is empty, don't add it to the total layer count!
This commit is contained in:
parent
64ea2399a1
commit
0b62a312c3
@ -342,6 +342,11 @@ class SimulationView(View):
|
||||
min_layer_number = sys.maxsize
|
||||
max_layer_number = -sys.maxsize
|
||||
for layer_id in layer_data.getLayers():
|
||||
|
||||
# If a layer doesn't contain any polygons, skip it (for infill meshes taller than print objects
|
||||
if len(layer_data.getLayer(layer_id).polygons) < 1:
|
||||
continue
|
||||
|
||||
# Store the max and min feedrates and thicknesses for display purposes
|
||||
for p in layer_data.getLayer(layer_id).polygons:
|
||||
self._max_feedrate = max(float(p.lineFeedrates.max()), self._max_feedrate)
|
||||
@ -634,4 +639,3 @@ class _CreateTopLayersJob(Job):
|
||||
def cancel(self):
|
||||
self._cancel = True
|
||||
super().cancel()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user