mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-12 11:32:33 +02:00
e727a097b3
- **Tools:**
- **PCB Exposure:**
- (Add) Allow to scale the drawing sizes per gerber file
- (Add) Allow to invert the drawing polarity per gerber file (#592)
- (Add) Allow to drag and drop files into "Add files" button and grid header
- (Improvement) Do not add empty layers when usable to draw or when draw a all black image
- (Improvement) "Merge all gerbers into one layer" will now draw all gerber into one image instead of perform the Max(of all gerbers pixels), allowing to subtract areas as they are on gerbers
- **Import layers:** Fix error when trying to insert layers
- **Export layers images:** Better compression of contours for SVG export, resulting in smooth curves, better visuals and lower file size
- (Add) Outline: Triangulate
- (Remove) Avalonia.Diagnostics dependency in release mode
292 lines
9.1 KiB
XML
292 lines
9.1 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="950" d:DesignHeight="600"
|
|
x:Class="UVtools.WPF.Controls.Tools.ToolPixelDimmingControl">
|
|
<StackPanel Spacing="10">
|
|
<StackPanel Spacing="10" Orientation="Horizontal">
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
Text="Wall thickness:"
|
|
/>
|
|
<NumericUpDown
|
|
Minimum="0"
|
|
Maximum="1000"
|
|
Width="80"
|
|
Value="{Binding Operation.WallThicknessStart}"
|
|
/>
|
|
|
|
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
Text="To:"
|
|
IsEnabled="{Binding Operation.Chamfer}"
|
|
/>
|
|
<NumericUpDown
|
|
Minimum="0"
|
|
Maximum="1000"
|
|
Width="80"
|
|
Value="{Binding Operation.WallThicknessEnd}"
|
|
IsEnabled="{Binding Operation.Chamfer}"
|
|
/>
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
Text="px"
|
|
IsEnabled="{Binding Operation.Chamfer}"
|
|
/>
|
|
|
|
<CheckBox
|
|
Margin="20,0,0,0"
|
|
Content="Chamfer walls"
|
|
ToolTip.Tip="Allow the number of walls pixels to be gradually varied as the operation progresses from the starting layer to the ending layer."
|
|
IsChecked="{Binding Operation.Chamfer}"
|
|
/>
|
|
|
|
<CheckBox
|
|
Margin="20,0,0,0"
|
|
Content="Dim only walls"
|
|
IsChecked="{Binding Operation.WallsOnly}"/>
|
|
|
|
</StackPanel>
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="10">
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
Text="Alternate the pattern every:"
|
|
/>
|
|
<NumericUpDown
|
|
Minimum="1"
|
|
Maximum="{Binding ushort.MaxValue}"
|
|
Width="150"
|
|
Value="{Binding Operation.AlternatePatternPerLayers}"
|
|
/>
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
Text="layers"
|
|
/>
|
|
</StackPanel>
|
|
|
|
<Grid
|
|
RowDefinitions="Auto,200,10,Auto"
|
|
ColumnDefinitions="450,10,450">
|
|
|
|
<Button Grid.Row="0" Grid.Column="0"
|
|
Content="Load pattern from image"
|
|
HorizontalContentAlignment="Center"
|
|
VerticalAlignment="Stretch"
|
|
HorizontalAlignment="Stretch"
|
|
Command="{Binding LoadPatternFromImage}"
|
|
CommandParameter="False"/>
|
|
|
|
<TextBox
|
|
Grid.Row="1" Grid.Column="0"
|
|
AcceptsReturn="True"
|
|
Watermark="Pattern"
|
|
UseFloatingWatermark="True"
|
|
TextWrapping="NoWrap"
|
|
Text="{Binding Operation.PatternText}"/>
|
|
|
|
<Button Grid.Row="0" Grid.Column="2"
|
|
Content="Load alternate pattern from image"
|
|
HorizontalContentAlignment="Center"
|
|
VerticalAlignment="Stretch"
|
|
HorizontalAlignment="Stretch"
|
|
Command="{Binding LoadPatternFromImage}"
|
|
CommandParameter="True"/>
|
|
<TextBox
|
|
Grid.Row="1" Grid.Column="2"
|
|
AcceptsReturn="True"
|
|
Watermark="Alternate pattern (Optional)"
|
|
UseFloatingWatermark="True"
|
|
TextWrapping="NoWrap"
|
|
Text="{Binding Operation.AlternatePatternText}"/>
|
|
|
|
<Border
|
|
Grid.Row="3" Grid.Column="0"
|
|
BorderBrush="LightGray"
|
|
BorderThickness="1"
|
|
Padding="5"
|
|
>
|
|
|
|
<StackPanel Spacing="10">
|
|
<TextBlock FontWeight="Bold" Text="Pixel dimming generator"/>
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="10">
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
Text="Brightness:"/>
|
|
<NumericUpDown
|
|
Minimum="0"
|
|
Maximum="254"
|
|
Value="{Binding Operation.Brightness}"/>
|
|
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
Text="{Binding Operation.BrightnessPercent, StringFormat=({0}%)}"/>
|
|
</StackPanel>
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="10">
|
|
<Button
|
|
Padding="10"
|
|
Content="Chessboard"
|
|
Width="100"
|
|
Command="{Binding Operation.GeneratePixelDimming}"
|
|
CommandParameter="Chessboard"
|
|
/>
|
|
<Button
|
|
Padding="10"
|
|
Content="Sparse"
|
|
Width="100"
|
|
Command="{Binding Operation.GeneratePixelDimming}"
|
|
CommandParameter="Sparse"
|
|
/>
|
|
<Button
|
|
Padding="10"
|
|
Content="Crosses"
|
|
Width="100"
|
|
Command="{Binding Operation.GeneratePixelDimming}"
|
|
CommandParameter="Crosses"
|
|
/>
|
|
<Button
|
|
Padding="10"
|
|
Content="Strips"
|
|
Width="100"
|
|
Command="{Binding Operation.GeneratePixelDimming}"
|
|
CommandParameter="Strips"
|
|
/>
|
|
</StackPanel>
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="10">
|
|
<Button
|
|
Padding="10"
|
|
Content="Pyramid"
|
|
Width="100"
|
|
Command="{Binding Operation.GeneratePixelDimming}"
|
|
CommandParameter="Pyramid"
|
|
/>
|
|
|
|
<Button
|
|
Padding="10"
|
|
Content="Rhombus"
|
|
Width="100"
|
|
Command="{Binding Operation.GeneratePixelDimming}"
|
|
CommandParameter="Rhombus"
|
|
/>
|
|
<Button
|
|
Padding="10"
|
|
Content="Waves"
|
|
Width="100"
|
|
Command="{Binding Operation.GeneratePixelDimming}"
|
|
CommandParameter="Waves"
|
|
/>
|
|
<Button
|
|
Padding="10"
|
|
Content="Slashes"
|
|
Width="100"
|
|
Command="{Binding Operation.GeneratePixelDimming}"
|
|
CommandParameter="Slashes"
|
|
/>
|
|
</StackPanel>
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="10">
|
|
<Button
|
|
Padding="10"
|
|
Content="Hearts"
|
|
Width="100"
|
|
Command="{Binding Operation.GeneratePixelDimming}"
|
|
CommandParameter="Hearts"
|
|
/>
|
|
<Button
|
|
Padding="10"
|
|
Content="Solid"
|
|
Width="100"
|
|
Command="{Binding Operation.GeneratePixelDimming}"
|
|
CommandParameter="Solid"
|
|
/>
|
|
</StackPanel>
|
|
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<Border
|
|
Grid.Row="3"
|
|
Grid.Column="2"
|
|
BorderBrush="LightGray"
|
|
BorderThickness="1"
|
|
Padding="5"
|
|
>
|
|
|
|
<StackPanel Spacing="10">
|
|
<TextBlock FontWeight="Bold" Text="Infill generator"/>
|
|
|
|
<TextBlock
|
|
TextWrapping="Wrap"
|
|
Text="Warning: This function can generate a large number of resin traps. (Use with caution)"/>
|
|
|
|
<Grid RowDefinitions="Auto,10,Auto"
|
|
ColumnDefinitions="Auto,10,150,5,Auto">
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
Text="Thickness:"/>
|
|
<NumericUpDown
|
|
Grid.Row="0" Grid.Column="2"
|
|
Minimum="5"
|
|
Maximum="10000"
|
|
Value="{Binding Operation.InfillGenThickness}"/>
|
|
<TextBlock Grid.Row="0" Grid.Column="4"
|
|
VerticalAlignment="Center"
|
|
Text="px"/>
|
|
|
|
<TextBlock Grid.Row="2" Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Spacing:"/>
|
|
<NumericUpDown Grid.Row="2" Grid.Column="2"
|
|
Minimum="5"
|
|
Maximum="10000"
|
|
Value="{Binding Operation.InfillGenSpacing}"/>
|
|
<TextBlock Grid.Row="2" Grid.Column="4"
|
|
VerticalAlignment="Center"
|
|
Text="px"/>
|
|
|
|
</Grid>
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="10">
|
|
<Button
|
|
Padding="10"
|
|
Content="Rectilinear"
|
|
Width="100"
|
|
Command="{Binding Operation.GenerateInfill}"
|
|
CommandParameter="Rectilinear"
|
|
/>
|
|
<Button
|
|
Padding="10"
|
|
Content="Square grid"
|
|
Width="100"
|
|
Command="{Binding Operation.GenerateInfill}"
|
|
CommandParameter="Square grid"
|
|
/>
|
|
<Button
|
|
Padding="10"
|
|
Content="Waves"
|
|
Width="100"
|
|
Command="{Binding Operation.GenerateInfill}"
|
|
CommandParameter="Waves"
|
|
/>
|
|
<Button
|
|
Padding="10"
|
|
Content="Lattice"
|
|
Width="100"
|
|
Command="{Binding Operation.GenerateInfill}"
|
|
CommandParameter="Lattice"
|
|
/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
</Grid>
|
|
|
|
|
|
</StackPanel>
|
|
</UserControl>
|