diff options
Diffstat (limited to 'UVtools.Core/Layer/LayerManager.cs')
-rw-r--r-- | UVtools.Core/Layer/LayerManager.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/UVtools.Core/Layer/LayerManager.cs b/UVtools.Core/Layer/LayerManager.cs index b9585c3..08d342c 100644 --- a/UVtools.Core/Layer/LayerManager.cs +++ b/UVtools.Core/Layer/LayerManager.cs @@ -585,6 +585,19 @@ namespace UVtools.Core SlicerFile?.UpdatePrintTime(); } + public IEnumerable<Layer> GetSamePositionedLayers() + { + var layers = new List<Layer>(); + for (int layerIndex = 1; layerIndex < LayerCount; layerIndex++) + { + var layer = this[layerIndex]; + if (this[layerIndex - 1].PositionZ != layer.PositionZ) continue; + layers.Add(layer); + } + + return layers; + } + public Rectangle GetBoundingRectangle(OperationProgress progress = null) { if (!_boundingRectangle.IsEmpty || LayerCount == 0 || this[0] is null) return _boundingRectangle; |