From addcb8633a262dd9d874485977e098a1836382d3 Mon Sep 17 00:00:00 2001
From: CPL <1179393954@qq.com>
Date: Fri, 5 Jan 2024 08:36:58 +0800
Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC-v1.2.3=20=E6=9B=B4=E6=96=B0m?=
=?UTF-8?q?ark=E7=B1=BB=E5=9E=8B=E5=92=8C=E7=BA=BF=E5=AE=BD=E8=A1=A5?=
=?UTF-8?q?=E5=81=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
halftoneproject-master/Code/Config.cs | 16 ++
halftoneproject-master/Code/FrmMain.cs | 4 +-
.../Code/FrmSysSetting.Designer.cs | 140 ++++++++++++++++--
halftoneproject-master/Code/FrmSysSetting.cs | 18 +++
.../Code/FrmSysSetting.resx | 20 +--
更新日志.txt | 3 +-
6 files changed, 178 insertions(+), 23 deletions(-)
diff --git a/halftoneproject-master/Code/Config.cs b/halftoneproject-master/Code/Config.cs
index 674f5ec..f29e5ae 100644
--- a/halftoneproject-master/Code/Config.cs
+++ b/halftoneproject-master/Code/Config.cs
@@ -47,6 +47,7 @@ namespace ProductionControl
public static int Light_PortNum = 1;//COM端口号
public static int Tension_PortNum = 7;//COM端口号
public static double Tension_Offset = 0;//张力偏移值
+
public static string SmallAxis_ComName = "COM2";//COM端口号
public static string HeightDev_IP = "192.168.3.35";
public static int HeightDev_Port = 64000;
@@ -63,6 +64,9 @@ namespace ProductionControl
public static string Defect_SavePath, Defect_Compress_SavePath, Defect_Small_SavePath;
public static double Defect_SavePath_AutoClear =-1,Defect_Compress_SavePath_AutoClear=-1,Defect_Small_SavePath_AutoClear=-1;
public static bool SaveAllDefectImg, MakeTag;
+
+ public static double PT_Offset = 0;//PT偏移值
+ public static double LineWidth_Offset = 0;//线宽偏移值
//尺寸配置
//public static string Size_LoadPath, Size_FileName;
@@ -290,6 +294,18 @@ namespace ProductionControl
SizeBmp_Zoom_Image_SavePath = Util.ReadIniValue(configPath, "DEV", "SizeBmp_Zoom_Image_SavePath");
lsTmp = Util.ReadIniValue(configPath, "DEV", "SizeBmp_Zoom_Image_SavePath_AutoClear");
if (Util.IsNumber(lsTmp)) SizeBmp_Zoom_Image_SavePath_AutoClear = Convert.ToDouble(lsTmp);
+
+ lsTmp = Util.ReadIniValue(configPath, "DEV", "PT_Offset");
+ if (string.IsNullOrEmpty(lsTmp))
+ Config.PT_Offset = 0;
+ else
+ Config.PT_Offset = double.Parse(lsTmp);
+ lsTmp = Util.ReadIniValue(configPath, "DEV", "LineWidth_Offset");
+ if (string.IsNullOrEmpty(lsTmp))
+ Config.LineWidth_Offset = 0;
+ else
+ Config.LineWidth_Offset = double.Parse(lsTmp);
+
//DB
DBConStr = Util.ReadIniValue(configPath, "DB", "DBConStr");
//HTTP
diff --git a/halftoneproject-master/Code/FrmMain.cs b/halftoneproject-master/Code/FrmMain.cs
index 0d4afd6..15fbf5c 100644
--- a/halftoneproject-master/Code/FrmMain.cs
+++ b/halftoneproject-master/Code/FrmMain.cs
@@ -1206,7 +1206,7 @@ namespace ProductionControl
{
lock (lstPT)
{
- lstPT.Add(Math.Round(res.PT1, 4));
+ lstPT.Add(Math.Round(res.PT1 + Config.PT_Offset, 4));
updatePTValueTest(model.PTBaseValue + model.PTUpFloatValue, model.PTBaseValue - model.PTDownFloatValue);
}
}
@@ -1227,7 +1227,7 @@ namespace ProductionControl
lock (lstLineWidth)
{
- lstLineWidth.Add(res.Shanxian > 0 ? Math.Round(res.Shanxian, 2) : 0);
+ lstLineWidth.Add(res.Shanxian > 0 ? Math.Round(res.Shanxian + Config.LineWidth_Offset, 2) : 0);
updateLineWidthValue(model.LineWidthBaseValue + model.LineWidthUpFloatValue, model.LineWidthBaseValue - model.LineWidthDownFloatValue);
}
}
diff --git a/halftoneproject-master/Code/FrmSysSetting.Designer.cs b/halftoneproject-master/Code/FrmSysSetting.Designer.cs
index 4c17510..75c1594 100644
--- a/halftoneproject-master/Code/FrmSysSetting.Designer.cs
+++ b/halftoneproject-master/Code/FrmSysSetting.Designer.cs
@@ -218,6 +218,7 @@
this.chkSizeBmp_SavePath_AutoClear = new System.Windows.Forms.CheckBox();
this.label43 = new System.Windows.Forms.Label();
this.tabPage9 = new System.Windows.Forms.TabPage();
+ this.cbOpenAxisXCal = new System.Windows.Forms.CheckBox();
this.cbOpenFlawDistribution = new System.Windows.Forms.CheckBox();
this.ckSkipSizeFailed = new System.Windows.Forms.CheckBox();
this.chkSkipSmallAxis = new System.Windows.Forms.CheckBox();
@@ -238,7 +239,12 @@
this.numHttpPort = new System.Windows.Forms.NumericUpDown();
this.label49 = new System.Windows.Forms.Label();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
- this.cbOpenAxisXCal = new System.Windows.Forms.CheckBox();
+ this.groupBox24 = new System.Windows.Forms.GroupBox();
+ this.panel24 = new System.Windows.Forms.Panel();
+ this.label60 = new System.Windows.Forms.Label();
+ this.numPToffset = new System.Windows.Forms.NumericUpDown();
+ this.label62 = new System.Windows.Forms.Label();
+ this.numLineWidthoffset = new System.Windows.Forms.NumericUpDown();
this.toolStrip1.SuspendLayout();
this.groupBox1.SuspendLayout();
this.panel1.SuspendLayout();
@@ -333,6 +339,10 @@
this.groupBox18.SuspendLayout();
this.panel18.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numHttpPort)).BeginInit();
+ this.groupBox24.SuspendLayout();
+ this.panel24.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.numPToffset)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.numLineWidthoffset)).BeginInit();
this.SuspendLayout();
//
// toolStrip1
@@ -2357,6 +2367,7 @@
//
// tabPage6
//
+ this.tabPage6.Controls.Add(this.groupBox24);
this.tabPage6.Controls.Add(this.groupBox21);
this.tabPage6.Controls.Add(this.groupBox20);
this.tabPage6.Controls.Add(this.groupBox6);
@@ -2749,6 +2760,17 @@
this.tabPage9.Text = "功能过滤";
this.tabPage9.UseVisualStyleBackColor = true;
//
+ // cbOpenAxisXCal
+ //
+ this.cbOpenAxisXCal.AutoSize = true;
+ this.cbOpenAxisXCal.Location = new System.Drawing.Point(19, 344);
+ this.cbOpenAxisXCal.Margin = new System.Windows.Forms.Padding(2);
+ this.cbOpenAxisXCal.Name = "cbOpenAxisXCal";
+ this.cbOpenAxisXCal.Size = new System.Drawing.Size(90, 16);
+ this.cbOpenAxisXCal.TabIndex = 13;
+ this.cbOpenAxisXCal.Text = "启用X轴校准";
+ this.cbOpenAxisXCal.UseVisualStyleBackColor = true;
+ //
// cbOpenFlawDistribution
//
this.cbOpenFlawDistribution.AutoSize = true;
@@ -2977,16 +2999,103 @@
this.label49.TabIndex = 4;
this.label49.Text = "本机IP:";
//
- // cbOpenAxisXCal
+ // groupBox24
//
- this.cbOpenAxisXCal.AutoSize = true;
- this.cbOpenAxisXCal.Location = new System.Drawing.Point(19, 344);
- this.cbOpenAxisXCal.Margin = new System.Windows.Forms.Padding(2);
- this.cbOpenAxisXCal.Name = "cbOpenAxisXCal";
- this.cbOpenAxisXCal.Size = new System.Drawing.Size(90, 16);
- this.cbOpenAxisXCal.TabIndex = 13;
- this.cbOpenAxisXCal.Text = "启用X轴校准";
- this.cbOpenAxisXCal.UseVisualStyleBackColor = true;
+ this.groupBox24.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.groupBox24.BackColor = System.Drawing.SystemColors.ActiveCaption;
+ this.groupBox24.Controls.Add(this.panel24);
+ this.groupBox24.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.groupBox24.Location = new System.Drawing.Point(2, 290);
+ this.groupBox24.Margin = new System.Windows.Forms.Padding(2);
+ this.groupBox24.Name = "groupBox24";
+ this.groupBox24.Padding = new System.Windows.Forms.Padding(2);
+ this.groupBox24.Size = new System.Drawing.Size(476, 73);
+ this.groupBox24.TabIndex = 34;
+ this.groupBox24.TabStop = false;
+ this.groupBox24.Text = "尺寸补偿";
+ //
+ // panel24
+ //
+ this.panel24.BackColor = System.Drawing.Color.White;
+ this.panel24.Controls.Add(this.label62);
+ this.panel24.Controls.Add(this.numLineWidthoffset);
+ this.panel24.Controls.Add(this.label60);
+ this.panel24.Controls.Add(this.numPToffset);
+ this.panel24.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel24.Location = new System.Drawing.Point(2, 16);
+ this.panel24.Margin = new System.Windows.Forms.Padding(2);
+ this.panel24.Name = "panel24";
+ this.panel24.Size = new System.Drawing.Size(472, 55);
+ this.panel24.TabIndex = 0;
+ //
+ // label60
+ //
+ this.label60.AutoSize = true;
+ this.label60.Location = new System.Drawing.Point(10, 20);
+ this.label60.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+ this.label60.Name = "label60";
+ this.label60.Size = new System.Drawing.Size(65, 12);
+ this.label60.TabIndex = 14;
+ this.label60.Text = "PT补偿(mm)";
+ //
+ // numPToffset
+ //
+ this.numPToffset.DecimalPlaces = 4;
+ this.numPToffset.Increment = new decimal(new int[] {
+ 1,
+ 0,
+ 0,
+ 65536});
+ this.numPToffset.Location = new System.Drawing.Point(79, 18);
+ this.numPToffset.Margin = new System.Windows.Forms.Padding(2);
+ this.numPToffset.Maximum = new decimal(new int[] {
+ 1000000000,
+ 0,
+ 0,
+ 0});
+ this.numPToffset.Minimum = new decimal(new int[] {
+ 100000000,
+ 0,
+ 0,
+ -2147483648});
+ this.numPToffset.Name = "numPToffset";
+ this.numPToffset.Size = new System.Drawing.Size(117, 21);
+ this.numPToffset.TabIndex = 13;
+ //
+ // label62
+ //
+ this.label62.AutoSize = true;
+ this.label62.Location = new System.Drawing.Point(231, 20);
+ this.label62.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+ this.label62.Name = "label62";
+ this.label62.Size = new System.Drawing.Size(77, 12);
+ this.label62.TabIndex = 16;
+ this.label62.Text = "线宽补偿(um)";
+ //
+ // numLineWidthoffset
+ //
+ this.numLineWidthoffset.DecimalPlaces = 2;
+ this.numLineWidthoffset.Increment = new decimal(new int[] {
+ 1,
+ 0,
+ 0,
+ 65536});
+ this.numLineWidthoffset.Location = new System.Drawing.Point(312, 18);
+ this.numLineWidthoffset.Margin = new System.Windows.Forms.Padding(2);
+ this.numLineWidthoffset.Maximum = new decimal(new int[] {
+ 1000000000,
+ 0,
+ 0,
+ 0});
+ this.numLineWidthoffset.Minimum = new decimal(new int[] {
+ 100000000,
+ 0,
+ 0,
+ -2147483648});
+ this.numLineWidthoffset.Name = "numLineWidthoffset";
+ this.numLineWidthoffset.Size = new System.Drawing.Size(117, 21);
+ this.numLineWidthoffset.TabIndex = 15;
//
// FrmSysSetting
//
@@ -3126,6 +3235,11 @@
this.panel18.ResumeLayout(false);
this.panel18.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numHttpPort)).EndInit();
+ this.groupBox24.ResumeLayout(false);
+ this.panel24.ResumeLayout(false);
+ this.panel24.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.numPToffset)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.numLineWidthoffset)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -3341,5 +3455,11 @@
private System.Windows.Forms.Label label7;
private System.Windows.Forms.CheckBox cbOpenFlawDistribution;
private System.Windows.Forms.CheckBox cbOpenAxisXCal;
+ private System.Windows.Forms.GroupBox groupBox24;
+ private System.Windows.Forms.Panel panel24;
+ private System.Windows.Forms.Label label62;
+ private System.Windows.Forms.NumericUpDown numLineWidthoffset;
+ private System.Windows.Forms.Label label60;
+ private System.Windows.Forms.NumericUpDown numPToffset;
}
}
\ No newline at end of file
diff --git a/halftoneproject-master/Code/FrmSysSetting.cs b/halftoneproject-master/Code/FrmSysSetting.cs
index 3ce07e0..4a5d613 100644
--- a/halftoneproject-master/Code/FrmSysSetting.cs
+++ b/halftoneproject-master/Code/FrmSysSetting.cs
@@ -195,6 +195,19 @@ namespace ProductionControl
ldTmp = Convert.ToDouble(lsTmp);
chkSizeBmp_Zoom_Image_SavePath_AutoClear.Checked = (ldTmp > -1);
if (ldTmp > -1) numSizeBmp_Zoom_Image_SavePath_AutoClear.Value = (decimal)ldTmp;
+
+ //线宽PT补偿
+ lsTmp = Util.ReadIniValue(configPath, "DEV", "PT_Offset");
+ if (string.IsNullOrWhiteSpace(lsTmp))
+ this.numPToffset.Value = 0;
+ else
+ this.numPToffset.Value = (decimal)double.Parse(lsTmp);
+ lsTmp = Util.ReadIniValue(configPath, "DEV", "LineWidth_Offset");
+ if (string.IsNullOrWhiteSpace(lsTmp))
+ this.numLineWidthoffset.Value = 0;
+ else
+ this.numLineWidthoffset.Value = (decimal)double.Parse(lsTmp);
+
//DB
this.txtDBCon.Text = Util.ReadIniValue(configPath, "DB", "DBConStr");
//HTTP
@@ -346,6 +359,11 @@ namespace ProductionControl
Utils.Util.WriteIniValue(configPath, "DEV", "SizeBmp_Compare_SavePath_AutoClear", (chkSizeBmp_Compare_SavePath_AutoClear.Checked ? (double)numSizeBmp_Compare_SavePath_AutoClear.Value : -1) + "");
Utils.Util.WriteIniValue(configPath, "DEV", "SizeBmp_Zoom_Image_SavePath", this.txtSizeBmp_Zoom_Image_SavePath.Text.Trim());
Utils.Util.WriteIniValue(configPath, "DEV", "SizeBmp_Zoom_Image_SavePath_AutoClear", (chkSizeBmp_Zoom_Image_SavePath_AutoClear.Checked ? (double)numSizeBmp_Zoom_Image_SavePath_AutoClear.Value : -1) + "");
+
+ decimal PT_Offset = this.numPToffset.Value;
+ decimal LW_Offset = this.numLineWidthoffset.Value;
+ Utils.Util.WriteIniValue(configPath, "DEV", "PT_Offset", PT_Offset.ToString());
+ Utils.Util.WriteIniValue(configPath, "DEV", "LineWidth_Offset", LW_Offset.ToString());
//DB
Utils.Util.WriteIniValue(configPath, "DB", "DBConStr", DBConStr);
//HTTP
diff --git a/halftoneproject-master/Code/FrmSysSetting.resx b/halftoneproject-master/Code/FrmSysSetting.resx
index af12abc..1ffbc24 100644
--- a/halftoneproject-master/Code/FrmSysSetting.resx
+++ b/halftoneproject-master/Code/FrmSysSetting.resx
@@ -124,16 +124,16 @@
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIeSURBVFhH7ZfLShxBFIaPCJKAIuQFghHdCO5MSFCzES/Z
- zyKIduyq6q7TxoXkDdyJbhQfwEswgYAv4E506QVcZJmduE4IJoRcThU1PV2ZmpmunkYQ/OGjZ6rq/P1P
- 9emeGbiXQx0QJePEdGG4nAKeDBk/D1UqXcDiQxD4txQ4rhjnnBI4UmfSPhPGPYe4HEsLGX6hT7ALIt7z
- R+5AiJ+1zxu8gijqNWdooSgZTQNw3DajxcTlauol5Ccz2kLZAELum9FiEnKz5qX9AjPTRNkADD+Y0fxi
- uEA7F+nXHDesAK/xO4TJYz3XUO0EWF5+SHV/dK0Sx/XUq0oYn9BMh553qp0AYdhDdV+JG/2ey7XUy0K+
- 0/NOWT2A781oPiVJN0y++q1rlawmtDjQ807ZAZosbCB925rmFbiV8arRdGftAGo7X5gZPzEcptrrjFcN
- jwAK1VSXxBk9YM5bQ+s4XkAQ/DL19XgGKJ+7GSAIvhWieldk8QqgTIScAcYeFSKOB8jn2PL02wFqrHYl
- MLE8PS/BT+rqJRDJM29Y/JT8ptOv5Sp3swnLxDPADV2CeeCLg7qh1DEvan0UPQcmTy3P229CiZan9w4I
- OQdC9MMCPtHH/1HjLvjbPqqnH7n6EZ0zQPZHqY36TvDD9RDSyI/mbA6pW8dZVCbNAgTBA1p0VF9UErOz
- P2iXp8zZGqhS6aTFL6kf3H+7iiJwUvfFvSwB/AOYeWWRyPCtmgAAAABJRU5ErkJggg==
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIdSURBVFhH7ZdBS9xAFMefFMRCRegXkLbUi+CtFqXVS1v1
+ A+xBRKOZmWReqgfxG3iT9tLSD9BWUUHwC3gTe6wt9ODRm3hWRKVUfTPMZjPu7G4mGwqCf/iR3Zl5//x3
+ 8pLdhXs51AFRMkKMF4bLMeBJv/HzUKXSCSzeAYHXpcBx2TjnlMAXdSbt88a45xCXr9NChof0Cb6DiFf9
+ kd8gxAPtM4tHEEU95gwtFCWv0gAcv5rRYuJyJfUScsuMtlA2gJDrZrSYhPxc89J+gZlpomwAhhtmNL8Y
+ ztHORfo1x09WgEk8gzDp1XMN1U6AxcWHVHela5U4fky9qoTxD5rp0PNOtRMgDLup7oQ41++5/JB6Wcgl
+ Pe+U1QO4ZkbzKUkewduJf7pWyWpCi20975QdoMnCBtK3rWlegV8yXjWa7qwdQG3nsJnxE8MBqj3OeNXw
+ CKBQTfWH2KcHzK/W0DqOvyEI/pr6ejwDlM/dDBAEp4Wo3hVZvAIoEyEngLHHhYjj5+SzZ3n67QA1VrsS
+ mFienpfgkrp6AUTy0hsWD5LfePq1XOVuNmGZeAY4p0swA/x9n24odcyLWh9FQ8DkT8vz/zehRMvTeweE
+ nAYhnsEcPtXH26hxF3z+CdXTj1z9iM4ZIPuj1EZ9J/jheghp5KY5m0Pq1nEWlUmzAEHQRYt264tKYmrq
+ gnZ5zJytgSqVB7R4lPrB/berKALf6b64lyWAG3A0ZYu/HkZSAAAAAElFTkSuQmCC
diff --git a/更新日志.txt b/更新日志.txt
index 4384852..3a4d5cf 100644
--- a/更新日志.txt
+++ b/更新日志.txt
@@ -24,4 +24,5 @@ V1.2.2:
V1.2.3:
1.修复开启比对,但比对失败当成无比对bug
2.修复查询显示的时候没有使用缺陷结果,显示结果ok等bug
- 3.更新上传图纸Mark点选项
\ No newline at end of file
+ 3.更新上传图纸Mark点选项
+ 4.增加pt和线宽补偿
\ No newline at end of file