From aa6b32cb313c914e5f8eed0a347551f8fc65ffbd Mon Sep 17 00:00:00 2001
From: kingno <30263@KINGNO>
Date: 星期三, 27 八月 2025 16:51:18 +0800
Subject: [PATCH] 合并
---
src/Bro.M135.Common/ProductModel.cs | 42 +++++++++++++++++++++++++++++++++++++++++-
1 files changed, 41 insertions(+), 1 deletions(-)
diff --git a/src/Bro.M135.Common/ProductModel.cs b/src/Bro.M135.Common/ProductModel.cs
index 5bebb83..6737e19 100644
--- a/src/Bro.M135.Common/ProductModel.cs
+++ b/src/Bro.M135.Common/ProductModel.cs
@@ -76,6 +76,13 @@
public bool IsPreStationOK { get; set; } = false;
+ [JsonIgnore]
+ public List<string> ImagePaths { get; set; } = new List<string>();
+
+ public List<Netdefectdetail> Netdefectdetails = new List<Netdefectdetail>();
+
+ public List<double> Centermatrix { get; set; } = new List<double>();
+
public DateTime? EndTime { get; set; } = null;
object _checkResultLock = new object();
@@ -422,7 +429,7 @@
#endregion
#region PositionCheckTimes
- public void InitialPositionCheckList(string positionName, List<int> checkTimes,string stationName)
+ public void InitialPositionCheckList(string positionName, List<int> checkTimes, string stationName)
{
lock (_checkResultLock)
{
@@ -491,4 +498,37 @@
TimeoutTimer = null;
}
}
+
+
+
+ public class Netdefectdetail
+ {
+ public string name { get; set; }
+
+ public double centerX { get; set; }
+ public double centerY { get; set; }
+
+
+
+
+ public static double GetDistance(double x1, double y1, double x2, double y2)
+ {
+ double dx = x2 - x1;
+ double dy = y2 - y1;
+ return Math.Sqrt(dx * dx + dy * dy);
+ }
+ public static bool operator ==(Netdefectdetail a, Netdefectdetail b)
+ {
+ if (GetDistance(a.centerX, a.centerY, b.centerX, b.centerY) < 50)
+ {
+ return true;
+ }
+ return false;
+ }
+
+ public static bool operator !=(Netdefectdetail a, Netdefectdetail b)
+ {
+ return !(a == b);
+ }
+ }
}
--
Gitblit v1.8.0