mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06: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
1 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue