Skip to content

Commit

Permalink
v3.5.3
Browse files Browse the repository at this point in the history
- (Add) Layer action - Export layers to HTML: Export file information and layers to an html file
- (Change) CXDLP: Validate header and footer value must start with "CXSW3D" instead of force equal to "CXSW3DV2" (#501)
- (Upgrade) .NET from 6.0.5 to 6.0.6
  • Loading branch information
sn4k3 committed Jul 7, 2022
1 parent 9711bb7 commit 6bd3bb7
Show file tree
Hide file tree
Showing 18 changed files with 22,048 additions and 7,072 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 07/07/2022 - v3.5.3

- (Add) Layer action - Export layers to HTML: Export file information and layers to an html file
- (Change) CXDLP: Validate header and footer value must start with "CXSW3D" instead of force equal to "CXSW3DV2" (#501)
- (Upgrade) .NET from 6.0.5 to 6.0.6

## 25/06/2022 - v3.5.2

- **PCB Exposure:**
Expand Down
8 changes: 3 additions & 5 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
- **PCB Exposure:**
- (Add) Gerber file extensions: gko, gtl, gto, gts, gbl, gbo, gbs, gml
- (Fix) Trailing zeros suppression mode and improve the parsing of the coordinate string (#492)
- (Fix) Allow coordinates without number `XYD0*` to indicate `X=0` and `Y=0`
- (Fix) Do not try to fetch apertures lower than index 10 when a `D02` (closed shutter) is found alone
- (Add) Layer action - Export layers to HTML: Export file information and layers to an html file
- (Change) CXDLP: Validate header and footer value must start with "CXSW3D" instead of force equal to "CXSW3DV2" (#501)
- (Upgrade) .NET from 6.0.5 to 6.0.6

Binary file added UVtools.CAD/UVtools-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2,244 changes: 0 additions & 2,244 deletions UVtools.CAD/old/UVtools_logo.ai

This file was deleted.

2,509 changes: 0 additions & 2,509 deletions UVtools.CAD/old/UVtools_logo2.ai

This file was deleted.

2,305 changes: 0 additions & 2,305 deletions UVtools.CAD/old/UVtools_logo3.ai

This file was deleted.

Binary file removed UVtools.CAD/old/UVtools_logo3.png
Binary file not shown.
22 changes: 19 additions & 3 deletions UVtools.Core/FileFormats/CXDLPFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class CXDLPFile : FileFormat
#region Constants
private const byte HEADER_SIZE = 9; // CXSW3DV2
private const string HEADER_VALUE = "CXSW3DV2";
private const string HEADER_VALUE_GENERIC = "CXSW3D";
#endregion

#region Sub Classes
Expand Down Expand Up @@ -128,9 +129,14 @@ public string PrinterModel

public void Validate()
{
if (HeaderSize != HEADER_SIZE || HeaderValue != HEADER_VALUE)
/*if (HeaderSize != HEADER_SIZE || HeaderValue != HEADER_VALUE)
{
throw new FileLoadException("Not a valid CXDLP file!");
}*/

if (HeaderSize - 1 != HeaderValue.Length || !HeaderValue.StartsWith(HEADER_VALUE_GENERIC))
{
throw new FileLoadException($"Invalid header data for CXDLP file.");
}
}

Expand Down Expand Up @@ -386,11 +392,21 @@ public sealed class Footer

public void Validate()
{
if (FooterSize != HEADER_SIZE || FooterValue != HEADER_VALUE)
/*if (FooterSize != HEADER_SIZE || FooterValue != HEADER_VALUE)
{
throw new FileLoadException("Not a valid CXDLP file!");
throw new FileLoadException($"Not a valid CXDLP file! Incorrect footer data.\n{ToString()}");
}*/

if (FooterSize-1 != FooterValue.Length || !FooterValue.StartsWith(HEADER_VALUE_GENERIC))
{
throw new FileLoadException($"Invalid footer data for CXDLP file.\n{ToString()}");
}
}

public override string ToString()
{
return $"{nameof(FooterSize)}: {FooterSize}, {nameof(FooterValue)}: {FooterValue}";
}
}
#endregion

Expand Down
673 changes: 673 additions & 0 deletions UVtools.Core/Operations/OperationLayerExportHtml.cs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion UVtools.Core/UVtools.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<RepositoryUrl>https://github.com/sn4k3/UVtools</RepositoryUrl>
<PackageProjectUrl>https://github.com/sn4k3/UVtools</PackageProjectUrl>
<Description>MSLA/DLP, file analysis, calibration, repair, conversion and manipulation</Description>
<Version>3.5.2</Version>
<Version>3.5.3</Version>
<Copyright>Copyright © 2020 PTRTECH</Copyright>
<PackageIcon>UVtools.png</PackageIcon>
<Platforms>AnyCPU;x64</Platforms>
Expand Down
2 changes: 1 addition & 1 deletion UVtools.InstallerMM/UVtools.InstallerMM.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?define ComponentRules="OneToOne"?>
<!-- SourceDir instructs IsWiX the location of the directory that contains files for this merge module -->
<?define SourceDir="..\publish\UVtools_win-x64_v3.5.2"?>
<?define SourceDir="..\publish\UVtools_win-x64_v3.5.3"?>
<Module Id="UVtools" Language="1033" Version="1.0.0.0">
<Package Id="12aaa1cf-ff06-4a02-abd5-2ac01ac4f83b" Manufacturer="PTRTECH" InstallerVersion="200" Keywords="MSLA, DLP" Description="MSLA/DLP, file analysis, repair, conversion and manipulation" InstallScope="perMachine" Platform="x64" />
<Directory Id="TARGETDIR" Name="SourceDir">
Expand Down
43 changes: 43 additions & 0 deletions UVtools.WPF/Controls/Tools/ToolLayerExportHtmlControl.axaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<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"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="UVtools.WPF.Controls.Tools.ToolLayerExportHtmlControl">
<StackPanel Spacing="10">

<StackPanel Orientation="Horizontal" Spacing="5">
<TextBox Watermark="Output filepath"
UseFloatingWatermark="True"
VerticalAlignment="Center"
IsReadOnly="True"
Width="500"
Text="{Binding Operation.FilePath}"/>
<Button VerticalAlignment="Stretch"
Command="{Binding ChooseFilePath}"
i:Attached.Icon="fa-solid fa-folder"/>
</StackPanel>

<CheckBox Content="Export thumbnails"
ToolTip.Tip="If enabled it will export all the available thumbnails"
IsChecked="{Binding Operation.ExportThumbnails}"/>

<CheckBox Content="Export file raw data structure"
ToolTip.Tip="If enabled it will export the raw data structure of the file"
IsChecked="{Binding Operation.ExportRawData}"/>

<CheckBox Content="Export layer settings"
ToolTip.Tip="If enabled it will export an table with all the layer settings"
IsChecked="{Binding Operation.ExportLayerSettings}"/>

<CheckBox Content="Export GCode"
ToolTip.Tip="If enabled it will export the GCode text"
IsChecked="{Binding Operation.ExportGCode}"/>

<CheckBox Content="Export layer preview"
ToolTip.Tip="If enabled it will export all the layers images and able to navigate between them but will produce a larger and slower file"
IsChecked="{Binding Operation.ExportLayerPreview}"/>

</StackPanel>
</UserControl>
44 changes: 44 additions & 0 deletions UVtools.WPF/Controls/Tools/ToolLayerExportHtmlControl.axaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
using System.Collections.Generic;
using System.IO;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using UVtools.Core.Operations;

namespace UVtools.WPF.Controls.Tools
{
public partial class ToolLayerExportHtmlControl : ToolControl
{
public OperationLayerExportHtml Operation => BaseOperation as OperationLayerExportHtml;
public ToolLayerExportHtmlControl()
{
BaseOperation = new OperationLayerExportHtml(SlicerFile);
if (!ValidateSpawn()) return;
InitializeComponent();
}

private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}

public async void ChooseFilePath()
{
var dialog = new SaveFileDialog
{
Filters = new List<FileDialogFilter>
{
new()
{
Extensions = new List<string>{"html"},
Name = "HTML files"
}
},
InitialFileName = Path.GetFileName(SlicerFile.FileFullPath) + ".html",
Directory = Path.GetDirectoryName(SlicerFile.FileFullPath)
};
var file = await dialog.ShowAsync(ParentWindow);
if (string.IsNullOrWhiteSpace(file)) return;
Operation.FilePath = file;
}
}
}
1 change: 1 addition & 0 deletions UVtools.WPF/MainWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public partial class MainWindow : WindowEx
new() { Tag = new OperationLayerRemove()},
new() { Tag = new OperationLayerExportImage()},
new() { Tag = new OperationLayerExportGif()},
new() { Tag = new OperationLayerExportHtml()},
new() { Tag = new OperationLayerExportSkeleton()},
new() { Tag = new OperationLayerExportHeatMap()},
new() { Tag = new OperationLayerExportMesh()},
Expand Down
1 change: 1 addition & 0 deletions UVtools.WPF/Structures/OperationProfiles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public class OperationProfiles //: IList<Operation>
[XmlElement(typeof(OperationScripting))]

[XmlElement(typeof(OperationLayerExportGif))]
[XmlElement(typeof(OperationLayerExportHtml))]

[XmlElement(typeof(OperationCalibrateExposureFinder))]
[XmlElement(typeof(OperationCalibrateElephantFoot))]
Expand Down
8 changes: 4 additions & 4 deletions UVtools.WPF/UVtools.WPF.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<RepositoryUrl>https://github.com/sn4k3/UVtools</RepositoryUrl>
<RepositoryType>Git</RepositoryType>
<Version>3.5.2</Version>
<Version>3.5.3</Version>
<Platforms>AnyCPU;x64</Platforms>
<PackageIcon>UVtools.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
Expand Down Expand Up @@ -44,9 +44,9 @@
<PackageReference Include="Avalonia.Desktop" Version="0.10.15" />
<PackageReference Include="Avalonia.Diagnostics" Version="0.10.15" />
<PackageReference Include="MessageBox.Avalonia" Version="2.0.1" />
<PackageReference Include="Projektanker.Icons.Avalonia" Version="5.0.2" />
<PackageReference Include="Projektanker.Icons.Avalonia.FontAwesome" Version="5.0.2" />
<PackageReference Include="Projektanker.Icons.Avalonia.MaterialDesign" Version="5.0.2" />
<PackageReference Include="Projektanker.Icons.Avalonia" Version="5.1.0" />
<PackageReference Include="Projektanker.Icons.Avalonia.FontAwesome" Version="5.1.0" />
<PackageReference Include="Projektanker.Icons.Avalonia.MaterialDesign" Version="5.1.0" />
<PackageReference Include="ThemeEditor.Controls.ColorPicker" Version="0.10.14" />
</ItemGroup>
<ItemGroup>
Expand Down
5 changes: 5 additions & 0 deletions build/createRelease.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
#
# https://gist.github.com/lantrix/738ebfa616d5222a8b1db947793bc3fc
#
if($PSVersionTable.PSVersion.Major -lt 7){
Write-Error("Powershell version $($PSVersionTable.PSVersion) is not compatible with this build script.`n
You need at least the version 7.")
return;
}

####################################
### Fix Zip slash ###
Expand Down
21,247 changes: 21,247 additions & 0 deletions wiki/html_export_sample.html

Large diffs are not rendered by default.

0 comments on commit 6bd3bb7

Please sign in to comment.