Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ToolRepairLayersControl.axaml « Tools « Controls « UVtools.WPF - github.com/sn4k3/UVtools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4080dd5edcfb2ac4e949b35c20da9522cbc70044 (plain)
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.
&#x0a;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.
&#x0a;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.
  &#x0a;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"
          
          ToolTip.Tip="The pixel area threshold above which islands will not be removed by this repair.
&#x0a;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.
&#x0a;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.
&#x0a;
&#x0a;NOTE: Use with caution as this can remove large portions of your model if proper supports have not been added beforehand.
&#x0a;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"
        
        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.
&#x0a;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.
&#x0a;
&#x0a;NOTE: Use with caution as this can remove large portions of your model if proper supports have not been added beforehand.
&#x0a;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.
&#x0a;If enabled, gap closing is attempted before island removal is attempted.
&#x0a;Set iterations to 0 to disable.
&#x0a;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"
        
        ToolTip.Tip="Attempt to repair islands by attaching them to other nearby islands in safe increments.
&#x0a;If enabled, gap closing is attempted before island removal is attempted.
&#x0a;Set iterations to 0 to disable.
&#x0a;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.
&#x0a;This settings can remove noise from a layer, but will also remove fine details.
&#x0a;Set iterations to 0 to disable.
&#x0a;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"
        
        ToolTip.Tip="Remove individual or small clusters of pixels in iterations.
&#x0a;This settings can remove noise from a layer, but will also remove fine details.
&#x0a;Set iterations to 0 to disable.
&#x0a;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>