diff --git a/Language/zh_CN.xaml b/Language/zh_CN.xaml
index edbf06f..3d501d7 100644
--- a/Language/zh_CN.xaml
+++ b/Language/zh_CN.xaml
@@ -17,7 +17,7 @@
导入模板
更新保存
- 添加{0}行
+ 添加5行
算法配置
定级配置
@@ -29,22 +29,6 @@
美化Json
压缩Json
-
- 标准
- 形状
- 冠部
- 亭部
- 重量(ct)
- 切工等级
- 对称等级
- 平均
- 圆度
- 深度
- 偏差值
- 最小值
- 最大值
- SYM等级
- 导出
是否退出程序?
是否退出
diff --git a/Views/Configuration/CutConfigPage.xaml b/Views/Configuration/CutConfigPage.xaml
index 8c19ebd..895503c 100644
--- a/Views/Configuration/CutConfigPage.xaml
+++ b/Views/Configuration/CutConfigPage.xaml
@@ -5,31 +5,75 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:SparkClient.Views"
mc:Ignorable="d">
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -38,12 +82,12 @@
@@ -52,21 +96,23 @@
-
-
-
-
+
-
+
@@ -76,6 +122,6 @@
Binding="{Binding GUID}" />
-
+
\ No newline at end of file
diff --git a/Views/Grading/DiamondSelect.xaml b/Views/Grading/DiamondSelect.xaml
index 024758d..dc98e15 100644
--- a/Views/Grading/DiamondSelect.xaml
+++ b/Views/Grading/DiamondSelect.xaml
@@ -7,11 +7,13 @@
xmlns:hc="https://handyorg.github.io/handycontrol"
d:DesignWidth="1000"
d:DesignHeight="600"
+
mc:Ignorable="d">
-
+
+
@@ -101,4 +103,7 @@
+
+
+
diff --git a/Views/Grading/GradingResult.xaml b/Views/Grading/GradingResult.xaml
index b8d9352..359948b 100644
--- a/Views/Grading/GradingResult.xaml
+++ b/Views/Grading/GradingResult.xaml
@@ -259,6 +259,7 @@
Background="Transparent"
BorderThickness="0"
CanUserSortColumns="False"
+ CanUserResizeColumns="False"
GridLinesVisibility="None"
HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Hidden"
diff --git a/Views/UserControl/ViewportData/Helper/ViewportHelperPro.cs b/Views/UserControl/ViewportData/Helper/ViewportHelperPro.cs
index 2974f03..8541947 100644
--- a/Views/UserControl/ViewportData/Helper/ViewportHelperPro.cs
+++ b/Views/UserControl/ViewportData/Helper/ViewportHelperPro.cs
@@ -346,6 +346,7 @@ public class ViewportHelperPro
List selFaceVector = new List();
if (waistList.Count > 0)
{
+ //顶线和底线
foreach (var entity in waistList)
{
selFaceVector.Add(entity.Point1);
@@ -367,8 +368,20 @@ public class ViewportHelperPro
}
result.Add(DisplayLineModel3D( VectorClockwiseSort(ViewportManager.GirdleBottomLines), color??ViewportManager.LineColor, thickness));
result.Add(DisplayLineModel3D( VectorClockwiseSort(ViewportManager.GirdleTopLines), color??ViewportManager.LineColor, thickness));
+ //找到所有平行于Y轴的线
+ for (int i = 0; i < uniqueVectors.ToList().Count - 1; i++)
+ {
+ var nowItem = uniqueVectors.ToList()[i];
+ var nextItem = uniqueVectors.ToList()[i + 1];
+ var line = new Tuple(nowItem, nextItem);
+ if (IsLineSegmentParallelToYAxis(line))
+ {
+ result.Add(DisplayLineModel3D(new List(){nowItem,nextItem }, color??ViewportManager.LineColor, thickness));
+ }
+ }
}
+
return result;
}
@@ -1009,6 +1022,17 @@ public class ViewportHelperPro
var v = p2 - p0;
return Vector3.Cross(u, v);
}
+ private static bool IsLineSegmentParallelToYAxis(Tuple lineSegment,float epsilon = 1e-6f)
+ {
+ Vector3 nowItem = lineSegment.Item1;
+ Vector3 nextItem = lineSegment.Item2;
+
+ if (Math.Abs(nowItem.X - nextItem.X) < epsilon && Math.Abs(nowItem.Z - nextItem.Z) < epsilon)
+ {
+ return true; // 平行于 Y 轴
+ }
+ return false; // 不平行于 Y 轴
+ }
#endregion
}
\ No newline at end of file