mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-11 11:02:32 +02:00
8e4995a6a5
- **UVtoolsCmd:**
- **print-properties:**
- (Change) `-b`, `--base` option to `-a`, `-all` to indicate all properties and sub-properties, now defaults to only show base properties
- (Add) `-r`, `--range` option to prints only the matching layer(s) index(es) in a range
- (Add) `-i`, `--indexes` option to prints only the matching layer(s) index(es)
- (Add) Command: `set-properties <input-file> <property=value> Set properties in a file or to it layers with new values`
- (Add) Command: `print-issues <input-file> Detect and print issues in a file`
- (Add) New option to the `run` command: `-p, --property <property=value> Set a property with a new value (Compatible with operations only)`
- (Remove) Command: `print-layers` as it has been moved to `print-properties`, use `-r :` to obtain same result as default on `print-layers`
- **Issues:**
- (Fix) Issues groups with only one issue was displaying the wrong area value
- (Fix) Volume incorrectly calculated, resulting in a high value for group of issues
- (Fix) Incorrect calculation of the bounding rectangle for a group of issues
- **Repair layers:**
- (Add) Switch to opt between "Re-detect the selected issues before repair" and "Use and repair the previous detected issues" (Default)
- (Improvement) Do not allow to run the tool if there are no detected issues when the option "Use and repair the previous detected issues" is selected
- (Improvement) Linux: Recompile libcvextern.so on a older system to be able to run on both older and newest system (#603)
- (Upgrade) .NET from 6.0.10 to 6.0.11
228 lines
11 KiB
XML
228 lines
11 KiB
XML
<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"
|
|
MinWidth="550"
|
|
x:Class="UVtools.WPF.Controls.Tools.ToolRepairLayersControl">
|
|
|
|
<StackPanel Orientation="Vertical" Spacing="10">
|
|
<ToggleSwitch IsChecked="{Binding Operation.DetectIssues}"
|
|
OnContent="Re-detect the selected issues before repair"
|
|
OffContent="Uses and repair the previous detected issues"/>
|
|
|
|
<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"/>
|
|
|
|
<!-- Repair resin traps -->
|
|
<CheckBox
|
|
IsChecked="{Binding Operation.RepairSuctionCups}"
|
|
ToolTip.Tip="If enabled, repair will drill suction cup layers with a vertical hole at the specified size."
|
|
Content="Repair suction cups"/>
|
|
|
|
|
|
<!-- 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 RowDefinitions="Auto,10,Auto,10,Auto,10,Auto,10,Auto" ColumnDefinitions="Auto,10,190,5,Auto">
|
|
|
|
<!-- Remove islands equal or smaller than -->
|
|
<TextBlock Grid.Row="0" Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
IsEnabled="{Binding Operation.RepairIslands}"
|
|
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.
|
|

NOTE: This repair method requires the issues to be manually computed before hand."
|
|
Text="Remove islands equal or smaller than:"/>
|
|
|
|
<NumericUpDown Grid.Row="0" Grid.Column="2"
|
|
Classes="ValueLabel ValueLabel_px"
|
|
Increment="1"
|
|
Minimum="0"
|
|
Maximum="65535"
|
|
IsEnabled="{Binding Operation.RepairIslands}"
|
|
|
|
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.
|
|

NOTE: This repair method requires the issues to be manually computed before hand."
|
|
Value="{Binding Operation.RemoveIslandsBelowEqualPixelCount}"/>
|
|
|
|
|
|
|
|
|
|
<!-- Recursively remove islands for up to -->
|
|
<TextBlock Grid.Row="2" Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
IsEnabled="{Binding Operation.RepairIslands}"
|
|
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.
|
|

This repair method requires the issues to be manually computed before hand.
|
|

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"
|
|
Classes="ValueLabel ValueLabel_layers"
|
|
Increment="1"
|
|
Minimum="0"
|
|
Maximum="65535"
|
|
IsEnabled="{Binding Operation.RepairIslands}"
|
|
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.
|
|

This repair method requires the issues to be manually computed before hand.
|
|

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"
|
|
IsEnabled="{Binding Operation.RepairIslands}"
|
|
Text="layers"/>
|
|
|
|
|
|
<!-- Attempt to attach islands below -->
|
|
<TextBlock Grid.Row="4" Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
IsEnabled="{Binding Operation.RepairIslands}"
|
|
ToolTip.Tip="Attempt to attach the islands down to n layers when found a safe mass below to support it.
|
|

NOTE: Use with caution and with a low value, this can mostly be used when there are some missed support layers in between as observed from the issues.
|
|

This repair method requires the issues to be manually computed before hand.
|
|

Use 0 to disable this repair method."
|
|
Text="Attempt to attach islands down to:"/>
|
|
|
|
<NumericUpDown Grid.Row="4" Grid.Column="2"
|
|
Classes="ValueLabel ValueLabel_layers"
|
|
Increment="1"
|
|
Minimum="0"
|
|
Maximum="65535"
|
|
IsEnabled="{Binding Operation.RepairIslands}"
|
|
ToolTip.Tip="Attempt to attach the islands down to n layers when found a safe mass below to support it.
|
|

NOTE: Use with caution and with a low value, this can mostly be used when there are some missed support layers in between as observed from the issues.
|
|

This repair method requires the issues to be manually computed before hand.
|
|

Use 0 to disable this repair method."
|
|
Value="{Binding Operation.AttachIslandsBelowLayers}"/>
|
|
|
|
<TextBlock Grid.Row="4" Grid.Column="4"
|
|
VerticalAlignment="Center"
|
|
IsEnabled="{Binding Operation.RepairIslands}"
|
|
Text="layers"/>
|
|
|
|
<!-- Overlap resin traps -->
|
|
<TextBlock Grid.Row="6" Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
IsEnabled="{Binding Operation.RepairResinTraps}"
|
|
ToolTip.Tip="Overlap and expand resin trap area by this value.
|
|

Use this field when you have aggressive blur on model and a visible margin between white pixels and the resin trap highlight area.
|
|

(0 = Fill the found area without overlap nearby pixels)"
|
|
Text="Overlap and expand resin traps by:"/>
|
|
|
|
<NumericUpDown Grid.Row="6" Grid.Column="2"
|
|
Classes="ValueLabel ValueLabel_px"
|
|
Increment="1"
|
|
Minimum="0"
|
|
Maximum="65535"
|
|
IsEnabled="{Binding Operation.RepairResinTraps}"
|
|
ToolTip.Tip="Overlap and expand resin trap area by this value.
|
|

Use this field when you have aggressive blur on model and a visible margin between white pixels and the resin trap highlight area.
|
|

(0 = Fill the found area without overlap nearby pixels)"
|
|
Value="{Binding Operation.ResinTrapsOverlapBy}"/>
|
|
|
|
<!-- Suction cup vent hole -->
|
|
<TextBlock Grid.Row="8" Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
IsEnabled="{Binding Operation.RepairSuctionCups}"
|
|
ToolTip.Tip="Hole diameter to drill the layers with"
|
|
Text="Suction cup vent hole diameter:"/>
|
|
|
|
<NumericUpDown Grid.Row="8" Grid.Column="2"
|
|
Classes="ValueLabel ValueLabel_px"
|
|
Increment="1"
|
|
Minimum="4"
|
|
Maximum="255"
|
|
IsEnabled="{Binding Operation.RepairSuctionCups}"
|
|
ToolTip.Tip="Hole diameter to drill the layers with"
|
|
Value="{Binding Operation.SuctionCupsVentHole}"/>
|
|
</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"
|
|
|
|
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"
|
|
|
|
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>
|