1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
|
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="UVtools.WPF.Controls.Tools.ToolRepairLayersControl">
<StackPanel Orientation="Vertical" Spacing="10">
<StackPanel Orientation="Horizontal" Spacing="20">
<!-- Repair islands -->
<CheckBox
IsChecked="{Binding Operation.RepairIslands}"
ToolTip.Tip="If enabled, repair will first attempt to eliminate islands smaller than the pixel area removal threshold, and then runs the “gap closure” technique."
Content="Repair islands"
/>
<!-- Repair resin traps -->
<CheckBox
IsChecked="{Binding Operation.RepairResinTraps}"
ToolTip.Tip="If enabled, repair will fill black pixels found within a resin trap with white pixels.

Hollow areas will become solid."
Content="Repair resin traps"
/>
<!-- Remove empty layers -->
<CheckBox
IsChecked="{Binding Operation.RemoveEmptyLayers}"
ToolTip.Tip="If enabled, repair will remove all layers with no white pixels.

The model will be recalculated to ensure the correct Z height is maintained."
Content="Remove empty layers"
/>
</StackPanel>
<Grid ColumnDefinitions="Auto,10,150,5,Auto"
RowDefinitions="Auto,10,Auto">
<!-- Remove islands equal or smaller than -->
<TextBlock
Grid.Row="0"
Grid.Column="0"
VerticalAlignment="Center"
ToolTip.Tip="The pixel area threshold above which islands will not be removed by this repair.

Islands remaining after repair will require supports to be added manually."
Text="Remove islands equal or smaller than:"/>
<NumericUpDown
Grid.Row="0"
Grid.Column="2"
Increment="1"
Minimum="0"
Maximum="65535"
ClipValueToMinMax="True"
ToolTip.Tip="The pixel area threshold above which islands will not be removed by this repair.

Islands remaining after repair will require supports to be added manually."
Value="{Binding Operation.RemoveIslandsBelowEqualPixelCount}"
/>
<TextBlock
Grid.Row="0"
Grid.Column="4"
VerticalAlignment="Center"
Text="px"/>
<!-- Recursively remove islands for up to -->
<TextBlock
Grid.Row="2"
Grid.Column="0"
VerticalAlignment="Center"
ToolTip.Tip="If the removal of an island in the current layer results in a new island being introduce in the layer above, the island in the layer above will also be automatically removed.

This process will repeat for up to the number of layers specified. Set to 0 to repeat until there are no more valid islands to remove.



NOTE: Use with caution as this can remove large portions of your model if proper supports have not been added beforehand.

Using this function with high values can be extremely slow depending on resolution and issue count."
Text="Recursively remove islands for up to:"/>
<NumericUpDown
Grid.Row="2"
Grid.Column="2"
Increment="1"
Minimum="0"
Maximum="65535"
ClipValueToMinMax="True"
ToolTip.Tip="If the removal of an island in the current layer results in a new island being introduce in the layer above, the island in the layer above will also be automatically removed.

This process will repeat for up to the number of layers specified. Set to 0 to repeat until there are no more valid islands to remove.



NOTE: Use with caution as this can remove large portions of your model if proper supports have not been added beforehand.

Using this function with high values can be extremely slow depending on resolution and issue count."
Value="{Binding Operation.RemoveIslandsRecursiveIterations}"
/>
<TextBlock
Grid.Row="2"
Grid.Column="4"
VerticalAlignment="Center"
Text="layers"/>
</Grid>
<Grid
IsVisible="{Binding ParentWindow.IsCheckBox1Checked}"
RowDefinitions="Auto,10,Auto"
ColumnDefinitions="Auto,10,155">
<!-- Gap closing iterations -->
<TextBlock
Grid.Row="0"
Grid.Column="0"
VerticalAlignment="Center"
ToolTip.Tip="Attempt to repair islands by attaching them to other nearby islands in safe increments.

If enabled, gap closing is attempted before island removal is attempted.

Set iterations to 0 to disable.

WARNING: Using high iteration values can destroy your model. Low values recommended."
Text="Gap closing iterations:"/>
<NumericUpDown
Grid.Row="0"
Grid.Column="2"
Increment="1"
Minimum="0"
Maximum="255"
ClipValueToMinMax="True"
ToolTip.Tip="Attempt to repair islands by attaching them to other nearby islands in safe increments.

If enabled, gap closing is attempted before island removal is attempted.

Set iterations to 0 to disable.

WARNING: Using high iteration values can destroy your model. Low values recommended."
Value="{Binding Operation.GapClosingIterations}"
/>
<!-- Noise removal iterations: -->
<TextBlock
Grid.Row="2"
Grid.Column="0"
VerticalAlignment="Center"
ToolTip.Tip="Remove individual or small clusters of pixels in iterations.

This settings can remove noise from a layer, but will also remove fine details.

Set iterations to 0 to disable.

WARNING: Even at low settings this operation has the potential to introduce new islands, as it may remove supporting material from previous layers."
Text="Noise removal iterations:"/>
<NumericUpDown
Grid.Row="2"
Grid.Column="2"
Increment="1"
Minimum="0"
Maximum="255"
ClipValueToMinMax="True"
ToolTip.Tip="Remove individual or small clusters of pixels in iterations.

This settings can remove noise from a layer, but will also remove fine details.

Set iterations to 0 to disable.

WARNING: Even at low settings this operation has the potential to introduce new islands, as it may remove supporting material from previous layers."
Value="{Binding Operation.NoiseRemovalIterations}"
/>
</Grid>
</StackPanel>
</UserControl>
|