diff options
author | Tiago Conceição <Tiago_caza@hotmail.com> | 2020-08-11 05:00:05 +0300 |
---|---|---|
committer | Tiago Conceição <Tiago_caza@hotmail.com> | 2020-08-11 05:00:05 +0300 |
commit | 747a292892ee4f4b1e3442f0a95897078e09e845 (patch) | |
tree | 780e7b22646cefca0bffcdc9d88006ce1a9e9f02 | |
parent | 292db4090fad93a5cecbeb63de1e56dd2b95b164 (diff) |
v0.6.6.0v0.6.6.0
* (Add) Pixel Editor: Eraser - Right click over a white pixel to remove it whole linked area (Fill with black) (#7)
* (Add) Pixel Editor: Parallel layer image save when apply modifications
* (Add) GCode: Save to clipboard
* (Change) Issues Repair: Default noise removal iterations to 0
* (Fix) Edit: Remove decimal plates for integer properties
* (Fix) cws: Exposure time was in seconds, changed to ms (#17)
* (Fix) cws: Calculate blanking time (#17)
* (Fix) cws: Edit LiftHeight and Exposure Time was enforcing integer number
* (Fix) cws: GCode extra space between slices
* (Fix) cws and zcodex: Precision errors on retract height
-rw-r--r-- | CHANGELOG.md | 15 | ||||
-rw-r--r-- | UVtools.Core/Extensions/EmguExtensions.cs | 1 | ||||
-rw-r--r-- | UVtools.Core/FileFormats/CWSFile.cs | 27 | ||||
-rw-r--r-- | UVtools.Core/FileFormats/ChituboxZipFile.cs | 4 | ||||
-rw-r--r-- | UVtools.Core/FileFormats/FileFormat.cs | 14 | ||||
-rw-r--r-- | UVtools.Core/FileFormats/ZCodexFile.cs | 4 | ||||
-rw-r--r-- | UVtools.Core/Layer/LayerManager.cs | 48 | ||||
-rw-r--r-- | UVtools.Core/PixelEditor/PixelEraser.cs | 21 | ||||
-rw-r--r-- | UVtools.Core/PixelEditor/PixelOperation.cs | 1 | ||||
-rw-r--r-- | UVtools.Core/UVtools.Core.csproj | 6 | ||||
-rw-r--r-- | UVtools.GUI/App.config | 5 | ||||
-rw-r--r-- | UVtools.GUI/Forms/FrmInputBox.cs | 4 | ||||
-rw-r--r-- | UVtools.GUI/FrmMain.Designer.cs | 153 | ||||
-rw-r--r-- | UVtools.GUI/FrmMain.cs | 137 | ||||
-rw-r--r-- | UVtools.GUI/FrmMain.resx | 31 | ||||
-rw-r--r-- | UVtools.GUI/Properties/AssemblyInfo.cs | 4 | ||||
-rw-r--r-- | UVtools.GUI/Properties/Settings.Designer.cs | 2 | ||||
-rw-r--r-- | UVtools.GUI/Properties/Settings.settings | 2 |
18 files changed, 392 insertions, 87 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 57f6d62..1fc505a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 11/08/2020 - v0.6.6.0 + +* (Add) Pixel Editor: Eraser - Right click over a white pixel to remove it whole linked area (Fill with black) (#7) +* (Add) Pixel Editor: Parallel layer image save when apply modifications +* (Add) GCode: Save to clipboard +* (Change) Issues Repair: Default noise removal iterations to 0 +* (Fix) Edit: Remove decimal plates for integer properties +* (Fix) cws: Exposure time was in seconds, changed to ms (#17) +* (Fix) cws: Calculate blanking time (#17) +* (Fix) cws: Edit LiftHeight and Exposure Time was enforcing integer number +* (Fix) cws: GCode extra space between slices +* (Fix) cws and zcodex: Precision errors on retract height + ## 08/08/2020 - v0.6.5.0 * (Add) Mutators: Custom kernels, auto kernels and anchor where applicable @@ -16,7 +29,7 @@ * (Add) Pixel Editor - Drawing: Line type and defaults to AntiAliasing * (Add) Pixel Editor - Drawing: Line thickness to allow hollow shapes * (Add) Pixel Editor - Drawing: Layer depth, to add pixels at multiple layers at once -* (Add) Pixel Editor: Text writing +* (Add) Pixel Editor: Text writing (#7) ## 05/08/2020 - v0.6.4.2 diff --git a/UVtools.Core/Extensions/EmguExtensions.cs b/UVtools.Core/Extensions/EmguExtensions.cs index 967f714..16db414 100644 --- a/UVtools.Core/Extensions/EmguExtensions.cs +++ b/UVtools.Core/Extensions/EmguExtensions.cs @@ -183,6 +183,7 @@ namespace UVtools.Core.Extensions } public static byte GetByte(this Mat mat, int x, int y) => GetByte(mat, mat.GetPixelPos(x, y)); + public static byte GetByte(this Mat mat, Point pos) => GetByte(mat, mat.GetPixelPos(pos.X, pos.Y)); public static void SetByte(this Mat mat, int pixel, byte value) => SetByte(mat, pixel, new[] {value}); diff --git a/UVtools.Core/FileFormats/CWSFile.cs b/UVtools.Core/FileFormats/CWSFile.cs index 26aee23..fa4aaf0 100644 --- a/UVtools.Core/FileFormats/CWSFile.cs +++ b/UVtools.Core/FileFormats/CWSFile.cs @@ -56,7 +56,7 @@ namespace UVtools.Core.FileFormats [DisplayName("Outline Width Outset")] public ushort OutlineWidthOutset { get; set; } = 0; [DisplayName("Bottom Layers Time")] public uint BottomLayersTime { get; set; } = 35000; [DisplayName("Number of Bottom Layers")] public ushort NumberBottomLayers { get; set; } = 3; - [DisplayName("Blanking Layer Time")] public uint BlankingLayerTime { get; set; } + [DisplayName("Blanking Layer Time")] public uint BlankingLayerTime { get; set; } = 1000; [DisplayName("BuildDirection")] public string BuildDirection { get; set; } = "Bottom_Up"; [DisplayName("Lift Distance")] public float LiftDistance { get; set; } = 4; [DisplayName("Slide/Tilt Value")] public byte TiltValue { get; set; } @@ -416,7 +416,7 @@ G1 Z-3.9 F120 if (ReferenceEquals(modifier, PrintParameterModifier.InitialExposureSeconds)) { SliceSettings.HeadLayersExpoMs = - OutputSettings.BottomLayersTime = value.Convert<uint>()*1000; + OutputSettings.BottomLayersTime = (uint) (value.Convert<float>()*1000); UpdateLayers(); UpdateGCode(); return true; @@ -424,7 +424,7 @@ G1 Z-3.9 F120 if (ReferenceEquals(modifier, PrintParameterModifier.ExposureSeconds)) { SliceSettings.LayersExpoMs = - OutputSettings.LayerTime = value.Convert<uint>() * 1000; + OutputSettings.LayerTime = (uint) (value.Convert<float>() * 1000); UpdateLayers(); UpdateGCode(); return true; @@ -433,7 +433,7 @@ G1 Z-3.9 F120 if (ReferenceEquals(modifier, PrintParameterModifier.LiftHeight)) { SliceSettings.LiftDistance = - OutputSettings.LiftDistance = value.Convert<byte>(); + OutputSettings.LiftDistance = value.Convert<float>(); UpdateGCode(); return true; } @@ -613,7 +613,7 @@ G1 Z-3.9 F120 Layer layer = this[layerIndex]; GCode.AppendLine($"{GCodeKeywordSlice} {layerIndex}"); GCode.AppendLine($"M106 S{GetInitialLayerValueOrNormal(layerIndex, OutputSettings.BottomLightPWM, OutputSettings.LightPWM)}"); - GCode.AppendLine($"{GCodeKeywordDelay} {layer.ExposureTime}"); + GCode.AppendLine($"{GCodeKeywordDelay} {layer.ExposureTime * 1000}"); GCode.AppendLine("M106 S0"); GCode.AppendLine(GCodeKeywordSliceBlank); @@ -622,15 +622,26 @@ G1 Z-3.9 F120 if (LiftHeight > 0) { GCode.AppendLine($"G1 Z{LiftHeight} F{LiftSpeed}"); - GCode.AppendLine($"G1 Z-{LiftHeight - layer.PositionZ + lastZPosition} F{RetractSpeed}"); + GCode.AppendLine($"G1 Z-{Math.Round(LiftHeight - layer.PositionZ + lastZPosition, 2)} F{RetractSpeed}"); } else { - GCode.AppendLine($"G1 Z{layer.PositionZ - lastZPosition} F{LiftSpeed}"); + GCode.AppendLine($"G1 Z{Math.Round(layer.PositionZ - lastZPosition, 2)} F{LiftSpeed}"); } } + // delay = max(extra['wait'], 500) + int(((int(lift)/(extra['lift_feed']/60)) + (int(lift)/(extra['lift_retract']/60)))*1000) + uint extraDelay = (uint) (((LiftHeight / (LiftSpeed / 60f)) + (LiftHeight / (RetractSpeed / 60f))) * 1000); + if (layerIndex < InitialLayerCount) + { + extraDelay = (uint) Math.Max(extraDelay + 10000, layer.ExposureTime * 1000); + } + else + { + extraDelay += Math.Max(OutputSettings.BlankingLayerTime, 500); + } - GCode.AppendLine($"{GCodeKeywordDelay} {layer.ExposureTime}"); + GCode.AppendLine($"{GCodeKeywordDelay} {extraDelay}"); + GCode.AppendLine(); lastZPosition = layer.PositionZ; } diff --git a/UVtools.Core/FileFormats/ChituboxZipFile.cs b/UVtools.Core/FileFormats/ChituboxZipFile.cs index b5b096a..f2ccae0 100644 --- a/UVtools.Core/FileFormats/ChituboxZipFile.cs +++ b/UVtools.Core/FileFormats/ChituboxZipFile.cs @@ -571,7 +571,7 @@ namespace UVtools.Core.FileFormats var liftHeight = GetInitialLayerValueOrNormal(layerIndex, HeaderSettings.BottomLiftHeight, HeaderSettings.LiftHeight); - var liftZHeight = liftHeight + this[layerIndex].PositionZ; + float liftZHeight = (float) Math.Round(liftHeight + this[layerIndex].PositionZ, 2); var liftZSpeed = GetInitialLayerValueOrNormal(layerIndex, HeaderSettings.BottomLiftSpeed, HeaderSettings.LiftSpeed); @@ -580,7 +580,7 @@ namespace UVtools.Core.FileFormats HeaderSettings.LightOffTime) * 1000; var pwmValue = GetInitialLayerValueOrNormal(layerIndex, HeaderSettings.BottomLightPWM, HeaderSettings.LayerLightPWM); - var exposureTime = GetInitialLayerValueOrNormal(layerIndex, InitialExposureTime, LayerExposureTime) * 1000; + var exposureTime = this[layerIndex].ExposureTime * 1000; GCode.AppendLine($";LAYER_START:{layerIndex}"); GCode.AppendLine($";currPos:{this[layerIndex].PositionZ}"); diff --git a/UVtools.Core/FileFormats/FileFormat.cs b/UVtools.Core/FileFormats/FileFormat.cs index 1eaabe1..a9109db 100644 --- a/UVtools.Core/FileFormats/FileFormat.cs +++ b/UVtools.Core/FileFormats/FileFormat.cs @@ -55,7 +55,7 @@ namespace UVtools.Core.FileFormats { #region Instances - public static PrintParameterModifier InitialLayerCount { get; } = new PrintParameterModifier("Initial Layer Count", @"Modify 'Initial Layer Count' value", null,0, ushort.MaxValue); + public static PrintParameterModifier InitialLayerCount { get; } = new PrintParameterModifier("Initial Layer Count", @"Modify 'Initial Layer Count' value", null,0, ushort.MaxValue, 0); public static PrintParameterModifier InitialExposureSeconds { get; } = new PrintParameterModifier("Initial Exposure Time", @"Modify 'Initial Exposure Time' seconds", "s", 0.1M, byte.MaxValue); public static PrintParameterModifier ExposureSeconds { get; } = new PrintParameterModifier("Exposure Time", @"Modify 'Exposure Time' seconds", "s", 0.1M, byte.MaxValue); @@ -67,8 +67,8 @@ namespace UVtools.Core.FileFormats public static PrintParameterModifier LiftSpeed { get; } = new PrintParameterModifier("Lift Speed", @"Modify 'Lift Speed' mm/min between layers", "mm/min", 10, 5000); public static PrintParameterModifier RetractSpeed { get; } = new PrintParameterModifier("Retract Speed", @"Modify 'Retract Speed' mm/min between layers", "mm/min", 10, 5000); - public static PrintParameterModifier BottomLightPWM { get; } = new PrintParameterModifier("Bottom Light PWM", @"Modify 'Bottom Light PWM' value", null, 50, byte.MaxValue); - public static PrintParameterModifier LightPWM { get; } = new PrintParameterModifier("Light PWM", @"Modify 'Light PWM' value", null, 50, byte.MaxValue); + public static PrintParameterModifier BottomLightPWM { get; } = new PrintParameterModifier("Bottom Light PWM", @"Modify 'Bottom Light PWM' value", null, 50, byte.MaxValue, 0); + public static PrintParameterModifier LightPWM { get; } = new PrintParameterModifier("Light PWM", @"Modify 'Light PWM' value", null, 50, byte.MaxValue, 0); #endregion #region Properties @@ -97,16 +97,22 @@ namespace UVtools.Core.FileFormats /// Gets the maximum value /// </summary> public decimal Maximum { get; } + + /// <summary> + /// Gets the number of decimal plates + /// </summary> + public byte DecimalPlates { get; } #endregion #region Constructor - public PrintParameterModifier(string name, string description, string valueUnit = null, decimal minimum = 0, decimal maximum = 1000) + public PrintParameterModifier(string name, string description, string valueUnit = null, decimal minimum = 0, decimal maximum = 1000, byte decimalPlates = 2) { Name = name; Description = description; ValueUnit = valueUnit ?? string.Empty; Minimum = minimum; Maximum = maximum; + DecimalPlates = decimalPlates; } #endregion diff --git a/UVtools.Core/FileFormats/ZCodexFile.cs b/UVtools.Core/FileFormats/ZCodexFile.cs index 9a89749..caddead 100644 --- a/UVtools.Core/FileFormats/ZCodexFile.cs +++ b/UVtools.Core/FileFormats/ZCodexFile.cs @@ -264,11 +264,11 @@ namespace UVtools.Core.FileFormats if (LiftHeight > 0) { GCode.AppendLine($"G1 Z{LiftHeight} F{LiftSpeed}"); - GCode.AppendLine($"G1 Z-{LiftHeight - layer.PositionZ + lastZPosition} F{RetractSpeed}"); + GCode.AppendLine($"G1 Z-{Math.Round(LiftHeight - layer.PositionZ + lastZPosition, 2)} F{RetractSpeed}"); } else { - GCode.AppendLine($"G1 Z{layer.PositionZ- lastZPosition} F{LiftSpeed}"); + GCode.AppendLine($"G1 Z{Math.Round(layer.PositionZ- lastZPosition, 2)} F{LiftSpeed}"); } } /*else diff --git a/UVtools.Core/Layer/LayerManager.cs b/UVtools.Core/Layer/LayerManager.cs index 77efb72..c22756b 100644 --- a/UVtools.Core/Layer/LayerManager.cs +++ b/UVtools.Core/Layer/LayerManager.cs @@ -1485,9 +1485,12 @@ namespace UVtools.Core progress.Reset("Drawings", (uint) pixelHistory.Count); ConcurrentDictionary<uint, Mat> modfiedLayers = new ConcurrentDictionary<uint, Mat>(); - for (var layerIndex = 0; layerIndex < pixelHistory.Count; layerIndex++) + for (var i = 0; i < pixelHistory.Count; i++) { - var operation = pixelHistory[layerIndex]; + var operation = pixelHistory[i]; + VectorOfVectorOfPoint layerContours = null; + Mat layerHierarchy = null; + if (operation.OperationType == PixelOperation.PixelOperationType.Drawing) { var operationDrawing = (PixelDrawing) operation; @@ -1519,6 +1522,30 @@ namespace UVtools.Core CvInvoke.PutText(mat, operationText.Text, operationText.Location, operationText.Font, operationText.FontScale, new MCvScalar(operationText.Color), operationText.Thickness, operationText.LineType, operationText.Mirror); } + else if (operation.OperationType == PixelOperation.PixelOperationType.Eraser) + { + var mat = modfiedLayers.GetOrAdd(operation.LayerIndex, u => this[operation.LayerIndex].LayerMat); + + if (ReferenceEquals(layerContours, null)) + { + layerContours = new VectorOfVectorOfPoint(); + layerHierarchy = new Mat(); + + CvInvoke.FindContours(mat, layerContours, layerHierarchy, RetrType.Ccomp, + ChainApproxMethod.ChainApproxSimple); + } + + if (mat.GetByte(operation.Location) >= 10) + { + for (int contourIdx = 0; contourIdx < layerContours.Size; contourIdx++) + { + if (!(CvInvoke.PointPolygonTest(layerContours[contourIdx], operation.Location, false) >= 0)) + continue; + CvInvoke.DrawContours(mat, layerContours, contourIdx, new MCvScalar(0, 0, 0), -1); + break; + } + } + } else if (operation.OperationType == PixelOperation.PixelOperationType.Supports) { var operationSupport = (PixelSupport)operation; @@ -1592,16 +1619,29 @@ namespace UVtools.Core } } + layerContours?.Dispose(); + layerHierarchy?.Dispose(); + progress++; } progress.Reset("Saving", (uint) modfiedLayers.Count); - foreach (var modfiedLayer in modfiedLayers) + Parallel.ForEach(modfiedLayers, (modfiedLayer, state) => + { + this[modfiedLayer.Key].LayerMat = modfiedLayer.Value; + modfiedLayer.Value.Dispose(); + + lock (progress) + { + progress++; + } + }); + /*foreach (var modfiedLayer in modfiedLayers) { this[modfiedLayer.Key].LayerMat = modfiedLayer.Value; modfiedLayer.Value.Dispose(); progress++; - } + }*/ //pixelHistory.Clear(); } diff --git a/UVtools.Core/PixelEditor/PixelEraser.cs b/UVtools.Core/PixelEditor/PixelEraser.cs new file mode 100644 index 0000000..362d999 --- /dev/null +++ b/UVtools.Core/PixelEditor/PixelEraser.cs @@ -0,0 +1,21 @@ +/* + * 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.Drawing; + +namespace UVtools.Core.PixelEditor +{ + public class PixelEraser : PixelOperation + { + public const byte Diameter = 4; + + public PixelEraser(uint layerIndex, Point location) : base(PixelOperationType.Eraser, layerIndex, location) + { + Size = new Size(Diameter, Diameter); + } + } +} diff --git a/UVtools.Core/PixelEditor/PixelOperation.cs b/UVtools.Core/PixelEditor/PixelOperation.cs index dc4c2d2..d64fce6 100644 --- a/UVtools.Core/PixelEditor/PixelOperation.cs +++ b/UVtools.Core/PixelEditor/PixelOperation.cs @@ -16,6 +16,7 @@ namespace UVtools.Core.PixelEditor { Drawing, Text, + Eraser, Supports, DrainHole, } diff --git a/UVtools.Core/UVtools.Core.csproj b/UVtools.Core/UVtools.Core.csproj index 8a7c465..4b7006f 100644 --- a/UVtools.Core/UVtools.Core.csproj +++ b/UVtools.Core/UVtools.Core.csproj @@ -10,12 +10,12 @@ <RepositoryUrl>https://github.com/sn4k3/UVtools</RepositoryUrl> <PackageProjectUrl>https://github.com/sn4k3/UVtools</PackageProjectUrl> <Description>MSLA/DLP, file analysis, repair, conversion and manipulation</Description> - <Version>0.6.5.0</Version> + <Version>0.6.6.0</Version> <Copyright>Copyright © 2020 PTRTECH</Copyright> <PackageIcon>UVtools.png</PackageIcon> <Platforms>AnyCPU;x64</Platforms> - <AssemblyVersion>0.6.5.0</AssemblyVersion> - <FileVersion>0.6.5.0</FileVersion> + <AssemblyVersion>0.6.6.0</AssemblyVersion> + <FileVersion>0.6.6.0</FileVersion> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> diff --git a/UVtools.GUI/App.config b/UVtools.GUI/App.config index eaf7878..c0dba46 100644 --- a/UVtools.GUI/App.config +++ b/UVtools.GUI/App.config @@ -178,7 +178,7 @@ <value>2</value> </setting> <setting name="LayerRepairDefaultOpeningIterations" serializeAs="String"> - <value>1</value> + <value>0</value> </setting> <setting name="LayerRepairLayersIslands" serializeAs="String"> <value>True</value> @@ -189,7 +189,8 @@ <setting name="LayerRepairRemoveEmptyLayers" serializeAs="String"> <value>True</value> </setting> - <setting name="LayerRepairRemoveIslandsBelowEqualPixelsDefault" serializeAs="String"> + <setting name="LayerRepairRemoveIslandsBelowEqualPixelsDefault" + serializeAs="String"> <value>10</value> </setting> <setting name="PartialUpdateIslandsOnEditing" serializeAs="String"> diff --git a/UVtools.GUI/Forms/FrmInputBox.cs b/UVtools.GUI/Forms/FrmInputBox.cs index 4788900..4ab9295 100644 --- a/UVtools.GUI/Forms/FrmInputBox.cs +++ b/UVtools.GUI/Forms/FrmInputBox.cs @@ -53,8 +53,8 @@ namespace UVtools.GUI.Forms } - public FrmInputBox(FileFormat.PrintParameterModifier modifier, decimal currentValue, byte decimals = 2) : this(modifier.Name, - modifier.Description, currentValue, modifier.ValueUnit, modifier.Minimum, modifier.Maximum, decimals) + public FrmInputBox(FileFormat.PrintParameterModifier modifier, decimal currentValue) : this(modifier.Name, + modifier.Description, currentValue, modifier.ValueUnit, modifier.Minimum, modifier.Maximum, modifier.DecimalPlates) { } public FrmInputBox(string title, string description, decimal currentValue, string valueUnit = null, decimal minValue = 0, decimal maxValue = 100, byte decimals = 2, string valueLabel = "Value") : this() { diff --git a/UVtools.GUI/FrmMain.Designer.cs b/UVtools.GUI/FrmMain.Designer.cs index d11056d..ce0bd94 100644 --- a/UVtools.GUI/FrmMain.Designer.cs +++ b/UVtools.GUI/FrmMain.Designer.cs @@ -127,7 +127,9 @@ this.tsGCodeLabelLines = new System.Windows.Forms.ToolStripLabel(); this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); this.tsGcodeLabelChars = new System.Windows.Forms.ToolStripLabel(); - this.tsGCodeButtonSave = new System.Windows.Forms.ToolStripButton(); + this.tsGCodeButtonSave = new System.Windows.Forms.ToolStripSplitButton(); + this.tsGCodeButtonSaveFile = new System.Windows.Forms.ToolStripMenuItem(); + this.tsGCodeButtonSaveClipboard = new System.Windows.Forms.ToolStripMenuItem(); this.tabPageIssues = new System.Windows.Forms.TabPage(); this.flvIssues = new BrightIdeasSoftware.FastObjectListView(); this.flvIssuesColType = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); @@ -200,6 +202,9 @@ this.label23 = new System.Windows.Forms.Label(); this.label24 = new System.Windows.Forms.Label(); this.cbPixelEditorTextFontFace = new System.Windows.Forms.ComboBox(); + this.tabPage5 = new System.Windows.Forms.TabPage(); + this.panel7 = new System.Windows.Forms.Panel(); + this.label30 = new System.Windows.Forms.Label(); this.tabPage2 = new System.Windows.Forms.TabPage(); this.label10 = new System.Windows.Forms.Label(); this.nmPixelEditorSupportsBaseDiameter = new System.Windows.Forms.NumericUpDown(); @@ -238,6 +243,11 @@ this.btnFirstLayer = new System.Windows.Forms.Button(); this.toolTipInformation = new System.Windows.Forms.ToolTip(this.components); this.layerScrollTimer = new System.Windows.Forms.Timer(this.components); + this.label31 = new System.Windows.Forms.Label(); + this.nmPixelEditorEraserLayersAbove = new System.Windows.Forms.NumericUpDown(); + this.label32 = new System.Windows.Forms.Label(); + this.nmPixelEditorEraserLayersBelow = new System.Windows.Forms.NumericUpDown(); + this.label33 = new System.Windows.Forms.Label(); this.menu.SuspendLayout(); this.mainTable.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.scCenter)).BeginInit(); @@ -278,6 +288,8 @@ ((System.ComponentModel.ISupportInitialize)(this.nmPixelEditorTextLayersBelow)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nmPixelEditorTextFontScale)).BeginInit(); this.panel6.SuspendLayout(); + this.tabPage5.SuspendLayout(); + this.panel7.SuspendLayout(); this.tabPage2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nmPixelEditorSupportsBaseDiameter)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nmPixelEditorSupportsPillarDiameter)).BeginInit(); @@ -293,6 +305,8 @@ this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.tbLayer)).BeginInit(); this.panel2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nmPixelEditorEraserLayersAbove)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nmPixelEditorEraserLayersBelow)).BeginInit(); this.SuspendLayout(); // // menu @@ -1281,14 +1295,34 @@ // this.tsGCodeButtonSave.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; this.tsGCodeButtonSave.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.tsGCodeButtonSave.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.tsGCodeButtonSaveFile, + this.tsGCodeButtonSaveClipboard}); this.tsGCodeButtonSave.Image = global::UVtools.GUI.Properties.Resources.Save_16x16; this.tsGCodeButtonSave.ImageTransparentColor = System.Drawing.Color.Magenta; this.tsGCodeButtonSave.Name = "tsGCodeButtonSave"; - this.tsGCodeButtonSave.Size = new System.Drawing.Size(23, 22); - this.tsGCodeButtonSave.Text = "Save GCode"; - this.tsGCodeButtonSave.ToolTipText = "Save GCode to file"; + this.tsGCodeButtonSave.Size = new System.Drawing.Size(32, 22); + this.tsGCodeButtonSave.Text = "Save to"; + this.tsGCodeButtonSave.ToolTipText = "Save GCode to a file or clipboard"; + this.tsGCodeButtonSave.ButtonClick += new System.EventHandler(this.tsGCodeButtonSave_ButtonClick); this.tsGCodeButtonSave.Click += new System.EventHandler(this.EventClick); // + // tsGCodeButtonSaveFile + // + this.tsGCodeButtonSaveFile.Image = global::UVtools.GUI.Properties.Resources.file_image_16x16; + this.tsGCodeButtonSaveFile.Name = "tsGCodeButtonSaveFile"; + this.tsGCodeButtonSaveFile.Size = new System.Drawing.Size(141, 22); + this.tsGCodeButtonSaveFile.Text = "To &File"; + this.tsGCodeButtonSaveFile.Click += new System.EventHandler(this.EventClick); + // + // tsGCodeButtonSaveClipboard + // + this.tsGCodeButtonSaveClipboard.Image = global::UVtools.GUI.Properties.Resources.clipboard_16x16; + this.tsGCodeButtonSaveClipboard.Name = "tsGCodeButtonSaveClipboard"; + this.tsGCodeButtonSaveClipboard.Size = new System.Drawing.Size(141, 22); + this.tsGCodeButtonSaveClipboard.Text = "To &Clipboard"; + this.tsGCodeButtonSaveClipboard.Click += new System.EventHandler(this.EventClick); + // // tabPageIssues // this.tabPageIssues.Controls.Add(this.flvIssues); @@ -1663,6 +1697,7 @@ // this.tabControlPixelEditor.Controls.Add(this.tabPage1); this.tabControlPixelEditor.Controls.Add(this.tabPage4); + this.tabControlPixelEditor.Controls.Add(this.tabPage5); this.tabControlPixelEditor.Controls.Add(this.tabPage2); this.tabControlPixelEditor.Controls.Add(this.tabPage3); this.tabControlPixelEditor.Dock = System.Windows.Forms.DockStyle.Top; @@ -2131,6 +2166,43 @@ this.cbPixelEditorTextFontFace.Size = new System.Drawing.Size(257, 26); this.cbPixelEditorTextFontFace.TabIndex = 12; // + // tabPage5 + // + this.tabPage5.Controls.Add(this.label31); + this.tabPage5.Controls.Add(this.nmPixelEditorEraserLayersAbove); + this.tabPage5.Controls.Add(this.label32); + this.tabPage5.Controls.Add(this.nmPixelEditorEraserLayersBelow); + this.tabPage5.Controls.Add(this.label33); + this.tabPage5.Controls.Add(this.panel7); + this.tabPage5.Location = new System.Drawing.Point(4, 27); + this.tabPage5.Name = "tabPage5"; + this.tabPage5.Padding = new System.Windows.Forms.Padding(3); + this.tabPage5.Size = new System.Drawing.Size(372, 291); + this.tabPage5.TabIndex = 4; + this.tabPage5.Text = "Eraser"; + this.tabPage5.UseVisualStyleBackColor = true; + // + // panel7 + // + this.panel7.BackColor = System.Drawing.Color.WhiteSmoke; + this.panel7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel7.Controls.Add(this.label30); + this.panel7.Dock = System.Windows.Forms.DockStyle.Top; + this.panel7.Location = new System.Drawing.Point(3, 3); + this.panel7.Name = "panel7"; + this.panel7.Size = new System.Drawing.Size(366, 57); + this.panel7.TabIndex = 4; + // + // label30 + // + this.label30.AutoSize = true; + this.label30.Location = new System.Drawing.Point(3, 9); + this.label30.Name = "label30"; + this.label30.Size = new System.Drawing.Size(321, 36); + this.label30.TabIndex = 1; + this.label30.Text = "Right click over a white pixel to remove it whole \r\nlinked area (Fill with black)" + + ""; + // // tabPage2 // this.tabPage2.Controls.Add(this.label10); @@ -2627,6 +2699,61 @@ this.layerScrollTimer.Interval = 150; this.layerScrollTimer.Tick += new System.EventHandler(this.EventTimerTick); // + // label31 + // + this.label31.AutoSize = true; + this.label31.Location = new System.Drawing.Point(302, 93); + this.label31.Name = "label31"; + this.label31.Size = new System.Drawing.Size(49, 18); + this.label31.TabIndex = 27; + this.label31.Text = "Above"; + // + // nmPixelEditorEraserLayersAbove + // + this.nmPixelEditorEraserLayersAbove.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.nmPixelEditorEraserLayersAbove.Location = new System.Drawing.Point(293, 66); + this.nmPixelEditorEraserLayersAbove.Maximum = new decimal(new int[] { + 65535, + 0, + 0, + 0}); + this.nmPixelEditorEraserLayersAbove.Name = "nmPixelEditorEraserLayersAbove"; + this.nmPixelEditorEraserLayersAbove.Size = new System.Drawing.Size(73, 24); + this.nmPixelEditorEraserLayersAbove.TabIndex = 26; + // + // label32 + // + this.label32.AutoSize = true; + this.label32.Location = new System.Drawing.Point(115, 93); + this.label32.Name = "label32"; + this.label32.Size = new System.Drawing.Size(49, 18); + this.label32.TabIndex = 25; + this.label32.Text = "Below"; + // + // nmPixelEditorEraserLayersBelow + // + this.nmPixelEditorEraserLayersBelow.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.nmPixelEditorEraserLayersBelow.Location = new System.Drawing.Point(109, 66); + this.nmPixelEditorEraserLayersBelow.Maximum = new decimal(new int[] { + 65535, + 0, + 0, + 0}); + this.nmPixelEditorEraserLayersBelow.Name = "nmPixelEditorEraserLayersBelow"; + this.nmPixelEditorEraserLayersBelow.Size = new System.Drawing.Size(73, 24); + this.nmPixelEditorEraserLayersBelow.TabIndex = 24; + // + // label33 + // + this.label33.AutoSize = true; + this.label33.Location = new System.Drawing.Point(7, 69); + this.label33.Name = "label33"; + this.label33.Size = new System.Drawing.Size(96, 18); + this.label33.TabIndex = 23; + this.label33.Text = "Layers depth:"; + // // FrmMain // this.AllowDrop = true; @@ -2702,6 +2829,10 @@ ((System.ComponentModel.ISupportInitialize)(this.nmPixelEditorTextFontScale)).EndInit(); this.panel6.ResumeLayout(false); this.panel6.PerformLayout(); + this.tabPage5.ResumeLayout(false); + this.tabPage5.PerformLayout(); + this.panel7.ResumeLayout(false); + this.panel7.PerformLayout(); this.tabPage2.ResumeLayout(false); this.tabPage2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.nmPixelEditorSupportsBaseDiameter)).EndInit(); @@ -2724,6 +2855,8 @@ this.panel1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.tbLayer)).EndInit(); this.panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.nmPixelEditorEraserLayersAbove)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nmPixelEditorEraserLayersBelow)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -2770,7 +2903,6 @@ private System.Windows.Forms.ToolStripLabel tsGCodeLabelLines; private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; private System.Windows.Forms.ToolStripLabel tsGcodeLabelChars; - private System.Windows.Forms.ToolStripButton tsGCodeButtonSave; private System.Windows.Forms.ToolStrip tsProperties; private System.Windows.Forms.ToolStripLabel tsPropertiesLabelCount; private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; @@ -2939,6 +3071,17 @@ private System.Windows.Forms.Label label29; private System.Windows.Forms.Label label28; private System.Windows.Forms.NumericUpDown nmPixelEditorDrawingThickness; + private System.Windows.Forms.ToolStripSplitButton tsGCodeButtonSave; + private System.Windows.Forms.ToolStripMenuItem tsGCodeButtonSaveFile; + private System.Windows.Forms.ToolStripMenuItem tsGCodeButtonSaveClipboard; + private System.Windows.Forms.TabPage tabPage5; + private System.Windows.Forms.Panel panel7; + private System.Windows.Forms.Label label30; + private System.Windows.Forms.Label label31; + private System.Windows.Forms.NumericUpDown nmPixelEditorEraserLayersAbove; + private System.Windows.Forms.Label label32; + private System.Windows.Forms.NumericUpDown nmPixelEditorEraserLayersBelow; + private System.Windows.Forms.Label label33; } } diff --git a/UVtools.GUI/FrmMain.cs b/UVtools.GUI/FrmMain.cs index 8f0d0aa..f1eb0ce 100644 --- a/UVtools.GUI/FrmMain.cs +++ b/UVtools.GUI/FrmMain.cs @@ -1292,6 +1292,11 @@ namespace UVtools.GUI ***********************/ if (ReferenceEquals(sender, tsGCodeButtonSave)) { + tsGCodeButtonSave.ShowDropDown(); + return; + } + if (ReferenceEquals(sender, tsGCodeButtonSaveFile)) + { using (SaveFileDialog dialog = new SaveFileDialog()) { dialog.Filter = "Text Files|.*txt"; @@ -1320,6 +1325,11 @@ namespace UVtools.GUI return; } } + if (ReferenceEquals(sender, tsGCodeButtonSaveClipboard)) + { + Clipboard.SetText(SlicerFile.GCode.ToString()); + return; + } /************************ * Issues Menu * @@ -2431,6 +2441,19 @@ namespace UVtools.GUI btnFirstLayer.Enabled = btnPreviousLayer.Enabled = layerNum > 0; var layer = SlicerFile[ActualLayer]; + VectorOfVectorOfPoint layerContours = null; + Mat layerHierarchy = null; + Array layerHierarchyJagged = null; + + void iniContours() + { + if (!ReferenceEquals(layerContours, null)) return; + layerContours = new VectorOfVectorOfPoint(); + layerHierarchy = new Mat(); + CvInvoke.FindContours(ActualLayerImage, layerContours, layerHierarchy, RetrType.Ccomp, + ChainApproxMethod.ChainApproxSimple); + layerHierarchyJagged = layerHierarchy.GetData(); + } try { @@ -2440,10 +2463,11 @@ namespace UVtools.GUI //pbLayer.Image = Image.FromStream(SlicerFile.LayerEntries[layerNum].Open()); //pbLayer.Image.RotateFlip(RotateFlipType.Rotate90FlipNone); - + Stopwatch watch = Stopwatch.StartNew(); - ActualLayerImage?.Dispose(); + + ActualLayerImage?.Dispose(); ActualLayerImage = SlicerFile[layerNum].LayerMat; CvInvoke.CvtColor(ActualLayerImage, ActualLayerImageBgr, ColorConversion.Gray2Bgr); @@ -2565,44 +2589,36 @@ namespace UVtools.GUI if (tsLayerImageLayerOutlineHollowAreas.Checked) { //CvInvoke.Threshold(ActualLayerImage, grayscale, 1, 255, ThresholdType.Binary); - using (VectorOfVectorOfPoint contours = new VectorOfVectorOfPoint()) + iniContours(); + + /* + * 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 + */ + for (int i = 0; i < layerContours.Size; i++) { - using (Mat hierarchy = new Mat()) + if ((int)layerHierarchyJagged.GetValue(0, i, 2) == -1 && (int)layerHierarchyJagged.GetValue(0, i, 3) != -1) { - 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); - } + //var r = CvInvoke.BoundingRectangle(contours[i]); + //CvInvoke.Rectangle(ActualLayerImageBgr, r, new MCvScalar(0, 0, 255), 2); + CvInvoke.DrawContours(ActualLayerImageBgr, layerContours, 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); } } @@ -2645,6 +2661,20 @@ namespace UVtools.GUI CvInvoke.PutText(ActualLayerImageBgr, operationText.Text, operationText.Location, operationText.Font, operationText.FontScale, new MCvScalar(color.B, color.G, color.R), operationText.Thickness, operationText.LineType, operationText.Mirror); } + else if (operation.OperationType == PixelOperation.PixelOperationType.Eraser) + { + iniContours(); + if(imageSpan[ActualLayerImage.GetPixelPos(operation.Location)] < 10) continue; + var color = Settings.Default.PixelEditorRemovePixelColor; + for (int i = 0; i < layerContours.Size; i++) + { + if (CvInvoke.PointPolygonTest(layerContours[i], operation.Location, false) >= 0) + { + CvInvoke.DrawContours(ActualLayerImageBgr, layerContours, i, new MCvScalar(color.B, color.G, color.R), -1); + break; + } + } + } else if (operation.OperationType == PixelOperation.PixelOperationType.Supports) { var operationSupport = (PixelSupport)operation; @@ -2682,7 +2712,9 @@ namespace UVtools.GUI tsLayerBounds.Invalidate(); tsLayerInfo.Update(); tsLayerInfo.Refresh(); - + + layerContours?.Dispose(); + layerHierarchy?.Dispose(); watch.Stop(); @@ -2965,7 +2997,7 @@ namespace UVtools.GUI PixelOperation operation = null; Bitmap bmp = pbLayer.Image as Bitmap; - if (tabControlPixelEditor.SelectedIndex == (int) PixelOperation.PixelOperationType.Drawing) + if (tabControlPixelEditor.SelectedIndex == (byte) PixelOperation.PixelOperationType.Drawing) { LineType lineType = (LineType)cbPixelEditorDrawingLineType.SelectedItem; PixelDrawing.BrushShapeType shapeType = @@ -3018,7 +3050,7 @@ namespace UVtools.GUI } } } - else if (tabControlPixelEditor.SelectedIndex == (int)PixelOperation.PixelOperationType.Text) + else if (tabControlPixelEditor.SelectedIndex == (byte)PixelOperation.PixelOperationType.Text) { if (string.IsNullOrEmpty(tbPixelEditorTextText.Text) || nmPixelEditorTextFontScale.Value < 0.2m) return; @@ -3038,7 +3070,22 @@ namespace UVtools.GUI ShowLayer(); return; } - else if (tabControlPixelEditor.SelectedIndex == (int) PixelOperation.PixelOperationType.Supports) + else if (tabControlPixelEditor.SelectedIndex == (byte) PixelOperation.PixelOperationType.Eraser) + { + if (ActualLayerImage.GetByte(x, y) < 10) return; + uint minLayer = (uint)Math.Max(0, ActualLayer - nmPixelEditorEraserLayersBelow.Value); + uint maxLayer = (uint)Math.Min(SlicerFile.LayerCount - 1, ActualLayer + nmPixelEditorEraserLayersAbove.Value); + for (uint layerIndex = minLayer; layerIndex <= maxLayer; layerIndex++) + { + operation = new PixelEraser(layerIndex, new Point(x, y)); + + if (PixelHistory.Contains(operation)) continue; + PixelHistory.Add(operation); + } + ShowLayer(); + return; + } + else if (tabControlPixelEditor.SelectedIndex == (byte) PixelOperation.PixelOperationType.Supports) { if (ActualLayer == 0) return; operation = new PixelSupport(ActualLayer, new Point(x, y), @@ -3055,7 +3102,7 @@ namespace UVtools.GUI gfx.FillEllipse(brush, Math.Max(0, location.X - shiftPos), Math.Max(0, location.Y - shiftPos), (int)nmPixelEditorSupportsTipDiameter.Value, (int)nmPixelEditorSupportsTipDiameter.Value); } } - else if (tabControlPixelEditor.SelectedIndex == (int)PixelOperation.PixelOperationType.DrainHole) + else if (tabControlPixelEditor.SelectedIndex == (byte)PixelOperation.PixelOperationType.DrainHole) { if (ActualLayer == 0) return; operation = new PixelDrainHole(ActualLayer, new Point(x, y), (byte)nmPixelEditorDrainHoleDiameter.Value); @@ -3541,6 +3588,7 @@ namespace UVtools.GUI { if (item.OperationType != PixelOperation.PixelOperationType.Drawing && item.OperationType != PixelOperation.PixelOperationType.Text && + item.OperationType != PixelOperation.PixelOperationType.Eraser && item.OperationType != PixelOperation.PixelOperationType.Supports) continue; if (whiteListLayers.Contains(item.LayerIndex)) continue; whiteListLayers.Add(item.LayerIndex); @@ -3637,5 +3685,10 @@ namespace UVtools.GUI UpdateIssuesInfo(); ShowLayer(); } + + private void tsGCodeButtonSave_ButtonClick(object sender, EventArgs e) + { + + } } } diff --git a/UVtools.GUI/FrmMain.resx b/UVtools.GUI/FrmMain.resx index ff3506c..ed8862b 100644 --- a/UVtools.GUI/FrmMain.resx +++ b/UVtools.GUI/FrmMain.resx @@ -129,12 +129,6 @@ <metadata name="tsLayer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>201, 17</value> </metadata> - <metadata name="tsThumbnails.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>291, 17</value> - </metadata> - <metadata name="tsProperties.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>649, 17</value> - </metadata> <metadata name="tsGCode.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>551, 17</value> </metadata> @@ -158,7 +152,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABk - FAAAAk1TRnQBSQFMAgEBBgEAAbgBCAG4AQgBEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA + FAAAAk1TRnQBSQFMAgEBBgEAAdABCAHQAQgBEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA AwABIAMAAQEBAAEgBgABIC4AAxgBIgMwAUsDMAFMAzIBUDMAAQEDJAE2AysBQqwAAyIBMQNWAbkDXQHi AwAB/wMAAf8BKgEtASgB/gNTAawDTQGVAwABARgAAwkBDAMzAVIDUAGdA1cB6AMAAf4DKwH8Ay8BSqQA AyEBMANZAewBKwEuASkB+gNRAfcDUgH0A1MB8QNIAfYDQQH5AwAB/wNPAZsDAAEBCAADFQEdAz8BbgNV @@ -206,7 +200,7 @@ BAADUgGpAzQBVQM0AVUgAAM0AVUDNAFVA1IBqQgAA0oBiwMAAf8DAAH/A08BnAQAA00BlQMAAf8DVAGr CAADTwGcAwAB/wMAAf8DSgGLBAADUQGgAQABzAH3Af8BAAHMAfcB/wEAAcwB9wH/AQABzAH3Af8DQwF3 CAADSgGNAgAB7AH/AgAB7AH/AgAB7wH/AgAB7AH/AgAB7AH/AgAB7QH/AVICUwGoA1IBqAMAAf8DAAH/ - AwAB/wNMAfcDHgH9A1ABnwsAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wNSAagEAANSAakDNAFVAzQBVQNG + AwAB/wNRAfcDIQH9A1ABnwsAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wNSAagEAANSAakDNAFVAzQBVQNG AYADUgGpA1IBqQNSAakDUgGpA1IBqQNSAakDRQF/AzQBVQM0AVUDUgGpBAADUQGiAwAB/wMAAf8DSQGJ CAADLwFKAwAB/wNUAe4MAANJAYkDAAH/AwAB/wNRAaIDAAEBAT8CQAFvAT4CXAH4AQABzQH3Af8BAAHN AfcB/wMSARgIAAMBAQIDRgF+AlIBXQHwAgAB7gH/AgAB7gH/AkABqAH9AUUCRgF+AwMBBANSAagDAAH/ @@ -248,6 +242,27 @@ AfwBPws= </value> </data> + <metadata name="tsThumbnails.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>291, 17</value> + </metadata> + <metadata name="tsProperties.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>649, 17</value> + </metadata> + <metadata name="tsGCode.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>551, 17</value> + </metadata> + <metadata name="tsIssuesLv.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>1504, 17</value> + </metadata> + <metadata name="tsIssues.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>765, 17</value> + </metadata> + <metadata name="tsLog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>1423, 17</value> + </metadata> + <metadata name="toolTipInformation.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>863, 17</value> + </metadata> <metadata name="toolTipInformation.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>863, 17</value> </metadata> diff --git a/UVtools.GUI/Properties/AssemblyInfo.cs b/UVtools.GUI/Properties/AssemblyInfo.cs index ebfa840..348ca16 100644 --- a/UVtools.GUI/Properties/AssemblyInfo.cs +++ b/UVtools.GUI/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.6.5.0")] -[assembly: AssemblyFileVersion("0.6.5.0")] +[assembly: AssemblyVersion("0.6.6.0")] +[assembly: AssemblyFileVersion("0.6.6.0")] diff --git a/UVtools.GUI/Properties/Settings.Designer.cs b/UVtools.GUI/Properties/Settings.Designer.cs index 776ee3e..b79750f 100644 --- a/UVtools.GUI/Properties/Settings.Designer.cs +++ b/UVtools.GUI/Properties/Settings.Designer.cs @@ -613,7 +613,7 @@ namespace UVtools.GUI.Properties { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("1")] + [global::System.Configuration.DefaultSettingValueAttribute("0")] public byte LayerRepairDefaultOpeningIterations { get { return ((byte)(this["LayerRepairDefaultOpeningIterations"])); diff --git a/UVtools.GUI/Properties/Settings.settings b/UVtools.GUI/Properties/Settings.settings index 752d936..bf43d69 100644 --- a/UVtools.GUI/Properties/Settings.settings +++ b/UVtools.GUI/Properties/Settings.settings @@ -150,7 +150,7 @@ <Value Profile="(Default)">2</Value> </Setting> <Setting Name="LayerRepairDefaultOpeningIterations" Type="System.Byte" Scope="User"> - <Value Profile="(Default)">1</Value> + <Value Profile="(Default)">0</Value> </Setting> <Setting Name="LayerRepairLayersIslands" Type="System.Boolean" Scope="User"> <Value Profile="(Default)">True</Value> |