Commit 254ae75e LN

复制的点位自动校准投影位置

1 个父辈 6bf8fce3
...@@ -35,12 +35,12 @@ namespace TSA_V.LoadCSVLibrary ...@@ -35,12 +35,12 @@ namespace TSA_V.LoadCSVLibrary
[CSVAttribute("Code", true, "物料编码", "元器件名称", "Name", "Material Code")] [CSVAttribute("Code", true, "物料编码", "元器件名称", "Name", "Material Code")]
public string PN { get; set; } public string PN { get; set; }
/// <summary> /// <summary>
///位置 ///位置,多个用分号分割
/// </summary> /// </summary>
[CSVAttribute("PNum", true, "料盘位置", "位置", "PositionNum", "Lot")] [CSVAttribute("PNum", true, "料盘位置", "位置", "PositionNum", "Lot")]
public string PositionNum { get; set; } public string PositionNum { get; set; }
/// <summary> /// <summary>
///数量 ///数量,多个用分号分割
/// </summary> /// </summary>
[CSVAttribute("Count", true, "数量", "Quantity")] [CSVAttribute("Count", true, "数量", "Quantity")]
public string ComCount { get; set; } = "0"; public string ComCount { get; set; } = "0";
......
...@@ -241,9 +241,9 @@ ...@@ -241,9 +241,9 @@
// label2 // label2
// //
this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(55, 139); this.label2.Location = new System.Drawing.Point(4, 139);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(80, 17); this.label2.Size = new System.Drawing.Size(137, 17);
this.label2.TabIndex = 299; this.label2.TabIndex = 299;
this.label2.Text = "列间距:"; this.label2.Text = "列间距:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
...@@ -261,9 +261,9 @@ ...@@ -261,9 +261,9 @@
// label12 // label12
// //
this.label12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label12.Location = new System.Drawing.Point(55, 63); this.label12.Location = new System.Drawing.Point(4, 63);
this.label12.Name = "label12"; this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(80, 17); this.label12.Size = new System.Drawing.Size(137, 17);
this.label12.TabIndex = 297; this.label12.TabIndex = 297;
this.label12.Text = "列:"; this.label12.Text = "列:";
this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
...@@ -281,9 +281,9 @@ ...@@ -281,9 +281,9 @@
// label11 // label11
// //
this.label11.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label11.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label11.Location = new System.Drawing.Point(55, 101); this.label11.Location = new System.Drawing.Point(4, 101);
this.label11.Name = "label11"; this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(80, 17); this.label11.Size = new System.Drawing.Size(137, 17);
this.label11.TabIndex = 295; this.label11.TabIndex = 295;
this.label11.Text = "行间距:"; this.label11.Text = "行间距:";
this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
...@@ -301,9 +301,9 @@ ...@@ -301,9 +301,9 @@
// label7 // label7
// //
this.label7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label7.Location = new System.Drawing.Point(55, 25); this.label7.Location = new System.Drawing.Point(4, 25);
this.label7.Name = "label7"; this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(80, 17); this.label7.Size = new System.Drawing.Size(137, 17);
this.label7.TabIndex = 293; this.label7.TabIndex = 293;
this.label7.Text = "行:"; this.label7.Text = "行:";
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
...@@ -371,9 +371,9 @@ ...@@ -371,9 +371,9 @@
// label9 // label9
// //
this.label9.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label9.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label9.Location = new System.Drawing.Point(9, 30); this.label9.Location = new System.Drawing.Point(4, 30);
this.label9.Name = "label9"; this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(129, 17); this.label9.Size = new System.Drawing.Size(137, 17);
this.label9.TabIndex = 280; this.label9.TabIndex = 280;
this.label9.Text = "X轴偏移量→:"; this.label9.Text = "X轴偏移量→:";
this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
...@@ -381,7 +381,7 @@ ...@@ -381,7 +381,7 @@
// txtAngle // txtAngle
// //
this.txtAngle.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtAngle.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAngle.Location = new System.Drawing.Point(144, 103); this.txtAngle.Location = new System.Drawing.Point(145, 103);
this.txtAngle.MaxLength = 12; this.txtAngle.MaxLength = 12;
this.txtAngle.Name = "txtAngle"; this.txtAngle.Name = "txtAngle";
this.txtAngle.Size = new System.Drawing.Size(89, 23); this.txtAngle.Size = new System.Drawing.Size(89, 23);
...@@ -391,9 +391,9 @@ ...@@ -391,9 +391,9 @@
// label4 // label4
// //
this.label4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label4.Location = new System.Drawing.Point(9, 106); this.label4.Location = new System.Drawing.Point(4, 106);
this.label4.Name = "label4"; this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(128, 17); this.label4.Size = new System.Drawing.Size(136, 17);
this.label4.TabIndex = 282; this.label4.TabIndex = 282;
this.label4.Text = "旋转角度:"; this.label4.Text = "旋转角度:";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
...@@ -401,7 +401,7 @@ ...@@ -401,7 +401,7 @@
// txtXUpdate // txtXUpdate
// //
this.txtXUpdate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtXUpdate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtXUpdate.Location = new System.Drawing.Point(144, 27); this.txtXUpdate.Location = new System.Drawing.Point(145, 27);
this.txtXUpdate.MaxLength = 12; this.txtXUpdate.MaxLength = 12;
this.txtXUpdate.Name = "txtXUpdate"; this.txtXUpdate.Name = "txtXUpdate";
this.txtXUpdate.Size = new System.Drawing.Size(89, 23); this.txtXUpdate.Size = new System.Drawing.Size(89, 23);
...@@ -411,7 +411,7 @@ ...@@ -411,7 +411,7 @@
// txtYUpdate // txtYUpdate
// //
this.txtYUpdate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtYUpdate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtYUpdate.Location = new System.Drawing.Point(144, 65); this.txtYUpdate.Location = new System.Drawing.Point(145, 65);
this.txtYUpdate.MaxLength = 12; this.txtYUpdate.MaxLength = 12;
this.txtYUpdate.Name = "txtYUpdate"; this.txtYUpdate.Name = "txtYUpdate";
this.txtYUpdate.Size = new System.Drawing.Size(89, 23); this.txtYUpdate.Size = new System.Drawing.Size(89, 23);
...@@ -421,9 +421,9 @@ ...@@ -421,9 +421,9 @@
// label10 // label10
// //
this.label10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label10.Location = new System.Drawing.Point(9, 68); this.label10.Location = new System.Drawing.Point(4, 68);
this.label10.Name = "label10"; this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(128, 17); this.label10.Size = new System.Drawing.Size(136, 17);
this.label10.TabIndex = 282; this.label10.TabIndex = 282;
this.label10.Text = "Y轴偏移量↓:"; this.label10.Text = "Y轴偏移量↓:";
this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
...@@ -670,7 +670,7 @@ ...@@ -670,7 +670,7 @@
this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClose.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnClose.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClose.Location = new System.Drawing.Point(467, 537); this.btnClose.Location = new System.Drawing.Point(420, 538);
this.btnClose.Name = "btnClose"; this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(120, 45); this.btnClose.Size = new System.Drawing.Size(120, 45);
this.btnClose.TabIndex = 41; this.btnClose.TabIndex = 41;
...@@ -683,7 +683,7 @@ ...@@ -683,7 +683,7 @@
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSave.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnSave.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSave.Location = new System.Drawing.Point(326, 537); this.btnSave.Location = new System.Drawing.Point(279, 538);
this.btnSave.Name = "btnSave"; this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(120, 45); this.btnSave.Size = new System.Drawing.Size(120, 45);
this.btnSave.TabIndex = 40; this.btnSave.TabIndex = 40;
......
...@@ -257,8 +257,8 @@ namespace TSA_V ...@@ -257,8 +257,8 @@ namespace TSA_V
int rowValue = FormUtil.GetIntValue(txtRowS); int rowValue = FormUtil.GetIntValue(txtRowS);
int colValue = FormUtil.GetIntValue(txtColS); int colValue = FormUtil.GetIntValue(txtColS);
showMsg = ResourceCulture.GetString(ResourceCulture.PWSureCopyPoint, "确定复制?目标为{0}行,{1}列,X间距={2}, Y间距={3}", row,col,rowValue,colValue); showMsg = ResourceCulture.GetString(ResourceCulture.PWSureCopyPoint, "确定复制?目标为{0}行,{1}列,X间距={2}, Y间距={3}", row,col, colValue, rowValue);
DialogResult result = MessageBox.Show($"确定复制?目标为{row}行,{col}列,X间距={rowValue}, Y间距={colValue}", ResourceCulture.GetString(ResourceCulture.Sure, "确认"), MessageBoxButtons.YesNo); DialogResult result = MessageBox.Show(showMsg, ResourceCulture.GetString(ResourceCulture.Sure, "确认"), MessageBoxButtons.YesNo);
if (!result.Equals(DialogResult.Yes)) if (!result.Equals(DialogResult.Yes))
{ {
return; return;
...@@ -266,7 +266,7 @@ namespace TSA_V ...@@ -266,7 +266,7 @@ namespace TSA_V
//复制 //复制
List<SMTPointInfo> oldPoints = new List<SMTPointInfo>(); List<SMTPointInfo> oldPoints = new List<SMTPointInfo>();
resultPointList = new List<SMTPointInfo>(); resultPointList = new List<SMTPointInfo>();
msg = $"点位复制: 目标为{row}行,{col}列,X间距={rowValue}, Y间距={colValue},列表: "; msg = $"点位复制: 目标为{row}行,{col}列,X间距={colValue}, Y间距={rowValue},列表: ";
foreach (SMTPointInfo point in selectPoints) foreach (SMTPointInfo point in selectPoints)
{ {
msg += "\r\n" + point.TagNo + "_" + point.PN + $",更改组={1}"; msg += "\r\n" + point.TagNo + "_" + point.PN + $",更改组={1}";
...@@ -274,6 +274,7 @@ namespace TSA_V ...@@ -274,6 +274,7 @@ namespace TSA_V
oldPoints.Add(point); oldPoints.Add(point);
} }
List<SMTPointInfo> checkOKList = updateBoardInfo.getCalPoint();//如果已经校准过点位,直接校准新点位
int nextNum = updateBoardInfo.GetNextPNum(); int nextNum = updateBoardInfo.GetNextPNum();
selectPoints = new List<SMTPointInfo>(oldPoints); selectPoints = new List<SMTPointInfo>(oldPoints);
for (int currRow = 1; currRow <= row; currRow++) for (int currRow = 1; currRow <= row; currRow++)
...@@ -299,7 +300,8 @@ namespace TSA_V ...@@ -299,7 +300,8 @@ namespace TSA_V
newPoint.PointSizeX = point.PointSizeX; newPoint.PointSizeX = point.PointSizeX;
newPoint.CheckOK = false; newPoint.CheckOK = false;
msg += "\r\n" + point.pointName + "_" + point.PN + $",更改组={index}"; newPoint = XYConvertManager.CalPointNodePosition(newPoint, checkOKList);
msg += "\r\n" + point.pointName + "_" + point.PN + $",更改组={index} , X={newPoint.PositionX},Y={newPoint.PositionY},投影X={newPoint.NodePositionX},投影Y={newPoint.NodePositionY}";
resultPointList.Add(newPoint); resultPointList.Add(newPoint);
nextNum++; nextNum++;
} }
......
...@@ -201,6 +201,69 @@ ...@@ -201,6 +201,69 @@
<metadata name="col_Polarities.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="col_Polarities.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="Column_pointNum.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_PartNum.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_X.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_Y.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_NodeX.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_NodeY.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_NeedSoldering.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_WeldTemp.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_WeldTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_NeedCheck.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_CheckOK.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_PointType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_PointSizeX.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_PointSizeY.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_PenWidth.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_ShowText.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_disable.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_Notes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="col_IsEdit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="col_Polarities.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>82</value> <value>82</value>
</metadata> </metadata>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!