From c1d96faf2cacfd81edac6d3bbd37f4aafdd2900c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Concei=C3=A7=C3=A3o?= Date: Thu, 7 Jan 2021 05:25:13 +0000 Subject: [PATCH] Update README.md --- UVtools.Scripts/README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/UVtools.Scripts/README.md b/UVtools.Scripts/README.md index d91e86e..0e4c9b1 100644 --- a/UVtools.Scripts/README.md +++ b/UVtools.Scripts/README.md @@ -78,11 +78,18 @@ Take **Erode-Bottom.ps1** as bootstrap and minimal script, read each line and st * [Operations - Applies operation over layers, the tools menu on the GUI](https://github.com/sn4k3/UVtools/tree/master/UVtools.Core/Operations) * Example: ```Powershell + # Erode bottom layers $morph = New-Object UVtools.Core.Operations.OperationMorph $morph.MorphOperation = [Emgu.CV.CvEnum.MorphOp]::Erode $morph.IterationsStart = $iterations $morph.LayerIndexEnd = $slicerFile.BottomLayerCount - 1 if(!$morph.Execute($slicerFile, $progress)){ return; } + + # Reuse object and erode normal layers with 1 less iteration + $morph.IterationsStart = $iterations - 1 + $morph.LayerIndexStart = $slicerFile.BottomLayerCount + $morph.LayerIndexEnd = $slicerFile.LayerCount - 1 + if(!$morph.Execute($slicerFile, $progress)){ return; } ``` ## Contribute with your scripts