fix: 线条锚定

master
Tongg 5 months ago
parent 871a9e1d00
commit d908568b8b
  1. 1
      SparkClient.sln.DotSettings.user
  2. 8
      Views/UserControl/ViewportData/Helper/ViewportHelperPro.cs

@ -17,6 +17,7 @@
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AContentControl_002Ecs_002Fl_003AC_0021_003FUsers_003Ftongg_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F27bb3fae2c21cbe9a2565477feaa7a5b3a19cd779b4a91a98edfff9cd468972_003FContentControl_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ACulturePreservingExecutionContext_002Ecs_002Fl_003AC_0021_003FUsers_003Ftongg_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fbc9a074a2f204631bd77a8b9ba934b50226928_003Fd3_003Fb047e8cb_003FCulturePreservingExecutionContext_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADependencyObject_002Ecs_002Fl_003AC_0021_003FUsers_003Ftongg_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F60b63c019ead4a238340b47a1c0010d5226910_003Fca_003F09e9dbc0_003FDependencyObject_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADictionary_002Ecs_002Fl_003AC_0021_003FUsers_003Ftongg_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F387238ef9c8f8c6b1dccf4dcba4eed0e459454919b2e4b9cad11a5071789df_003FDictionary_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADispatcherOperation_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F60b63c019ead4a238340b47a1c0010d5226910_003Fd8_003F13c94a2a_003FDispatcherOperation_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADispatcherOperation_002Ecs_002Fl_003AC_0021_003FUsers_003Ftongg_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F60b63c019ead4a238340b47a1c0010d5226910_003Fd8_003F13c94a2a_003FDispatcherOperation_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADispatcher_002Ecs_002Fl_003AC_0021_003FUsers_003Ftongg_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F60b63c019ead4a238340b47a1c0010d5226910_003Ff6_003F1c45f799_003FDispatcher_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>

@ -555,12 +555,12 @@ public class ViewportHelperPro
{
case 0:
case 2:
var longestLine1 = GetLeftOrRightLineSegment(facetPoints, facetIndex >= 24 && facetIndex <= 55 ? true : false);
var longestLine1 = GetLeftOrRightLineSegment(facetPoints, facetIndex >= 25 && facetIndex <= 57 ? true : false);
result.Add(DisplayLineModel3D(new List<Tuple<Vector3, Vector3>>() { longestLine1 }, new Color4(1f, 0, 0, 1f), 2f));
break;
case 1:
case 3:
var longestLine2 = GetLeftOrRightLineSegment(facetPoints, facetIndex >= 24 && facetIndex <= 55 ? false : true);
var longestLine2 = GetLeftOrRightLineSegment(facetPoints, facetIndex >= 25 && facetIndex <= 57 ? false : true);
result.Add(DisplayLineModel3D(new List<Tuple<Vector3, Vector3>>() { longestLine2 }, new Color4(1f, 0, 0, 1f), 2f));
break;
}
@ -672,7 +672,9 @@ public class ViewportHelperPro
List<Vector3> facetPoints = new List<Vector3>();
dic.Value.ForEach(e => { facetPoints.Add(e.Point1); facetPoints.Add(e.Point2); facetPoints.Add(e.Point3); });
//高亮的线
var showLine = GetLeftParallelLineSegment(facetPoints);
// var showLine = GetLeftParallelLineSegment(facetPoints);
var facetIndex = int.Parse(dic.Key.Split("_")[1]) - 1;
var showLine =GetLeftOrRightLineSegment(facetPoints, facetIndex >= 25 && facetIndex <= 57 ? true : false);;
if (showLine == null) continue;
//文字显示位置

Loading…
Cancel
Save