* (Add) UVtools now notify when a new version available is detected
* (Add) Mutator "Flip"
* (Add) Mutator "Rotate"
* (Add) User Settings - Many parameters can now be customized to needs
* (Add) File load elapsed time into Title bar
* (Add) Outline - Print Volume bounds
* (Add) Outline - Layer bounds
* (Add) Outline - Hollow areas
* (Add) Double click layer picture to Zoom To Fit
* (Improvement) Huge performance boost in layer reparing and in every mutator
* (Improvement) Layer preview is now faster
* (Improvement) Islands detection is now better and don't skip any pixel, more islands will show or the region will be bigger
* (Improvement) Islands search are now faster, it will jump from island to insland instead of search in every pixel by pixel
* (Improvement) ResinTrap detection and corrected some cases where it can't detect a drain
* (Improvement) Better memory optimization by dispose all objects on operations
* (Improvement) Image engine changed to use only OpenCV Mat instead of two and avoid converting from one to another, as result there's a huge performance gain in some operations (#6)
* (Improvement) UVtools now rely on UVtools.Core, and drop the UVtools.Parser. The Core now perform all operations and transformations inplace of the GUI
* (Improvement) If error occur during save it will show a message with the error
* (Improvement) When rotate layer it will zoom to fit
* (Improvement) Allow zoom to fit to print volume area instead of whole build volume
* (Removed) ImageSharp dependency
* (Removed) UVtools.Parser project
* (Fix) Nova3D Elfin printer values changed to Display Width : 131mm / Height : 73mm & Screen X: 2531 / Y: 1410 (#5)
* (Fix) Fade resizes make image offset a pixel from layer to layer because of integer placement, now it matain the correct position
* (Fix) sl1: AbsoluteCorrection, GammaCorrection, MinExposureTime, MaxExposureTime, FastTiltTime, SlowTiltTime and AreaFill was byte and float values prevents the file from open (#4)
* (Fix) zcodex: XCorrection and YCorrection was byte and float values prevents the file from open (#4)
* (Fix) cws: XCorrection and YCorrection was byte and float values prevents the file from open (#4)
* (Fix) cws: Wrong # char on .gcode file prevent from printing (#4)
This commit is contained in:
Tiago Conceição
2020-06-29 05:18:33 +01:00
parent 6d401eb774
commit 2cbb3f377a
45 changed files with 6798 additions and 728 deletions
+5 -3
View File
@@ -23,10 +23,12 @@ A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Files**
Were possible attach the problematic file, both source and output file if applicable
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Version [e.g. 22]
- OS: [e.g. Windows 10 x64 v2004]
**Exceptions Log file**
In some unexpected exceptions errors will generate and save a log file under appfolder/Logs/AppErrors.
If present you can attach the log file here. Check file name against date/time to be sure it's related to your problem.
@@ -16,5 +16,8 @@ A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Screenshots**
If applicable, add screenshots to help explain your request.
**Additional context**
Add any other context or screenshots about the feature request here.
+22 -6
View File
@@ -1,19 +1,35 @@
# Changelog
## ? - v0.6
## 29/06/2020 - v0.6.0.0
* (Add) UVtoolsCmd, a terminal muti-platform aplication to run almost all operations as the GUI
* (Add) UVtools now notify when a new version available is detected
* (Add) Mutator "Flip"
* (Add) Mutator "Rotate"
* (Add) User Settings - Many parameters can now be customized to needs
* (Add) File load elapsed time into Title bar
* (Add) Outline - Print Volume bounds
* (Add) Outline - Layer bounds
* (Add) Outline - Hollow areas
* (Add) Double click layer picture to Zoom To Fit
* (Improvement) Huge performance boost in layer reparing and in every mutator
* (Improvement) Layer preview is now faster
* (Improvement) Islands detection is now better and don't skip any pixel, more islands will show or the region will be bigger
* (Improvement) ResinTrap performance
* (Improvement) Islands search are now faster, it will jump from island to insland instead of search in every pixel by pixel
* (Improvement) ResinTrap detection and corrected some cases where it can't detect a drain
* (Improvement) Better memory optimization by dispose all objects on operations
* (Change) Image engine changed to use only OpenCV Mat instead of two and avoid converting from one to another, as result there's a huge performance gain in some operations
* (Change) UVtools now rely on UVtools.Core, and drop the UVtools.Parser. The Core now perform all operations and transformations inplace of the GUI
* (Change) Islands search are now faster, it will jump from island to insland instead of search in every pixel by pixel
* (Improvement) Image engine changed to use only OpenCV Mat instead of two and avoid converting from one to another, as result there's a huge performance gain in some operations (#6)
* (Improvement) UVtools now rely on UVtools.Core, and drop the UVtools.Parser. The Core now perform all operations and transformations inplace of the GUI
* (Improvement) If error occur during save it will show a message with the error
* (Improvement) When rotate layer it will zoom to fit
* (Improvement) Allow zoom to fit to print volume area instead of whole build volume
* (Removed) ImageSharp dependency
* (Removed) UVtools.Parser project
* (Fix) Nova3D Elfin printer values changed to Display Width : 131mm / Height : 73mm & Screen X: 2531 / Y: 1410 (#5)
* (Fix) Fade resizes make image offset a pixel from layer to layer because of integer placement, now it matain the correct position
* (Fix) sl1: AbsoluteCorrection, GammaCorrection, MinExposureTime, MaxExposureTime, FastTiltTime, SlowTiltTime and AreaFill was byte and float values prevents the file from open (#4)
* (Fix) zcodex: XCorrection and YCorrection was byte and float values prevents the file from open (#4)
* (Fix) cws: XCorrection and YCorrection was byte and float values prevents the file from open (#4)
* (Fix) cws: Wrong # char on .gcode file prevent from printing (#4)
## 21/06/2020 - v0.5.2.2
+6 -1
View File
@@ -17,4 +17,9 @@
### Jason S. McMullan (ezrec)
* For ideas and permission to use his project (uv3dp)
* https://github.com/ezrec/uv3dp
* https://github.com/ezrec/uv3dp
# Supporters
* Ingo Strohmenger
* Sven Vogt
+1 -1
View File
@@ -1,5 +1,5 @@
cd $PSScriptRoot
$version = (Get-Command UVtools.GUI\bin\Release\UVtools.Parser.dll).FileVersionInfo.ProductVersion
$version = (Get-Command UVtools.GUI\bin\Release\UVtools.Core.dll).FileVersionInfo.FileVersion
Add-Type -A System.IO.Compression.FileSystem
[IO.Compression.ZipFile]::CreateFromDirectory("$PSScriptRoot\UVtools.GUI\bin\Release", "$PSScriptRoot\UVtools.GUI\bin\UVtools_v$version.zip")
+6 -6
View File
@@ -1,18 +1,18 @@
# generated by PrusaSlicer 2.2.0+win64 on 2020-06-12 at 00:41:01 UTC
# generated by PrusaSlicer 2.2.0+win64 on 2020-06-26 at 17:18:51 UTC
absolute_correction = 0
area_fill = 50
bed_custom_model =
bed_custom_texture =
bed_shape = 0x0,132x0,132x74,0x74
bed_shape = 0x0,131x0,131x73,0x73
default_sla_material_profile = Prusa Orange Tough 0.05
default_sla_print_profile = 0.05 Normal
display_height = 66.04
display_height = 73
display_mirror_x = 0
display_mirror_y = 0
display_orientation = portrait
display_pixels_x = 2560
display_pixels_y = 1440
display_width = 120.96
display_pixels_x = 2531
display_pixels_y = 1410
display_width = 131
elefant_foot_compensation = 0.2
elefant_foot_min_width = 0.2
fast_tilt_time = 5
+72 -34
View File
@@ -3,8 +3,11 @@ using System.Collections.Generic;
using System.CommandLine;
using System.CommandLine.Invocation;
using System.Diagnostics;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using UVtools.Core;
@@ -14,6 +17,7 @@ namespace UVtools.Cmd
{
public static async Task<int> Main(params string[] args)
{
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB");
Stopwatch sw = new Stopwatch();
uint count = 0;
var rootCommand = new RootCommand("MSLA/DLP, file analysis, repair, conversion and manipulation")
@@ -27,12 +31,17 @@ namespace UVtools.Cmd
{
Argument = new Argument<FileSystemInfo>("filepath")
},
new Option(new []{"-e", "--extract"}, "Extract file content to a folder")
{
Argument = new Argument<DirectoryInfo>("folder")
},
new Option(new []{"-c", "--convert"}, "Converts input into a output file format by it extension")
{
Argument = new Argument<FileSystemInfo>("filepath")
},
new Option(new []{"-p", "--properties"}, "Print a list of all properties/settings"),
new Option(new []{"-gcode"}, "Print the GCode if available"),
new Option(new []{"-i", "--issues"}, "Compute and print a list of all issues"),
new Option(new []{"-r", "--repair"}, "Attempt to repair all issues"){
Argument = new Argument<int[]>("[start layer index] [end layer index]")
@@ -40,73 +49,58 @@ namespace UVtools.Cmd
new Option(new []{"-mr", "--mut-resize"}, "Resizes layer images in a X and/or Y factor, starting from 100% value")
{
Argument = new Argument<int[]>("[x%] [y%] [start layer index] [end layer index] [fade 0/1]")
Argument = new Argument<double[]>("[x%] [y%] [start layer index] [end layer index] [fade 0/1]")
},
new Option(new []{"-ms", "--mut-solidify"}, "Closes all inner holes")
{
Argument = new Argument<int[]>("[start layer index] [end layer index]")
Argument = new Argument<uint[]>("[start layer index] [end layer index]")
},
new Option(new []{"-me", "--mut-erode"}, "Erodes away the boundaries of foreground object")
{
Argument = new Argument<int[]>("[start iterations] [end iterations] [start layer index] [end layer index] [fade 0/1]")
Argument = new Argument<uint[]>("[start iterations] [end iterations] [start layer index] [end layer index] [fade 0/1]")
},
new Option(new []{"-md", "--mut-dilate"}, "It is just opposite of erosion")
{
Argument = new Argument<int[]>("[start iterations] [end iterations] [start layer index] [end layer index] [fade 0/1]")
Argument = new Argument<uint[]>("[start iterations] [end iterations] [start layer index] [end layer index] [fade 0/1]")
},
new Option(new []{"-mc", "--mut-close"}, "Dilation followed by Erosion")
{
Argument = new Argument<int[]>("[start iterations] [end iterations] [start layer index] [end layer index] [fade 0/1]")
Argument = new Argument<uint[]>("[start iterations] [end iterations] [start layer index] [end layer index] [fade 0/1]")
},
new Option(new []{"-mo", "--mut-open"}, "Erosion followed by Dilation")
{
Argument = new Argument<int[]>("[start iterations] [end iterations] [start layer index] [end layer index] [fade 0/1]")
Argument = new Argument<uint[]>("[start iterations] [end iterations] [start layer index] [end layer index] [fade 0/1]")
},
new Option(new []{"-mg", "--mut-gradient"}, "The difference between dilation and erosion of an image")
{
Argument = new Argument<int[]>("[kernel size] [start layer index] [end layer index] [fade 0/1]")
Argument = new Argument<uint[]>("[kernel size] [start layer index] [end layer index] [fade 0/1]")
},
new Option(new []{"-mpyr", "--mut-pyr"}, "Performs downsampling step of Gaussian pyramid decomposition")
new Option(new []{"-mpy", "--mut-py"}, "Performs downsampling step of Gaussian pyramid decomposition")
{
Argument = new Argument<int[]>("[start layer index] [end layer index]")
Argument = new Argument<uint[]>("[start layer index] [end layer index]")
},
new Option(new []{"-mgb", "--mut-gaussian-blur"}, "Each pixel is a sum of fractions of each pixel in its neighborhood")
{
Argument = new Argument<int[]>("[aperture] [sigmaX] [sigmaY]")
Argument = new Argument<ushort[]>("[aperture] [sigmaX] [sigmaY]")
},
new Option(new []{"-mmb", "--mut-median-blur"}, "Each pixel becomes the median of its surrounding pixels")
{
Argument = new Argument<ushort>("[aperture]")
},
/*new Option(new []{"-ls", "--layer-start"}, "Specify a start layer index to use with some operations as a range")
{
Argument = new Argument<uint>("Layer index")
},
new Option(new []{"-le", "--layer-end"}, "Specify a end layer index to use with some operations as a range")
{
Argument = new Argument<uint>("Layer index")
},
new Option(new []{"-is", "--iteration-start"}, "Specify a start layer index to use with some operations as a range")
{
Argument = new Argument<uint>("Layer index")
},
new Option(new []{"-fade"}, "Fade a start value towards a end value to use with some operations")*/
};
rootCommand.Handler = CommandHandler.Create(
(FileSystemInfo file, FileSystemInfo convert, bool properties, bool issues, bool repair, uint layerStartIndex, uint layerEndIndex) =>
(
FileSystemInfo file,
FileSystemInfo convert,
DirectoryInfo extract,
bool properties,
bool gcode,
bool issues,
bool repair
) =>
{
Console.WriteLine($"Reading: {file}");
var fileFormat = FileFormat.FindByExtension(file.FullName, true, true);
if (ReferenceEquals(fileFormat, null))
{
@@ -114,7 +108,35 @@ namespace UVtools.Cmd
}
else
{
Console.Write($"Reading: {file}");
sw.Restart();
fileFormat.Decode(file.FullName);
sw.Stop();
Console.WriteLine($", in {sw.ElapsedMilliseconds}ms");
Console.WriteLine("----------------------");
Console.WriteLine($"Layers: {fileFormat.LayerCount} x {fileFormat.LayerHeight}mm = {fileFormat.TotalHeight}mm");
Console.WriteLine($"Resolution: {new Size((int) fileFormat.ResolutionX, (int) fileFormat.ResolutionY)}");
Console.WriteLine($"AntiAlias: {fileFormat.ValidateAntiAliasingLevel()}");
Console.WriteLine($"Bottom Layer Count: {fileFormat.InitialLayerCount}");
Console.WriteLine($"Bottom Exposure Time: {fileFormat.InitialExposureTime}s");
Console.WriteLine($"Layer Exposure Time: {fileFormat.LayerExposureTime}s");
Console.WriteLine($"Print Time: {fileFormat.PrintTime}s");
Console.WriteLine($"Cost: {fileFormat.MaterialCost}$");
Console.WriteLine($"Resin Name: {fileFormat.MaterialName}");
Console.WriteLine($"Machine Name: {fileFormat.MachineName}");
Console.WriteLine($"Thumbnails: {fileFormat.CreatedThumbnailsCount}");
Console.WriteLine("----------------------");
}
if (!ReferenceEquals(extract, null))
{
Console.Write($"Extracting to {extract.FullName}");
sw.Restart();
fileFormat.Extract(extract.FullName);
sw.Stop();
Console.WriteLine($", finished in {sw.ElapsedMilliseconds}ms");
}
if (properties)
@@ -140,6 +162,22 @@ namespace UVtools.Cmd
Console.WriteLine($"Total properties: {count}");
}
if (gcode)
{
if (ReferenceEquals(fileFormat.GCode, null))
{
Console.WriteLine("No GCode available");
}
else
{
Console.WriteLine("----------------------");
Console.WriteLine(fileFormat.GCode);
Console.WriteLine("----------------------");
Console.WriteLine($"Total lines: {fileFormat.GCode.Length}");
}
}
if (issues)
{
Console.WriteLine("Computing Issues, please wait.");
+6 -3
View File
@@ -202,7 +202,7 @@ namespace UVtools.Core
for(uint layerIndex = 0; layerIndex < LayerCount; layerIndex++)
{
Layer layer = this[layerIndex];
var layerimagePath = $"{Path.GetFileNameWithoutExtension(fileFullPath)}{layer.Index:D4}.png";
var layerimagePath = $"{Path.GetFileNameWithoutExtension(fileFullPath)}{layer.Index.ToString().PadLeft(LayerCount.ToString().Length, '0')}.png";
outputFile.PutFileContent(layerimagePath, layer.CompressedBytes);
}
@@ -293,12 +293,15 @@ namespace UVtools.Core
if (!zipArchiveEntry.Name.EndsWith(".png")) continue;
// - .png - 4 numbers
string layerStr = zipArchiveEntry.Name.Substring(zipArchiveEntry.Name.Length - 4 - 4, 4);
int layerSize = OutputSettings.LayersNum.ToString().Length;
string layerStr = zipArchiveEntry.Name.Substring(zipArchiveEntry.Name.Length - 4 - layerSize, layerSize);
uint iLayer = uint.Parse(layerStr);
LayerManager[iLayer] = new Layer(iLayer, zipArchiveEntry.Open(), zipArchiveEntry.Name);
}
}
var rect = LayerManager.BoundingRectangle;
}
public override object GetValueFromPrintParameterModifier(PrintParameterModifier modifier)
@@ -437,7 +440,7 @@ namespace UVtools.Core
{
string arch = Environment.Is64BitOperatingSystem ? "64-bits" : "32-bits";
GCode = new StringBuilder();
GCode.AppendLine($"# {About.Website} {About.Software} {Assembly.GetExecutingAssembly().GetName().Version} {arch} {DateTime.Now}");
GCode.AppendLine($"; {About.Website} {About.Software} {Assembly.GetExecutingAssembly().GetName().Version} {arch} {DateTime.Now}");
GCode.AppendLine("(****Build and Slicing Parameters * ***)");
foreach (var propertyInfo in OutputSettings.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance))
+7 -5
View File
@@ -1077,9 +1077,11 @@ namespace UVtools.Core
Parallel.For(0, LayerCount, /*new ParallelOptions{MaxDegreeOfParallelism = 1},*/ layerIndex =>
{
LayerData layerData = new LayerData(this, (uint) layerIndex);
var image = this[layerIndex].LayerMat;
layerData.Encode(image, aaIndex, (uint) layerIndex);
LayersDefinitions[aaIndex, layerIndex] = layerData;
using (var image = this[layerIndex].LayerMat)
{
layerData.Encode(image, aaIndex, (uint) layerIndex);
LayersDefinitions[aaIndex, layerIndex] = layerData;
}
});
for (uint layerIndex = 0; layerIndex < LayerCount; layerIndex++)
@@ -1218,8 +1220,8 @@ namespace UVtools.Core
LayersDefinitions[aaIndex, layerIndex] = layerData;
layerOffset += (uint)Helpers.Serializer.SizeOf(layerData);
Debug.Write($"LAYER {layerIndex} -> ");
Debug.WriteLine(layerData);
//Debug.Write($"LAYER {layerIndex} -> ");
//Debug.WriteLine(layerData);
layerData.EncodedRle = new byte[layerData.DataSize];
inputFile.Seek(layerData.DataAddress, SeekOrigin.Begin);
+2
View File
@@ -262,6 +262,8 @@ namespace UVtools.Core
CvInvoke.Imdecode(entry.Open().ToArray(), ImreadModes.AnyColor, Thumbnails[CreatedThumbnailsCount]);
}
}
var rect = LayerManager.BoundingRectangle;
}
public override object GetValueFromPrintParameterModifier(PrintParameterModifier modifier)
@@ -0,0 +1,34 @@
using System;
using System.Drawing;
namespace UVtools.Core.Extensions
{
public static class DrawingExtensions
{
public static Color FactorColor(this Color color, byte pixelColor, byte min = 0, byte max = byte.MaxValue) =>
FactorColor(color, pixelColor / 255f, min, max);
public static Color FactorColor(this Color color, float factor, byte min = 0, byte max = byte.MaxValue)
{
byte r = (byte)(color.R == 0 ? 0 :
Math.Min(Math.Max(min, color.R * factor), max));
byte g = (byte)(color.G == 0 ? 0 :
Math.Min(Math.Max(min, color.G * factor), max));
byte b = (byte)(color.B == 0 ? 0 :
Math.Min(Math.Max(min, color.B * factor), max));
return Color.FromArgb(r, g, b);
}
public static int GetArea(this Rectangle rect)
{
return rect.Width * rect.Height;
}
public static int GetArea(this Size size)
{
return size.Width * size.Height;
}
}
}
+9 -8
View File
@@ -27,11 +27,10 @@ namespace UVtools.Core.Extensions
return new Span<T>(mat.DataPointer.ToPointer(), mat.GetLength());
}
public static Span<T> GetPixelRowSpan<T>(this Mat mat, int y)
public static unsafe Span<T> GetPixelRowSpan<T>(this Mat mat, int y)
{
int offset = y * mat.Step;
//IntPtr ptr = IntPtr.Add(mat.DataPointer, offset);
return mat.GetPixelSpan<T>().Slice(offset, mat.Step);
return new Span<T>(IntPtr.Add(mat.DataPointer, y * mat.Step).ToPointer(), mat.Step);
//return mat.GetPixelSpan<T>().Slice(offset, mat.Step);
}
/// <summary>
@@ -44,17 +43,19 @@ namespace UVtools.Core.Extensions
/// <param name="xTrans">X translation</param>
/// <param name="yTrans">Y translation</param>
/// <param name="interpolation">Interpolation mode</param>
public static void ScaleFromCenter(this Mat src, double xScale, double yScale, double xTrans = 0, double yTrans = 0, Inter interpolation = Inter.Linear)
public static void TransformFromCenter(this Mat src, double xScale, double yScale, double xTrans = 0, double yTrans = 0, Inter interpolation = Inter.Linear)
{
//var dst = new Mat(src.Size, src.Depth, src.NumberOfChannels);
var translateTransform = new Matrix<double>(2, 3)
using (var translateTransform = new Matrix<double>(2, 3)
{
[0, 0] = xScale, // xScale
[1, 1] = yScale, // yScale
[0, 2] = xTrans + (src.Width - src.Width * xScale) / 2.0, //x translation + compensation of x scaling
[1, 2] = yTrans + (src.Height - src.Height * yScale) / 2.0 // y translation + compensation of y scaling
};
CvInvoke.WarpAffine(src, src, translateTransform, src.Size, interpolation);
})
{
CvInvoke.WarpAffine(src, src, translateTransform, src.Size, interpolation);
}
}
/// <summary>
+34
View File
@@ -0,0 +1,34 @@
using System;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
namespace UVtools.Core.Extensions
{
public static class SpanExtensions
{
public static unsafe void Fill<T>(this Span<T> span, Func<T> provider) where T : struct
{
int
cores = Environment.ProcessorCount,
batch = span.Length / cores,
mod = span.Length % cores,
size = Unsafe.SizeOf<T>();
ref T r0 = ref span.GetPinnableReference();
fixed (byte* p0 = &Unsafe.As<T, byte>(ref r0))
{
byte* p = p0;
Parallel.For(0, cores, i =>
{
byte* pi = p + i * batch * size;
for (int j = 0; j < batch; j++, pi += size)
Unsafe.Write(pi, provider());
});
// Remaining values
if (mod < 1) return;
for (int i = span.Length - mod; i < span.Length; i++)
Unsafe.Write(p + i * size, provider());
}
}
}
}
+441 -134
View File
@@ -10,7 +10,6 @@ using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
@@ -23,8 +22,73 @@ using UVtools.Core.Extensions;
namespace UVtools.Core
{
#region LayerIssue Class
public class IslandDetectionConfiguration
{
/// <summary>
/// Gets if the detection is enabled
/// </summary>
public bool Enabled { get; set; } = true;
/// <summary>
/// Gets or sets the binary threshold, all pixels below this value will turn in black, otherwise white
/// Set to 0 to disable this operation
/// </summary>
public byte BinaryThreshold { get; set; } = 1;
/// <summary>
/// Gets the required area size (x*y) to consider process a island (0-255)
/// </summary>
public byte RequiredAreaToProcessCheck { get; set; } = 1;
/// <summary>
/// Gets the required brightness for check a pixel under a island (0-255)
/// </summary>
public byte RequiredPixelBrightnessToProcessCheck { get; set; } = 10;
/// <summary>
/// Gets the required number of pixels to support a island and discard it as a issue (0-255)
/// </summary>
public byte RequiredPixelsToSupport { get; set; } = 10;
/// <summary>
/// Gets the required brightness of supporting pixels to count as a valid support (0-255)
/// </summary>
public byte RequiredPixelBrightnessToSupport { get; set; } = 150;
}
public class ResinTrapDetectionConfiguration
{
/// <summary>
/// Gets if the detection is enabled
/// </summary>
public bool Enabled { get; set; } = true;
/// <summary>
/// Gets or sets the binary threshold, all pixels below this value will turn in black, otherwise white
/// Set to 0 to disable this operation
/// </summary>
public byte BinaryThreshold { get; set; } = 127;
/// <summary>
/// Gets the required area size (x*y) to consider process a hollow area (0-255)
/// </summary>
public byte RequiredAreaToProcessCheck { get; set; } = 1;
/// <summary>
/// Gets the number of black pixels required to consider a drain
/// </summary>
public byte RequiredBlackPixelsToDrain { get; set; } = 10;
/// <summary>
/// Gets the maximum pixel brightness to be a drain pixel (0-150)
/// </summary>
public byte MaximumPixelBrightnessToDrain { get; set; } = 30;
}
public class LayerIssue : IEnumerable<Point>
{
public enum IssueType : byte
@@ -208,11 +272,31 @@ namespace UVtools.Core
/// </summary>
public LayerManager ParentLayerManager { get; set; }
/// <summary>
/// Gets the number of non zero pixels on this layer image
/// </summary>
public uint NonZeroPixelCount { get; private protected set; }
/// <summary>
/// Gets the bounding rectangle for the image area
/// </summary>
public Rectangle BoundingRectangle { get; private protected set; } = Rectangle.Empty;
/// <summary>
/// Gets the layer index
/// </summary>
public uint Index { get; }
/// <summary>
/// Gets or sets the exposure time in raw value
/// </summary>
public float ExposureTime { get; set; }
/// <summary>
/// Gets or sets the layer position on Z in raw value
/// </summary>
public float PositionZ { get; set; }
private byte[] _compressedBytes;
/// <summary>
/// Gets or sets layer image compressed data
@@ -224,6 +308,8 @@ namespace UVtools.Core
{
_compressedBytes = LayerManager.CompressLayer(value);
IsModified = true;
if(!ReferenceEquals(ParentLayerManager, null))
ParentLayerManager.BoundingRectangle = Rectangle.Empty;
}
}
@@ -254,6 +340,8 @@ namespace UVtools.Core
{
CvInvoke.Imencode(".png", value, vector);
CompressedBytes = vector.ToArray();
GetBoundingRectangle(value, true);
}
}
}
@@ -276,11 +364,15 @@ namespace UVtools.Core
#region Constructor
public Layer(uint index, byte[] compressedBytes, string filename = null, LayerManager pararentLayerManager = null)
{
Index = index;
CompressedBytes = compressedBytes;
Filename = filename ?? $"Layer{index}.png";
IsModified = false;
ParentLayerManager = pararentLayerManager;
Index = index;
Filename = filename ?? $"Layer{index}.png";
CompressedBytes = compressedBytes;
IsModified = false;
/*if (compressedBytes.Length > 0)
{
GetBoundingRectangle();
}*/
}
public Layer(uint index, Mat layerMat, string filename = null, LayerManager pararentLayerManager = null) : this(index, new byte[0], filename, pararentLayerManager)
@@ -374,6 +466,27 @@ namespace UVtools.Core
#region Methods
public Rectangle GetBoundingRectangle(Mat mat = null, bool reCalculate = false)
{
if (NonZeroPixelCount > 0 && !reCalculate)
{
return BoundingRectangle;
}
bool needDispose = false;
if (ReferenceEquals(mat, null))
{
mat = LayerMat;
needDispose = true;
}
CvInvoke.FindNonZero(mat, mat);
NonZeroPixelCount = (uint)mat.Rows / 2;
BoundingRectangle = CvInvoke.BoundingRectangle(mat);
if(needDispose) mat.Dispose();
return BoundingRectangle;
}
public Layer PreviousLayer()
{
if (ReferenceEquals(ParentLayerManager, null) || Index == 0)
@@ -570,7 +683,67 @@ namespace UVtools.Core
{
using (var mat = LayerMat)
{
mat.ScaleFromCenter(xScale, yScale);
mat.TransformFromCenter(xScale, yScale);
LayerMat = mat;
}
}
public void MutateFlip(FlipType flipType, bool makeCopy = true)
{
using (var mat = LayerMat)
{
if (makeCopy)
{
using (Mat dst = new Mat())
{
CvInvoke.Flip(mat, dst, flipType);
var spanSrc = mat.GetPixelSpan<byte>();
var spanDst = dst.GetPixelSpan<byte>();
for (int i = 0; i < spanSrc.Length; i++)
{
if (spanDst[i] == 0) continue;
spanSrc[i] = spanDst[i];
}
LayerMat = mat;
}
}
else
{
CvInvoke.Flip(mat, mat, flipType);
}
LayerMat = mat;
}
}
public void MutateRotate(double angle = 90.0, Inter interpolation = Inter.Linear)
{
using (var mat = LayerMat)
{
var halfWidth = mat.Width / 2.0f;
var halfHeight = mat.Height / 2.0f;
using (var translateTransform = new Matrix<double>(2, 3))
{
CvInvoke.GetRotationMatrix2D(new PointF(halfWidth, halfHeight), angle, 1.0, translateTransform);
/*var rect = new RotatedRect(PointF.Empty, mat.Size, (float) angle).MinAreaRect();
translateTransform[0, 2] += rect.Width / 2.0 - mat.Cols / 2.0;
translateTransform[0, 2] += rect.Height / 2.0 - mat.Rows / 2.0;*/
/* var abs_cos = Math.Abs(translateTransform[0, 0]);
var abs_sin = Math.Abs(translateTransform[0, 1]);
var bound_w = mat.Height * abs_sin + mat.Width * abs_cos;
var bound_h = mat.Height * abs_cos + mat.Width * abs_sin;
translateTransform[0, 2] += bound_w / 2 - halfWidth;
translateTransform[1, 2] += bound_h / 2 - halfHeight;*/
CvInvoke.WarpAffine(mat, mat, translateTransform, mat.Size, interpolation);
}
LayerMat = mat;
}
}
@@ -712,18 +885,66 @@ namespace UVtools.Core
#endregion
}
#endregion
#region LayerManager Class
public class LayerManager : IEnumerable<Layer>
{
#region Properties
#region Enums
public enum Mutate : byte
{
Resize,
Flip,
Rotate,
Solidify,
//LayerSmash,
Erode,
Dilate,
Opening,
Closing,
Gradient,
TopHat,
BlackHat,
HitMiss,
PyrDownUp,
SmoothMedian,
SmoothGaussian,
}
#endregion
#region Properties
/// <summary>
/// Layers List
/// </summary>
public Layer[] Layers { get; }
private Rectangle _boundingRectangle = Rectangle.Empty;
public Rectangle BoundingRectangle
{
get
{
if(!_boundingRectangle.IsEmpty) return _boundingRectangle;
_boundingRectangle = this[0].BoundingRectangle;
if (_boundingRectangle.IsEmpty) // Safe checking
{
Parallel.For(0, Count, layerIndex =>
{
this[layerIndex].GetBoundingRectangle();
});
_boundingRectangle = this[0].BoundingRectangle;
}
for (int i = 1; i < Count; i++)
{
_boundingRectangle = Rectangle.Union(_boundingRectangle, this[i].BoundingRectangle);
}
return _boundingRectangle;
}
set => _boundingRectangle = value;
}
/// <summary>
/// Gets the layers count
/// </summary>
@@ -915,6 +1136,22 @@ namespace UVtools.Core
});
}
public void MutateFlip(uint startLayerIndex, uint endLayerIndex, FlipType flipType, bool makeCopy = false)
{
Parallel.For(startLayerIndex, endLayerIndex + 1, layerIndex =>
{
this[layerIndex].MutateFlip(flipType, makeCopy);
});
}
public void MutateRotate(uint startLayerIndex, uint endLayerIndex, double angle, Inter interpolation = Inter.Linear)
{
Parallel.For(startLayerIndex, endLayerIndex + 1, layerIndex =>
{
this[layerIndex].MutateRotate(angle, interpolation);
});
}
public void MutateSolidify(uint startLayerIndex, uint endLayerIndex)
{
Parallel.For(startLayerIndex, endLayerIndex + 1, layerIndex =>
@@ -1074,29 +1311,18 @@ namespace UVtools.Core
});
}
public ConcurrentDictionary<uint, List<LayerIssue>> GetAllIssues()
public ConcurrentDictionary<uint, List<LayerIssue>> GetAllIssues(IslandDetectionConfiguration islandConfig = null, ResinTrapDetectionConfiguration resinTrapConfig = null)
{
const byte requiredPixelsToSupportIsland = 10;
const byte minIslandPixelToCheck = 10;
const byte minIslandSupportPixelColor = 150;
if(ReferenceEquals(islandConfig, null)) islandConfig = new IslandDetectionConfiguration();
if(ReferenceEquals(resinTrapConfig, null)) resinTrapConfig = new ResinTrapDetectionConfiguration();
const byte minTouchingBondsPixelColor = 200;
var result = new ConcurrentDictionary<uint, List<LayerIssue>>();
/*Parallel.ForEach(this, layer =>
{
var issues = layer.GetIssues();
if (issues.Count > 0)
{
if (!result.TryAdd(layer.Index, issues))
{
throw new AccessViolationException("Error while trying to add an issue to the dictionary, please try again.");
}
}
});*/
var task1 = new TaskFactory().StartNew(() =>
var layerHollowAreas = new ConcurrentDictionary<uint, List<LayerHollowArea>>();
Parallel.Invoke(() =>
{
if (!islandConfig.Enabled) return;
// Detect contours
Parallel.ForEach(this,
//new ParallelOptions{MaxDegreeOfParallelism = 1},
@@ -1143,14 +1369,26 @@ namespace UVtools.Core
});
}
if (layer.Index == 0) return; // No inslands for layer 0
if (layer.Index == 0) return; // No islands for layer 0
CvInvoke.Threshold(image, image, 1, 255, ThresholdType.Binary);
VectorOfVectorOfPoint contours = new VectorOfVectorOfPoint();
Mat hierarchy = new Mat();
CvInvoke.FindContours(image, contours, hierarchy, RetrType.Ccomp,
ChainApproxMethod.ChainApproxSimple);
if (islandConfig.BinaryThreshold > 0)
{
using (var thresholdImage = new Mat())
{
CvInvoke.Threshold(image, thresholdImage, 1, 255, ThresholdType.Binary);
CvInvoke.FindContours(thresholdImage, contours, hierarchy, RetrType.Ccomp,
ChainApproxMethod.ChainApproxSimple);
}
}
else
{
CvInvoke.FindContours(image, contours, hierarchy, RetrType.Ccomp,
ChainApproxMethod.ChainApproxSimple);
}
var arr = hierarchy.GetData();
//
@@ -1162,18 +1400,19 @@ namespace UVtools.Core
Mat previousImage = null;
Span<byte> previousSpan = null;
Span<byte> imageSpan = null;
for (int i = 0; i < contours.Size; i++)
{
if ((int) arr.GetValue(0, i, 2) == -1 && (int) arr.GetValue(0, i, 3) != -1) continue;
var rect = CvInvoke.BoundingRectangle(contours[i]);
if (rect.GetArea() < islandConfig.RequiredAreaToProcessCheck)
continue;
if (ReferenceEquals(previousImage, null))
{
previousImage = this[layer.Index - 1].LayerMat;
previousSpan = previousImage.GetPixelSpan<byte>();
imageSpan = image.GetPixelSpan<byte>();
}
var rect = CvInvoke.BoundingRectangle(contours[i]);
List<Point> points = new List<Point>();
uint pixelsSupportingIsland = 0;
@@ -1186,9 +1425,8 @@ namespace UVtools.Core
{
for (int x = rect.X; x < rect.Right; x++)
{
//int pixel = image.GetPixelPos(x, y);
int pixel = step * y + x;
if (imageSpan[pixel] < minIslandPixelToCheck)
if (span[pixel] < islandConfig.RequiredPixelBrightnessToProcessCheck)
continue; // Low brightness, ignore
if (contourImageSpan[pixel] != 255)
continue; // Not inside contour, ignore
@@ -1197,7 +1435,7 @@ namespace UVtools.Core
//Debug.WriteLine($"Layer: {layer.Index}, Coutour: {i}, X:{x} Y:{y}");
points.Add(new Point(x, y));
if (previousSpan[pixel] >= minIslandSupportPixelColor)
if (previousSpan[pixel] >= islandConfig.RequiredPixelBrightnessToSupport)
{
pixelsSupportingIsland++;
}
@@ -1206,9 +1444,9 @@ namespace UVtools.Core
}
if (points.Count == 0) continue;
if (pixelsSupportingIsland >= requiredPixelsToSupportIsland)
if (pixelsSupportingIsland >= islandConfig.RequiredPixelsToSupport)
continue; // Not a island, bounding is strong, i think...
if (pixelsSupportingIsland > 0 && points.Count < requiredPixelsToSupportIsland &&
if (pixelsSupportingIsland > 0 && points.Count < islandConfig.RequiredPixelsToSupport &&
pixelsSupportingIsland >= Math.Max(1, points.Count / 2))
continue; // Not a island, but maybe weak bounding...
@@ -1227,11 +1465,9 @@ namespace UVtools.Core
previousImage?.Dispose();
}
});
});
var layerHollowAreas = new ConcurrentDictionary<uint, List<LayerHollowArea>>();
var task2 = new TaskFactory().StartNew(() =>
}, () =>
{
if (!resinTrapConfig.Enabled) return;
// Detect contours
Parallel.ForEach(this,
//new ParallelOptions{MaxDegreeOfParallelism = 1},
@@ -1239,7 +1475,10 @@ namespace UVtools.Core
{
using (var image = layer.LayerMat)
{
CvInvoke.Threshold(image, image, 254, 255, ThresholdType.Binary);
if (resinTrapConfig.BinaryThreshold > 0)
{
CvInvoke.Threshold(image, image, resinTrapConfig.BinaryThreshold, 255, ThresholdType.Binary);
}
var listHollowArea = new List<LayerHollowArea>();
@@ -1263,8 +1502,11 @@ namespace UVtools.Core
{
if ((int) arr.GetValue(0, i, 2) != -1 || (int) arr.GetValue(0, i, 3) == -1)
continue;
var rect = CvInvoke.BoundingRectangle(contours[i]);
if(rect.GetArea() < resinTrapConfig.RequiredAreaToProcessCheck) continue;
listHollowArea.Add(new LayerHollowArea(contours[i].ToArray(),
CvInvoke.BoundingRectangle(contours[i]),
rect,
layer.Index == 0 || layer.Index == Count - 1
? LayerHollowArea.AreaType.Drain
: LayerHollowArea.AreaType.Unknown));
@@ -1288,7 +1530,7 @@ namespace UVtools.Core
Parallel.ForEach(from t in areas where t.Type == LayerHollowArea.AreaType.Unknown select t, area =>
{
//if (area.Type != LayerHollowArea.AreaType.Unknown) return; // processed, ignore
if (area.Type != LayerHollowArea.AreaType.Unknown) return; // processed, ignore
area.Type = LayerHollowArea.AreaType.Trap;
areaCount++;
@@ -1308,11 +1550,11 @@ namespace UVtools.Core
if (checkArea.Processed) continue;
checkArea.Processed = true;
nextLayerIndex += dir;
Debug.WriteLine($"Area Count: {areaCount} | Layer: {layerIndex} | Next Layer: {nextLayerIndex} | Dir: {dir}");
if (nextLayerIndex < 0 && nextLayerIndex >= Count)
break; // Exhausted layers
bool haveNextAreas = layerHollowAreas.TryGetValue((uint) nextLayerIndex, out var nextAreas);
List<LayerHollowArea> intersectingAreas = new List<LayerHollowArea>();
Dictionary<int, LayerHollowArea> intersectingAreas = new Dictionary<int, LayerHollowArea>();
using (var image = this[nextLayerIndex].LayerMat)
{
@@ -1324,110 +1566,122 @@ namespace UVtools.Core
CvInvoke.DrawContours(emguImage, vec, -1, new MCvScalar(255), -1);
}
if (haveNextAreas)
using (var intersectingAreasMat = image.CloneBlank())
{
foreach (var nextArea in nextAreas)
if (haveNextAreas)
{
if (!checkArea.BoundingRectangle.IntersectsWith(nextArea.BoundingRectangle)) continue;
intersectingAreas.Add(nextArea);
/*CvInvoke.DrawContours(emguImage,
new VectorOfVectorOfPoint(new VectorOfPoint(nextArea.Contour)),
-1,
new MCvScalar(intersectingAreas.Count), -1);*/
}
if (intersectingAreas.Count == 0)
{
haveNextAreas = false;
}
}
bool exitPixelLoop = false;
uint blackCount = 0;
var spanContour = emguImage.GetPixelSpan<byte>();
for (int y = checkArea.BoundingRectangle.Y;
y <= checkArea.BoundingRectangle.Bottom &&
area.Type != LayerHollowArea.AreaType.Drain && !exitPixelLoop;
y++)
{
int pixelPos = image.GetPixelPos(checkArea.BoundingRectangle.X, y)-1;
for (int x = checkArea.BoundingRectangle.X;
x <= checkArea.BoundingRectangle.Right &&
area.Type != LayerHollowArea.AreaType.Drain && !exitPixelLoop;
x++)
{
pixelPos++;
if (spanContour[pixelPos] == 0) continue; // No contour
if (span[pixelPos] > 30) continue; // Threshold to ignore white area
blackCount++;
if (haveNextAreas) // Have areas, can be on same area path or not
foreach (var nextArea in nextAreas)
{
/*int i = spanContour[pixelPos] - 1;
if (i == -1 || i >= 254)
continue;
//if(queue.Contains(intersectingAreas[i])) continue;
//Debug.WriteLine($"BlackCount: {blackCount}, pixel color: {i}, layerindex: {layerIndex}");
if (intersectingAreas[i].Type == LayerHollowArea.AreaType.Drain) // Found a drain, stop query
if (!checkArea.BoundingRectangle.IntersectsWith(
nextArea.BoundingRectangle)) continue;
intersectingAreas.Add(intersectingAreas.Count + 1, nextArea);
using (var vec = new VectorOfVectorOfPoint(new VectorOfPoint(nextArea.Contour)))
{
area.Type = LayerHollowArea.AreaType.Drain;
CvInvoke.DrawContours(intersectingAreasMat, vec, -1,
new MCvScalar(intersectingAreas.Count), -1);
}
else
}
}
//Debug.WriteLine($"Area Count: {areaCount} | Next Areas: {intersectingAreas.Count} | Layer: {layerIndex} | Next Layer: {nextLayerIndex} | Dir: {dir}");
bool exitPixelLoop = false;
uint blackCount = 0;
var spanContour = emguImage.GetPixelSpan<byte>();
var spanIntersect = intersectingAreasMat.GetPixelSpan<byte>();
for (int y = checkArea.BoundingRectangle.Y;
y < checkArea.BoundingRectangle.Bottom &&
area.Type != LayerHollowArea.AreaType.Drain && !exitPixelLoop;
y++)
{
int pixelPos = image.GetPixelPos(checkArea.BoundingRectangle.X, y) - 1;
for (int x = checkArea.BoundingRectangle.X;
x < checkArea.BoundingRectangle.Right &&
area.Type != LayerHollowArea.AreaType.Drain && !exitPixelLoop;
x++)
{
pixelPos++;
if (spanContour[pixelPos] != 255) continue; // No contour
if (span[pixelPos] > resinTrapConfig.MaximumPixelBrightnessToDrain) continue; // Threshold to ignore white area
blackCount++;
if (intersectingAreas.Count > 0) // Have areas, can be on same area path or not
{
queue.Enqueue(intersectingAreas[i]);
}
byte i = spanIntersect[pixelPos];
if (i == 0 || !intersectingAreas.ContainsKey(i)) // Black pixels
continue;
linkedAreas.Add(intersectingAreas[i]);
//Debug.WriteLine($"BlackCount: {blackCount}, pixel color: {i}, layerindex: {layerIndex}");
exitPixelLoop = true;
break;*/
foreach (var nextAreaCheck in intersectingAreas)
{
using (var vec = new VectorOfPoint(nextAreaCheck.Contour))
{
//Debug.WriteLine(CvInvoke.PointPolygonTest(vec, new PointF(x, y), false));
if (CvInvoke.PointPolygonTest(vec, new PointF(x, y), false) < 0) continue;
}
if (nextAreaCheck.Type == LayerHollowArea.AreaType.Drain
) // Found a drain, stop query
if (intersectingAreas[i].Type == LayerHollowArea.AreaType.Drain) // Found a drain, stop query
{
area.Type = LayerHollowArea.AreaType.Drain;
exitPixelLoop = true;
}
else
{
queue.Enqueue(area);
queue.Enqueue(intersectingAreas[i]);
}
linkedAreas.Add(intersectingAreas[i]);
intersectingAreas.Remove(i);
if (intersectingAreas.Count == 0) // Intersection areas sweep end, quit this path
{
exitPixelLoop = true;
break;
}
linkedAreas.Add(nextAreaCheck);
intersectingAreas.Remove(nextAreaCheck);
haveNextAreas = intersectingAreas.Count > 0;
break;
//exitPixelLoop = true;
//break;
// Old Way
/*foreach (var nextAreaCheck in intersectingAreas)
{
using (var vec = new VectorOfPoint(nextAreaCheck.Value.Contour))
{
//Debug.WriteLine(CvInvoke.PointPolygonTest(vec, new PointF(x, y), false));
if (CvInvoke.PointPolygonTest(vec, new PointF(x, y), false) < 0) continue;
}
if (nextAreaCheck.Value.Type == LayerHollowArea.AreaType.Drain) // Found a drain, stop query
{
area.Type = LayerHollowArea.AreaType.Drain;
exitPixelLoop = true;
}
else
{
queue.Enqueue(nextAreaCheck.Value);
}
linkedAreas.Add(nextAreaCheck.Value);
intersectingAreas.Remove(nextAreaCheck.Key);
if (intersectingAreas.Count == 0)
{
haveNextAreas = false;
exitPixelLoop = true;
}
//exitPixelLoop = true;
break;
}*/
}
}
else if (blackCount > Math.Min(checkArea.Contour.Length / 2, 10)) // Black pixel without next areas = Drain
{
area.Type = LayerHollowArea.AreaType.Drain;
exitPixelLoop = true;
break;
}
} // X loop
} // Y loop
else if (blackCount > Math.Min(checkArea.Contour.Length / 2, resinTrapConfig.RequiredBlackPixelsToDrain)) // Black pixel without next areas = Drain
{
area.Type = LayerHollowArea.AreaType.Drain;
exitPixelLoop = true;
break;
}
} // X loop
} // Y loop
if (queue.Count == 0 && blackCount > Math.Min(checkArea.Contour.Length / 2, 10))
{
area.Type = LayerHollowArea.AreaType.Drain;
}
if (queue.Count == 0 && blackCount > Math.Min(checkArea.Contour.Length / 2, resinTrapConfig.RequiredBlackPixelsToDrain))
{
area.Type = LayerHollowArea.AreaType.Drain;
}
} // Dispose intersecting image
} // Dispose emgu image
} // Dispose image
} // Areas loop
@@ -1441,9 +1695,6 @@ namespace UVtools.Core
}
});
task1.Wait(); // Islands & bounds
task2.Wait(); // Resin trap
for (uint layerIndex = 0; layerIndex < Count; layerIndex++)
{
if (!layerHollowAreas.TryGetValue(layerIndex, out var list)) continue;
@@ -1465,6 +1716,62 @@ namespace UVtools.Core
return result;
}
public void RepairLayers(uint layerStart, uint layerEnd, uint closingIterations = 1, uint openingIterations = 1,
bool repairIslands = true, bool repairResinTraps = true, Dictionary<uint, List<LayerIssue>> issues = null)
{
Parallel.For(layerStart, layerEnd + 1, layerIndex =>
{
Layer layer = this[layerIndex];
using (var image = layer.LayerMat)
{
if (repairResinTraps && !ReferenceEquals(issues, null))
{
if (issues.TryGetValue((uint)layerIndex, out var issueList))
{
foreach (var issue in issueList.Where(issue => issue.Type == LayerIssue.IssueType.ResinTrap))
{
using (var vec = new VectorOfVectorOfPoint(new VectorOfPoint(issue.Pixels)))
{
CvInvoke.DrawContours(image,
vec,
-1,
new MCvScalar(255),
-1);
}
/*CvInvoke.DrawContours(image,
new VectorOfVectorOfPoint(new VectorOfPoint(issue.Pixels)),
-1,
new MCvScalar(255),
2);*/
}
}
}
if (repairIslands)
{
using (Mat kernel = CvInvoke.GetStructuringElement(ElementShape.Rectangle, new Size(3, 3),
new Point(-1, -1)))
{
if (closingIterations > 0)
{
CvInvoke.MorphologyEx(image, image, MorphOp.Close, kernel, new Point(-1, -1),
(int) closingIterations, BorderType.Default, new MCvScalar());
}
if (openingIterations > 0)
{
CvInvoke.MorphologyEx(image, image, MorphOp.Open, kernel, new Point(-1, -1),
(int) closingIterations, BorderType.Default, new MCvScalar());
}
}
}
layer.LayerMat = image;
}
});
}
/// <summary>
/// Desmodify all layers
/// </summary>
+16 -12
View File
@@ -372,13 +372,12 @@ namespace UVtools.Core
}
}
int pixel = 0;
while (pixel < span.Length)
for (int pixel = 0; pixel < span.Length; pixel += image.NumberOfChannels)
{
var ncolor15 =
(span[pixel++] >> 3)
| ((span[pixel++] >> 2) << 5)
| ((span[pixel++] >> 3) << 11);
(span[pixel] >> 3)
| ((span[pixel+1] >> 2) << 5)
| ((span[pixel+2] >> 3) << 11);
if (ncolor15 == color15)
{
@@ -526,7 +525,7 @@ namespace UVtools.Core
public void Encode(Mat image, uint layerIndex)
{
List<byte> rawData = new List<byte>();
var span = image.GetPixelSpan<byte>();
//byte color = byte.MaxValue >> 1;
byte color = byte.MaxValue;
uint stride = 0;
@@ -553,12 +552,14 @@ namespace UVtools.Core
int halfWidth = image.Width / 2;
//int pixel = 0;
for (int y = 0; y < image.Height; y++)
{
for (int x = 0; x < image.Width; x++)
var span = image.GetPixelRowSpan<byte>(y);
for (int x = 0; x < span.Length; x++)
{
var grey7 = (byte)((span[image.GetPixelPos(x, y)] >> 1) & 0x7f);
var grey7 = (byte)((span[x] >> 1) & 0x7f);
if (grey7 > 0x7c)
{
grey7 = 0x7c;
@@ -814,11 +815,14 @@ namespace UVtools.Core
currentOffset += (uint)machineBytes.Length;
}
Parallel.For(0, LayerCount, layerIndex =>
Parallel.For(0, LayerCount, /*new ParallelOptions{MaxDegreeOfParallelism = 1},*/ layerIndex =>
{
LayerData layer = new LayerData(this, (uint)layerIndex);
layer.Encode(this[layerIndex].LayerMat, (uint) layerIndex);
LayersDefinitions[layerIndex] = layer;
using (var image = this[layerIndex].LayerMat)
{
layer.Encode(image, (uint) layerIndex);
LayersDefinitions[layerIndex] = layer;
}
});
HeaderSettings.LayersDefinitionOffsetAddress = currentOffset;
+13 -10
View File
@@ -321,22 +321,22 @@ namespace UVtools.Core
Width = (uint) image.Width,
Height = (uint) image.Height,
Resolution = 42,
Data = new byte[span.Length * 2]
Data = new byte[image.Width * image.Height * 2]
};
int pixel = 0;
for (int i = 0; i < span.Length; i++)
int i = 0;
for (int pixel = 0; pixel < span.Length; pixel += image.NumberOfChannels)
{
// BGR
int b = span[pixel++] >> 3;
int g = span[pixel++] >> 2;
int r = span[pixel++] >> 3;
int b = span[pixel] >> 3;
int g = span[pixel+1] >> 2;
int r = span[pixel+2] >> 3;
ushort color = (ushort) ((r << 11) | (g << 5) | (b << 0));
preview.Data[i * 2] = (byte) color;
preview.Data[i * 2 + 1] = (byte) (color >> 8);
preview.Data[i++] = (byte) color;
preview.Data[i++] = (byte) (color >> 8);
}
preview.Section.Length += (uint) preview.Data.Length;
@@ -849,8 +849,11 @@ namespace UVtools.Core
Parallel.For(0, LayerCount, layerIndex =>
{
LayerData layer = new LayerData(this, (uint) layerIndex);
layer.Encode(this[layerIndex].LayerMat);
LayersDefinition.Layers[layerIndex] = layer;
using (var image = this[layerIndex].LayerMat)
{
layer.Encode(image);
LayersDefinition.Layers[layerIndex] = layer;
}
});
LayersDefinition.Section.Length += (uint)Helpers.Serializer.SizeOf(LayersDefinition[0]) * LayerCount;
+11 -9
View File
@@ -72,26 +72,26 @@ namespace UVtools.Core
#endregion
#region Tilt
public byte FastTiltTime { get; set; }
public byte SlowTiltTime { get; set; }
public byte AreaFill { get; set; }
public float FastTiltTime { get; set; }
public float SlowTiltTime { get; set; }
public float AreaFill { get; set; }
#endregion
#region Corrections
public string RelativeCorrection { get; set; }
public byte AbsoluteCorrection { get; set; }
public float AbsoluteCorrection { get; set; }
public float ElefantFootCompensation { get; set; }
public float ElefantFootMinWidth { get; set; }
public byte GammaCorrection { get; set; }
public float GammaCorrection { get; set; }
#endregion
#region Exposure
public byte MinExposureTime { get; set; }
public byte MaxExposureTime { get; set; }
public byte MinInitialExposureTime { get; set; }
public ushort MaxInitialExposureTime { get; set; }
public float MinExposureTime { get; set; }
public float MaxExposureTime { get; set; }
public float MinInitialExposureTime { get; set; }
public float MaxInitialExposureTime { get; set; }
#endregion
@@ -481,6 +481,8 @@ namespace UVtools.Core
}
}
var rect = LayerManager.BoundingRectangle;
Statistics.ExecutionTime.Stop();
Debug.WriteLine(Statistics);
+1
View File
@@ -44,6 +44,7 @@
<PackageReference Include="Emgu.CV" Version="4.3.0.3890" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="System.Memory" Version="4.5.4" />
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.7.0" />
</ItemGroup>
</Project>
+4 -2
View File
@@ -90,8 +90,8 @@ namespace UVtools.Core
public float ZLiftRetractRate { get; set; } = 100;
public float ZLiftFeedRate { get; set; } = 100;
public byte AntiAliasing { get; set; } = 0;
public byte XCorrection { get; set; }
public byte YCorrection { get; set; }
public float XCorrection { get; set; }
public float YCorrection { get; set; }
public byte HollowEnabled { get; set; }
public float HollowThickness { get; set; }
public byte InfillDensity { get; set; }
@@ -346,6 +346,8 @@ namespace UVtools.Core
}
}
}
var rect = LayerManager.BoundingRectangle;
}
public override bool SetValueFromPrintParameterModifier(PrintParameterModifier modifier, string value)
+114
View File
@@ -1,5 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="UVtools.GUI.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
@@ -23,4 +28,113 @@
</dependentAssembly>
</assemblyBinding>
</runtime>
<userSettings>
<UVtools.GUI.Properties.Settings>
<setting name="PreviousNextLayerColor" serializeAs="String">
<value>Red</value>
</setting>
<setting name="IslandColor" serializeAs="String">
<value>Yellow</value>
</setting>
<setting name="ResinTrapColor" serializeAs="String">
<value>Orange</value>
</setting>
<setting name="TouchingBoundsColor" serializeAs="String">
<value>Red</value>
</setting>
<setting name="PreviousLayerColor" serializeAs="String">
<value>Magenta</value>
</setting>
<setting name="NextLayerColor" serializeAs="String">
<value>Cyan</value>
</setting>
<setting name="UpdateSettings" serializeAs="String">
<value>True</value>
</setting>
<setting name="StartMaximized" serializeAs="String">
<value>False</value>
</setting>
<setting name="CheckForUpdatesOnStartup" serializeAs="String">
<value>True</value>
</setting>
<setting name="LayerAutoRotateBestView" serializeAs="String">
<value>True</value>
</setting>
<setting name="LayerDifferenceDefault" serializeAs="String">
<value>False</value>
</setting>
<setting name="ComputeIssuesOnLoad" serializeAs="String">
<value>False</value>
</setting>
<setting name="LayerZoomToFit" serializeAs="String">
<value>True</value>
</setting>
<setting name="ComputeIslands" serializeAs="String">
<value>True</value>
</setting>
<setting name="ComputeResinTraps" serializeAs="String">
<value>True</value>
</setting>
<setting name="IslandRequiredAreaToProcessCheck" serializeAs="String">
<value>1</value>
</setting>
<setting name="IslandRequiredPixelBrightnessToProcessCheck" serializeAs="String">
<value>1</value>
</setting>
<setting name="IslandRequiredPixelsToSupport" serializeAs="String">
<value>10</value>
</setting>
<setting name="IslandRequiredPixelBrightnessToSupport" serializeAs="String">
<value>150</value>
</setting>
<setting name="ResinTrapRequiredAreaToProcessCheck" serializeAs="String">
<value>17</value>
</setting>
<setting name="ResinTrapRequiredBlackPixelsToDrain" serializeAs="String">
<value>10</value>
</setting>
<setting name="ResinTrapMaximumPixelBrightnessToDrain" serializeAs="String">
<value>30</value>
</setting>
<setting name="AutoComputeIssuesClickOnTab" serializeAs="String">
<value>True</value>
</setting>
<setting name="OutlinePrintVolumeBoundsColor" serializeAs="String">
<value>Lime</value>
</setting>
<setting name="OutlinePrintVolumeBoundsLineThickness" serializeAs="String">
<value>3</value>
</setting>
<setting name="OutlineLayerBoundsColor" serializeAs="String">
<value>Lime</value>
</setting>
<setting name="OutlineLayerBoundsLineThickness" serializeAs="String">
<value>3</value>
</setting>
<setting name="OutlineHollowAreasColor" serializeAs="String">
<value>Orange</value>
</setting>
<setting name="OutlineHollowAreasLineThickness" serializeAs="String">
<value>3</value>
</setting>
<setting name="OutlinePrintVolumeBounds" serializeAs="String">
<value>True</value>
</setting>
<setting name="OutlineLayerBounds" serializeAs="String">
<value>False</value>
</setting>
<setting name="OutlineHollowAreas" serializeAs="String">
<value>False</value>
</setting>
<setting name="ZoomToFitPrintVolumeBounds" serializeAs="String">
<value>True</value>
</setting>
<setting name="ResinTrapBinaryThreshold" serializeAs="String">
<value>127</value>
</setting>
<setting name="IslandBinaryThreshold" serializeAs="String">
<value>0</value>
</setting>
</UVtools.GUI.Properties.Settings>
</userSettings>
</configuration>
+1 -7
View File
@@ -46,13 +46,7 @@ namespace UVtools.GUI.Forms
}
}
public static string AssemblyVersion
{
get
{
return Assembly.GetExecutingAssembly().GetName().Version.ToString();
}
}
public static string AssemblyVersion => Assembly.GetExecutingAssembly().GetName().Version.ToString();
public static string AssemblyDescription
{
+14 -7
View File
@@ -8,6 +8,7 @@
using System;
using System.Windows.Forms;
using UVtools.Core;
namespace UVtools.GUI.Forms
{
@@ -49,15 +50,21 @@ namespace UVtools.GUI.Forms
#endregion
#region Constructors
public FrmMutation(Mutation mutation, uint defaultIterations = 1)
public FrmMutation()
{
InitializeComponent();
}
public FrmMutation(Mutation mutation, uint defaultIterations = 1) : this()
{
Mutation = mutation;
DialogResult = DialogResult.Cancel;
if (defaultIterations == 0 ||
mutation.Mutate == Mutation.Mutates.PyrDownUp ||
mutation.Mutate == Mutation.Mutates.Solidify)
mutation.Mutate == LayerManager.Mutate.PyrDownUp ||
mutation.Mutate == LayerManager.Mutate.Solidify)
{
lbIterationsStart.Enabled =
numIterationsStart.Enabled =
@@ -72,8 +79,8 @@ namespace UVtools.GUI.Forms
numIterationsStart.Select();
}
if (Mutation.Mutate == Mutation.Mutates.SmoothGaussian ||
Mutation.Mutate == Mutation.Mutates.SmoothMedian)
if (Mutation.Mutate == LayerManager.Mutate.SmoothGaussian ||
Mutation.Mutate == LayerManager.Mutate.SmoothMedian)
{
lbIterationsStop.Enabled =
nmIterationsEnd.Enabled =
@@ -185,8 +192,8 @@ namespace UVtools.GUI.Forms
return;
}
if (Mutation.Mutate == Mutation.Mutates.SmoothGaussian ||
Mutation.Mutate == Mutation.Mutates.SmoothMedian)
if (Mutation.Mutate == LayerManager.Mutate.SmoothGaussian ||
Mutation.Mutate == LayerManager.Mutate.SmoothMedian)
{
if (IterationsFade)
{
+296
View File
@@ -0,0 +1,296 @@
using UVtools.GUI.Controls;
namespace UVtools.GUI.Forms
{
partial class FrmMutationOneComboBox
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMutationOneComboBox));
this.lbDescription = new System.Windows.Forms.Label();
this.lbValue = new System.Windows.Forms.Label();
this.lbLayerRange = new System.Windows.Forms.Label();
this.nmLayerRangeStart = new System.Windows.Forms.NumericUpDown();
this.nmLayerRangeEnd = new System.Windows.Forms.NumericUpDown();
this.lbLayerRangeTo = new System.Windows.Forms.Label();
this.cmLayerRange = new System.Windows.Forms.ContextMenuStrip(this.components);
this.btnLayerRangeAllLayers = new System.Windows.Forms.ToolStripMenuItem();
this.btnLayerRangeCurrentLayer = new System.Windows.Forms.ToolStripMenuItem();
this.btnLayerRangeBottomLayers = new System.Windows.Forms.ToolStripMenuItem();
this.btnLayerRangeNormalLayers = new System.Windows.Forms.ToolStripMenuItem();
this.btnCancel = new System.Windows.Forms.Button();
this.btnMutate = new System.Windows.Forms.Button();
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
this.cbValue = new System.Windows.Forms.ComboBox();
this.btnLayerRangeSelect = new UVtools.GUI.Controls.SplitButton();
this.cbMakeCopy = new System.Windows.Forms.CheckBox();
((System.ComponentModel.ISupportInitialize)(this.nmLayerRangeStart)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nmLayerRangeEnd)).BeginInit();
this.cmLayerRange.SuspendLayout();
this.SuspendLayout();
//
// lbDescription
//
this.lbDescription.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.lbDescription.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbDescription.Location = new System.Drawing.Point(13, 14);
this.lbDescription.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbDescription.Name = "lbDescription";
this.lbDescription.Size = new System.Drawing.Size(584, 128);
this.lbDescription.TabIndex = 0;
this.lbDescription.Text = "Description";
//
// lbValue
//
this.lbValue.Location = new System.Drawing.Point(2, 185);
this.lbValue.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbValue.Name = "lbValue";
this.lbValue.Size = new System.Drawing.Size(108, 20);
this.lbValue.TabIndex = 3;
this.lbValue.Text = "Label:";
this.lbValue.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// lbLayerRange
//
this.lbLayerRange.AutoSize = true;
this.lbLayerRange.Location = new System.Drawing.Point(13, 150);
this.lbLayerRange.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbLayerRange.Name = "lbLayerRange";
this.lbLayerRange.Size = new System.Drawing.Size(97, 20);
this.lbLayerRange.TabIndex = 9;
this.lbLayerRange.Text = "Layer range:";
this.toolTip.SetToolTip(this.lbLayerRange, resources.GetString("lbLayerRange.ToolTip"));
//
// nmLayerRangeStart
//
this.nmLayerRangeStart.Location = new System.Drawing.Point(118, 147);
this.nmLayerRangeStart.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.nmLayerRangeStart.Maximum = new decimal(new int[] {
100000,
0,
0,
0});
this.nmLayerRangeStart.Name = "nmLayerRangeStart";
this.nmLayerRangeStart.Size = new System.Drawing.Size(120, 26);
this.nmLayerRangeStart.TabIndex = 0;
//
// nmLayerRangeEnd
//
this.nmLayerRangeEnd.Location = new System.Drawing.Point(314, 147);
this.nmLayerRangeEnd.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.nmLayerRangeEnd.Maximum = new decimal(new int[] {
100000,
0,
0,
0});
this.nmLayerRangeEnd.Name = "nmLayerRangeEnd";
this.nmLayerRangeEnd.Size = new System.Drawing.Size(120, 26);
this.nmLayerRangeEnd.TabIndex = 1;
//
// lbLayerRangeTo
//
this.lbLayerRangeTo.AutoSize = true;
this.lbLayerRangeTo.Location = new System.Drawing.Point(275, 150);
this.lbLayerRangeTo.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbLayerRangeTo.Name = "lbLayerRangeTo";
this.lbLayerRangeTo.Size = new System.Drawing.Size(31, 20);
this.lbLayerRangeTo.TabIndex = 12;
this.lbLayerRangeTo.Text = "To:";
//
// cmLayerRange
//
this.cmLayerRange.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.btnLayerRangeAllLayers,
this.btnLayerRangeCurrentLayer,
this.btnLayerRangeBottomLayers,
this.btnLayerRangeNormalLayers});
this.cmLayerRange.Name = "cmLayerRange";
this.cmLayerRange.Size = new System.Drawing.Size(226, 92);
//
// btnLayerRangeAllLayers
//
this.btnLayerRangeAllLayers.Name = "btnLayerRangeAllLayers";
this.btnLayerRangeAllLayers.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
| System.Windows.Forms.Keys.A)));
this.btnLayerRangeAllLayers.Size = new System.Drawing.Size(225, 22);
this.btnLayerRangeAllLayers.Text = "&All Layers";
this.btnLayerRangeAllLayers.Click += new System.EventHandler(this.ItemClicked);
//
// btnLayerRangeCurrentLayer
//
this.btnLayerRangeCurrentLayer.Name = "btnLayerRangeCurrentLayer";
this.btnLayerRangeCurrentLayer.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
| System.Windows.Forms.Keys.C)));
this.btnLayerRangeCurrentLayer.Size = new System.Drawing.Size(225, 22);
this.btnLayerRangeCurrentLayer.Text = "&Current Layer";
this.btnLayerRangeCurrentLayer.Click += new System.EventHandler(this.ItemClicked);
//
// btnLayerRangeBottomLayers
//
this.btnLayerRangeBottomLayers.Name = "btnLayerRangeBottomLayers";
this.btnLayerRangeBottomLayers.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
| System.Windows.Forms.Keys.B)));
this.btnLayerRangeBottomLayers.Size = new System.Drawing.Size(225, 22);
this.btnLayerRangeBottomLayers.Text = "&Bottom Layers";
this.btnLayerRangeBottomLayers.Click += new System.EventHandler(this.ItemClicked);
//
// btnLayerRangeNormalLayers
//
this.btnLayerRangeNormalLayers.Name = "btnLayerRangeNormalLayers";
this.btnLayerRangeNormalLayers.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
| System.Windows.Forms.Keys.N)));
this.btnLayerRangeNormalLayers.Size = new System.Drawing.Size(225, 22);
this.btnLayerRangeNormalLayers.Text = "&Normal Layers";
this.btnLayerRangeNormalLayers.Click += new System.EventHandler(this.ItemClicked);
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Image = global::UVtools.GUI.Properties.Resources.Cancel_24x24;
this.btnCancel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnCancel.Location = new System.Drawing.Point(434, 230);
this.btnCancel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(150, 48);
this.btnCancel.TabIndex = 6;
this.btnCancel.Text = "&Cancel";
this.btnCancel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.ItemClicked);
//
// btnMutate
//
this.btnMutate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnMutate.Image = global::UVtools.GUI.Properties.Resources.Ok_24x24;
this.btnMutate.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnMutate.Location = new System.Drawing.Point(276, 230);
this.btnMutate.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.btnMutate.Name = "btnMutate";
this.btnMutate.Size = new System.Drawing.Size(150, 48);
this.btnMutate.TabIndex = 5;
this.btnMutate.Text = "&Mutate";
this.btnMutate.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btnMutate.UseVisualStyleBackColor = true;
this.btnMutate.Click += new System.EventHandler(this.ItemClicked);
//
// toolTip
//
this.toolTip.AutoPopDelay = 32767;
this.toolTip.InitialDelay = 500;
this.toolTip.IsBalloon = true;
this.toolTip.ReshowDelay = 100;
this.toolTip.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info;
this.toolTip.ToolTipTitle = "Information";
//
// cbValue
//
this.cbValue.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbValue.FormattingEnabled = true;
this.cbValue.Location = new System.Drawing.Point(117, 181);
this.cbValue.Name = "cbValue";
this.cbValue.Size = new System.Drawing.Size(121, 28);
this.cbValue.TabIndex = 13;
//
// btnLayerRangeSelect
//
this.btnLayerRangeSelect.Location = new System.Drawing.Point(446, 146);
this.btnLayerRangeSelect.Menu = this.cmLayerRange;
this.btnLayerRangeSelect.Name = "btnLayerRangeSelect";
this.btnLayerRangeSelect.Size = new System.Drawing.Size(138, 26);
this.btnLayerRangeSelect.TabIndex = 2;
this.btnLayerRangeSelect.Text = "Select";
this.btnLayerRangeSelect.UseVisualStyleBackColor = true;
//
// cbMakeCopy
//
this.cbMakeCopy.AutoSize = true;
this.cbMakeCopy.Location = new System.Drawing.Point(244, 183);
this.cbMakeCopy.Name = "cbMakeCopy";
this.cbMakeCopy.Size = new System.Drawing.Size(104, 24);
this.cbMakeCopy.TabIndex = 14;
this.cbMakeCopy.Text = "Make copy";
this.cbMakeCopy.UseVisualStyleBackColor = true;
//
// FrmMutationOneComboBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(599, 292);
this.Controls.Add(this.cbMakeCopy);
this.Controls.Add(this.cbValue);
this.Controls.Add(this.btnLayerRangeSelect);
this.Controls.Add(this.lbLayerRangeTo);
this.Controls.Add(this.nmLayerRangeEnd);
this.Controls.Add(this.nmLayerRangeStart);
this.Controls.Add(this.lbLayerRange);
this.Controls.Add(this.btnMutate);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.lbValue);
this.Controls.Add(this.lbDescription);
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.KeyPreview = true;
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FrmMutationOneComboBox";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.Text = "Form1";
this.TopMost = true;
((System.ComponentModel.ISupportInitialize)(this.nmLayerRangeStart)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nmLayerRangeEnd)).EndInit();
this.cmLayerRange.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label lbDescription;
private System.Windows.Forms.Label lbValue;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnMutate;
private System.Windows.Forms.Label lbLayerRange;
private System.Windows.Forms.NumericUpDown nmLayerRangeStart;
private System.Windows.Forms.NumericUpDown nmLayerRangeEnd;
private System.Windows.Forms.Label lbLayerRangeTo;
private Controls.SplitButton btnLayerRangeSelect;
private System.Windows.Forms.ContextMenuStrip cmLayerRange;
private System.Windows.Forms.ToolStripMenuItem btnLayerRangeAllLayers;
private System.Windows.Forms.ToolStripMenuItem btnLayerRangeCurrentLayer;
private System.Windows.Forms.ToolStripMenuItem btnLayerRangeBottomLayers;
private System.Windows.Forms.ToolStripMenuItem btnLayerRangeNormalLayers;
private System.Windows.Forms.ToolTip toolTip;
private System.Windows.Forms.ComboBox cbValue;
private System.Windows.Forms.CheckBox cbMakeCopy;
}
}
@@ -0,0 +1,182 @@
/*
* GNU AFFERO GENERAL PUBLIC LICENSE
* Version 3, 19 November 2007
* Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
* Everyone is permitted to copy and distribute verbatim copies
* of this license document, but changing it is not allowed.
*/
using System;
using System.Windows.Forms;
using UVtools.Core;
namespace UVtools.GUI.Forms
{
public partial class FrmMutationOneComboBox : Form
{
#region Properties
private Mutation Mutation { get; }
public uint LayerRangeStart
{
get => (uint) nmLayerRangeStart.Value;
set => nmLayerRangeStart.Value = value;
}
public uint LayerRangeEnd
{
get => (uint)Math.Min(nmLayerRangeEnd.Value, Program.SlicerFile.LayerCount-1);
set => nmLayerRangeEnd.Value = value;
}
public int SelectedValue
{
get => cbValue.SelectedIndex;
set => cbValue.SelectedIndex = value;
}
public bool MakeCopy
{
get => cbMakeCopy.Checked;
set => cbMakeCopy.Checked = value;
}
#endregion
#region Constructors
public FrmMutationOneComboBox(Mutation mutation)
{
InitializeComponent();
Mutation = mutation;
DialogResult = DialogResult.Cancel;
Text = $"Mutate: {mutation.Mutate}";
lbDescription.Text = Mutation.Description;
nmLayerRangeEnd.Value = Program.SlicerFile.LayerCount-1;
switch (mutation.Mutate)
{
case LayerManager.Mutate.Flip:
lbValue.Text = "Flip Direction";
cbValue.Items.AddRange(new object[]
{
"Horizontally",
"Vertically",
"Both"
});
break;
}
SelectedValue = 0;
}
#endregion
#region Overrides
protected override void OnKeyUp(KeyEventArgs e)
{
base.OnKeyUp(e);
if (e.KeyCode == Keys.Enter)
{
btnMutate.PerformClick();
e.Handled = true;
return;
}
if ((ModifierKeys & Keys.Shift) == Keys.Shift && (ModifierKeys & Keys.Control) == Keys.Control)
{
if (e.KeyCode == Keys.A)
{
btnLayerRangeAllLayers.PerformClick();
e.Handled = true;
return;
}
if (e.KeyCode == Keys.C)
{
btnLayerRangeCurrentLayer.PerformClick();
e.Handled = true;
return;
}
if (e.KeyCode == Keys.B)
{
btnLayerRangeBottomLayers.PerformClick();
e.Handled = true;
return;
}
if (e.KeyCode == Keys.N)
{
btnLayerRangeNormalLayers.PerformClick();
e.Handled = true;
return;
}
}
}
#endregion
#region Events
private void ItemClicked(object sender, EventArgs e)
{
if (ReferenceEquals(sender, btnLayerRangeAllLayers))
{
nmLayerRangeStart.Value = 0;
nmLayerRangeEnd.Value = Program.SlicerFile.LayerCount-1;
return;
}
if (ReferenceEquals(sender, btnLayerRangeCurrentLayer))
{
nmLayerRangeStart.Value = Program.FrmMain.ActualLayer;
nmLayerRangeEnd.Value = Program.FrmMain.ActualLayer;
return;
}
if (ReferenceEquals(sender, btnLayerRangeBottomLayers))
{
nmLayerRangeStart.Value = 0;
nmLayerRangeEnd.Value = Program.SlicerFile.InitialLayerCount-1;
return;
}
if (ReferenceEquals(sender, btnLayerRangeNormalLayers))
{
nmLayerRangeStart.Value = Program.SlicerFile.InitialLayerCount - 1;
nmLayerRangeEnd.Value = Program.SlicerFile.LayerCount - 1;
return;
}
if (ReferenceEquals(sender, btnMutate))
{
if (!btnMutate.Enabled) return;
if (LayerRangeStart > LayerRangeEnd)
{
MessageBox.Show("Layer range start can't be higher than layer end.\nPlease fix and try again.", Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
nmLayerRangeStart.Select();
return;
}
if (MessageBox.Show($"Are you sure you want to {Mutation.Mutate}?", Text, MessageBoxButtons.YesNo,
MessageBoxIcon.Question) == DialogResult.Yes)
{
DialogResult = DialogResult.OK;
Close();
}
return;
}
if (ReferenceEquals(sender, btnCancel))
{
DialogResult = DialogResult.Cancel;
return;
}
}
#endregion
}
}
@@ -0,0 +1,131 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>148, 17</value>
</metadata>
<data name="lbLayerRange.ToolTip" xml:space="preserve">
<value>Selects the layers range within start layer and end layer where mutator will operate.
Select same layer start as end to operate only within that layer.
Note: "Layer Start" start can't be higher than "Layer End".</value>
</data>
<metadata name="cmLayerRange.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
+289
View File
@@ -0,0 +1,289 @@
using UVtools.GUI.Controls;
namespace UVtools.GUI.Forms
{
partial class FrmMutationOneNumericalInput
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMutationOneNumericalInput));
this.lbDescription = new System.Windows.Forms.Label();
this.lbValue = new System.Windows.Forms.Label();
this.lbLayerRange = new System.Windows.Forms.Label();
this.nmLayerRangeStart = new System.Windows.Forms.NumericUpDown();
this.nmLayerRangeEnd = new System.Windows.Forms.NumericUpDown();
this.lbLayerRangeTo = new System.Windows.Forms.Label();
this.cmLayerRange = new System.Windows.Forms.ContextMenuStrip(this.components);
this.btnLayerRangeAllLayers = new System.Windows.Forms.ToolStripMenuItem();
this.btnLayerRangeCurrentLayer = new System.Windows.Forms.ToolStripMenuItem();
this.btnLayerRangeBottomLayers = new System.Windows.Forms.ToolStripMenuItem();
this.btnLayerRangeNormalLayers = new System.Windows.Forms.ToolStripMenuItem();
this.btnCancel = new System.Windows.Forms.Button();
this.btnMutate = new System.Windows.Forms.Button();
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
this.nmValue = new System.Windows.Forms.NumericUpDown();
this.btnLayerRangeSelect = new UVtools.GUI.Controls.SplitButton();
((System.ComponentModel.ISupportInitialize)(this.nmLayerRangeStart)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nmLayerRangeEnd)).BeginInit();
this.cmLayerRange.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nmValue)).BeginInit();
this.SuspendLayout();
//
// lbDescription
//
this.lbDescription.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.lbDescription.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbDescription.Location = new System.Drawing.Point(13, 14);
this.lbDescription.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbDescription.Name = "lbDescription";
this.lbDescription.Size = new System.Drawing.Size(584, 128);
this.lbDescription.TabIndex = 0;
this.lbDescription.Text = "Description";
//
// lbValue
//
this.lbValue.Location = new System.Drawing.Point(13, 185);
this.lbValue.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbValue.Name = "lbValue";
this.lbValue.Size = new System.Drawing.Size(293, 20);
this.lbValue.TabIndex = 3;
this.lbValue.Text = "Label:";
this.lbValue.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// lbLayerRange
//
this.lbLayerRange.AutoSize = true;
this.lbLayerRange.Location = new System.Drawing.Point(13, 150);
this.lbLayerRange.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbLayerRange.Name = "lbLayerRange";
this.lbLayerRange.Size = new System.Drawing.Size(97, 20);
this.lbLayerRange.TabIndex = 9;
this.lbLayerRange.Text = "Layer range:";
this.toolTip.SetToolTip(this.lbLayerRange, resources.GetString("lbLayerRange.ToolTip"));
//
// nmLayerRangeStart
//
this.nmLayerRangeStart.Location = new System.Drawing.Point(118, 147);
this.nmLayerRangeStart.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.nmLayerRangeStart.Maximum = new decimal(new int[] {
100000,
0,
0,
0});
this.nmLayerRangeStart.Name = "nmLayerRangeStart";
this.nmLayerRangeStart.Size = new System.Drawing.Size(120, 26);
this.nmLayerRangeStart.TabIndex = 0;
//
// nmLayerRangeEnd
//
this.nmLayerRangeEnd.Location = new System.Drawing.Point(314, 147);
this.nmLayerRangeEnd.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.nmLayerRangeEnd.Maximum = new decimal(new int[] {
100000,
0,
0,
0});
this.nmLayerRangeEnd.Name = "nmLayerRangeEnd";
this.nmLayerRangeEnd.Size = new System.Drawing.Size(120, 26);
this.nmLayerRangeEnd.TabIndex = 1;
//
// lbLayerRangeTo
//
this.lbLayerRangeTo.AutoSize = true;
this.lbLayerRangeTo.Location = new System.Drawing.Point(275, 150);
this.lbLayerRangeTo.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbLayerRangeTo.Name = "lbLayerRangeTo";
this.lbLayerRangeTo.Size = new System.Drawing.Size(31, 20);
this.lbLayerRangeTo.TabIndex = 12;
this.lbLayerRangeTo.Text = "To:";
//
// cmLayerRange
//
this.cmLayerRange.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.btnLayerRangeAllLayers,
this.btnLayerRangeCurrentLayer,
this.btnLayerRangeBottomLayers,
this.btnLayerRangeNormalLayers});
this.cmLayerRange.Name = "cmLayerRange";
this.cmLayerRange.Size = new System.Drawing.Size(226, 92);
//
// btnLayerRangeAllLayers
//
this.btnLayerRangeAllLayers.Name = "btnLayerRangeAllLayers";
this.btnLayerRangeAllLayers.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
| System.Windows.Forms.Keys.A)));
this.btnLayerRangeAllLayers.Size = new System.Drawing.Size(225, 22);
this.btnLayerRangeAllLayers.Text = "&All Layers";
this.btnLayerRangeAllLayers.Click += new System.EventHandler(this.ItemClicked);
//
// btnLayerRangeCurrentLayer
//
this.btnLayerRangeCurrentLayer.Name = "btnLayerRangeCurrentLayer";
this.btnLayerRangeCurrentLayer.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
| System.Windows.Forms.Keys.C)));
this.btnLayerRangeCurrentLayer.Size = new System.Drawing.Size(225, 22);
this.btnLayerRangeCurrentLayer.Text = "&Current Layer";
this.btnLayerRangeCurrentLayer.Click += new System.EventHandler(this.ItemClicked);
//
// btnLayerRangeBottomLayers
//
this.btnLayerRangeBottomLayers.Name = "btnLayerRangeBottomLayers";
this.btnLayerRangeBottomLayers.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
| System.Windows.Forms.Keys.B)));
this.btnLayerRangeBottomLayers.Size = new System.Drawing.Size(225, 22);
this.btnLayerRangeBottomLayers.Text = "&Bottom Layers";
this.btnLayerRangeBottomLayers.Click += new System.EventHandler(this.ItemClicked);
//
// btnLayerRangeNormalLayers
//
this.btnLayerRangeNormalLayers.Name = "btnLayerRangeNormalLayers";
this.btnLayerRangeNormalLayers.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
| System.Windows.Forms.Keys.N)));
this.btnLayerRangeNormalLayers.Size = new System.Drawing.Size(225, 22);
this.btnLayerRangeNormalLayers.Text = "&Normal Layers";
this.btnLayerRangeNormalLayers.Click += new System.EventHandler(this.ItemClicked);
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Image = global::UVtools.GUI.Properties.Resources.Cancel_24x24;
this.btnCancel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnCancel.Location = new System.Drawing.Point(434, 230);
this.btnCancel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(150, 48);
this.btnCancel.TabIndex = 6;
this.btnCancel.Text = "&Cancel";
this.btnCancel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.ItemClicked);
//
// btnMutate
//
this.btnMutate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnMutate.Image = global::UVtools.GUI.Properties.Resources.Ok_24x24;
this.btnMutate.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnMutate.Location = new System.Drawing.Point(276, 230);
this.btnMutate.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.btnMutate.Name = "btnMutate";
this.btnMutate.Size = new System.Drawing.Size(150, 48);
this.btnMutate.TabIndex = 5;
this.btnMutate.Text = "&Mutate";
this.btnMutate.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btnMutate.UseVisualStyleBackColor = true;
this.btnMutate.Click += new System.EventHandler(this.ItemClicked);
//
// toolTip
//
this.toolTip.AutoPopDelay = 32767;
this.toolTip.InitialDelay = 500;
this.toolTip.IsBalloon = true;
this.toolTip.ReshowDelay = 100;
this.toolTip.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info;
this.toolTip.ToolTipTitle = "Information";
//
// nmValue
//
this.nmValue.Location = new System.Drawing.Point(314, 183);
this.nmValue.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.nmValue.Maximum = new decimal(new int[] {
100000,
0,
0,
0});
this.nmValue.Name = "nmValue";
this.nmValue.Size = new System.Drawing.Size(120, 26);
this.nmValue.TabIndex = 13;
//
// btnLayerRangeSelect
//
this.btnLayerRangeSelect.Location = new System.Drawing.Point(446, 146);
this.btnLayerRangeSelect.Menu = this.cmLayerRange;
this.btnLayerRangeSelect.Name = "btnLayerRangeSelect";
this.btnLayerRangeSelect.Size = new System.Drawing.Size(138, 26);
this.btnLayerRangeSelect.TabIndex = 2;
this.btnLayerRangeSelect.Text = "Select";
this.btnLayerRangeSelect.UseVisualStyleBackColor = true;
//
// FrmMutationOneNumericalInput
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(599, 292);
this.Controls.Add(this.nmValue);
this.Controls.Add(this.btnLayerRangeSelect);
this.Controls.Add(this.lbLayerRangeTo);
this.Controls.Add(this.nmLayerRangeEnd);
this.Controls.Add(this.nmLayerRangeStart);
this.Controls.Add(this.lbLayerRange);
this.Controls.Add(this.btnMutate);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.lbValue);
this.Controls.Add(this.lbDescription);
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.KeyPreview = true;
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FrmMutationOneNumericalInput";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.Text = "Form1";
this.TopMost = true;
((System.ComponentModel.ISupportInitialize)(this.nmLayerRangeStart)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nmLayerRangeEnd)).EndInit();
this.cmLayerRange.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.nmValue)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label lbDescription;
private System.Windows.Forms.Label lbValue;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnMutate;
private System.Windows.Forms.Label lbLayerRange;
private System.Windows.Forms.NumericUpDown nmLayerRangeStart;
private System.Windows.Forms.NumericUpDown nmLayerRangeEnd;
private System.Windows.Forms.Label lbLayerRangeTo;
private Controls.SplitButton btnLayerRangeSelect;
private System.Windows.Forms.ContextMenuStrip cmLayerRange;
private System.Windows.Forms.ToolStripMenuItem btnLayerRangeAllLayers;
private System.Windows.Forms.ToolStripMenuItem btnLayerRangeCurrentLayer;
private System.Windows.Forms.ToolStripMenuItem btnLayerRangeBottomLayers;
private System.Windows.Forms.ToolStripMenuItem btnLayerRangeNormalLayers;
private System.Windows.Forms.ToolTip toolTip;
private System.Windows.Forms.NumericUpDown nmValue;
}
}
@@ -0,0 +1,173 @@
/*
* GNU AFFERO GENERAL PUBLIC LICENSE
* Version 3, 19 November 2007
* Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
* Everyone is permitted to copy and distribute verbatim copies
* of this license document, but changing it is not allowed.
*/
using System;
using System.Windows.Forms;
using UVtools.Core;
namespace UVtools.GUI.Forms
{
public partial class FrmMutationOneNumericalInput : Form
{
#region Properties
private Mutation Mutation { get; }
public uint LayerRangeStart
{
get => (uint) nmLayerRangeStart.Value;
set => nmLayerRangeStart.Value = value;
}
public uint LayerRangeEnd
{
get => (uint)Math.Min(nmLayerRangeEnd.Value, Program.SlicerFile.LayerCount-1);
set => nmLayerRangeEnd.Value = value;
}
public decimal Value
{
get => nmValue.Value;
set => nmValue.Value = value;
}
#endregion
#region Constructors
public FrmMutationOneNumericalInput(Mutation mutation)
{
InitializeComponent();
Mutation = mutation;
DialogResult = DialogResult.Cancel;
Text = $"Mutate: {mutation.Mutate}";
lbDescription.Text = Mutation.Description;
nmLayerRangeEnd.Value = Program.SlicerFile.LayerCount-1;
switch (mutation.Mutate)
{
case LayerManager.Mutate.Rotate:
lbValue.Text = "Rotation degrees:";
nmValue.Maximum = 360;
nmValue.Minimum = -360;
nmValue.DecimalPlaces = 2;
Value = 90;
break;
}
}
#endregion
#region Overrides
protected override void OnKeyUp(KeyEventArgs e)
{
base.OnKeyUp(e);
if (e.KeyCode == Keys.Enter)
{
btnMutate.PerformClick();
e.Handled = true;
return;
}
if ((ModifierKeys & Keys.Shift) == Keys.Shift && (ModifierKeys & Keys.Control) == Keys.Control)
{
if (e.KeyCode == Keys.A)
{
btnLayerRangeAllLayers.PerformClick();
e.Handled = true;
return;
}
if (e.KeyCode == Keys.C)
{
btnLayerRangeCurrentLayer.PerformClick();
e.Handled = true;
return;
}
if (e.KeyCode == Keys.B)
{
btnLayerRangeBottomLayers.PerformClick();
e.Handled = true;
return;
}
if (e.KeyCode == Keys.N)
{
btnLayerRangeNormalLayers.PerformClick();
e.Handled = true;
return;
}
}
}
#endregion
#region Events
private void ItemClicked(object sender, EventArgs e)
{
if (ReferenceEquals(sender, btnLayerRangeAllLayers))
{
nmLayerRangeStart.Value = 0;
nmLayerRangeEnd.Value = Program.SlicerFile.LayerCount-1;
return;
}
if (ReferenceEquals(sender, btnLayerRangeCurrentLayer))
{
nmLayerRangeStart.Value = Program.FrmMain.ActualLayer;
nmLayerRangeEnd.Value = Program.FrmMain.ActualLayer;
return;
}
if (ReferenceEquals(sender, btnLayerRangeBottomLayers))
{
nmLayerRangeStart.Value = 0;
nmLayerRangeEnd.Value = Program.SlicerFile.InitialLayerCount-1;
return;
}
if (ReferenceEquals(sender, btnLayerRangeNormalLayers))
{
nmLayerRangeStart.Value = Program.SlicerFile.InitialLayerCount - 1;
nmLayerRangeEnd.Value = Program.SlicerFile.LayerCount - 1;
return;
}
if (ReferenceEquals(sender, btnMutate))
{
if (!btnMutate.Enabled) return;
if (LayerRangeStart > LayerRangeEnd)
{
MessageBox.Show("Layer range start can't be higher than layer end.\nPlease fix and try again.", Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
nmLayerRangeStart.Select();
return;
}
if (MessageBox.Show($"Are you sure you want to {Mutation.Mutate}?", Text, MessageBoxButtons.YesNo,
MessageBoxIcon.Question) == DialogResult.Yes)
{
DialogResult = DialogResult.OK;
Close();
}
return;
}
if (ReferenceEquals(sender, btnCancel))
{
DialogResult = DialogResult.Cancel;
return;
}
}
#endregion
}
}
@@ -0,0 +1,131 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>148, 17</value>
</metadata>
<data name="lbLayerRange.ToolTip" xml:space="preserve">
<value>Selects the layers range within start layer and end layer where mutator will operate.
Select same layer start as end to operate only within that layer.
Note: "Layer Start" start can't be higher than "Layer End".</value>
</data>
<metadata name="cmLayerRange.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
+76 -76
View File
@@ -34,7 +34,6 @@ namespace UVtools.GUI.Forms
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMutationResize));
this.lbDescription = new System.Windows.Forms.Label();
this.lbX = new System.Windows.Forms.Label();
this.nmX = new System.Windows.Forms.NumericUpDown();
this.lbLayerRange = new System.Windows.Forms.Label();
this.nmLayerRangeStart = new System.Windows.Forms.NumericUpDown();
this.nmLayerRangeEnd = new System.Windows.Forms.NumericUpDown();
@@ -44,20 +43,21 @@ namespace UVtools.GUI.Forms
this.btnLayerRangeCurrentLayer = new System.Windows.Forms.ToolStripMenuItem();
this.btnLayerRangeBottomLayers = new System.Windows.Forms.ToolStripMenuItem();
this.btnLayerRangeNormalLayers = new System.Windows.Forms.ToolStripMenuItem();
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
this.btnLayerRangeSelect = new UVtools.GUI.Controls.SplitButton();
this.btnCancel = new System.Windows.Forms.Button();
this.btnMutate = new System.Windows.Forms.Button();
this.nmX = new System.Windows.Forms.NumericUpDown();
this.label1 = new System.Windows.Forms.Label();
this.lbY = new System.Windows.Forms.Label();
this.nmY = new System.Windows.Forms.NumericUpDown();
this.cbConstrainXY = new System.Windows.Forms.CheckBox();
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.btnLayerRangeSelect = new UVtools.GUI.Controls.SplitButton();
this.cbConstrainXY = new System.Windows.Forms.CheckBox();
this.cbFade = new System.Windows.Forms.CheckBox();
((System.ComponentModel.ISupportInitialize)(this.nmX)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nmLayerRangeStart)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nmLayerRangeEnd)).BeginInit();
this.cmLayerRange.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nmX)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nmY)).BeginInit();
this.SuspendLayout();
//
@@ -84,31 +84,6 @@ namespace UVtools.GUI.Forms
this.lbX.Text = "X:";
this.toolTip.SetToolTip(this.lbX, resources.GetString("lbX.ToolTip"));
//
// nmX
//
this.nmX.DecimalPlaces = 2;
this.nmX.Location = new System.Drawing.Point(118, 187);
this.nmX.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.nmX.Maximum = new decimal(new int[] {
1000,
0,
0,
0});
this.nmX.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.nmX.Name = "nmX";
this.nmX.Size = new System.Drawing.Size(120, 26);
this.nmX.TabIndex = 3;
this.nmX.Value = new decimal(new int[] {
100,
0,
0,
0});
this.nmX.ValueChanged += new System.EventHandler(this.EventValueChanged);
//
// lbLayerRange
//
this.lbLayerRange.AutoSize = true;
@@ -202,6 +177,25 @@ namespace UVtools.GUI.Forms
this.btnLayerRangeNormalLayers.Text = "&Normal Layers";
this.btnLayerRangeNormalLayers.Click += new System.EventHandler(this.ItemClicked);
//
// toolTip
//
this.toolTip.AutoPopDelay = 32767;
this.toolTip.InitialDelay = 500;
this.toolTip.IsBalloon = true;
this.toolTip.ReshowDelay = 100;
this.toolTip.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info;
this.toolTip.ToolTipTitle = "Information";
//
// btnLayerRangeSelect
//
this.btnLayerRangeSelect.Location = new System.Drawing.Point(446, 146);
this.btnLayerRangeSelect.Menu = this.cmLayerRange;
this.btnLayerRangeSelect.Name = "btnLayerRangeSelect";
this.btnLayerRangeSelect.Size = new System.Drawing.Size(138, 26);
this.btnLayerRangeSelect.TabIndex = 2;
this.btnLayerRangeSelect.Text = "Select";
this.btnLayerRangeSelect.UseVisualStyleBackColor = true;
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
@@ -233,6 +227,42 @@ namespace UVtools.GUI.Forms
this.btnMutate.UseVisualStyleBackColor = true;
this.btnMutate.Click += new System.EventHandler(this.ItemClicked);
//
// nmX
//
this.nmX.DecimalPlaces = 2;
this.nmX.Location = new System.Drawing.Point(118, 187);
this.nmX.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.nmX.Maximum = new decimal(new int[] {
1000,
0,
0,
0});
this.nmX.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.nmX.Name = "nmX";
this.nmX.Size = new System.Drawing.Size(120, 26);
this.nmX.TabIndex = 3;
this.nmX.Value = new decimal(new int[] {
100,
0,
0,
0});
this.nmX.ValueChanged += new System.EventHandler(this.EventValueChanged);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(246, 190);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(23, 20);
this.label1.TabIndex = 16;
this.label1.Text = "%";
this.toolTip.SetToolTip(this.label1, resources.GetString("label1.ToolTip"));
//
// lbY
//
this.lbY.AutoSize = true;
@@ -269,38 +299,6 @@ namespace UVtools.GUI.Forms
0,
0});
//
// cbConstrainXY
//
this.cbConstrainXY.AutoSize = true;
this.cbConstrainXY.Checked = true;
this.cbConstrainXY.CheckState = System.Windows.Forms.CheckState.Checked;
this.cbConstrainXY.Location = new System.Drawing.Point(470, 188);
this.cbConstrainXY.Name = "cbConstrainXY";
this.cbConstrainXY.Size = new System.Drawing.Size(126, 24);
this.cbConstrainXY.TabIndex = 15;
this.cbConstrainXY.Text = "Constrain X/Y";
this.cbConstrainXY.CheckedChanged += new System.EventHandler(this.EventCheckedChanged);
//
// toolTip
//
this.toolTip.AutoPopDelay = 32767;
this.toolTip.InitialDelay = 500;
this.toolTip.IsBalloon = true;
this.toolTip.ReshowDelay = 100;
this.toolTip.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info;
this.toolTip.ToolTipTitle = "Information";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(246, 190);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(23, 20);
this.label1.TabIndex = 16;
this.label1.Text = "%";
this.toolTip.SetToolTip(this.label1, resources.GetString("label1.ToolTip"));
//
// label2
//
this.label2.AutoSize = true;
@@ -312,15 +310,17 @@ namespace UVtools.GUI.Forms
this.label2.Text = "%";
this.toolTip.SetToolTip(this.label2, resources.GetString("label2.ToolTip"));
//
// btnLayerRangeSelect
// cbConstrainXY
//
this.btnLayerRangeSelect.Location = new System.Drawing.Point(446, 146);
this.btnLayerRangeSelect.Menu = this.cmLayerRange;
this.btnLayerRangeSelect.Name = "btnLayerRangeSelect";
this.btnLayerRangeSelect.Size = new System.Drawing.Size(138, 26);
this.btnLayerRangeSelect.TabIndex = 2;
this.btnLayerRangeSelect.Text = "Select";
this.btnLayerRangeSelect.UseVisualStyleBackColor = true;
this.cbConstrainXY.AutoSize = true;
this.cbConstrainXY.Checked = true;
this.cbConstrainXY.CheckState = System.Windows.Forms.CheckState.Checked;
this.cbConstrainXY.Location = new System.Drawing.Point(470, 188);
this.cbConstrainXY.Name = "cbConstrainXY";
this.cbConstrainXY.Size = new System.Drawing.Size(126, 24);
this.cbConstrainXY.TabIndex = 15;
this.cbConstrainXY.Text = "Constrain X/Y";
this.cbConstrainXY.CheckedChanged += new System.EventHandler(this.EventCheckedChanged);
//
// cbFade
//
@@ -364,10 +364,10 @@ namespace UVtools.GUI.Forms
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.Text = "Form1";
this.TopMost = true;
((System.ComponentModel.ISupportInitialize)(this.nmX)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nmLayerRangeStart)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nmLayerRangeEnd)).EndInit();
this.cmLayerRange.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.nmX)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nmY)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -378,7 +378,6 @@ namespace UVtools.GUI.Forms
private System.Windows.Forms.Label lbDescription;
private System.Windows.Forms.Label lbX;
private System.Windows.Forms.NumericUpDown nmX;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnMutate;
private System.Windows.Forms.Label lbLayerRange;
@@ -391,12 +390,13 @@ namespace UVtools.GUI.Forms
private System.Windows.Forms.ToolStripMenuItem btnLayerRangeCurrentLayer;
private System.Windows.Forms.ToolStripMenuItem btnLayerRangeBottomLayers;
private System.Windows.Forms.ToolStripMenuItem btnLayerRangeNormalLayers;
private System.Windows.Forms.ToolTip toolTip;
private System.Windows.Forms.NumericUpDown nmX;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label lbY;
private System.Windows.Forms.NumericUpDown nmY;
private System.Windows.Forms.CheckBox cbConstrainXY;
private System.Windows.Forms.ToolTip toolTip;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.CheckBox cbConstrainXY;
private System.Windows.Forms.CheckBox cbFade;
}
}
File diff suppressed because it is too large Load Diff
+157
View File
@@ -0,0 +1,157 @@
using System;
using System.Windows.Forms;
using UVtools.GUI.Properties;
namespace UVtools.GUI.Forms
{
public partial class FrmSettings : Form
{
public FrmSettings()
{
InitializeComponent();
Init();
}
public void Init()
{
try
{
cbCheckForUpdatesOnStartup.Checked = Settings.Default.CheckForUpdatesOnStartup;
cbStartMaximized.Checked = Settings.Default.StartMaximized;
btnPreviousNextLayerColor.BackColor = Settings.Default.PreviousNextLayerColor;
btnPreviousLayerColor.BackColor = Settings.Default.PreviousLayerColor;
btnNextLayerColor.BackColor = Settings.Default.NextLayerColor;
btnIslandColor.BackColor = Settings.Default.IslandColor;
btnResinTrapColor.BackColor = Settings.Default.ResinTrapColor;
btnTouchingBoundsColor.BackColor = Settings.Default.TouchingBoundsColor;
btnOutlinePrintVolumeBoundsColor.BackColor = Settings.Default.OutlinePrintVolumeBoundsColor;
btnOutlineLayerBoundsColor.BackColor = Settings.Default.OutlineLayerBoundsColor;
btnOutlineHollowAreasColor.BackColor = Settings.Default.OutlineHollowAreasColor;
nmOutlinePrintVolumeBoundsLineThickness.Value = Settings.Default.OutlinePrintVolumeBoundsLineThickness;
nmOutlineLayerBoundsLineThickness.Value = Settings.Default.OutlineLayerBoundsLineThickness;
nmOutlineHollowAreasLineThickness.Value = Settings.Default.OutlineHollowAreasLineThickness;
cbOutlinePrintVolumeBounds.Checked = Settings.Default.OutlinePrintVolumeBounds;
cbOutlineLayerBounds.Checked = Settings.Default.OutlineLayerBounds;
cbOutlineHollowAreas.Checked = Settings.Default.OutlineHollowAreas;
cbLayerAutoRotateBestView.Checked = Settings.Default.LayerAutoRotateBestView;
cbLayerZoomToFit.Checked = Settings.Default.LayerZoomToFit;
cbZoomToFitPrintVolumeBounds.Checked = Settings.Default.ZoomToFitPrintVolumeBounds;
cbLayerDifferenceDefault.Checked = Settings.Default.LayerDifferenceDefault;
cbComputeIssuesOnLoad.Checked = Settings.Default.ComputeIssuesOnLoad;
cbComputeIslands.Checked = Settings.Default.ComputeIslands;
cbComputeResinTraps.Checked = Settings.Default.ComputeResinTraps;
cbAutoComputeIssuesClickOnTab.Checked = Settings.Default.AutoComputeIssuesClickOnTab;
nmIslandBinaryThreshold.Value = Settings.Default.IslandBinaryThreshold;
nmIslandRequiredAreaToProcessCheck.Value = Settings.Default.IslandRequiredAreaToProcessCheck;
nmIslandRequiredPixelBrightnessToProcessCheck.Value = Settings.Default.IslandRequiredPixelBrightnessToProcessCheck;
nmIslandRequiredPixelsToSupport.Value = Settings.Default.IslandRequiredPixelsToSupport;
nmIslandRequiredPixelBrightnessToSupport.Value = Settings.Default.IslandRequiredPixelBrightnessToSupport;
nmResinTrapBinaryThreshold.Value = Settings.Default.ResinTrapBinaryThreshold;
nmResinTrapRequiredAreaToProcessCheck.Value = Settings.Default.ResinTrapRequiredAreaToProcessCheck;
nmResinTrapRequiredBlackPixelsToDrain.Value = Settings.Default.ResinTrapRequiredBlackPixelsToDrain;
nmResinTrapMaximumPixelBrightnessToDrain.Value = Settings.Default.ResinTrapMaximumPixelBrightnessToDrain;
}
catch (Exception ex)
{
MessageBox.Show($"Unable to use current settings, a reset will be performed.\n{ex.Message}",
"Unable to use current settings", MessageBoxButtons.OK, MessageBoxIcon.Error);
Settings.Default.Reset();
Settings.Default.Save();
Init();
}
}
private void EventClick(object sender, EventArgs e)
{
if (
ReferenceEquals(sender, btnPreviousNextLayerColor) ||
ReferenceEquals(sender, btnPreviousLayerColor) ||
ReferenceEquals(sender, btnNextLayerColor) ||
ReferenceEquals(sender, btnIslandColor) ||
ReferenceEquals(sender, btnResinTrapColor) ||
ReferenceEquals(sender, btnTouchingBoundsColor) ||
ReferenceEquals(sender, btnOutlinePrintVolumeBoundsColor) ||
ReferenceEquals(sender, btnOutlineLayerBoundsColor) ||
ReferenceEquals(sender, btnOutlineHollowAreasColor)
)
{
Button btn = sender as Button;
colorDialog.Color = btn.BackColor;
if (colorDialog.ShowDialog() != DialogResult.OK) return;
btn.BackColor = colorDialog.Color;
return;
}
if (ReferenceEquals(sender, btnReset))
{
if (MessageBox.Show("Are you sure you want to reset the settings to the default values?",
"Reset settings?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) !=
DialogResult.Yes) return;
Settings.Default.Reset();
Init();
return;
}
if (ReferenceEquals(sender, btnSave))
{
Settings.Default.CheckForUpdatesOnStartup = cbCheckForUpdatesOnStartup.Checked;
Settings.Default.StartMaximized = cbStartMaximized.Checked;
Settings.Default.PreviousNextLayerColor = btnPreviousNextLayerColor.BackColor;
Settings.Default.PreviousLayerColor = btnPreviousLayerColor.BackColor;
Settings.Default.NextLayerColor = btnNextLayerColor.BackColor;
Settings.Default.IslandColor = btnIslandColor.BackColor;
Settings.Default.ResinTrapColor = btnResinTrapColor.BackColor;
Settings.Default.TouchingBoundsColor = btnTouchingBoundsColor.BackColor;
Settings.Default.OutlinePrintVolumeBoundsColor = btnOutlinePrintVolumeBoundsColor.BackColor;
Settings.Default.OutlineLayerBoundsColor = btnOutlineLayerBoundsColor.BackColor;
Settings.Default.OutlineHollowAreasColor = btnOutlineHollowAreasColor.BackColor;
Settings.Default.OutlinePrintVolumeBoundsLineThickness = (byte) nmOutlinePrintVolumeBoundsLineThickness.Value;
Settings.Default.OutlineLayerBoundsLineThickness = (byte) nmOutlineLayerBoundsLineThickness.Value;
Settings.Default.OutlineHollowAreasLineThickness = (sbyte) nmOutlineHollowAreasLineThickness.Value;
Settings.Default.OutlinePrintVolumeBounds = cbOutlinePrintVolumeBounds.Checked;
Settings.Default.OutlineLayerBounds = cbOutlineLayerBounds.Checked;
Settings.Default.OutlineHollowAreas = cbOutlineHollowAreas.Checked;
Settings.Default.LayerAutoRotateBestView = cbLayerAutoRotateBestView.Checked;
Settings.Default.LayerZoomToFit = cbLayerZoomToFit.Checked;
Settings.Default.ZoomToFitPrintVolumeBounds = cbZoomToFitPrintVolumeBounds.Checked;
Settings.Default.LayerDifferenceDefault = cbLayerDifferenceDefault.Checked;
Settings.Default.ComputeIssuesOnLoad = cbComputeIssuesOnLoad.Checked;
Settings.Default.ComputeIslands = cbComputeIslands.Checked;
Settings.Default.ComputeResinTraps = cbComputeResinTraps.Checked;
Settings.Default.AutoComputeIssuesClickOnTab = cbAutoComputeIssuesClickOnTab.Checked;
Settings.Default.IslandBinaryThreshold = (byte)nmIslandBinaryThreshold.Value;
Settings.Default.IslandRequiredAreaToProcessCheck = (byte) nmIslandRequiredAreaToProcessCheck.Value;
Settings.Default.IslandRequiredPixelBrightnessToProcessCheck = (byte)nmIslandRequiredPixelBrightnessToProcessCheck.Value;
Settings.Default.IslandRequiredPixelsToSupport = (byte)nmIslandRequiredPixelsToSupport.Value;
Settings.Default.IslandRequiredPixelBrightnessToSupport = (byte)nmIslandRequiredPixelBrightnessToSupport.Value;
Settings.Default.ResinTrapBinaryThreshold = (byte) nmResinTrapBinaryThreshold.Value;
Settings.Default.ResinTrapRequiredAreaToProcessCheck = (byte)nmResinTrapRequiredAreaToProcessCheck.Value;
Settings.Default.ResinTrapRequiredBlackPixelsToDrain = (byte)nmResinTrapRequiredBlackPixelsToDrain.Value;
Settings.Default.ResinTrapMaximumPixelBrightnessToDrain = (byte)nmResinTrapMaximumPixelBrightnessToDrain.Value;
Settings.Default.Save();
DialogResult = DialogResult.OK;
return;
}
}
}
}
File diff suppressed because it is too large Load Diff
+123 -22
View File
@@ -42,6 +42,8 @@
this.menuFileExtract = new System.Windows.Forms.ToolStripMenuItem();
this.menuFileConvert = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.menuFileSettings = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator15 = new System.Windows.Forms.ToolStripSeparator();
this.menuFileExit = new System.Windows.Forms.ToolStripMenuItem();
this.menuEdit = new System.Windows.Forms.ToolStripMenuItem();
this.menuMutate = new System.Windows.Forms.ToolStripMenuItem();
@@ -54,6 +56,7 @@
this.menuHelpAbout = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
this.menuHelpInstallPrinters = new System.Windows.Forms.ToolStripMenuItem();
this.menuNewVersion = new System.Windows.Forms.ToolStripMenuItem();
this.statusBar = new System.Windows.Forms.StatusStrip();
this.mainTable = new System.Windows.Forms.TableLayoutPanel();
this.scCenter = new System.Windows.Forms.SplitContainer();
@@ -71,7 +74,11 @@
this.toolStripSeparator14 = new System.Windows.Forms.ToolStripSeparator();
this.tsLayerImageHighlightIssues = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
this.tsLayerImageLayerOutline = new System.Windows.Forms.ToolStripButton();
this.tsLayerImageLayerOutline = new System.Windows.Forms.ToolStripSplitButton();
this.tsLayerImageLayerOutlinePrintVolumeBounds = new System.Windows.Forms.ToolStripMenuItem();
this.tsLayerImageLayerOutlineLayerBounds = new System.Windows.Forms.ToolStripMenuItem();
this.tsLayerImageLayerOutlineHollowAreas = new System.Windows.Forms.ToolStripMenuItem();
this.tsLayerImageLayerOutlineEdgeDetection = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
this.tsLayerImagePixelEdit = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
@@ -116,8 +123,10 @@
this.tsIssueCount = new System.Windows.Forms.ToolStripLabel();
this.tsIssueNext = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator();
this.tsIsuesRefresh = new System.Windows.Forms.ToolStripButton();
this.tsIssueRemove = new System.Windows.Forms.ToolStripButton();
this.tsIsuesRefresh = new System.Windows.Forms.ToolStripSplitButton();
this.tsIsuesRefreshIslands = new System.Windows.Forms.ToolStripMenuItem();
this.tsIsuesRefreshResinTraps = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator();
this.tsIssuesRepair = new System.Windows.Forms.ToolStripButton();
this.imageList16x16 = new System.Windows.Forms.ImageList(this.components);
@@ -169,7 +178,8 @@
this.menuMutate,
this.menuTools,
this.viewToolStripMenuItem,
this.helpToolStripMenuItem});
this.helpToolStripMenuItem,
this.menuNewVersion});
this.menu.Location = new System.Drawing.Point(0, 0);
this.menu.Name = "menu";
this.menu.Size = new System.Drawing.Size(1784, 24);
@@ -189,6 +199,8 @@
this.menuFileExtract,
this.menuFileConvert,
this.toolStripSeparator2,
this.menuFileSettings,
this.toolStripSeparator15,
this.menuFileExit});
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
@@ -281,6 +293,20 @@
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(258, 6);
//
// menuFileSettings
//
this.menuFileSettings.Image = global::UVtools.GUI.Properties.Resources.settings_16x16;
this.menuFileSettings.Name = "menuFileSettings";
this.menuFileSettings.ShortcutKeys = System.Windows.Forms.Keys.F12;
this.menuFileSettings.Size = new System.Drawing.Size(261, 22);
this.menuFileSettings.Text = "&Settings";
this.menuFileSettings.Click += new System.EventHandler(this.EventClick);
//
// toolStripSeparator15
//
this.toolStripSeparator15.Name = "toolStripSeparator15";
this.toolStripSeparator15.Size = new System.Drawing.Size(258, 6);
//
// menuFileExit
//
this.menuFileExit.Image = global::UVtools.GUI.Properties.Resources.Exit_16x16;
@@ -384,6 +410,15 @@
this.menuHelpInstallPrinters.Text = "Install profiles into PrusaSlicer";
this.menuHelpInstallPrinters.Click += new System.EventHandler(this.EventClick);
//
// menuNewVersion
//
this.menuNewVersion.BackColor = System.Drawing.Color.Lime;
this.menuNewVersion.Name = "menuNewVersion";
this.menuNewVersion.Size = new System.Drawing.Size(147, 20);
this.menuNewVersion.Text = "New version is available!";
this.menuNewVersion.Visible = false;
this.menuNewVersion.Click += new System.EventHandler(this.EventClick);
//
// statusBar
//
this.statusBar.Location = new System.Drawing.Point(0, 789);
@@ -433,6 +468,7 @@
//
// pbLayer
//
this.pbLayer.AllowDoubleClick = true;
this.pbLayer.Dock = System.Windows.Forms.DockStyle.Fill;
this.pbLayer.GridScale = Cyotek.Windows.Forms.ImageBoxGridScale.Large;
this.pbLayer.Location = new System.Drawing.Point(0, 25);
@@ -442,6 +478,7 @@
this.pbLayer.Size = new System.Drawing.Size(1228, 705);
this.pbLayer.TabIndex = 7;
this.pbLayer.Zoomed += new System.EventHandler<Cyotek.Windows.Forms.ImageBoxZoomEventArgs>(this.pbLayer_Zoomed);
this.pbLayer.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.EventMouseDoubleClick);
this.pbLayer.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pbLayer_MouseMove);
this.pbLayer.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pbLayer_MouseUp);
//
@@ -581,14 +618,49 @@
//
// tsLayerImageLayerOutline
//
this.tsLayerImageLayerOutline.CheckOnClick = true;
this.tsLayerImageLayerOutline.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsLayerImageLayerOutlinePrintVolumeBounds,
this.tsLayerImageLayerOutlineLayerBounds,
this.tsLayerImageLayerOutlineHollowAreas,
this.tsLayerImageLayerOutlineEdgeDetection});
this.tsLayerImageLayerOutline.Image = global::UVtools.GUI.Properties.Resources.Geometry_16x16;
this.tsLayerImageLayerOutline.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsLayerImageLayerOutline.Name = "tsLayerImageLayerOutline";
this.tsLayerImageLayerOutline.Size = new System.Drawing.Size(66, 22);
this.tsLayerImageLayerOutline.Size = new System.Drawing.Size(78, 22);
this.tsLayerImageLayerOutline.Text = "Outline";
this.tsLayerImageLayerOutline.ToolTipText = "Show layer outlines only";
this.tsLayerImageLayerOutline.Click += new System.EventHandler(this.EventClick);
this.tsLayerImageLayerOutline.ButtonClick += new System.EventHandler(this.EventClick);
//
// tsLayerImageLayerOutlinePrintVolumeBounds
//
this.tsLayerImageLayerOutlinePrintVolumeBounds.CheckOnClick = true;
this.tsLayerImageLayerOutlinePrintVolumeBounds.Name = "tsLayerImageLayerOutlinePrintVolumeBounds";
this.tsLayerImageLayerOutlinePrintVolumeBounds.Size = new System.Drawing.Size(185, 22);
this.tsLayerImageLayerOutlinePrintVolumeBounds.Text = "Print Volume Bounds";
this.tsLayerImageLayerOutlinePrintVolumeBounds.Click += new System.EventHandler(this.EventClick);
//
// tsLayerImageLayerOutlineLayerBounds
//
this.tsLayerImageLayerOutlineLayerBounds.CheckOnClick = true;
this.tsLayerImageLayerOutlineLayerBounds.Name = "tsLayerImageLayerOutlineLayerBounds";
this.tsLayerImageLayerOutlineLayerBounds.Size = new System.Drawing.Size(185, 22);
this.tsLayerImageLayerOutlineLayerBounds.Text = "Layer Bounds";
this.tsLayerImageLayerOutlineLayerBounds.Click += new System.EventHandler(this.EventClick);
//
// tsLayerImageLayerOutlineHollowAreas
//
this.tsLayerImageLayerOutlineHollowAreas.CheckOnClick = true;
this.tsLayerImageLayerOutlineHollowAreas.Name = "tsLayerImageLayerOutlineHollowAreas";
this.tsLayerImageLayerOutlineHollowAreas.Size = new System.Drawing.Size(185, 22);
this.tsLayerImageLayerOutlineHollowAreas.Text = "Hollow Areas";
this.tsLayerImageLayerOutlineHollowAreas.Click += new System.EventHandler(this.EventClick);
//
// tsLayerImageLayerOutlineEdgeDetection
//
this.tsLayerImageLayerOutlineEdgeDetection.CheckOnClick = true;
this.tsLayerImageLayerOutlineEdgeDetection.Name = "tsLayerImageLayerOutlineEdgeDetection";
this.tsLayerImageLayerOutlineEdgeDetection.Size = new System.Drawing.Size(185, 22);
this.tsLayerImageLayerOutlineEdgeDetection.Text = "&Edge Detection";
this.tsLayerImageLayerOutlineEdgeDetection.Click += new System.EventHandler(this.EventClick);
//
// toolStripSeparator9
//
@@ -975,8 +1047,8 @@
this.tsIssueCount,
this.tsIssueNext,
this.toolStripSeparator13,
this.tsIsuesRefresh,
this.tsIssueRemove,
this.tsIsuesRefresh,
this.toolStripSeparator12,
this.tsIssuesRepair});
this.tsIssues.Location = new System.Drawing.Point(3, 3);
@@ -1021,18 +1093,6 @@
this.toolStripSeparator13.Name = "toolStripSeparator13";
this.toolStripSeparator13.Size = new System.Drawing.Size(6, 25);
//
// tsIsuesRefresh
//
this.tsIsuesRefresh.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
this.tsIsuesRefresh.Enabled = false;
this.tsIsuesRefresh.Image = global::UVtools.GUI.Properties.Resources.refresh_16x16;
this.tsIsuesRefresh.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsIsuesRefresh.Name = "tsIsuesRefresh";
this.tsIsuesRefresh.Size = new System.Drawing.Size(61, 22);
this.tsIsuesRefresh.Text = "Detect";
this.tsIsuesRefresh.ToolTipText = "Compute Issues";
this.tsIsuesRefresh.Click += new System.EventHandler(this.EventClick);
//
// tsIssueRemove
//
this.tsIssueRemove.Enabled = false;
@@ -1046,6 +1106,38 @@
"tion, need reslice.";
this.tsIssueRemove.Click += new System.EventHandler(this.EventClick);
//
// tsIsuesRefresh
//
this.tsIsuesRefresh.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
this.tsIsuesRefresh.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsIsuesRefreshIslands,
this.tsIsuesRefreshResinTraps});
this.tsIsuesRefresh.Image = global::UVtools.GUI.Properties.Resources.refresh_16x16;
this.tsIsuesRefresh.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsIsuesRefresh.Name = "tsIsuesRefresh";
this.tsIsuesRefresh.Size = new System.Drawing.Size(73, 22);
this.tsIsuesRefresh.Text = "&Detect";
this.tsIsuesRefresh.ToolTipText = "Compute Issues";
this.tsIsuesRefresh.ButtonClick += new System.EventHandler(this.EventClick);
//
// tsIsuesRefreshIslands
//
this.tsIsuesRefreshIslands.Checked = true;
this.tsIsuesRefreshIslands.CheckOnClick = true;
this.tsIsuesRefreshIslands.CheckState = System.Windows.Forms.CheckState.Checked;
this.tsIsuesRefreshIslands.Name = "tsIsuesRefreshIslands";
this.tsIsuesRefreshIslands.Size = new System.Drawing.Size(211, 22);
this.tsIsuesRefreshIslands.Text = "Islands && Touching Bonds";
//
// tsIsuesRefreshResinTraps
//
this.tsIsuesRefreshResinTraps.Checked = true;
this.tsIsuesRefreshResinTraps.CheckOnClick = true;
this.tsIsuesRefreshResinTraps.CheckState = System.Windows.Forms.CheckState.Checked;
this.tsIsuesRefreshResinTraps.Name = "tsIsuesRefreshResinTraps";
this.tsIsuesRefreshResinTraps.Size = new System.Drawing.Size(211, 22);
this.tsIsuesRefreshResinTraps.Text = "Resin traps";
//
// toolStripSeparator12
//
this.toolStripSeparator12.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
@@ -1364,7 +1456,6 @@
private System.Windows.Forms.ToolStripLabel tsLayerImageZoom;
private System.Windows.Forms.ToolStripButton tsLayerImagePixelEdit;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator8;
private System.Windows.Forms.ToolStripButton tsLayerImageLayerOutline;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator9;
private System.Windows.Forms.ToolStripMenuItem menuMutate;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator10;
@@ -1378,7 +1469,6 @@
private System.Windows.Forms.ColumnHeader lvIssuesCount;
private System.Windows.Forms.ColumnHeader lvIssuesXY;
private System.Windows.Forms.ColumnHeader lvIssuesPixels;
private System.Windows.Forms.ToolStripButton tsIsuesRefresh;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator11;
private System.Windows.Forms.ToolStripLabel tsLayerImageMouseLocation;
private System.Windows.Forms.ColumnHeader lvIssuesLayerHeader;
@@ -1408,6 +1498,17 @@
private System.Windows.Forms.ToolStripSplitButton tsLayerImageExport;
private System.Windows.Forms.ToolStripMenuItem tsLayerImageExportFile;
private System.Windows.Forms.ToolStripMenuItem tsLayerImageExportClipboard;
private System.Windows.Forms.ToolStripMenuItem menuNewVersion;
private System.Windows.Forms.ToolStripMenuItem menuFileSettings;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator15;
private System.Windows.Forms.ToolStripSplitButton tsIsuesRefresh;
private System.Windows.Forms.ToolStripMenuItem tsIsuesRefreshIslands;
private System.Windows.Forms.ToolStripMenuItem tsIsuesRefreshResinTraps;
private System.Windows.Forms.ToolStripSplitButton tsLayerImageLayerOutline;
private System.Windows.Forms.ToolStripMenuItem tsLayerImageLayerOutlineEdgeDetection;
private System.Windows.Forms.ToolStripMenuItem tsLayerImageLayerOutlinePrintVolumeBounds;
private System.Windows.Forms.ToolStripMenuItem tsLayerImageLayerOutlineLayerBounds;
private System.Windows.Forms.ToolStripMenuItem tsLayerImageLayerOutlineHollowAreas;
}
}
+396 -212
View File
@@ -11,7 +11,7 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
@@ -23,6 +23,7 @@ using Emgu.CV.Util;
using UVtools.Core;
using UVtools.Core.Extensions;
using UVtools.GUI.Forms;
using UVtools.GUI.Properties;
namespace UVtools.GUI
{
@@ -33,37 +34,43 @@ namespace UVtools.GUI
#region Properties
public static readonly Dictionary<Mutation.Mutates, Mutation> Mutations =
new Dictionary<Mutation.Mutates, Mutation>
public static readonly Dictionary<LayerManager.Mutate, Mutation> Mutations =
new Dictionary<LayerManager.Mutate, Mutation>
{
{Mutation.Mutates.Resize, new Mutation(Mutation.Mutates.Resize,
{LayerManager.Mutate.Resize, new Mutation(LayerManager.Mutate.Resize,
"Resizes layer images in a X and/or Y factor, starting from 100% value\n" +
"NOTE 1: Build volume bounds are not validated after operation, please ensure scaling stays inside your limits.\n" +
"NOTE 2: X and Y are applied to original image, not to the rotated preview (If enabled)."
)},
{Mutation.Mutates.Solidify, new Mutation(Mutation.Mutates.Solidify,
{LayerManager.Mutate.Flip, new Mutation(LayerManager.Mutate.Flip,
"Flips layer images vertically and/or horizontally"
)},
{LayerManager.Mutate.Rotate, new Mutation(LayerManager.Mutate.Rotate,
"Rotate layer images in a certain degrees"
)},
{LayerManager.Mutate.Solidify, new Mutation(LayerManager.Mutate.Solidify,
"Solidifies the selected layers, closes all inner holes.\n" +
"Warning: All surrounded holes are filled, no exceptions! Make sure you don't require any of holes in layer path.",
Properties.Resources.mutation_solidify
)},
{Mutation.Mutates.Erode, new Mutation(Mutation.Mutates.Erode,
{LayerManager.Mutate.Erode, new Mutation(LayerManager.Mutate.Erode,
"The basic idea of erosion is just like soil erosion only, it erodes away the boundaries of foreground object (Always try to keep foreground in white). " +
"So what happends is that, all the pixels near boundary will be discarded depending upon the size of kernel. So the thickness or size of the foreground object decreases or simply white region decreases in the image. It is useful for removing small white noises, detach two connected objects, etc.",
Properties.Resources.mutation_erosion
)},
{Mutation.Mutates.Dilate, new Mutation(Mutation.Mutates.Dilate,
{LayerManager.Mutate.Dilate, new Mutation(LayerManager.Mutate.Dilate,
"It is just opposite of erosion. Here, a pixel element is '1' if atleast one pixel under the kernel is '1'. So it increases the white region in the image or size of foreground object increases. Normally, in cases like noise removal, erosion is followed by dilation. Because, erosion removes white noises, but it also shrinks our object. So we dilate it. Since noise is gone, they won't come back, but our object area increases. It is also useful in joining broken parts of an object.",
Properties.Resources.mutation_dilation
)},
{Mutation.Mutates.Opening, new Mutation(Mutation.Mutates.Opening,
{LayerManager.Mutate.Opening, new Mutation(LayerManager.Mutate.Opening,
"Opening is just another name of erosion followed by dilation. It is useful in removing noise.",
Properties.Resources.mutation_opening
)},
{Mutation.Mutates.Closing, new Mutation(Mutation.Mutates.Closing,
{LayerManager.Mutate.Closing, new Mutation(LayerManager.Mutate.Closing,
"Closing is reverse of Opening, Dilation followed by Erosion. It is useful in closing small holes inside the foreground objects, or small black points on the object.",
Properties.Resources.mutation_closing
)},
{Mutation.Mutates.Gradient, new Mutation(Mutation.Mutates.Gradient,
{LayerManager.Mutate.Gradient, new Mutation(LayerManager.Mutate.Gradient,
"It's the difference between dilation and erosion of an image.",
Properties.Resources.mutation_gradient
)},
@@ -79,16 +86,16 @@ namespace UVtools.GUI
"The Hit-or-Miss transformation is useful to find patterns in binary images. In particular, it finds those pixels whose neighbourhood matches the shape of a first structuring element B1 while not matching the shape of a second structuring element B2 at the same time.",
null
)},*/
{Mutation.Mutates.PyrDownUp, new Mutation(Mutation.Mutates.PyrDownUp,
{LayerManager.Mutate.PyrDownUp, new Mutation(LayerManager.Mutate.PyrDownUp,
"Performs downsampling step of Gaussian pyramid decomposition.\n" +
"First it convolves image with the specified filter and then downsamples the image by rejecting even rows and columns.\n" +
"After performs up-sampling step of Gaussian pyramid decomposition\n"
)},
{Mutation.Mutates.SmoothMedian, new Mutation(Mutation.Mutates.SmoothMedian,
{LayerManager.Mutate.SmoothMedian, new Mutation(LayerManager.Mutate.SmoothMedian,
"Each pixel becomes the median of its surrounding pixels. Also a good way to remove noise.\n" +
"Note: Iterations must be a odd number."
)},
{Mutation.Mutates.SmoothGaussian, new Mutation(Mutation.Mutates.SmoothGaussian,
{LayerManager.Mutate.SmoothGaussian, new Mutation(LayerManager.Mutate.SmoothGaussian,
"Each pixel is a sum of fractions of each pixel in its neighborhood\n" +
"Very fast, but does not preserve sharp edges well.\n" +
"Note: Iterations must be a odd number."
@@ -108,7 +115,7 @@ namespace UVtools.GUI
public Mat ActualLayerImage { get; private set; }
public Mat ActualLayerImageBgr { get; private set; }
public Mat ActualLayerImageBgr { get; private set; } = new Mat();
public Dictionary<uint, List<LayerIssue>> Issues { get; set; }
@@ -125,10 +132,24 @@ namespace UVtools.GUI
FrmLoading = new FrmLoading();
Program.SetAllControlsFontSize(Controls, 11);
Program.SetAllControlsFontSize(FrmLoading.Controls, 11);
if (Settings.Default.UpdateSettings)
{
Settings.Default.Upgrade();
Settings.Default.UpdateSettings = false;
Settings.Default.Save();
}
Clear();
if (Width >= Screen.FromControl(this).WorkingArea.Width ||
tsLayerImageLayerDifference.Checked = Settings.Default.LayerDifferenceDefault;
tsIsuesRefreshIslands.Checked = Settings.Default.ComputeIslands;
tsIsuesRefreshResinTraps.Checked = Settings.Default.ComputeResinTraps;
tsLayerImageLayerOutlinePrintVolumeBounds.Checked = Settings.Default.OutlinePrintVolumeBounds;
tsLayerImageLayerOutlineLayerBounds.Checked = Settings.Default.OutlineLayerBounds;
tsLayerImageLayerOutlineHollowAreas.Checked = Settings.Default.OutlineHollowAreas;
if (Settings.Default.StartMaximized || Width >= Screen.FromControl(this).WorkingArea.Width ||
Height >= Screen.FromControl(this).WorkingArea.Height)
{
WindowState = FormWindowState.Maximized;
@@ -138,7 +159,7 @@ namespace UVtools.GUI
DragEnter += (s, e) => { if (e.Data.GetDataPresent(DataFormats.FileDrop)) e.Effect = DragDropEffects.Copy; };
DragDrop += (s, e) => { ProcessFile((string[])e.Data.GetData(DataFormats.FileDrop)); };
foreach (Mutation.Mutates mutate in (Mutation.Mutates[])Enum.GetValues(typeof(Mutation.Mutates)))
foreach (LayerManager.Mutate mutate in (LayerManager.Mutate[])Enum.GetValues(typeof(LayerManager.Mutate)))
{
if(!Mutations.ContainsKey(mutate)) continue;
var item = new ToolStripMenuItem(mutate.ToString())
@@ -155,6 +176,41 @@ namespace UVtools.GUI
var group = new ListViewGroup(issueType.ToString(), $"{issueType}s"){HeaderAlignment = HorizontalAlignment.Center};
lvIssues.Groups.Add(group);
}
if (Settings.Default.CheckForUpdatesOnStartup)
{
Task.Factory.StartNew(AppLoadTask);
}
}
private void AppLoadTask()
{
try
{
using (WebClient client = new WebClient())
{
string htmlCode = client.DownloadString($"{About.Website}/releases");
const string searchFor = "/releases/tag/";
var startIndex = htmlCode.IndexOf(searchFor, StringComparison.InvariantCultureIgnoreCase) + searchFor.Length;
var endIndex = htmlCode.IndexOf("\"", startIndex, StringComparison.InvariantCultureIgnoreCase);
var version = htmlCode.Substring(startIndex, endIndex- startIndex);
if (string.Compare(version, $"v{FrmAbout.AssemblyVersion}", StringComparison.OrdinalIgnoreCase) > 0)
{
Invoke((MethodInvoker)delegate
{
// Running on the UI thread
menuNewVersion.Text = $"New version {version} is available!";
menuNewVersion.Tag = $"{About.Website}/releases/tag/{version}";
menuNewVersion.Visible = true;
});
}
//Debug.WriteLine(version);
}
}
catch (Exception e)
{
Debug.WriteLine(e.Message);
}
}
#endregion
@@ -233,7 +289,7 @@ namespace UVtools.GUI
if (e.KeyCode == Keys.NumPad0 || e.KeyCode == Keys.D0)
{
pbLayer.ZoomToFit();
ZoomToFit();
e.Handled = true;
return;
}
@@ -265,7 +321,11 @@ namespace UVtools.GUI
protected override void OnResize(EventArgs e)
{
base.OnResize(e);
pbLayer.ZoomToFit();
if (Settings.Default.LayerZoomToFit)
{
ZoomToFit();
}
lbLayerActual.Location = new Point(lbLayerActual.Location.X,
Math.Max(1,
Math.Min(tbLayer.Height - 40,
@@ -273,6 +333,7 @@ namespace UVtools.GUI
));
}
#endregion
#region Events
@@ -345,8 +406,10 @@ namespace UVtools.GUI
SlicerFile.Save();
result = true;
}
catch (Exception)
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Error while saving the file", MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
finally
{
@@ -389,8 +452,10 @@ namespace UVtools.GUI
SlicerFile.SaveAs(dialog.FileName);
result = true;
}
catch (Exception)
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Error while saving the file", MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
finally
{
@@ -433,6 +498,15 @@ namespace UVtools.GUI
return;
}
if (ReferenceEquals(sender, menuFileSettings))
{
using (FrmSettings frmSettings = new FrmSettings())
{
if (frmSettings.ShowDialog() != DialogResult.OK) return;
}
return;
}
if (ReferenceEquals(sender, menuFileExit))
{
if (menuFileSave.Enabled)
@@ -483,7 +557,7 @@ namespace UVtools.GUI
"Extraction completed", MessageBoxButtons.YesNo, MessageBoxIcon.Question) ==
DialogResult.Yes)
{
Process.Start(finalPath);
using (Process.Start(finalPath)){}
}
}
catch (Exception exception)
@@ -529,9 +603,9 @@ namespace UVtools.GUI
}
if (item.Tag.GetType() == typeof(Mutation.Mutates))
if (item.Tag.GetType() == typeof(LayerManager.Mutate))
{
Mutation.Mutates mutate = (Mutation.Mutates) item.Tag;
LayerManager.Mutate mutate = (LayerManager.Mutate) item.Tag;
MutateLayers(mutate);
return;
}
@@ -562,7 +636,7 @@ namespace UVtools.GUI
if (repairResinTraps && ReferenceEquals(Issues, null))
{
ComputeIssues();
ComputeIssues(new IslandDetectionConfiguration {Enabled = false}); // Ignore islands as we dont require it
}
DisableGUI();
@@ -573,49 +647,7 @@ namespace UVtools.GUI
bool result = false;
try
{
Parallel.For(layerStart, layerEnd + 1, layerIndex =>
{
Layer layer = SlicerFile[layerIndex];
using (var image = layer.LayerMat)
{
if (repairResinTraps)
{
if (Issues.TryGetValue((uint) layerIndex, out var issues))
{
foreach (var issue in issues.Where(issue => issue.Type == LayerIssue.IssueType.ResinTrap))
{
CvInvoke.DrawContours(image,
new VectorOfVectorOfPoint(new VectorOfPoint(issue.Pixels)),
-1,
new MCvScalar(255),
-1);
/*CvInvoke.DrawContours(image,
new VectorOfVectorOfPoint(new VectorOfPoint(issue.Pixels)),
-1,
new MCvScalar(255),
2);*/
}
}
}
if (repairIslands)
{
Mat kernel = CvInvoke.GetStructuringElement(ElementShape.Rectangle, new Size(3, 3), new Point(1, 1));
if (closingIterations > 0)
{
CvInvoke.MorphologyEx(image, image, MorphOp.Close, kernel, new Point(-1, -1), (int) closingIterations, BorderType.Default, new MCvScalar());
}
if (openingIterations > 0)
{
CvInvoke.MorphologyEx(image, image, MorphOp.Open, kernel, new Point(-1, -1), (int)closingIterations, BorderType.Default, new MCvScalar());
}
}
layer.LayerMat = image;
}
});
SlicerFile.LayerManager.RepairLayers(layerStart, layerEnd, closingIterations, openingIterations, repairIslands, repairResinTraps, Issues);
result = true;
}
catch (Exception ex)
@@ -638,7 +670,7 @@ namespace UVtools.GUI
ShowLayer();
ComputeIssues();
ComputeIssues(GetIslandDetectionConfiguration(), GetResinTrapDetectionConfiguration());
menuFileSave.Enabled =
menuFileSaveAs.Enabled = true;
@@ -654,7 +686,7 @@ namespace UVtools.GUI
if (ReferenceEquals(sender, menuHelpWebsite))
{
Process.Start(About.Website);
using (Process.Start(About.Website)){}
return;
}
@@ -665,7 +697,7 @@ namespace UVtools.GUI
"If you're happy to contribute for a better program and for my work i will appreciate the tip.\n" +
"A browser window will be open and forward to my paypal address after you click 'OK'.\nHappy Printing!",
"Donation", MessageBoxButtons.OK, MessageBoxIcon.Information);
Process.Start(About.Donate);
using (Process.Start(About.Donate)){}
return;
}
@@ -684,7 +716,9 @@ namespace UVtools.GUI
switch (result)
{
case DialogResult.OK:
Process.Start("https://www.prusa3d.com/prusaslicer/");
using (Process.Start("https://www.prusa3d.com/prusaslicer/"))
{ }
return;
default:
return;
@@ -700,6 +734,12 @@ namespace UVtools.GUI
}
}
if (ReferenceEquals(sender, menuNewVersion))
{
using (Process.Start(menuNewVersion.Tag.ToString())) { }
return;
}
/************************
* Thumbnail Menu *
***********************/
@@ -818,7 +858,7 @@ namespace UVtools.GUI
"Properties save completed", MessageBoxButtons.YesNo, MessageBoxIcon.Question) ==
DialogResult.Yes)
{
Process.Start(dialog.FileName);
using (Process.Start(dialog.FileName)){}
}
}
@@ -850,7 +890,7 @@ namespace UVtools.GUI
"GCode save completed", MessageBoxButtons.YesNo, MessageBoxIcon.Question) ==
DialogResult.Yes)
{
Process.Start(dialog.FileName);
using (Process.Start(dialog.FileName)){}
}
}
@@ -938,9 +978,13 @@ namespace UVtools.GUI
}
else if (issue.Type == LayerIssue.IssueType.ResinTrap)
{
var contours = new VectorOfVectorOfPoint(new VectorOfPoint(issue.Pixels));
CvInvoke.DrawContours(image, contours, -1, new MCvScalar(255), -1);
//CvInvoke.DrawContours(image, contours, -1, new MCvScalar(255), 2);
using (var contours =
new VectorOfVectorOfPoint(new VectorOfPoint(issue.Pixels)))
{
CvInvoke.DrawContours(image, contours, -1, new MCvScalar(255), -1);
//CvInvoke.DrawContours(image, contours, -1, new MCvScalar(255), 2);
}
edited = true;
}
@@ -1004,7 +1048,7 @@ namespace UVtools.GUI
if (MessageBox.Show("Are you sure you want to compute issues?", "Issues Compute",
MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes) return;
ComputeIssues();
ComputeIssues(GetIslandDetectionConfiguration(), GetResinTrapDetectionConfiguration());
return;
}
@@ -1012,11 +1056,27 @@ namespace UVtools.GUI
/************************
* Layer Menu *
***********************/
if (ReferenceEquals(sender, tsLayerImageRotate) || ReferenceEquals(sender, tsLayerImageLayerDifference) ||
if (ReferenceEquals(sender, tsLayerImageRotate) ||
ReferenceEquals(sender, tsLayerImageLayerDifference) ||
ReferenceEquals(sender, tsLayerImageHighlightIssues) ||
ReferenceEquals(sender, tsLayerImageLayerOutline))
ReferenceEquals(sender, tsLayerImageLayerOutlinePrintVolumeBounds) ||
ReferenceEquals(sender, tsLayerImageLayerOutlineLayerBounds) ||
ReferenceEquals(sender, tsLayerImageLayerOutlineHollowAreas) ||
ReferenceEquals(sender, tsLayerImageLayerOutlineEdgeDetection)
)
{
ShowLayer();
if (ReferenceEquals(sender, tsLayerImageRotate))
{
ZoomToFit();
}
return;
}
if (ReferenceEquals(sender, tsLayerImageLayerOutline))
{
tsLayerImageLayerOutline.ShowDropDown();
return;
}
@@ -1231,7 +1291,7 @@ namespace UVtools.GUI
if (issue.Type == LayerIssue.IssueType.TouchingBound)
{
pbLayer.ZoomToFit();
ZoomToFit();
}
else if (issue.X >= 0 && issue.Y >= 0)
{
@@ -1448,7 +1508,10 @@ namespace UVtools.GUI
lbInitialLayer.Text = $"{SlicerFile.LayerHeight}mm\n0";
tsLayerImageRotate.Checked = ActualLayerImage.Height > ActualLayerImage.Width;
if (Settings.Default.LayerAutoRotateBestView)
{
tsLayerImageRotate.Checked = ActualLayerImage.Height > ActualLayerImage.Width;
}
if (!ReferenceEquals(SlicerFile.ConvertToFormats, null))
{
@@ -1464,7 +1527,7 @@ namespace UVtools.GUI
new ToolStripMenuItem(fileFormat.GetType().Name.Replace("File", extensions))
{
Tag = fileFormat,
Image = Properties.Resources.layers_16x16
Image = Resources.layers_16x16
};
menuItem.Click += ConvertToItemOnClick;
menuFileConvert.DropDownItems.Add(menuItem);
@@ -1542,16 +1605,24 @@ namespace UVtools.GUI
RefreshInfo();
pbLayer.ZoomToFit();
if (Settings.Default.LayerZoomToFit)
{
ZoomToFit();
}
UpdateTitle();
if (Settings.Default.ComputeIssuesOnLoad)
{
ComputeIssues(GetIslandDetectionConfiguration(), GetResinTrapDetectionConfiguration());
}
}
void UpdateTitle()
{
Text = $"{FrmAbout.AssemblyTitle} File: {Path.GetFileName(SlicerFile.FileFullPath)} Version: {FrmAbout.AssemblyVersion}";
Text = $"{FrmAbout.AssemblyTitle} File: {Path.GetFileName(SlicerFile.FileFullPath)} ({FrmLoading.StopWatch.ElapsedMilliseconds}ms) Version: {FrmAbout.AssemblyVersion}";
}
void RefreshInfo()
{
menuEdit.DropDownItems.Clear();
@@ -1686,65 +1757,22 @@ namespace UVtools.GUI
Stopwatch watch = Stopwatch.StartNew();
ActualLayerImage?.Dispose();
ActualLayerImageBgr?.Dispose();
ActualLayerImage = SlicerFile[layerNum].LayerMat;
ActualLayerImageBgr = new Mat();
CvInvoke.CvtColor(ActualLayerImage, ActualLayerImageBgr, ColorConversion.Gray2Bgr);
var imageSpan = ActualLayerImage.GetPixelSpan<byte>();
var imageBgrSpan = ActualLayerImageBgr.GetPixelSpan<byte>();
if (tsLayerImageLayerOutline.Checked)
if (tsLayerImageLayerOutlineEdgeDetection.Checked)
{
#if DEBUG
using (Mat grayscale = new Mat())
{
CvInvoke.Threshold(ActualLayerImage, grayscale, 1, 255, ThresholdType.Binary);
using (VectorOfVectorOfPoint contours = new VectorOfVectorOfPoint())
{
using (Mat hierarchy = new Mat())
{
CvInvoke.FindContours(grayscale, contours, hierarchy, RetrType.Ccomp,
ChainApproxMethod.ChainApproxSimple);
/*
* hierarchy[i][0]: the index of the next contour of the same level
* hierarchy[i][1]: the index of the previous contour of the same level
* hierarchy[i][2]: the index of the first child
* hierarchy[i][3]: the index of the parent
*/
var arr = hierarchy.GetData();
for (int i = 0; i < contours.Size; i++)
{
//if ((int)arr.GetValue(0, i, 2) == -1 && (int)arr.GetValue(0, i, 3) > -1) continue;
/*Debug.WriteLine($"[0] {arr.GetValue(0, i, 0)}");
Debug.WriteLine($"[1] {arr.GetValue(0, i, 1)}");
Debug.WriteLine($"[2] {arr.GetValue(0, i, 2)}");
Debug.WriteLine($"[3] {arr.GetValue(0, i, 3)}");*/
//if ((int)arr.GetValue(0, i, 2) > -1 || (int)arr.GetValue(0, i, 3) > -1) continue;
//if (((int)arr.GetValue(0, i, 2) > -1 && (int)arr.GetValue(0, i, 3) > -1)) continue;
// if ((int) arr.GetValue(0, i, 3) >= 0) continue;
if ((int)arr.GetValue(0, i, 2) != -1 || (int)arr.GetValue(0, i, 3) == -1)
continue;
var r = CvInvoke.BoundingRectangle(contours[i]);
CvInvoke.Rectangle(ActualLayerImageBgr, r, new MCvScalar(0, 0, 255), 5);
CvInvoke.DrawContours(ActualLayerImageBgr, contours, i, new MCvScalar(125, 125, 125), -1);
//if ((int) arr.GetValue(0, i, 2) == -1 && (int) arr.GetValue(0, i, 3) != -1)
// CvInvoke.DrawContours(ActualLayerImageBgr, contours, i, new MCvScalar(0, 0, 0), -1);
}
}
}
}
#else
using (var grayscale = new Mat())
{
CvInvoke.Canny(ActualLayerImage, grayscale, 80, 40, 3, true);
CvInvoke.CvtColor(grayscale, ActualLayerImageBgr, ColorConversion.Gray2Bgr);
}
#endif
}
else if (tsLayerImageLayerDifference.Checked)
{
@@ -1759,27 +1787,26 @@ namespace UVtools.GUI
for (int pixel = 0; pixel < imageSpan.Length; pixel++)
{
if (imageSpan[pixel] == 0)
if (imageSpan[pixel] != 0) continue;
Color color = Color.Empty;
if (previousSpan[pixel] > 0 && nextSpan[pixel] > 0)
{
if (previousSpan[pixel] > 0 && nextSpan[pixel] > 0)
{
imageBgrSpan[pixel * 3] = 0; // B
imageBgrSpan[pixel * 3 + 1] = 0; // G
imageBgrSpan[pixel * 3 + 2] = 255; // R
}
else if (previousSpan[pixel] > 0)
{
imageBgrSpan[pixel * 3] = previousSpan[pixel]; // B
imageBgrSpan[pixel * 3 + 1] = 0; // G
imageBgrSpan[pixel * 3 + 2] = previousSpan[pixel]; // R
}
else if (nextSpan[pixel] > 0)
{
imageBgrSpan[pixel * 3] = nextSpan[pixel]; // B
imageBgrSpan[pixel * 3 + 1] = nextSpan[pixel]; // G
imageBgrSpan[pixel * 3 + 2] = 0; // R
}
color = Settings.Default.PreviousNextLayerColor;
}
else if (previousSpan[pixel] > 0)
{
color = Settings.Default.PreviousLayerColor;
}
else if (nextSpan[pixel] > 0)
{
color = Settings.Default.NextLayerColor;
}
if (color.IsEmpty) continue;
var bgrPixel = pixel * 3;
imageBgrSpan[bgrPixel] = color.B; // B
imageBgrSpan[++bgrPixel] = color.G; // G
imageBgrSpan[++bgrPixel] = color.R; // R
}
}
}
@@ -1790,54 +1817,111 @@ namespace UVtools.GUI
!ReferenceEquals(Issues, null) &&
Issues.TryGetValue(ActualLayer, out var issues))
{
byte brightness;
foreach (var issue in issues)
{
if (ReferenceEquals(issue, null)) continue; // Removed issue
if(!issue.HaveValidPoint) continue;
Color color = Settings.Default.ResinTrapColor;
if (issue.Type == LayerIssue.IssueType.ResinTrap)
{
CvInvoke.DrawContours(ActualLayerImageBgr, new VectorOfVectorOfPoint(new VectorOfPoint(issue.Pixels)), -1, new MCvScalar(0, 180, 255), -1);
//CvInvoke.DrawContours(ActualLayerImageBgr, new VectorOfVectorOfPoint(new VectorOfPoint(issue.Pixels)), -1, new MCvScalar(0, 0, 255), 1);
using (var vec = new VectorOfVectorOfPoint(new VectorOfPoint(issue.Pixels)))
{
CvInvoke.DrawContours(ActualLayerImageBgr, vec, -1,
new MCvScalar(color.B, color.G, color.R), -1);
//CvInvoke.DrawContours(ActualLayerImageBgr, new VectorOfVectorOfPoint(new VectorOfPoint(issue.Pixels)), -1, new MCvScalar(0, 0, 255), 1);
}
continue;
}
foreach (var pixel in issue)
{
int pixelPos = ActualLayerImage.GetPixelPos(pixel);
byte brightness = imageSpan[pixelPos];
if (brightness == 0) continue;
int pixelBgrPos = pixelPos*ActualLayerImageBgr.NumberOfChannels;
switch (issue.Type)
{
/*case LayerIssue.IssueType.ResinTrap:
break;*/
case LayerIssue.IssueType.Island:
brightness = imageSpan[pixelPos];
if (brightness == 0) continue;
// alpha, Color.Yellow
brightness = Math.Max((byte)80, brightness);
imageBgrSpan[pixelBgrPos] = 0; // B
imageBgrSpan[pixelBgrPos + 1] = brightness; // G
imageBgrSpan[pixelBgrPos + 2] = brightness; // R
color = Settings.Default.IslandColor;
break;
default:
brightness = imageSpan[pixelPos];
if (brightness == 0) continue;
// alpha, Color.Yellow
brightness = Math.Max((byte)80, brightness);
imageBgrSpan[pixelBgrPos] = 0; // B
imageBgrSpan[pixelBgrPos + 1] = 0; // G
imageBgrSpan[pixelBgrPos + 2] = brightness; // R
case LayerIssue.IssueType.TouchingBound:
color = Settings.Default.TouchingBoundsColor;
break;
}
var newColor = color.FactorColor(brightness, 80);
imageBgrSpan[pixelBgrPos] = newColor.B; // B
imageBgrSpan[pixelBgrPos + 1] = newColor.G; // G
imageBgrSpan[pixelBgrPos + 2] = newColor.R; // R
}
}
}
if (tsLayerImageLayerOutlinePrintVolumeBounds.Checked)
{
CvInvoke.Rectangle(ActualLayerImageBgr, SlicerFile.LayerManager.BoundingRectangle,
new MCvScalar(Settings.Default.OutlinePrintVolumeBoundsColor.B, Settings.Default.OutlinePrintVolumeBoundsColor.G, Settings.Default.OutlinePrintVolumeBoundsColor.R), Settings.Default.OutlinePrintVolumeBoundsLineThickness);
}
if (tsLayerImageLayerOutlineLayerBounds.Checked)
{
CvInvoke.Rectangle(ActualLayerImageBgr, SlicerFile[layerNum].BoundingRectangle,
new MCvScalar(Settings.Default.OutlineLayerBoundsColor.B, Settings.Default.OutlineLayerBoundsColor.G, Settings.Default.OutlineLayerBoundsColor.R), Settings.Default.OutlineLayerBoundsLineThickness);
}
if (tsLayerImageLayerOutlineHollowAreas.Checked)
{
using (Mat grayscale = new Mat())
{
//CvInvoke.Threshold(ActualLayerImage, grayscale, 1, 255, ThresholdType.Binary);
using (VectorOfVectorOfPoint contours = new VectorOfVectorOfPoint())
{
using (Mat hierarchy = new Mat())
{
CvInvoke.FindContours(ActualLayerImage, contours, hierarchy, RetrType.Ccomp, ChainApproxMethod.ChainApproxSimple);
/*
* hierarchy[i][0]: the index of the next contour of the same level
* hierarchy[i][1]: the index of the previous contour of the same level
* hierarchy[i][2]: the index of the first child
* hierarchy[i][3]: the index of the parent
*/
var arr = hierarchy.GetData();
for (int i = 0; i < contours.Size; i++)
{
if ((int) arr.GetValue(0, i, 2) == -1 && (int) arr.GetValue(0, i, 3) != -1)
{
//var r = CvInvoke.BoundingRectangle(contours[i]);
//CvInvoke.Rectangle(ActualLayerImageBgr, r, new MCvScalar(0, 0, 255), 2);
CvInvoke.DrawContours(ActualLayerImageBgr, contours, i,
new MCvScalar(Settings.Default.OutlineHollowAreasColor.B,
Settings.Default.OutlineHollowAreasColor.G, Settings.Default.OutlineHollowAreasColor.R),
Settings.Default.OutlineHollowAreasLineThickness);
}
/*else
{
CvInvoke.DrawContours(ActualLayerImageBgr, contours, i,
new MCvScalar(Settings.Default.ResinTrapColor.B,
Settings.Default.IslandColor.G, Settings.Default.IslandColor.R),
2);
}*/
//if ((int) arr.GetValue(0, i, 2) == -1 && (int) arr.GetValue(0, i, 3) != -1)
// CvInvoke.DrawContours(ActualLayerImageBgr, contours, i, new MCvScalar(0, 0, 0), -1);
}
}
}
}
}
if (tsLayerImageRotate.Checked)
{
CvInvoke.Rotate(ActualLayerImageBgr, ActualLayerImageBgr, RotateFlags.Rotate90Clockwise);
@@ -1936,8 +2020,8 @@ namespace UVtools.GUI
{
if(ReferenceEquals(tabControlLeft.SelectedTab, tabPageIssues))
{
if (!ReferenceEquals(tabPageIssues.Tag, null)) return;
ComputeIssues();
if (!ReferenceEquals(tabPageIssues.Tag, null) || !Settings.Default.AutoComputeIssuesClickOnTab) return;
ComputeIssues(GetIslandDetectionConfiguration(), GetResinTrapDetectionConfiguration());
}
return;
}
@@ -2056,7 +2140,48 @@ namespace UVtools.GUI
return;
}
}
#endregion
private void EventMouseDown(object sender, MouseEventArgs e)
{
if (ReferenceEquals(sender, btnNextLayer) || ReferenceEquals(sender, btnPreviousLayer))
{
layerScrollTimer.Tag = ReferenceEquals(sender, btnNextLayer);
layerScrollTimer.Start();
return;
}
}
private void EventMouseUp(object sender, MouseEventArgs e)
{
if (ReferenceEquals(sender, btnNextLayer) || ReferenceEquals(sender, btnPreviousLayer))
{
layerScrollTimer.Stop();
return;
}
}
private void EventTimerTick(object sender, EventArgs e)
{
if (ReferenceEquals(sender, layerScrollTimer))
{
ShowLayer((bool)layerScrollTimer.Tag);
return;
}
}
private void EventMouseDoubleClick(object sender, MouseEventArgs e)
{
if (ReferenceEquals(sender, pbLayer))
{
if ((e.Button & MouseButtons.Left) != 0)
{
ZoomToFit();
return;
}
return;
}
}
#endregion
@@ -2104,7 +2229,7 @@ namespace UVtools.GUI
public void MutateLayers(Mutation.Mutates type)
public void MutateLayers(LayerManager.Mutate mutator)
{
uint layerStart;
uint layerEnd;
@@ -2115,10 +2240,10 @@ namespace UVtools.GUI
double x = 0;
double y = 0;
switch (type)
switch (mutator)
{
case Mutation.Mutates.Resize:
using (FrmMutationResize inputBox = new FrmMutationResize(Mutations[type]))
case LayerManager.Mutate.Resize:
using (FrmMutationResize inputBox = new FrmMutationResize(Mutations[mutator]))
{
if (inputBox.ShowDialog() != DialogResult.OK) return;
layerStart = inputBox.LayerRangeStart;
@@ -2128,9 +2253,28 @@ namespace UVtools.GUI
fade = inputBox.Fade;
}
break;
case LayerManager.Mutate.Flip:
using (FrmMutationOneComboBox inputBox = new FrmMutationOneComboBox(Mutations[mutator]))
{
if (inputBox.ShowDialog() != DialogResult.OK) return;
layerStart = inputBox.LayerRangeStart;
layerEnd = inputBox.LayerRangeEnd;
iterationsStart = (uint) inputBox.SelectedValue;
fade = inputBox.MakeCopy;
}
break;
case LayerManager.Mutate.Rotate:
using (FrmMutationOneNumericalInput inputBox = new FrmMutationOneNumericalInput(Mutations[mutator]))
{
if (inputBox.ShowDialog() != DialogResult.OK) return;
layerStart = inputBox.LayerRangeStart;
layerEnd = inputBox.LayerRangeEnd;
x = (double) inputBox.Value;
}
break;
default:
using (FrmMutation inputBox = new FrmMutation(Mutations[type]))
using (FrmMutation inputBox = new FrmMutation(Mutations[mutator]))
{
if (inputBox.ShowDialog() != DialogResult.OK) return;
iterationsStart = inputBox.Iterations;
@@ -2146,34 +2290,53 @@ namespace UVtools.GUI
DisableGUI();
FrmLoading.SetDescription($"Mutating - {type}");
FrmLoading.SetDescription($"Mutating - {mutator}");
Task<bool> task = Task<bool>.Factory.StartNew(() =>
{
bool result = false;
try
{
switch (type)
switch (mutator)
{
case Mutation.Mutates.Resize:
case LayerManager.Mutate.Resize:
SlicerFile.LayerManager.MutateResize(layerStart, layerEnd, x / 100.0, y / 100.0, fade);
break;
case Mutation.Mutates.Solidify:
case LayerManager.Mutate.Flip:
FlipType flipType = FlipType.Horizontal;
switch (iterationsStart)
{
case 0:
flipType = FlipType.Horizontal;
break;
case 1:
flipType = FlipType.Vertical;
break;
case 2:
flipType = FlipType.Horizontal | FlipType.Vertical;
break;
}
SlicerFile.LayerManager.MutateFlip(layerStart, layerEnd, flipType, fade);
break;
case LayerManager.Mutate.Rotate:
SlicerFile.LayerManager.MutateRotate(layerStart, layerEnd, x);
break;
case LayerManager.Mutate.Solidify:
SlicerFile.LayerManager.MutateSolidify(layerStart, layerEnd);
break;
case Mutation.Mutates.Erode:
case LayerManager.Mutate.Erode:
SlicerFile.LayerManager.MutateErode(layerStart, layerEnd, (int) iterationsStart, (int) iterationsEnd, fade);
break;
case Mutation.Mutates.Dilate:
case LayerManager.Mutate.Dilate:
SlicerFile.LayerManager.MutateDilate(layerStart, layerEnd, (int)iterationsStart, (int)iterationsEnd, fade);
break;
case Mutation.Mutates.Opening:
case LayerManager.Mutate.Opening:
SlicerFile.LayerManager.MutateOpen(layerStart, layerEnd, (int)iterationsStart, (int)iterationsEnd, fade);
break;
case Mutation.Mutates.Closing:
case LayerManager.Mutate.Closing:
SlicerFile.LayerManager.MutateClose(layerStart, layerEnd, (int)iterationsStart, (int)iterationsEnd, fade);
break;
case Mutation.Mutates.Gradient:
case LayerManager.Mutate.Gradient:
SlicerFile.LayerManager.MutateGradient(layerStart, layerEnd, (int)iterationsStart, (int)iterationsEnd, fade);
break;
/*case Mutation.Mutates.TopHat:
@@ -2192,13 +2355,13 @@ namespace UVtools.GUI
CvInvoke.MorphologyEx(image, image, MorphOp.HitMiss, Program.KernelFindIsolated,
new Point(-1, -1), (int) iterations, BorderType.Default, new MCvScalar());
break;*/
case Mutation.Mutates.PyrDownUp:
case LayerManager.Mutate.PyrDownUp:
SlicerFile.LayerManager.MutatePyrDownUp(layerStart, layerEnd);
break;
case Mutation.Mutates.SmoothMedian:
case LayerManager.Mutate.SmoothMedian:
SlicerFile.LayerManager.MutateMedianBlur(layerStart, layerEnd, (int)iterationsStart);
break;
case Mutation.Mutates.SmoothGaussian:
case LayerManager.Mutate.SmoothGaussian:
SlicerFile.LayerManager.MutateGaussianBlur(layerStart, layerEnd, new Size((int) iterationsStart, (int) iterationsStart));
break;
}
@@ -2252,7 +2415,7 @@ namespace UVtools.GUI
}
private void ComputeIssues()
private void ComputeIssues(IslandDetectionConfiguration islandConfig = null, ResinTrapDetectionConfiguration resinTrapConfig = null)
{
tabPageIssues.Tag = true;
TotalIssues = 0;
@@ -2269,7 +2432,7 @@ namespace UVtools.GUI
bool result = false;
try
{
var issues = SlicerFile.LayerManager.GetAllIssues();
var issues = SlicerFile.LayerManager.GetAllIssues(islandConfig, resinTrapConfig);
Issues = new Dictionary<uint, List<LayerIssue>>();
for (uint i = 0; i < SlicerFile.LayerCount; i++)
@@ -2337,32 +2500,53 @@ namespace UVtools.GUI
ShowLayer();
}
private void EventMouseDown(object sender, MouseEventArgs e)
private void ZoomToFit()
{
if (ReferenceEquals(sender, btnNextLayer) || ReferenceEquals(sender, btnPreviousLayer))
if (ReferenceEquals(SlicerFile, null)) return;
if (Settings.Default.ZoomToFitPrintVolumeBounds)
{
layerScrollTimer.Tag = ReferenceEquals(sender, btnNextLayer);
layerScrollTimer.Start();
return;
if (!tsLayerImageRotate.Checked)
{
pbLayer.ZoomToRegion(SlicerFile.LayerManager.BoundingRectangle);
}
else
{
pbLayer.ZoomToRegion(ActualLayerImage.Height - 1 - SlicerFile.LayerManager.BoundingRectangle.Bottom,
SlicerFile.LayerManager.BoundingRectangle.X,
SlicerFile.LayerManager.BoundingRectangle.Height,
SlicerFile.LayerManager.BoundingRectangle.Width
);
}
}
else
{
pbLayer.ZoomToFit();
}
}
private void EventMouseUp(object sender, MouseEventArgs e)
public IslandDetectionConfiguration GetIslandDetectionConfiguration()
{
if (ReferenceEquals(sender, btnNextLayer) || ReferenceEquals(sender, btnPreviousLayer))
return new IslandDetectionConfiguration
{
layerScrollTimer.Stop();
return;
}
Enabled = tsIsuesRefreshIslands.Checked,
BinaryThreshold = Settings.Default.IslandBinaryThreshold,
RequiredAreaToProcessCheck = Settings.Default.IslandRequiredAreaToProcessCheck,
RequiredPixelBrightnessToProcessCheck = Settings.Default.IslandRequiredPixelBrightnessToProcessCheck,
RequiredPixelsToSupport = Settings.Default.IslandRequiredPixelsToSupport,
RequiredPixelBrightnessToSupport = Settings.Default.IslandRequiredPixelBrightnessToSupport
};
}
private void EventTimerTick(object sender, EventArgs e)
public ResinTrapDetectionConfiguration GetResinTrapDetectionConfiguration()
{
if (ReferenceEquals(sender, layerScrollTimer))
return new ResinTrapDetectionConfiguration
{
ShowLayer((bool)layerScrollTimer.Tag);
return;
}
Enabled = tsIsuesRefreshResinTraps.Checked,
BinaryThreshold = Settings.Default.ResinTrapBinaryThreshold,
RequiredAreaToProcessCheck = Settings.Default.ResinTrapRequiredAreaToProcessCheck,
RequiredBlackPixelsToDrain = Settings.Default.ResinTrapRequiredBlackPixelsToDrain,
MaximumPixelBrightnessToDrain = Settings.Default.ResinTrapMaximumPixelBrightnessToDrain
};
}
}
}
+61 -61
View File
@@ -145,68 +145,68 @@
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAA4
DgAAAk1TRnQBSQFMAgEBBAEAAUABBAFAAQQBEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAs
DgAAAk1TRnQBSQFMAgEBBAEAAbgBBAG4AQQBEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA
AwABIAMAAQEBAAEgBgABIP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8AZgADUAGjA1IBqQNS
AakDUgGpA1IBqQNSAakDUgGpA1IBqQNSAakDUgGpA1IBqQNSAakDUgGpA1ABo1wAAxUBHQFCAWwBcwH1
AUgBgQGHAfcDQwF3A1sByAJCAW8B9QJYAV8B4wNKAYwDCgENBAADVQG0A1kBxwMvAUkDAAEBAxsBJgMc
AScDHAEnAxwBJwMcAScDHAEnAxwBJwMcAScDHAEnAxwBJwMcAScDAgEDBAADUgGpMAADUgGpEAADJwE6
AzABTAMwAUwDMAFMAzABTAMwAUwDMAFMAzABTAMwAUwDJwE6FAADBQEHA0wBkgFWAlgBwQMVAR0DPQFp
AQUByAHzAf8BEwGQAeYB/wIpAdwB/wIpAd0B/wJeAeMB/wI0Ad4B/wIpAd0B/wJYAVsBywMGAQgDAAH/
AwAB/wNDAXcDKQE+AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DMgFR
BAADUgGpBAADUAGdA1MBqgNTAaoDUwGqA1MBqgNTAaoDUwGqA1ABnQwAA1IBqRAAA04B+wMAAf8DAAH/
AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/A04B+xQAATACMQFNAQYByQHzAf8BBgHJAfQB/wFZAWIBZAHr
AVsCXgHZAQkBwAHxAf8BKgEyAd8B/wIsAeAB/wIsAeAB/wJlAekB/wI3AeIB/wIsAeAB/wIsAeAB/wNA
AXEDUQGiA1YBtgMqAUAEAAMQARUDEQEXAxEBFwMRARcDEQEXAxEBFwMRARcDEQEXAxEBFwMRARcDEAEW
CAADUgGpBAADUAGdA1MBqgNTAaoDHwEsHAADUgGpEwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMA
Af8DAAH/AwAB/xQAAwcBCgFWAWkBbwHyAQgBygH0Af8BCAHKAfQB/wEIAcoB9AH/ARQBoQHuAf8CLwHj
Af8CLwHjAf8CLwHjAf8CqQHvAf8CNgHjAf8CLwHjAf8CLwHjAf8CVgFYAbkDCgEOAxEBFwMAAQE4AANS
AakwAANSAakTAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/DAADFQEdAz0BaQM6
AWIBXAJgAdQBCQHLAfUB/wEJAcsB9QH/AQkBywH1Af8BFwGgAfAB/wIyAeYB/wIyAeYB/wIyAeYB/wLC
AfYB/wJKAegB/wIyAeYB/wIyAeYB/wJXAVkBvwNSAfQDAAH/Az4BbAMOARMDQgF2A0MBdwNDAXcDQwF3
A0MBdwNDAXcDQwF3A0MBdwNDAXcDQwF3A0IBdgMUARsEAANSAakDIgEyA1IBqQNSAakDUgGpA1IBqQNS
AakDUgGpA1IBqQNSAakDUgGpA1IBqQMiATIDUgGpEwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMA
Af8DAAH/AwAB/wwAAUsCTAGQAQoBywH2Af8BCgHLAfYB/wEKAcsB9gH/AQoBywH2Af8BKQGGAZwB+gND
AXgDIgEyAksBmAH7AjUB6QH/AjUB6QH/As0B+AH/AlkB7QH/AjUB6QH/AjUB6QH/A1ABngMAAf4DAAH/
A0MBdwMeASsDVwHFA1kBxwNZAccDWQHHA1kBxwNZAccDWQHHA1kBxwNZAccDWQHHA1gBxgMmATkEAANS
AakDNAFVAzQBVSAAAzQBVQM0AVUDUgGpEwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/
AwAB/wwAA1EBoAEMAcwB9wH/AQwBzAH3Af8BDAHMAfcB/wEMAcwB9wH/A0MBdwgAA0oBjQI4AewB/wI4
AewB/wJUAe8B/wI8AewB/wI4AewB/wE0AUUB7QH/AVICUwGoAzMBUwM8AWcDFAEcOAADUgGpAzQBVQM0
AVUDRgGAA1IBqQNSAakDUgGpA1IBqQNSAakDUgGpA0UBfwM0AVUDNAFVA1IBqRMAAf8DAAH/AwAB/wMA
Af8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8PAAEBAT8CQAFvAT4BfwGQAfgBDQHNAfcB/wENAc0B9wH/
AxIBGAgAAwEBAgNGAX4CUgFnAfACOwHuAf8BOwE8Ae4B/wFAAU4BugH9AUUCRgF+AwMBBAMzAVMDPAFn
AxQBHDgAA1IBqQM0AVUDNAFVAz8BbgMyAVAQAAMnATsDRAF8AzQBVQM0AVUDUgGpEwAB/wMAAf8DAAH/
AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/w8AAQEBPwJAAW8BPgF/AZAB+AEOAc4B+AH/AQ4BzgH4
Af8DEgEYEAADFwEgARUBvAH3Af8BEgHEAfcB/wE6Aa4BvAH9AUUCRgF+AwMBBAMAAf4DAAH/A0MBdwMf
ASwDVwHFA1kBxwNZAccDWQHHA1kBxwNZAccDWQHHA1kBxwNZAccDWQHHA1gBxgMmATkEAANSAakDNAFV
AzQBVQMFAQcDVQG1AxEBFwNSAakDKQE+BAADUAGfAxEBFwM0AVUDNAFVA1IBqRMAAf8DAAH/AwAB/wMA
Af8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8MAANRAaABEAHOAfgB/wEQAc8B+QH/ARABzwH5Af8BEAHP
AfkB/wNDAXcQAANEAXoBEAHPAfkB/wEQAc8B+QH/ARABzwH5Af8BEAHOAfgB/wFSAlMBqANSAfQDAAH/
Az4BbAMOARMDQgF1A0MBdwNDAXcDQwF3A0MBdwNDAXcDQwF3A0MBdwNDAXcDQwF3A0MBdwMUARsEAANS
AakDNAFVAzQBVQQAAzwBaANWAb4DIwE0A1UBtQMSARkDUQGgBAADNAFVAzQBVQNSAakTAAH/AwAB/wMA
Af8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DXAHfDAABSwJMAZABEQHQAfoB/wERAdAB+gH/AREB0AH6
Af8BEQHQAfoB/wEpAYYBnAH6A0MBeAMSARkDEwEaA0QBegEoAZEBnQH7AREB0AH6Af8BEQHQAfoB/wER
AdAB+gH/AREB0AH6Af8DSgGMAwoBDgMRARcDAAEBOAADUgGpAzQBVQM0AVUDAAEBAy0BRgMKAQ4EAAM5
AV8DXAHOAygBPAQAAzQBVQM0AVUDUgGpEwAB/wOCAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DXAHf
AxcBIAwAAxUBHQM9AWkDOgFiAVwCYAHUARIB0QH6Af8BEgHRAfoB/wESAdAB+gH/ARIBywHzAf8BEgHL
AfMB/wESAdAB+gH/ARIB0QH6Af8BEgHRAfoB/wFdAmEB4gM6AWIDPQFpAxQBHANRAaIDVgG2AyoBQAQA
AxABFQMRARcDEQEXAxEBFwMRARcDEQEXAxEBFwMRARcDEQEXAxEBFwMQARYIAANSAakDNAFVAzQBVQMz
AVMDUgGmA0oBjAcAAQEDRwGDCAADNAFVAzQBVQNSAakTAAH/A5kB/wOFAf8DAAH/AwAB/wMAAf8DAAH/
A1wB3wMXASAYAAMHAQoBWAFpAW8B8gEUAdIB+wH/ARQB0gH7Af8BFAHSAfsB/wEUAdIB+wH/ARQB0gH7
Af8BFAHSAfsB/wEUAdIB+wH/ARQB0gH7Af8BKwGSAZ0B+wMRARcLAAH/AwAB/wNDAXcDKQE+AwAB/wMA
Af8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DMgFRBAADUgGpAzQBVQM0AVUDEQEX
A1ABngMkATYUAAM0AVUDNAFVA1IBqRAAA1AB+wMAAf8DAAH/AwAB/wMAAf8DAAH/A1wB3wMXASAcAAEw
AjEBTQEVAdIB/AH/ARUB0gH8Af8BWQFjAWYB6wFbAl4B2QEVAdIB/AH/ARUB0gH8Af8BWwJhAeEBXQJh
AeIBFQHSAfwB/wEVAdIB/AH/AzgBXggAA1UBtANZAccDLwFJAwABAQMbASYDHAEnAxwBJwMcAScDHAEn
AxwBJwMcAScDHAEnAxwBJwMcAScDHAEnAwIBAwQAA1IBqQMiATIDUgGpA1IBqQNSAakDUgGpA1IBqQNS
AakDUgGpA1IBqQNSAakDUgGpAyIBMgNSAakQAAMgAS4DKQE/AykBPwMpAT8DKQE/AykBPwMRARcgAAMF
AQcDTAGSAVYCWAHBAxUBHQM9AWkBFgHTAfwB/wEWAdMB/AH/AUUCRgF/AxABFQNWAbMBSwJMAY8DBAEG
TAADUAGjA1IBqQNSAakDUgGpA1IBqQNSAakDUgGpA1IBqQNSAakDUgGpA1IBqQNSAakDUgGpA1ABo1wA
AxUBHQFCAW8BewH1AVEBhQGKAfcDIAEvGAABQgFNAT4HAAE+AwABKAMAAUADAAEgAwABAQEAAQEGAAEB
FgAD/4EAAv8BgAEBAv8B/AEBAgABvwH9AeABBwHAAwABoAEdAeABBwHAAQABEAEBAaEB/QHgAQcBwAEA
AR8B/wG/Af0B4AEHBAABgAEBAeABBwQAAY8B8QHgAQcBAwEAAR8B/wGAAQEB4AEHAQMBAAEfAf8BgwHB
AeABBwEDAcACAAGAAUEB4AEHAQMBwAIAAYgBEQHgAQcCAAEfAf8BgQERAeABBwIAARABAQGBATEB4AEP
AcABAwIAAYEB8QHgAR8BwAEDAgABgAEBAeABPwHAAQMC/wGAAQEC/wH8AT8L
AakDUgGpA1IBqQNSAakDUgGpA1IBqQNSAakDUgGpA1IBqQNSAakDUgGpA1ABo1wAAxUBHQFCAVkBXgH1
AVECbQH3A0MBdwNbAcgCQgFaAfUCWAFfAeMDSgGMAwoBDQQAA1UBtANZAccDLwFJAwABAQMbASYDHAEn
AxwBJwMcAScDHAEnAxwBJwMcAScDHAEnAxwBJwMcAScDHAEnAwIBAwQAA1IBqTAAA1IBqRAAAycBOgMw
AUwDMAFMAzABTAMwAUwDMAFMAzABTAMwAUwDMAFMAycBOhQAAwUBBwNMAZIBVgJYAcEDFQEdAz0BaQEA
AcgB8wH/AQQBkAHmAf8CGgHcAf8CGgHdAf8CTwHjAf8CJQHeAf8CGgHdAf8CWAFbAcsDBgEIAwAB/wMA
Af8DQwF3AykBPgMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AzIBUQQA
A1IBqQQAA1ABnQNTAaoDUwGqA1MBqgNTAaoDUwGqA1MBqgNQAZ0MAANSAakQAANOAfsDAAH/AwAB/wMA
Af8DAAH/AwAB/wMAAf8DAAH/AwAB/wNOAfsUAAEwAjEBTQEAAckB8wH/AQAByQH0Af8BWQJgAesBWwJe
AdkBAAHAAfEB/wEbASMB3wH/Ah0B4AH/Ah0B4AH/AlYB6QH/AigB4gH/Ah0B4AH/Ah0B4AH/A0ABcQNR
AaIDVgG2AyoBQAQAAxABFQMRARcDEQEXAxEBFwMRARcDEQEXAxEBFwMRARcDEQEXAxEBFwMQARYIAANS
AakEAANQAZ0DUwGqA1MBqgMfASwcAANSAakTAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMA
Af8DAAH/FAADBwEKAVkCZwHyAQABygH0Af8BAAHKAfQB/wEAAcoB9AH/AQUBoQHuAf8CIAHjAf8CIAHj
Af8CIAHjAf8CqQHvAf8CJwHjAf8CIAHjAf8CIAHjAf8CVgFYAbkDCgEOAxEBFwMAAQE4AANSAakwAANS
AakTAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/DAADFQEdAz0BaQM6AWIBXAJg
AdQBAAHLAfUB/wEAAcsB9QH/AQABywH1Af8BCAGgAfAB/wIjAeYB/wIjAeYB/wIjAeYB/wLCAfYB/wI7
AegB/wIjAeYB/wIjAeYB/wJXAVkBvwNSAfQDAAH/Az4BbAMOARMDQgF2A0MBdwNDAXcDQwF3A0MBdwND
AXcDQwF3A0MBdwNDAXcDQwF3A0IBdgMUARsEAANSAakDIgEyA1IBqQNSAakDUgGpA1IBqQNSAakDUgGp
A1IBqQNSAakDUgGpA1IBqQMiATIDUgGpEwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/
AwAB/wwAAUsCTAGQAQABywH2Af8BAAHLAfYB/wEAAcsB9gH/AQABywH2Af8BKQFyAXoB+gNDAXgDIgEy
AksBiAH7AiYB6QH/AiYB6QH/As0B+AH/AkoB7QH/AiYB6QH/AiYB6QH/A1ABngMAAf4DAAH/A0MBdwMe
ASsDVwHFA1kBxwNZAccDWQHHA1kBxwNZAccDWQHHA1kBxwNZAccDWQHHA1gBxgMmATkEAANSAakDNAFV
AzQBVSAAAzQBVQM0AVUDUgGpEwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wwA
A1EBoAEAAcwB9wH/AQABzAH3Af8BAAHMAfcB/wEAAcwB9wH/A0MBdwgAA0oBjQIpAewB/wIpAewB/wJF
Ae8B/wItAewB/wIpAewB/wElATYB7QH/AVICUwGoAzMBUwM8AWcDFAEcOAADUgGpAzQBVQM0AVUDRgGA
A1IBqQNSAakDUgGpA1IBqQNSAakDUgGpA0UBfwM0AVUDNAFVA1IBqRMAAf8DAAH/AwAB/wMAAf8DAAH/
AwAB/wMAAf8DAAH/AwAB/wMAAf8PAAEBAT8CQAFvAT4BcAF1AfgBAAHNAfcB/wEAAc0B9wH/AxIBGAgA
AwEBAgNGAX4CUgFdAfACLAHuAf8BLAEtAe4B/wJAAasB/QFFAkYBfgMDAQQDMwFTAzwBZwMUARw4AANS
AakDNAFVAzQBVQM/AW4DMgFQEAADJwE7A0QBfAM0AVUDNAFVA1IBqRMAAf8DAAH/AwAB/wMAAf8DAAH/
AwAB/wMAAf8DAAH/AwAB/wMAAf8PAAEBAT8CQAFvAT4BcAF1AfgBAAHOAfgB/wEAAc4B+AH/AxIBGBAA
AxcBIAEGAbwB9wH/AQMBxAH3Af8BQAGoAa0B/QFFAkYBfgMDAQQDAAH+AwAB/wNDAXcDHwEsA1cBxQNZ
AccDWQHHA1kBxwNZAccDWQHHA1kBxwNZAccDWQHHA1kBxwNYAcYDJgE5BAADUgGpAzQBVQM0AVUDBQEH
A1UBtQMRARcDUgGpAykBPgQAA1ABnwMRARcDNAFVAzQBVQNSAakTAAH/AwAB/wMAAf8DAAH/AwAB/wMA
Af8DAAH/AwAB/wMAAf8DAAH/DAADUQGgAQEBzgH4Af8BAQHPAfkB/wEBAc8B+QH/AQEBzwH5Af8DQwF3
EAADRAF6AQEBzwH5Af8BAQHPAfkB/wEBAc8B+QH/AQEBzgH4Af8BUgJTAagDUgH0AwAB/wM+AWwDDgET
A0IBdQNDAXcDQwF3A0MBdwNDAXcDQwF3A0MBdwNDAXcDQwF3A0MBdwNDAXcDFAEbBAADUgGpAzQBVQM0
AVUEAAM8AWgDVgG+AyMBNANVAbUDEgEZA1EBoAQAAzQBVQM0AVUDUgGpEwAB/wMAAf8DAAH/AwAB/wMA
Af8DAAH/AwAB/wMAAf8DAAH/A1wB3wwAAUsCTAGQAQIB0AH6Af8BAgHQAfoB/wECAdAB+gH/AQIB0AH6
Af8BKQFyAXoB+gNDAXgDEgEZAxMBGgNEAXoBKAGCAYsB+wECAdAB+gH/AQIB0AH6Af8BAgHQAfoB/wEC
AdAB+gH/A0oBjAMKAQ4DEQEXAwABATgAA1IBqQM0AVUDNAFVAwABAQMtAUYDCgEOBAADOQFfA1wBzgMo
ATwEAAM0AVUDNAFVA1IBqRMAAf8DggH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/A1wB3wMXASAMAAMV
AR0DPQFpAzoBYgFcAmAB1AEDAdEB+gH/AQMB0QH6Af8BAwHQAfoB/wEDAcsB8wH/AQMBywHzAf8BAwHQ
AfoB/wEDAdEB+gH/AQMB0QH6Af8BXQJhAeIDOgFiAz0BaQMUARwDUQGiA1YBtgMqAUAEAAMQARUDEQEX
AxEBFwMRARcDEQEXAxEBFwMRARcDEQEXAxEBFwMRARcDEAEWCAADUgGpAzQBVQM0AVUDMwFTA1IBpgNK
AYwHAAEBA0cBgwgAAzQBVQM0AVUDUgGpEwAB/wOZAf8DhQH/AwAB/wMAAf8DAAH/AwAB/wNcAd8DFwEg
GAADBwEKAVkCZwHyAQUB0gH7Af8BBQHSAfsB/wEFAdIB+wH/AQUB0gH7Af8BBQHSAfsB/wEFAdIB+wH/
AQUB0gH7Af8BBQHSAfsB/wErAYMBiwH7AxEBFwsAAf8DAAH/A0MBdwMpAT4DAAH/AwAB/wMAAf8DAAH/
AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMyAVEEAANSAakDNAFVAzQBVQMRARcDUAGeAyQBNhQA
AzQBVQM0AVUDUgGpEAADUAH7AwAB/wMAAf8DAAH/AwAB/wMAAf8DXAHfAxcBIBwAATACMQFNAQYB0gH8
Af8BBgHSAfwB/wFZAmAB6wFbAl4B2QEGAdIB/AH/AQYB0gH8Af8BWwJhAeEBXQJhAeIBBgHSAfwB/wEG
AdIB/AH/AzgBXggAA1UBtANZAccDLwFJAwABAQMbASYDHAEnAxwBJwMcAScDHAEnAxwBJwMcAScDHAEn
AxwBJwMcAScDHAEnAwIBAwQAA1IBqQMiATIDUgGpA1IBqQNSAakDUgGpA1IBqQNSAakDUgGpA1IBqQNS
AakDUgGpAyIBMgNSAakQAAMgAS4DKQE/AykBPwMpAT8DKQE/AykBPwMRARcgAAMFAQcDTAGSAVYCWAHB
AxUBHQM9AWkBBwHTAfwB/wEHAdMB/AH/AUUCRgF/AxABFQNWAbMBSwJMAY8DBAEGTAADUAGjA1IBqQNS
AakDUgGpA1IBqQNSAakDUgGpA1IBqQNSAakDUgGpA1IBqQNSAakDUgGpA1ABo1wAAxUBHQFCAVoBYgH1
AVEBbQF0AfcDIAEvGAABQgFNAT4HAAE+AwABKAMAAUADAAEgAwABAQEAAQEGAAEBFgAD/4EAAv8BgAEB
Av8B/AEBAgABvwH9AeABBwHAAwABoAEdAeABBwHAAQABEAEBAaEB/QHgAQcBwAEAAR8B/wG/Af0B4AEH
BAABgAEBAeABBwQAAY8B8QHgAQcBAwEAAR8B/wGAAQEB4AEHAQMBAAEfAf8BgwHBAeABBwEDAcACAAGA
AUEB4AEHAQMBwAIAAYgBEQHgAQcCAAEfAf8BgQERAeABBwIAARABAQGBATEB4AEPAcABAwIAAYEB8QHg
AR8BwAEDAgABgAEBAeABPwHAAQMC/wGAAQEC/wH8AT8L
</value>
</data>
<metadata name="toolTipInformation.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
Binary file not shown.

After

Width:  |  Height:  |  Size: 290 B

+3 -23
View File
@@ -6,35 +6,15 @@
* of this license document, but changing it is not allowed.
*/
using System.Drawing;
using UVtools.Core;
namespace UVtools.GUI
{
public class Mutation
{
#region Enum
public enum Mutates : byte
{
Resize,
Solidify,
//LayerSmash,
Erode,
Dilate,
Opening,
Closing,
Gradient,
TopHat,
BlackHat,
HitMiss,
PyrDownUp,
SmoothMedian,
SmoothGaussian,
}
#endregion
#region Properties
public Mutates Mutate { get; }
public LayerManager.Mutate Mutate { get; }
public string Description { get; }
@@ -43,7 +23,7 @@ namespace UVtools.GUI
#region Constructor
public Mutation(Mutates mutate, string description, Image image = null)
public Mutation(LayerManager.Mutate mutate, string description, Image image = null)
{
Mutate = mutate;
Description = description;
+10
View File
@@ -560,6 +560,16 @@ namespace UVtools.GUI.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap settings_16x16 {
get {
object obj = ResourceManager.GetObject("settings-16x16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
+33 -30
View File
@@ -121,14 +121,17 @@
<data name="Error-128x128" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\Error-128x128.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="UVtools" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\UVtools.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="search-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\search-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Cancel-24x24" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\Cancel-24x24.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="arrow-top-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\arrow-top-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="mutation_closing" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\gui\mutation_closing.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="mutation_solidify" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\gui\mutation_solidify.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="eye-24x24" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\eye-24x24.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -163,9 +166,6 @@
<data name="warning-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\warning-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="checkbox-marked-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\checkbox-marked-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Wrench-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\Wrench-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@@ -178,8 +178,8 @@
<data name="arrow-up" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\arrow-up.ico;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="SaveAs-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\SaveAs-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="Convert-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\Convert-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Ok-24x24" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\Ok-24x24.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -187,6 +187,9 @@
<data name="Button-Info-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\Button-Info-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="arrow-down-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\arrow-down-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Next-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\Next-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@@ -199,11 +202,14 @@
<data name="Open-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\Open-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="pointer-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\pointer-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="File-Close-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\File-Close-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="search-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\search-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="SaveAs-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\SaveAs-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Cancel-32x32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\Cancel-32x32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -211,20 +217,17 @@
<data name="eye-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\eye-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="mutation_tophat" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\gui\mutation_tophat.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Geometry-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\Geometry-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="CNCMachine-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\CNCMachine-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="mutation_tophat" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\gui\mutation_tophat.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="plus" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\plus.ico;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Convert-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\Convert-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="UVtools" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\UVtools.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="layers-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\layers-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -247,23 +250,23 @@
<data name="checkbox-unmarked-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\checkbox-unmarked-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="CNCMachine-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\CNCMachine-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="delete-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\delete-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="arrow-down-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\arrow-down-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="pointer-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\pointer-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="mutation_solidify" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\gui\mutation_solidify.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="checkbox-marked-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\checkbox-marked-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="mutation_blackhat" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\gui\mutation_blackhat.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Cancel-24x24" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\Cancel-24x24.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="mutation_closing" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\gui\mutation_closing.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="clipboard-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\clipboard-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="arrow-down" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\arrow-down.ico;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -274,7 +277,7 @@
<data name="island-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\island-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="clipboard-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\clipboard-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="settings-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\settings-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
+420
View File
@@ -22,5 +22,425 @@ namespace UVtools.GUI.Properties {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Red")]
public global::System.Drawing.Color PreviousNextLayerColor {
get {
return ((global::System.Drawing.Color)(this["PreviousNextLayerColor"]));
}
set {
this["PreviousNextLayerColor"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Yellow")]
public global::System.Drawing.Color IslandColor {
get {
return ((global::System.Drawing.Color)(this["IslandColor"]));
}
set {
this["IslandColor"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Orange")]
public global::System.Drawing.Color ResinTrapColor {
get {
return ((global::System.Drawing.Color)(this["ResinTrapColor"]));
}
set {
this["ResinTrapColor"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Red")]
public global::System.Drawing.Color TouchingBoundsColor {
get {
return ((global::System.Drawing.Color)(this["TouchingBoundsColor"]));
}
set {
this["TouchingBoundsColor"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Magenta")]
public global::System.Drawing.Color PreviousLayerColor {
get {
return ((global::System.Drawing.Color)(this["PreviousLayerColor"]));
}
set {
this["PreviousLayerColor"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Cyan")]
public global::System.Drawing.Color NextLayerColor {
get {
return ((global::System.Drawing.Color)(this["NextLayerColor"]));
}
set {
this["NextLayerColor"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool UpdateSettings {
get {
return ((bool)(this["UpdateSettings"]));
}
set {
this["UpdateSettings"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool StartMaximized {
get {
return ((bool)(this["StartMaximized"]));
}
set {
this["StartMaximized"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool CheckForUpdatesOnStartup {
get {
return ((bool)(this["CheckForUpdatesOnStartup"]));
}
set {
this["CheckForUpdatesOnStartup"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool LayerAutoRotateBestView {
get {
return ((bool)(this["LayerAutoRotateBestView"]));
}
set {
this["LayerAutoRotateBestView"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool LayerDifferenceDefault {
get {
return ((bool)(this["LayerDifferenceDefault"]));
}
set {
this["LayerDifferenceDefault"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool ComputeIssuesOnLoad {
get {
return ((bool)(this["ComputeIssuesOnLoad"]));
}
set {
this["ComputeIssuesOnLoad"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool LayerZoomToFit {
get {
return ((bool)(this["LayerZoomToFit"]));
}
set {
this["LayerZoomToFit"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool ComputeIslands {
get {
return ((bool)(this["ComputeIslands"]));
}
set {
this["ComputeIslands"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool ComputeResinTraps {
get {
return ((bool)(this["ComputeResinTraps"]));
}
set {
this["ComputeResinTraps"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("1")]
public byte IslandRequiredAreaToProcessCheck {
get {
return ((byte)(this["IslandRequiredAreaToProcessCheck"]));
}
set {
this["IslandRequiredAreaToProcessCheck"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("1")]
public byte IslandRequiredPixelBrightnessToProcessCheck {
get {
return ((byte)(this["IslandRequiredPixelBrightnessToProcessCheck"]));
}
set {
this["IslandRequiredPixelBrightnessToProcessCheck"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("10")]
public byte IslandRequiredPixelsToSupport {
get {
return ((byte)(this["IslandRequiredPixelsToSupport"]));
}
set {
this["IslandRequiredPixelsToSupport"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("150")]
public byte IslandRequiredPixelBrightnessToSupport {
get {
return ((byte)(this["IslandRequiredPixelBrightnessToSupport"]));
}
set {
this["IslandRequiredPixelBrightnessToSupport"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("17")]
public byte ResinTrapRequiredAreaToProcessCheck {
get {
return ((byte)(this["ResinTrapRequiredAreaToProcessCheck"]));
}
set {
this["ResinTrapRequiredAreaToProcessCheck"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("10")]
public byte ResinTrapRequiredBlackPixelsToDrain {
get {
return ((byte)(this["ResinTrapRequiredBlackPixelsToDrain"]));
}
set {
this["ResinTrapRequiredBlackPixelsToDrain"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("30")]
public byte ResinTrapMaximumPixelBrightnessToDrain {
get {
return ((byte)(this["ResinTrapMaximumPixelBrightnessToDrain"]));
}
set {
this["ResinTrapMaximumPixelBrightnessToDrain"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool AutoComputeIssuesClickOnTab {
get {
return ((bool)(this["AutoComputeIssuesClickOnTab"]));
}
set {
this["AutoComputeIssuesClickOnTab"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Lime")]
public global::System.Drawing.Color OutlinePrintVolumeBoundsColor {
get {
return ((global::System.Drawing.Color)(this["OutlinePrintVolumeBoundsColor"]));
}
set {
this["OutlinePrintVolumeBoundsColor"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("3")]
public byte OutlinePrintVolumeBoundsLineThickness {
get {
return ((byte)(this["OutlinePrintVolumeBoundsLineThickness"]));
}
set {
this["OutlinePrintVolumeBoundsLineThickness"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Lime")]
public global::System.Drawing.Color OutlineLayerBoundsColor {
get {
return ((global::System.Drawing.Color)(this["OutlineLayerBoundsColor"]));
}
set {
this["OutlineLayerBoundsColor"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("3")]
public byte OutlineLayerBoundsLineThickness {
get {
return ((byte)(this["OutlineLayerBoundsLineThickness"]));
}
set {
this["OutlineLayerBoundsLineThickness"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Orange")]
public global::System.Drawing.Color OutlineHollowAreasColor {
get {
return ((global::System.Drawing.Color)(this["OutlineHollowAreasColor"]));
}
set {
this["OutlineHollowAreasColor"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("3")]
public sbyte OutlineHollowAreasLineThickness {
get {
return ((sbyte)(this["OutlineHollowAreasLineThickness"]));
}
set {
this["OutlineHollowAreasLineThickness"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool OutlinePrintVolumeBounds {
get {
return ((bool)(this["OutlinePrintVolumeBounds"]));
}
set {
this["OutlinePrintVolumeBounds"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool OutlineLayerBounds {
get {
return ((bool)(this["OutlineLayerBounds"]));
}
set {
this["OutlineLayerBounds"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool OutlineHollowAreas {
get {
return ((bool)(this["OutlineHollowAreas"]));
}
set {
this["OutlineHollowAreas"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool ZoomToFitPrintVolumeBounds {
get {
return ((bool)(this["ZoomToFitPrintVolumeBounds"]));
}
set {
this["ZoomToFitPrintVolumeBounds"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("127")]
public byte ResinTrapBinaryThreshold {
get {
return ((byte)(this["ResinTrapBinaryThreshold"]));
}
set {
this["ResinTrapBinaryThreshold"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public byte IslandBinaryThreshold {
get {
return ((byte)(this["IslandBinaryThreshold"]));
}
set {
this["IslandBinaryThreshold"] = value;
}
}
}
}
+110 -6
View File
@@ -1,7 +1,111 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="UVtools.GUI.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="PreviousNextLayerColor" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">Red</Value>
</Setting>
<Setting Name="IslandColor" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">Yellow</Value>
</Setting>
<Setting Name="ResinTrapColor" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">Orange</Value>
</Setting>
<Setting Name="TouchingBoundsColor" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">Red</Value>
</Setting>
<Setting Name="PreviousLayerColor" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">Magenta</Value>
</Setting>
<Setting Name="NextLayerColor" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">Cyan</Value>
</Setting>
<Setting Name="UpdateSettings" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="StartMaximized" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="CheckForUpdatesOnStartup" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="LayerAutoRotateBestView" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="LayerDifferenceDefault" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="ComputeIssuesOnLoad" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="LayerZoomToFit" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="ComputeIslands" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="ComputeResinTraps" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="IslandRequiredAreaToProcessCheck" Type="System.Byte" Scope="User">
<Value Profile="(Default)">1</Value>
</Setting>
<Setting Name="IslandRequiredPixelBrightnessToProcessCheck" Type="System.Byte" Scope="User">
<Value Profile="(Default)">1</Value>
</Setting>
<Setting Name="IslandRequiredPixelsToSupport" Type="System.Byte" Scope="User">
<Value Profile="(Default)">10</Value>
</Setting>
<Setting Name="IslandRequiredPixelBrightnessToSupport" Type="System.Byte" Scope="User">
<Value Profile="(Default)">150</Value>
</Setting>
<Setting Name="ResinTrapRequiredAreaToProcessCheck" Type="System.Byte" Scope="User">
<Value Profile="(Default)">17</Value>
</Setting>
<Setting Name="ResinTrapRequiredBlackPixelsToDrain" Type="System.Byte" Scope="User">
<Value Profile="(Default)">10</Value>
</Setting>
<Setting Name="ResinTrapMaximumPixelBrightnessToDrain" Type="System.Byte" Scope="User">
<Value Profile="(Default)">30</Value>
</Setting>
<Setting Name="AutoComputeIssuesClickOnTab" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="OutlinePrintVolumeBoundsColor" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">Lime</Value>
</Setting>
<Setting Name="OutlinePrintVolumeBoundsLineThickness" Type="System.Byte" Scope="User">
<Value Profile="(Default)">3</Value>
</Setting>
<Setting Name="OutlineLayerBoundsColor" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">Lime</Value>
</Setting>
<Setting Name="OutlineLayerBoundsLineThickness" Type="System.Byte" Scope="User">
<Value Profile="(Default)">3</Value>
</Setting>
<Setting Name="OutlineHollowAreasColor" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">Orange</Value>
</Setting>
<Setting Name="OutlineHollowAreasLineThickness" Type="System.SByte" Scope="User">
<Value Profile="(Default)">3</Value>
</Setting>
<Setting Name="OutlinePrintVolumeBounds" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="OutlineLayerBounds" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="OutlineHollowAreas" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="ZoomToFitPrintVolumeBounds" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="ResinTrapBinaryThreshold" Type="System.Byte" Scope="User">
<Value Profile="(Default)">127</Value>
</Setting>
<Setting Name="IslandBinaryThreshold" Type="System.Byte" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
</Settings>
</SettingsFile>
+31 -20
View File
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.Net.Compilers.Toolset.3.7.0-2.final\build\Microsoft.Net.Compilers.Toolset.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.Toolset.3.7.0-2.final\build\Microsoft.Net.Compilers.Toolset.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -63,9 +62,6 @@
<Reference Include="ApplicationManagement">
<HintPath>Libraries\ApplicationManagement.dll</HintPath>
</Reference>
<Reference Include="BinarySerializer, Version=8.5.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\BinarySerializer.8.5.1\lib\net46\BinarySerializer.dll</HintPath>
</Reference>
<Reference Include="Cyotek.Windows.Forms.ImageBox, Version=1.2.0.0, Culture=neutral, PublicKeyToken=58daa28b0b2de221, processorArchitecture=MSIL">
<HintPath>..\packages\CyotekImageBox.1.3.0-Alpha1\lib\net20\Cyotek.Windows.Forms.ImageBox.dll</HintPath>
</Reference>
@@ -75,9 +71,6 @@
<Reference Include="Emgu.CV.Platform.NetStandard, Version=4.3.0.3890, Culture=neutral, PublicKeyToken=7281126722ab4438, processorArchitecture=MSIL">
<HintPath>..\packages\Emgu.CV.4.3.0.3890\lib\net461\Emgu.CV.Platform.NetStandard.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
@@ -94,16 +87,6 @@
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Linq, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Linq.4.3.0\lib\net463\System.Linq.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Linq.Expressions, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Linq.Expressions.4.3.0\lib\net463\System.Linq.Expressions.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Management" />
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
@@ -126,7 +109,7 @@
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0-preview.5.20278.1\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0-preview.6.20305.6\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Extensions, Version=4.1.1.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.Extensions.4.3.1\lib\net462\System.Runtime.Extensions.dll</HintPath>
@@ -149,6 +132,18 @@
<Compile Include="Forms\FrmInstallPEProfiles.Designer.cs">
<DependentUpon>FrmInstallPEProfiles.cs</DependentUpon>
</Compile>
<Compile Include="Forms\FrmMutationOneNumericalInput.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\FrmMutationOneNumericalInput.Designer.cs">
<DependentUpon>FrmMutationOneNumericalInput.cs</DependentUpon>
</Compile>
<Compile Include="Forms\FrmMutationOneComoboBox.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\FrmMutationOneComoboBox.Designer.cs">
<DependentUpon>FrmMutationOneComoboBox.cs</DependentUpon>
</Compile>
<Compile Include="Forms\FrmMutationResize.cs">
<SubType>Form</SubType>
</Compile>
@@ -185,6 +180,12 @@
<Compile Include="Forms\FrmLoading.Designer.cs">
<DependentUpon>FrmLoading.cs</DependentUpon>
</Compile>
<Compile Include="Forms\FrmSettings.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\FrmSettings.Designer.cs">
<DependentUpon>FrmSettings.cs</DependentUpon>
</Compile>
<Compile Include="FrmMain.cs">
<SubType>Form</SubType>
</Compile>
@@ -201,6 +202,12 @@
<EmbeddedResource Include="Forms\FrmInstallPEProfiles.resx">
<DependentUpon>FrmInstallPEProfiles.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\FrmMutationOneNumericalInput.resx">
<DependentUpon>FrmMutationOneNumericalInput.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\FrmMutationOneComoboBox.resx">
<DependentUpon>FrmMutationOneComoboBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\FrmMutationResize.resx">
<DependentUpon>FrmMutationResize.cs</DependentUpon>
</EmbeddedResource>
@@ -216,6 +223,9 @@
<EmbeddedResource Include="Forms\FrmLoading.resx">
<DependentUpon>FrmLoading.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\FrmSettings.resx">
<DependentUpon>FrmSettings.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmMain.resx">
<DependentUpon>FrmMain.cs</DependentUpon>
</EmbeddedResource>
@@ -263,6 +273,7 @@
<None Include="Images\checkbox-unmarked-16x16.png" />
<None Include="Images\file-image-16x16.png" />
<None Include="Images\clipboard-16x16.png" />
<None Include="Images\settings-16x16.png" />
<Content Include="UVtools.ico" />
<None Include="UVtools.png" />
<None Include="Images\Exit-16x16.png" />
@@ -337,14 +348,14 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>xcopy /i /y /d /s $(ProjectDir)..\PrusaSlicer $(ProjectDir)$(OutDir)\PrusaSlicer</PostBuildEvent>
<PostBuildEvent>xcopy /i /y /d /s $(ProjectDir)..\PrusaSlicer $(ProjectDir)$(OutDir)\PrusaSlicer
xcopy /d /y $(ProjectDir)..\UVtools.Cmd\$(OutDir)netcoreapp3.1\* $(ProjectDir)$(OutDir)</PostBuildEvent>
</PropertyGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Emgu.CV.runtime.windows.4.3.0.3890\build\Emgu.CV.runtime.windows.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Emgu.CV.runtime.windows.4.3.0.3890\build\Emgu.CV.runtime.windows.targets'))" />
<Error Condition="!Exists('..\packages\Microsoft.Net.Compilers.Toolset.3.7.0-2.final\build\Microsoft.Net.Compilers.Toolset.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Net.Compilers.Toolset.3.7.0-2.final\build\Microsoft.Net.Compilers.Toolset.props'))" />
</Target>
<Import Project="..\packages\Emgu.CV.runtime.windows.4.3.0.3890\build\Emgu.CV.runtime.windows.targets" Condition="Exists('..\packages\Emgu.CV.runtime.windows.4.3.0.3890\build\Emgu.CV.runtime.windows.targets')" />
</Project>
+1 -8
View File
@@ -1,24 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="BinarySerializer" version="8.5.1" targetFramework="net48" />
<package id="CyotekImageBox" version="1.3.0-Alpha1" targetFramework="net48" />
<package id="Emgu.CV" version="4.3.0.3890" targetFramework="net48" />
<package id="Emgu.CV.runtime.windows" version="4.3.0.3890" targetFramework="net48" />
<package id="Microsoft.Net.Compilers.Toolset" version="3.7.0-2.final" targetFramework="net48" developmentDependency="true" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net48" />
<package id="System.Buffers" version="4.5.1" targetFramework="net48" />
<package id="System.Collections" version="4.3.0" targetFramework="net48" />
<package id="System.IO" version="4.3.0" targetFramework="net48" />
<package id="System.Linq" version="4.3.0" targetFramework="net48" />
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="net48" />
<package id="System.Memory" version="4.5.4" targetFramework="net48" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" />
<package id="System.Reflection" version="4.3.0" targetFramework="net48" />
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net48" />
<package id="System.Reflection.TypeExtensions" version="4.7.0" targetFramework="net48" />
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net48" />
<package id="System.Runtime" version="4.3.1" targetFramework="net48" />
<package id="System.Runtime.CompilerServices.Unsafe" version="5.0.0-preview.5.20278.1" targetFramework="net48" />
<package id="System.Runtime.CompilerServices.Unsafe" version="5.0.0-preview.6.20305.6" targetFramework="net48" />
<package id="System.Runtime.Extensions" version="4.3.1" targetFramework="net48" />
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net48" />
<package id="System.Threading" version="4.3.0" targetFramework="net48" />
+34 -22
View File
@@ -3,7 +3,7 @@
<?define ComponentRules="OneToOne"?>
<!-- SourceDir instructs IsWiX the location of the directory that contains files for this merge module -->
<?define SourceDir="..\UVtools.GUI\bin\Release"?>
<Module Id="UVtools" Language="1033" Version="0.5.2.2">
<Module Id="UVtools" Language="1033" Version="0.6.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" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="DesktopFolder" />
@@ -26,6 +26,9 @@
<Component Id="owc25ABE3DF1B281670E77FD3B882B58B9F" Guid="de5c6697-501a-2e10-da10-134ad4f060ad">
<File Id="owf25ABE3DF1B281670E77FD3B882B58B9F" Source="$(var.SourceDir)\Cyotek.Windows.Forms.ImageBox.xml" KeyPath="yes" />
</Component>
<Component Id="owc0F288E77993D555E272ECFA1DF023DDA" Guid="ad374cb5-9215-37cb-d59d-88e4b3bc61bb">
<File Id="owf0F288E77993D555E272ECFA1DF023DDA" Source="$(var.SourceDir)\Emgu.CV.Platform.NetCore.dll" KeyPath="yes" />
</Component>
<Component Id="owc5A25DAF599EFAF9BDE0A414028049BB5" Guid="08486262-cc80-60a3-c6b2-f5c1bba4699d">
<File Id="owf5A25DAF599EFAF9BDE0A414028049BB5" Source="$(var.SourceDir)\Emgu.CV.Platform.NetFramework.dll" KeyPath="yes" />
</Component>
@@ -44,27 +47,15 @@
<Component Id="owc3FC8434C1A84605AEEBC6A100CA2F3E1" Guid="47d7e276-db6d-424e-d797-1a69e1e24b3b">
<File Id="owf3FC8434C1A84605AEEBC6A100CA2F3E1" Source="$(var.SourceDir)\Newtonsoft.Json.dll" KeyPath="yes" />
</Component>
<Component Id="owcDE8FDCCF922CA433A075036DF5C1BE38" Guid="3a65cb72-6e09-91ed-08ba-4f7eadd88867">
<File Id="owfDE8FDCCF922CA433A075036DF5C1BE38" Source="$(var.SourceDir)\Newtonsoft.Json.xml" KeyPath="yes" />
</Component>
<Component Id="owcCE9BC93A259754292A772FFBD0707880" Guid="0fd9f7f4-8ed5-a50f-352f-a7fcc169d9ee">
<File Id="owfCE9BC93A259754292A772FFBD0707880" Source="$(var.SourceDir)\SixLabors.Core.dll" KeyPath="yes" />
</Component>
<Component Id="owc2D7EC5C1FE4514E7C7CCB37E8D125A40" Guid="08ff79c4-bff0-c6d4-ffba-1f1fcbb32f8b">
<File Id="owf2D7EC5C1FE4514E7C7CCB37E8D125A40" Source="$(var.SourceDir)\SixLabors.Core.xml" KeyPath="yes" />
</Component>
<Component Id="owc36F067EBBAC4A5B55BCC215DAB0D892B" Guid="31c6f4c4-ace8-5e28-4ae1-0d8f4f7122b9">
<File Id="owf36F067EBBAC4A5B55BCC215DAB0D892B" Source="$(var.SourceDir)\SixLabors.ImageSharp.dll" KeyPath="yes" />
</Component>
<Component Id="owc71BB2593A187E41D45ACB014E6A21293" Guid="672fc09e-6ff6-3166-9614-516281a7e144">
<File Id="owf71BB2593A187E41D45ACB014E6A21293" Source="$(var.SourceDir)\SixLabors.ImageSharp.xml" KeyPath="yes" />
</Component>
<Component Id="owc266C4DEC591C8A54CCC1D3C61FC512AA" Guid="2224179c-4d85-88a2-23e2-bc0c27cadd0e">
<File Id="owf266C4DEC591C8A54CCC1D3C61FC512AA" Source="$(var.SourceDir)\System.Buffers.dll" KeyPath="yes" />
</Component>
<Component Id="owcB3975236E57AF3476C692D6E3C40D3A7" Guid="5d90e46b-650b-92f7-6d00-2dd61f8a4944">
<File Id="owfB3975236E57AF3476C692D6E3C40D3A7" Source="$(var.SourceDir)\System.Buffers.xml" KeyPath="yes" />
</Component>
<Component Id="owc0517117239E80E566282BE4546F8180F" Guid="c6cee878-746b-dc34-9583-946f27cba26a">
<File Id="owf0517117239E80E566282BE4546F8180F" Source="$(var.SourceDir)\System.CommandLine.dll" KeyPath="yes" />
</Component>
<Component Id="owcF2B199C7800AE0BBCC0001E0A61F6988" Guid="405dfe99-fffe-4059-26e0-c7d1bd0a0bed">
<File Id="owfF2B199C7800AE0BBCC0001E0A61F6988" Source="$(var.SourceDir)\System.Memory.dll" KeyPath="yes" />
</Component>
@@ -89,17 +80,38 @@
<Component Id="owc912B341D759C6D4043ED430D16F8011A" Guid="fab0f014-28b2-d48f-5aa8-5a8e3bcf3ffb">
<File Id="owf912B341D759C6D4043ED430D16F8011A" Source="$(var.SourceDir)\System.Runtime.CompilerServices.Unsafe.xml" KeyPath="yes" />
</Component>
<Component Id="owc540CF8CDBE6617C60879532E387E1716" Guid="bd0331df-7b7e-28be-f87a-809cdbfa07f0">
<File Id="owf540CF8CDBE6617C60879532E387E1716" Source="$(var.SourceDir)\UVtools.Core.dll" KeyPath="yes" />
</Component>
<Component Id="owcBD6C2CB73106BCF8D5385465839D3344" Guid="efab6672-7297-cbab-c613-743b21593319">
<File Id="owfBD6C2CB73106BCF8D5385465839D3344" Source="$(var.SourceDir)\UVtools.Core.pdb" KeyPath="yes" />
</Component>
<Component Id="owc21B8C8C0F69E3CD1398B9A0674DF07BD" Guid="1e472543-e636-904d-da5b-cddaac2d36b1">
<File Id="owf21B8C8C0F69E3CD1398B9A0674DF07BD" Source="$(var.SourceDir)\UVtools.exe" KeyPath="yes">
<Shortcut Id="sc6327849DA5C02D2396E91B8B1892E03C" Name="UVtools" Directory="DesktopFolder" />
<Shortcut Id="sc218BF75801887335D1B30BAFB94BA631" Name="UVtools" Directory="scd220707349D4C8FA275285514283F3E2A" />
</File>
<File Id="owf21B8C8C0F69E3CD1398B9A0674DF07BD" Source="$(var.SourceDir)\UVtools.exe" KeyPath="yes" />
</Component>
<Component Id="owcFD68A2B6BB01205FB923D13D9A1EB333" Guid="a2bfa40e-e0f8-47b6-2570-e609ea5e428d">
<File Id="owfFD68A2B6BB01205FB923D13D9A1EB333" Source="$(var.SourceDir)\UVtools.exe.config" KeyPath="yes" />
</Component>
<Component Id="owcB6603ABDC143C6488F777606A4A341B1" Guid="040f11b5-152d-c7f3-9cd1-5ad8b731e02a">
<File Id="owfB6603ABDC143C6488F777606A4A341B1" Source="$(var.SourceDir)\UVtools.Parser.dll" KeyPath="yes" />
<Component Id="owc0C1077539E2B54F2460D2C0993613EFB" Guid="fc6ae2db-2865-9eb4-5753-4f2f941fdf16">
<File Id="owf0C1077539E2B54F2460D2C0993613EFB" Source="$(var.SourceDir)\UVtools.pdb" KeyPath="yes" />
</Component>
<Component Id="owcE56A1A43062CD54830A538D93042A2F9" Guid="97edfcac-9e9e-3019-6b8f-d6377d7dc1a1">
<File Id="owfE56A1A43062CD54830A538D93042A2F9" Source="$(var.SourceDir)\UVtoolsCmd.deps.json" KeyPath="yes" />
</Component>
<Component Id="owc0E305B983BD1AF09581ED4997D7E85ED" Guid="c24bfcd6-55aa-0509-f1f0-86b87d4f7d17">
<File Id="owf0E305B983BD1AF09581ED4997D7E85ED" Source="$(var.SourceDir)\UVtoolsCmd.dll" KeyPath="yes" />
</Component>
<Component Id="owcF3C69C370296234BECE8A6E9414BA938" Guid="91dd69f3-350b-ffc9-6030-3ec11aac16dc">
<File Id="owfF3C69C370296234BECE8A6E9414BA938" Source="$(var.SourceDir)\UVtoolsCmd.exe" KeyPath="yes" />
</Component>
<Component Id="owc0BA04EBA55A828242AC648F3806CE8F3" Guid="68bb485f-4b09-d863-394c-cd87049021a0">
<File Id="owf0BA04EBA55A828242AC648F3806CE8F3" Source="$(var.SourceDir)\UVtoolsCmd.pdb" KeyPath="yes" />
</Component>
<Component Id="owc59F6487971C89DDBCF40A8A690169334" Guid="b83137d1-2f79-c6e5-0e72-fb84e2059f28">
<File Id="owf59F6487971C89DDBCF40A8A690169334" Source="$(var.SourceDir)\UVtoolsCmd.runtimeconfig.dev.json" KeyPath="yes" />
</Component>
<Component Id="owc76C7AC737F3567A5F2C89DBE21A3BE39" Guid="01949189-492b-8d45-dc95-3e341f5d690c">
<File Id="owf76C7AC737F3567A5F2C89DBE21A3BE39" Source="$(var.SourceDir)\UVtoolsCmd.runtimeconfig.json" KeyPath="yes" />
</Component>
<Directory Id="owdF7EC390A16A84F49221C0816B06C7316" Name="PrusaSlicer">
<Directory Id="owd6830BAD7B93348EE48856553BF6B1294" Name="printer">
+3
View File
@@ -4,6 +4,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
VisualStudioVersion = 16.0.29926.136
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UVtools.GUI", "UVtools.GUI\UVtools.GUI.csproj", "{E7389EE3-CF56-464B-9BA1-816B31D1E6FF}"
ProjectSection(ProjectDependencies) = postProject
{36E5877E-6AA6-4368-A9EA-46D7C7C90302} = {36E5877E-6AA6-4368-A9EA-46D7C7C90302}
EndProjectSection
EndProject
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "UVtools.InstallerMM", "UVtools.InstallerMM\UVtools.InstallerMM.wixproj", "{E53BAA5D-29A8-4287-B3AA-1AFF5A4BDC6C}"
EndProject