mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-08 17:42:31 +02:00
v0.8.6.0
* (Change) Island detection system:
* **Before**: A island is consider safe by just have a static amount of pixels, this mean it's possible to have a mass with 100000px supported by only 10px (If safe pixels are configured to this value), so there's no relation with island size and it supporting size. This leads to a big problem and not detecting some potential/unsafe islands.
* **Now:** Instead of a static number of safe pixels, now there's a multiplier value, which will multiply the island total pixels per the multiplier, the supporting pixels count must be higher than the result of the multiplication.
* **Formula:** Supporting pixels >= Island pixels * multiplier
* **Example:** Multiplier of 0.25, an island with 1000px * 0.25 = 250px, so this island will not be considered if below exists at least 250px to support it, otherwise will be flagged as an island.
* **Notes:** This is a much more fair system but still not optimal, bridges and big planes with micro supports can trigger false islands. While this is a improvement over old system it's not perfect and you probably will have islands which you must ignore. Renember that you not have to clear out the issue list! Simply step over and ignore the issues you think are false-positives.
This commit is contained in:
@@ -218,7 +218,7 @@
|
||||
</setting>
|
||||
<setting name="LayerRepairRemoveIslandsBelowEqualPixelsDefault"
|
||||
serializeAs="String">
|
||||
<value>10</value>
|
||||
<value>5</value>
|
||||
</setting>
|
||||
<setting name="PartialUpdateIslandsOnEditing" serializeAs="String">
|
||||
<value>True</value>
|
||||
@@ -274,6 +274,9 @@
|
||||
<setting name="LoadDemoFileOnStartup" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="IslandRequiredPixelsToSupportMultiplier" serializeAs="String">
|
||||
<value>0.25</value>
|
||||
</setting>
|
||||
</UVtools.GUI.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
|
||||
+42
-34
@@ -55,7 +55,7 @@
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.nmIslandRequiredPixelBrightnessToSupport = new System.Windows.Forms.NumericUpDown();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.nmIslandRequiredPixelsToSupport = new System.Windows.Forms.NumericUpDown();
|
||||
this.nmIslandRequiredPixelsToSupportMultiplier = new System.Windows.Forms.NumericUpDown();
|
||||
this.nmIslandRequiredAreaToProcessCheck = new System.Windows.Forms.NumericUpDown();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
@@ -93,6 +93,7 @@
|
||||
this.label27 = new System.Windows.Forms.Label();
|
||||
this.tbFileSaveNamePreffix = new System.Windows.Forms.TextBox();
|
||||
this.groupBox4 = new System.Windows.Forms.GroupBox();
|
||||
this.cbLoadDemoFileOnStartup = new System.Windows.Forms.CheckBox();
|
||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
||||
this.groupBox9 = new System.Windows.Forms.GroupBox();
|
||||
this.cbLayerAutoRotateBestView = new System.Windows.Forms.CheckBox();
|
||||
@@ -187,7 +188,6 @@
|
||||
this.cbLayerRepairLayersIslands = new System.Windows.Forms.CheckBox();
|
||||
this.pnActions = new System.Windows.Forms.Panel();
|
||||
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.cbLoadDemoFileOnStartup = new System.Windows.Forms.CheckBox();
|
||||
this.groupBox3.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nmResinTrapBinaryThreshold)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nmResinTrapMaximumPixelBrightnessToDrain)).BeginInit();
|
||||
@@ -196,7 +196,7 @@
|
||||
this.groupBox2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nmIslandBinaryThreshold)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nmIslandRequiredPixelBrightnessToSupport)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nmIslandRequiredPixelsToSupport)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nmIslandRequiredPixelsToSupportMultiplier)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nmIslandRequiredAreaToProcessCheck)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nmIslandRequiredPixelBrightnessToProcessCheck)).BeginInit();
|
||||
this.groupBox1.SuspendLayout();
|
||||
@@ -480,7 +480,7 @@
|
||||
this.groupBox2.Controls.Add(this.label10);
|
||||
this.groupBox2.Controls.Add(this.nmIslandRequiredPixelBrightnessToSupport);
|
||||
this.groupBox2.Controls.Add(this.label9);
|
||||
this.groupBox2.Controls.Add(this.nmIslandRequiredPixelsToSupport);
|
||||
this.groupBox2.Controls.Add(this.nmIslandRequiredPixelsToSupportMultiplier);
|
||||
this.groupBox2.Controls.Add(this.nmIslandRequiredAreaToProcessCheck);
|
||||
this.groupBox2.Controls.Add(this.label7);
|
||||
this.groupBox2.Controls.Add(this.label8);
|
||||
@@ -568,33 +568,41 @@
|
||||
this.label9.AutoSize = true;
|
||||
this.label9.Location = new System.Drawing.Point(73, 148);
|
||||
this.label9.Name = "label9";
|
||||
this.label9.Size = new System.Drawing.Size(432, 18);
|
||||
this.label9.Size = new System.Drawing.Size(420, 18);
|
||||
this.label9.TabIndex = 23;
|
||||
this.label9.Text = "Supporting safe pixels required to considerer an island supported\r\n";
|
||||
this.toolTip.SetToolTip(this.label9, resources.GetString("label9.ToolTip"));
|
||||
this.label9.Text = "Supporting safe pixels required over a multiplier on island pixels";
|
||||
this.toolTip.SetToolTip(this.label9, "An island supported by at least it pixels multiplied by this value will always be" +
|
||||
" considered supported.\r\nFormula: Supporting pixels >= Island pixels * this value" +
|
||||
"");
|
||||
//
|
||||
// nmIslandRequiredPixelsToSupport
|
||||
// nmIslandRequiredPixelsToSupportMultiplier
|
||||
//
|
||||
this.nmIslandRequiredPixelsToSupport.Location = new System.Drawing.Point(10, 145);
|
||||
this.nmIslandRequiredPixelsToSupport.Maximum = new decimal(new int[] {
|
||||
255,
|
||||
this.nmIslandRequiredPixelsToSupportMultiplier.DecimalPlaces = 2;
|
||||
this.nmIslandRequiredPixelsToSupportMultiplier.Increment = new decimal(new int[] {
|
||||
5,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nmIslandRequiredPixelsToSupport.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
131072});
|
||||
this.nmIslandRequiredPixelsToSupportMultiplier.Location = new System.Drawing.Point(10, 145);
|
||||
this.nmIslandRequiredPixelsToSupportMultiplier.Maximum = new decimal(new int[] {
|
||||
95,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nmIslandRequiredPixelsToSupport.Name = "nmIslandRequiredPixelsToSupport";
|
||||
this.nmIslandRequiredPixelsToSupport.Size = new System.Drawing.Size(57, 24);
|
||||
this.nmIslandRequiredPixelsToSupport.TabIndex = 22;
|
||||
this.toolTip.SetToolTip(this.nmIslandRequiredPixelsToSupport, "Range 1-255");
|
||||
this.nmIslandRequiredPixelsToSupport.Value = new decimal(new int[] {
|
||||
1,
|
||||
131072});
|
||||
this.nmIslandRequiredPixelsToSupportMultiplier.Minimum = new decimal(new int[] {
|
||||
5,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
131072});
|
||||
this.nmIslandRequiredPixelsToSupportMultiplier.Name = "nmIslandRequiredPixelsToSupportMultiplier";
|
||||
this.nmIslandRequiredPixelsToSupportMultiplier.Size = new System.Drawing.Size(57, 24);
|
||||
this.nmIslandRequiredPixelsToSupportMultiplier.TabIndex = 22;
|
||||
this.toolTip.SetToolTip(this.nmIslandRequiredPixelsToSupportMultiplier, "Range 0.05-0.95");
|
||||
this.nmIslandRequiredPixelsToSupportMultiplier.Value = new decimal(new int[] {
|
||||
50,
|
||||
0,
|
||||
0,
|
||||
131072});
|
||||
//
|
||||
// nmIslandRequiredAreaToProcessCheck
|
||||
//
|
||||
@@ -1032,6 +1040,16 @@
|
||||
this.groupBox4.TabStop = false;
|
||||
this.groupBox4.Text = "Startup";
|
||||
//
|
||||
// cbLoadDemoFileOnStartup
|
||||
//
|
||||
this.cbLoadDemoFileOnStartup.AutoSize = true;
|
||||
this.cbLoadDemoFileOnStartup.Location = new System.Drawing.Point(6, 79);
|
||||
this.cbLoadDemoFileOnStartup.Name = "cbLoadDemoFileOnStartup";
|
||||
this.cbLoadDemoFileOnStartup.Size = new System.Drawing.Size(361, 22);
|
||||
this.cbLoadDemoFileOnStartup.TabIndex = 8;
|
||||
this.cbLoadDemoFileOnStartup.Text = "Loads a demo file on startup if no file was specified";
|
||||
this.cbLoadDemoFileOnStartup.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tabPage2
|
||||
//
|
||||
this.tabPage2.Controls.Add(this.groupBox9);
|
||||
@@ -2334,16 +2352,6 @@
|
||||
this.toolTip.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info;
|
||||
this.toolTip.ToolTipTitle = "Information";
|
||||
//
|
||||
// cbLoadDemoFileOnStartup
|
||||
//
|
||||
this.cbLoadDemoFileOnStartup.AutoSize = true;
|
||||
this.cbLoadDemoFileOnStartup.Location = new System.Drawing.Point(6, 79);
|
||||
this.cbLoadDemoFileOnStartup.Name = "cbLoadDemoFileOnStartup";
|
||||
this.cbLoadDemoFileOnStartup.Size = new System.Drawing.Size(361, 22);
|
||||
this.cbLoadDemoFileOnStartup.TabIndex = 8;
|
||||
this.cbLoadDemoFileOnStartup.Text = "Loads a demo file on startup if no file was specified";
|
||||
this.cbLoadDemoFileOnStartup.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// FrmSettings
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
|
||||
@@ -2371,7 +2379,7 @@
|
||||
this.groupBox2.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nmIslandBinaryThreshold)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nmIslandRequiredPixelBrightnessToSupport)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nmIslandRequiredPixelsToSupport)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nmIslandRequiredPixelsToSupportMultiplier)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nmIslandRequiredAreaToProcessCheck)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nmIslandRequiredPixelBrightnessToProcessCheck)).EndInit();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
@@ -2432,7 +2440,7 @@
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.Label label9;
|
||||
private System.Windows.Forms.NumericUpDown nmIslandRequiredPixelsToSupport;
|
||||
private System.Windows.Forms.NumericUpDown nmIslandRequiredPixelsToSupportMultiplier;
|
||||
private System.Windows.Forms.Label label10;
|
||||
private System.Windows.Forms.NumericUpDown nmIslandRequiredPixelBrightnessToSupport;
|
||||
private System.Windows.Forms.GroupBox groupBox3;
|
||||
|
||||
@@ -106,7 +106,7 @@ namespace UVtools.GUI.Forms
|
||||
nmIslandBinaryThreshold.Value = Settings.Default.IslandBinaryThreshold;
|
||||
nmIslandRequiredAreaToProcessCheck.Value = Settings.Default.IslandRequiredAreaToProcessCheck;
|
||||
nmIslandRequiredPixelBrightnessToProcessCheck.Value = Settings.Default.IslandRequiredPixelBrightnessToProcessCheck;
|
||||
nmIslandRequiredPixelsToSupport.Value = Settings.Default.IslandRequiredPixelsToSupport;
|
||||
nmIslandRequiredPixelsToSupportMultiplier.Value = Settings.Default.IslandRequiredPixelsToSupportMultiplier;
|
||||
nmIslandRequiredPixelBrightnessToSupport.Value = Settings.Default.IslandRequiredPixelBrightnessToSupport;
|
||||
|
||||
cbOverhangIndependentFromIslands.Checked = Settings.Default.OverhangIndependentFromIslands;
|
||||
@@ -301,7 +301,7 @@ namespace UVtools.GUI.Forms
|
||||
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.IslandRequiredPixelsToSupportMultiplier = nmIslandRequiredPixelsToSupportMultiplier.Value;
|
||||
Settings.Default.IslandRequiredPixelBrightnessToSupport = (byte)nmIslandRequiredPixelBrightnessToSupport.Value;
|
||||
|
||||
Settings.Default.OverhangIndependentFromIslands = cbOverhangIndependentFromIslands.Checked;
|
||||
|
||||
@@ -126,10 +126,6 @@
|
||||
<data name="cbIslandAllowDiagonalBonds.ToolTip" xml:space="preserve">
|
||||
<value>If enabled, components touching by even a single diagonal bond will be considered a single component for the purposes of island detection.
|
||||
Enabling this will result in faster island detection. but some potential islands with weak bonds to other components may not be detected.</value>
|
||||
</data>
|
||||
<data name="label9.ToolTip" xml:space="preserve">
|
||||
<value>An island supported by at least this number of safe pixels will always be considered supported.
|
||||
An island supported by less than this number of pixels will only be considered supported if the number of supporting pixels is at least half the area of the island itself.</value>
|
||||
</data>
|
||||
<data name="cbOverhangIndependentFromIslands.ToolTip" xml:space="preserve">
|
||||
<value>If enabled, overhangs will be computed everywhere, including on islands. An overhang on an island will always be detected and reported. (Faster)
|
||||
|
||||
@@ -3853,6 +3853,7 @@ namespace UVtools.GUI
|
||||
BinaryThreshold = Settings.Default.IslandBinaryThreshold,
|
||||
RequiredAreaToProcessCheck = Settings.Default.IslandRequiredAreaToProcessCheck,
|
||||
RequiredPixelBrightnessToProcessCheck = Settings.Default.IslandRequiredPixelBrightnessToProcessCheck,
|
||||
RequiredPixelsToSupportMultiplier = Settings.Default.IslandRequiredPixelsToSupportMultiplier,
|
||||
RequiredPixelsToSupport = Settings.Default.IslandRequiredPixelsToSupport,
|
||||
RequiredPixelBrightnessToSupport = Settings.Default.IslandRequiredPixelBrightnessToSupport
|
||||
};
|
||||
|
||||
@@ -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.8.5.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.5.0")]
|
||||
[assembly: AssemblyVersion("0.8.6.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.6.0")]
|
||||
|
||||
+13
-1
@@ -769,7 +769,7 @@ namespace UVtools.GUI.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("10")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("5")]
|
||||
public byte LayerRepairRemoveIslandsBelowEqualPixelsDefault {
|
||||
get {
|
||||
return ((byte)(this["LayerRepairRemoveIslandsBelowEqualPixelsDefault"]));
|
||||
@@ -994,5 +994,17 @@ namespace UVtools.GUI.Properties {
|
||||
this["LoadDemoFileOnStartup"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("0.25")]
|
||||
public decimal IslandRequiredPixelsToSupportMultiplier {
|
||||
get {
|
||||
return ((decimal)(this["IslandRequiredPixelsToSupportMultiplier"]));
|
||||
}
|
||||
set {
|
||||
this["IslandRequiredPixelsToSupportMultiplier"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="LayerRepairRemoveIslandsBelowEqualPixelsDefault" Type="System.Byte" Scope="User">
|
||||
<Value Profile="(Default)">10</Value>
|
||||
<Value Profile="(Default)">5</Value>
|
||||
</Setting>
|
||||
<Setting Name="PartialUpdateIslandsOnEditing" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
@@ -245,5 +245,8 @@
|
||||
<Setting Name="LoadDemoFileOnStartup" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="IslandRequiredPixelsToSupportMultiplier" Type="System.Decimal" Scope="User">
|
||||
<Value Profile="(Default)">0.25</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@@ -0,0 +1,28 @@
|
||||
namespace UVtools.GUI.Properties {
|
||||
|
||||
|
||||
// This class allows you to handle specific events on the settings class:
|
||||
// The SettingChanging event is raised before a setting's value is changed.
|
||||
// The PropertyChanged event is raised after a setting's value is changed.
|
||||
// The SettingsLoaded event is raised after the setting values are loaded.
|
||||
// The SettingsSaving event is raised before the setting values are saved.
|
||||
internal sealed partial class Settings {
|
||||
|
||||
public Settings() {
|
||||
// // To add event handlers for saving and changing settings, uncomment the lines below:
|
||||
//
|
||||
// this.SettingChanging += this.SettingChangingEventHandler;
|
||||
//
|
||||
// this.SettingsSaving += this.SettingsSavingEventHandler;
|
||||
//
|
||||
}
|
||||
|
||||
private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) {
|
||||
// Add code to handle the SettingChangingEvent event here.
|
||||
}
|
||||
|
||||
private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) {
|
||||
// Add code to handle the SettingsSaving event here.
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -362,6 +362,7 @@
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\Annotations.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Settings.cs" />
|
||||
<EmbeddedResource Include="Controls\CtrlKernel.resx">
|
||||
<DependentUpon>CtrlKernel.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
Reference in New Issue
Block a user