Files
UVtools/UVtools.WPF/Controls/Tools/ToolPCBExposureControl.axaml
T
Tiago Conceição 816898836b v3.9.0
- **File formats:**
  - (Add) File extension: .gktwo.ctb to `ChituboxFile` to be able to convert files for UniFormation GKtwo under special CTB format
  - (Add) UniFormation GKtwo compatibility under CTB format, if exporting JXS rename to CTB before open
  - (Fix) CTB, CBDDLP, PHOTON, FDG, PHZ: Read and write files larger then 4GB (#608)
- **PCB Exposure:**
  - (Add) Offset X/Y to offset the PCB from it origin
  - (Add) Allow to toggle between "Show preview image cropped by it bounds" and "Show full preview image (The final result)"
  - (Improvement) Use rectangle instead of line for center line primitive (#607)
  - (Fix) Implement rotation to polygon and center line primitives (#607)
  - (Fix) Macros in a single line was not being parsed (#607)
  - (Fix) Invert color per file was not affecting primitives
- **Network printers:**
  - (Add) Socket requests with TCP and UDP
  - (Add) AnyCubic printer preset (However it can't upload a file)
  - (Add) Scripts in request path to allow a first request to fetch data to the final request:
    -  A script starts with **<\?** and ends with **?>**
    -  First parameter is the first request to get response content from
    -  Second parameter is the regex pattern to match content with
    -  Third parameter is the final request that supports a parameter from regex matching group, eg: **{#1}** is match Group[1] value
    -  **Example:** <\? getfiles > {0}\/(\d+\.[\da-zA-Z]+), > printfile,{#1} ?>
  - (Change) Allow to print a filename without send it when upload request path is empty
  - (Fix) Do not show printers with empty requests
- (Change) Default layer compression to Lz4 instead of Png
- (Improvement) Application is now culture aware but set part of `NumberFormat` to the `InvariantCulture.NumberFormat`
- (Improvement) Material cost now show with the current culture currency symbol due previous change
- (Improvement) Better submit of bug reports using sections and forms
- (Improvement) Linux: AppImage now have a help manual with possible arguments and parameters
- (Improvement) macOS: Codesign app on auto-installer and auto-upgrade to bypass arm64 run restriction (#431)
- (Improvement) macOS: Rebuilt arm64 libcvextern.dylib to run with less dependencies (#431)
- (Improvement) macOS: Try to show missing dependencies from openCV (if any) on the error message
- (Fix) UI: layers sorted lexicographically instead of numerically in the issues list view (#611)
- (Fix) PrusaSlicer printer parameters: UniFormation GKtwo
2022-12-01 04:27:44 +00:00

200 lines
9.3 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"
xmlns:i="clr-namespace:Projektanker.Icons.Avalonia;assembly=Projektanker.Icons.Avalonia"
xmlns:controls="clr-namespace:UVtools.WPF.Controls"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="UVtools.WPF.Controls.Tools.ToolPCBExposureControl">
<Grid ColumnDefinitions="Auto,10,350">
<StackPanel Spacing="10">
<Border BorderBrush="Gray" BorderThickness="1" Padding="5"
DragDrop.AllowDrop="True">
<Grid>
<StackPanel Spacing="5" Orientation="Horizontal">
<controls:ButtonWithIcon Padding="5"
Command="{Binding AddFiles}"
Text="Add"
Spacing="5"
Icon="fa-solid fa-plus"/>
<controls:ButtonWithIcon Padding="5"
Command="{Binding AddFilesFromZip}"
Text="Import zip"
Spacing="5"
Icon="fa-solid fa-file-zipper"/>
<controls:ButtonWithIcon Padding="5"
IsEnabled="{Binding SelectedFile, Converter={x:Static ObjectConverters.IsNotNull}}"
Command="{Binding RemoveFiles}"
Text="Remove"
Spacing="5"
Icon="fa-solid fa-minus"/>
</StackPanel>
<StackPanel HorizontalAlignment="Right"
Spacing="5" Orientation="Horizontal">
<controls:ButtonWithIcon Padding="5"
IsEnabled="{Binding Operation.Files.Count}"
Command="{Binding Operation.Sort}"
Text="Sort ASC"
Spacing="5"
Icon="fa-solid fa-sort-alpha-up"/>
<controls:ButtonWithIcon
IsEnabled="{Binding Operation.Files.Count}"
Padding="5" Command="{Binding ClearFiles}"
Text="Clear"
Spacing="5"
Icon="fa-solid fa-xmark"/>
<TextBlock
VerticalAlignment="Center"
Text="{Binding Operation.Files.Count, StringFormat=Files: {0}}"/>
</StackPanel>
</Grid>
</Border>
<DataGrid Name="FilesDataGrid"
BorderBrush="Gray" BorderThickness="1"
CanUserReorderColumns="False"
CanUserResizeColumns="False"
CanUserSortColumns="True"
GridLinesVisibility="Horizontal"
SelectionMode="Extended"
ClipboardCopyMode="IncludeHeader"
MinHeight="150"
MaxHeight="400"
Width="508"
Items="{Binding Operation.Files}"
SelectedItem="{Binding SelectedFile}"
DragDrop.AllowDrop="True">
<DataGrid.Columns>
<DataGridTextColumn Header="Filename"
Binding="{Binding FileName}"
IsReadOnly="True"
Width="*" />
<DataGridTemplateColumn Header="Size scale"
Width="130">
<DataTemplate>
<NumericUpDown Increment="0.05"
Minimum="0.01"
Maximum="100"
FormatString="F2"
Value="{Binding SizeScale}">
</NumericUpDown>
</DataTemplate>
</DataGridTemplateColumn>
<DataGridCheckBoxColumn Header="Invert"
Binding="{Binding InvertPolarity}"
Width="Auto" />
</DataGrid.Columns>
</DataGrid>
<Grid RowDefinitions="Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto"
ColumnDefinitions="Auto,10,400">
<ToggleSwitch Grid.Row="0" Grid.Column="2"
IsChecked="{Binding Operation.MergeFiles}"
OnContent="Draw all gerber files into same layer"
OffContent="Create one layer per gerber file"/>
<TextBlock Grid.Row="2" Grid.Column="0"
VerticalAlignment="Center"
Text="Layer height:"/>
<NumericUpDown Grid.Row="2" Grid.Column="2"
Classes="ValueLabel ValueLabel_mm"
Increment="0.01"
Minimum="0.01"
Maximum="500"
FormatString="F3"
Value="{Binding Operation.LayerHeight}"/>
<TextBlock Grid.Row="4" Grid.Column="0"
VerticalAlignment="Center"
Text="Exposure time:"/>
<NumericUpDown Grid.Row="4" Grid.Column="2"
Classes="ValueLabel ValueLabel_s"
Increment="0.5"
Minimum="0.5"
Maximum="1000"
FormatString="F2"
Value="{Binding Operation.ExposureTime}"/>
<TextBlock Grid.Row="6" Grid.Column="0"
VerticalAlignment="Center"
Text="Size rounding:"/>
<ComboBox Grid.Row="6" Grid.Column="2"
HorizontalAlignment="Stretch"
Items="{Binding Operation.SizeMidpointRounding, Converter={StaticResource EnumToCollectionConverter}, Mode=OneTime}"
SelectedItem="{Binding Operation.SizeMidpointRounding, Converter={StaticResource FromValueDescriptionToEnumConverter}}"/>
<TextBlock Grid.Row="8" Grid.Column="0"
VerticalAlignment="Center"
ToolTip.Tip="Offset the PCB origin.
&#x0a;Use the 'Show full preview image (The final result)' option to preview the resulting position."
Text="Offset X/Y:"/>
<StackPanel Grid.Row="8" Grid.Column="2"
Orientation="Horizontal" Spacing="20">
<NumericUpDown Classes="ValueLabel ValueLabel_mm"
Increment="0.05"
Minimum="-10000"
Maximum="10000"
FormatString="F2"
Width="187"
Value="{Binding Operation.OffsetX}"/>
<NumericUpDown Classes="ValueLabel ValueLabel_mm"
Increment="0.05"
Minimum="-10000"
Maximum="10000"
FormatString="F2"
Width="187"
Value="{Binding Operation.OffsetY}"/>
</StackPanel>
<TextBlock Grid.Row="10" Grid.Column="0"
VerticalAlignment="Center"
Text="Options:"/>
<StackPanel Grid.Row="10" Grid.Column="2"
Orientation="Horizontal" Spacing="20">
<CheckBox VerticalAlignment="Center"
IsChecked="{Binding Operation.Mirror}"
Content="Mirror"/>
<CheckBox VerticalAlignment="Center"
IsChecked="{Binding Operation.InvertColor}"
Content="Invert color"/>
<CheckBox VerticalAlignment="Center"
IsChecked="{Binding Operation.EnableAntiAliasing}"
Content="Enable Anti-Aliasing"/>
</StackPanel>
</Grid>
</StackPanel>
<StackPanel Grid.Column="2" Orientation="Vertical" Spacing="10">
<ToggleSwitch IsChecked="{Binding CropPreview}"
OnContent="Show preview image cropped by it bounds"
OffContent="Show full preview image (The final result)"/>
<Image Stretch="Uniform"
MaxHeight="700"
Source="{Binding PreviewImage}"/>
<TextBlock Text="{Binding PreviewImage.Size, StringFormat=Size: {0}}" HorizontalAlignment="Center"/>
</StackPanel>
</Grid>
</UserControl>