|
@@ -413,15 +413,9 @@ namespace MeasureThread
|
|
|
const String ImageName5 = @"SEMDegreeTrap.tif";//传给客户,水平校正
|
|
|
const String ImageName6 = @"SEMMagEnd.tif";//传给客户,测量层高
|
|
|
const String ImageName7 = @"BeforeImage.tif";//计算感兴趣的区域
|
|
|
- //const String ImageName8 = @"SEMAfterMoveToPix.tif";//精确的位置移动后的图像
|
|
|
- //const String ImageName9 = @"SEMBeforeMoveToPix.tif";//精确的位置移动后的图像
|
|
|
- //const String ImageName10 = @"SEMTrapCPAfter.tif";//传给客户,找到已经切割点
|
|
|
- //const String ImageName111 = @"SEMBeforeCut.tif";//切割前SEM拍照
|
|
|
- //const String ImageName112 = @"SEMAfterCut.tif";//切割后SEM拍照
|
|
|
+
|
|
|
const String ImageNameTwo_1 = @"SEMRegion.tif";//第一个测量区域拍照
|
|
|
- //const String ImageNameTwo_2 = @"SEMTwoRegion.tif";//第二个测量区域拍照
|
|
|
- //const String ImageNameTwo_11 = @"SEMOneRegionMove.tif";//第一个测量区域拍照
|
|
|
- //const String ImageNameTwo_22 = @"SEMTwoRegionMove.tif";//第二个测量区域拍照
|
|
|
+
|
|
|
|
|
|
const String MacoInsertPt = "GIS Insert.MLF"; //传入PT针
|
|
|
const String MacoRetractPt = "GIS Retract.MLF"; //退出PT针
|
|
@@ -1638,7 +1632,8 @@ namespace MeasureThread
|
|
|
//送给客户,计算感兴趣的区域
|
|
|
List<System.Drawing.Point> listPoints = new List<System.Drawing.Point>();
|
|
|
List<System.Drawing.Point> LinesStartPoint = new List<System.Drawing.Point>();
|
|
|
- List<List<Segment>> listFeature = new List<List<Segment>>();
|
|
|
+
|
|
|
+ List<List<Segment>> Features = new List<List<Segment>>();
|
|
|
List<int> lines_height = new List<int>();
|
|
|
System.Drawing.Point area_pt = new System.Drawing.Point();
|
|
|
int width = 1;
|
|
@@ -1659,7 +1654,7 @@ namespace MeasureThread
|
|
|
return false;
|
|
|
}
|
|
|
log.Info("返回 listPoints=" + listPoints.Count.ToString(), true);
|
|
|
- if (!m_MeasDB.InsertAnylysisField(currHole.HoleNo, CutHoleName, currHole.EDS_path, listPoints.Count, listFeature.Count, a_FieldImagePositionID))
|
|
|
+ if (!m_MeasDB.InsertAnylysisField(currHole.HoleNo, CutHoleName, currHole.EDS_path, listPoints.Count, Features.Count, a_FieldImagePositionID))
|
|
|
{
|
|
|
log.Error("插入分析视场失败", false);
|
|
|
}
|
|
@@ -1711,17 +1706,24 @@ namespace MeasureThread
|
|
|
|
|
|
for (int i = 0; i < LinesStartPoint.Count; i++)
|
|
|
{
|
|
|
-
|
|
|
- List<Segment> segments = new List<Segment>();
|
|
|
- for (int j = 0; j <= lines_height[i]; j++)
|
|
|
+ int wholeHeight = lines_height[i];
|
|
|
+ int singleHeight = 5;//每5高度形成一个单元
|
|
|
+
|
|
|
+ for (int k = 0; k < wholeHeight; k += singleHeight)
|
|
|
{
|
|
|
- Segment segment = new Segment();
|
|
|
- segment.X = LinesStartPoint[i].X;
|
|
|
- segment.Y = LinesStartPoint[i].Y + j;
|
|
|
- segment.Length = 2;
|
|
|
- segments.Add(segment);
|
|
|
+
|
|
|
+ List<Segment> feature = new List<Segment>();
|
|
|
+ for (int j = 0; j <= singleHeight; j++)
|
|
|
+ {
|
|
|
+ Segment segment = new Segment();
|
|
|
+ segment.X = LinesStartPoint[i].X;
|
|
|
+ segment.Y = LinesStartPoint[i].Y + j+ k;
|
|
|
+ segment.Length = 2;
|
|
|
+ feature.Add(segment);
|
|
|
+ }
|
|
|
+ Features.Add(feature);
|
|
|
}
|
|
|
- listFeature.Add(segments);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -1735,22 +1737,22 @@ namespace MeasureThread
|
|
|
|
|
|
iExtender.BeginMultipleAquisition();
|
|
|
Thread.Sleep(100);
|
|
|
- for (int i = 0; i < listFeature.Count; i++)
|
|
|
+ for (int i = 0; i < Features.Count; i++)
|
|
|
{
|
|
|
- List<Segment> listSeg = listFeature[i];
|
|
|
+ List<Segment> listSeg = Features[i];
|
|
|
XrayData = new long[2000];
|
|
|
listElement = new Dictionary<string, double>();
|
|
|
|
|
|
|
|
|
- if (iExtender.XrayAreaCollectiong(15000, listSeg, out XrayData, out listElement))
|
|
|
+ if (iExtender.XrayAreaCollectiong(300, listSeg, out XrayData, out listElement))
|
|
|
{
|
|
|
string ele = "";
|
|
|
foreach (var s in listElement)
|
|
|
{
|
|
|
ele += s.ToString();
|
|
|
}
|
|
|
- log.Info("采集时间=15000" , true);
|
|
|
- log.Info("(" + listSeg[0].X + "," + listSeg[0].Y + ") height=" + lines_height[i] + " 元素:" + ele);
|
|
|
+ log.Info("采集时间=300" , true);
|
|
|
+ log.Info("(" + listSeg[0].X + "," + listSeg[0].Y + ") height=5" + " 元素:" + ele);
|
|
|
log.Info("线采集结束,写入数据库开始", true);
|
|
|
//写入数据库
|
|
|
m_nXrayId++;
|
|
@@ -1778,18 +1780,23 @@ namespace MeasureThread
|
|
|
log.Info("面返回数据" + area_pt.X.ToString() + "," + area_pt.Y.ToString() + ",height=" + height.ToString() + ",width=" + width.ToString(), true);
|
|
|
if (state == 1)
|
|
|
{
|
|
|
- //将面转换为segment数据
|
|
|
-
|
|
|
- List<Segment> segments = new List<Segment>();
|
|
|
- for (int j = 0; j <= height; j++)
|
|
|
+ //将面转换为segment数据,每5行形成一个面
|
|
|
+ int singleH = 5;
|
|
|
+ for (int k = 0; k < height; k += singleH)
|
|
|
{
|
|
|
- Segment segment = new Segment();
|
|
|
- segment.X = area_pt.X;
|
|
|
- segment.Y = area_pt.Y + j;
|
|
|
- segment.Length = width;
|
|
|
- segments.Add(segment);
|
|
|
+ List<Segment> segments = new List<Segment>();
|
|
|
+ for (int j = 0; j <= singleH; j++)
|
|
|
+ {
|
|
|
+ Segment segment = new Segment();
|
|
|
+ segment.X = area_pt.X;
|
|
|
+ segment.Y = area_pt.Y + j+k;
|
|
|
+ segment.Length = width;
|
|
|
+ segments.Add(segment);
|
|
|
+ }
|
|
|
+ Features.Add(segments);
|
|
|
+
|
|
|
}
|
|
|
- listFeature.Add(segments);
|
|
|
+
|
|
|
|
|
|
}
|
|
|
else
|
|
@@ -1800,13 +1807,13 @@ namespace MeasureThread
|
|
|
//面采集
|
|
|
iExtender.BeginMultipleAquisition();
|
|
|
Thread.Sleep(100);
|
|
|
- foreach (List<Segment> listSeg in listFeature)
|
|
|
+ foreach (List<Segment> feature in Features)
|
|
|
{
|
|
|
XrayData = new long[2000];
|
|
|
listElement = new Dictionary<string, double>();
|
|
|
|
|
|
- log.Info("AreaTime=50000", true);
|
|
|
- if (iExtender.XrayAreaCollectiong(50000, listSeg, out XrayData, out listElement))
|
|
|
+ log.Info("AreaTime=500", true);
|
|
|
+ if (iExtender.XrayAreaCollectiong(500, feature, out XrayData, out listElement))
|
|
|
{
|
|
|
string ele = "";
|
|
|
foreach (var s in listElement)
|
|
@@ -1819,7 +1826,7 @@ namespace MeasureThread
|
|
|
m_nXrayId++;
|
|
|
|
|
|
AreasNo++;
|
|
|
- m_MeasDB.InsertAAreaXay(currHole.HoleNo, m_nXrayId, AreasNo, listSeg, XrayData, listElement, a_FieldImagePositionID);
|
|
|
+ m_MeasDB.InsertAAreaXay(currHole.HoleNo, m_nXrayId, AreasNo, feature, XrayData, listElement, a_FieldImagePositionID);
|
|
|
}
|
|
|
else
|
|
|
{
|