From dc29c3526eba57b129f3d857086ae2cf0c6c31f2 Mon Sep 17 00:00:00 2001 From: tian <11429339@qq.com> Date: Mon, 9 Mar 2026 12:51:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9D=90=E6=A0=87=E7=B3=BB?= =?UTF-8?q?=E6=8E=A2=E7=B4=A2=E4=B8=BA=E6=A3=80=E6=B5=8B=EF=BC=9B=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=E5=9D=90=E6=A0=87=E7=B3=BB=E8=AE=BE=E7=BD=AE=E7=9A=84?= =?UTF-8?q?=E4=BB=8B=E7=BB=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coordinate-system-detection-results.md | 2 +- ...works-coordinate-system-api-exploration.md | 8 +++---- .../CoordinateSystemExplorerCommand.cs | 10 ++++---- .../ViewModels/SystemManagementViewModel.cs | 24 +++++++++---------- .../Views/CoordinateSystemResultDialog.xaml | 4 ++-- .../CoordinateSystemResultDialog.xaml.cs | 2 +- src/UI/WPF/Views/SystemManagementView.xaml | 12 +++------- 7 files changed, 28 insertions(+), 34 deletions(-) diff --git a/doc/working/coordinate-system-detection-results.md b/doc/working/coordinate-system-detection-results.md index d5e33b1..e7c00bb 100644 --- a/doc/working/coordinate-system-detection-results.md +++ b/doc/working/coordinate-system-detection-results.md @@ -124,7 +124,7 @@ type = "AutoDetect" ## 下一步行动 -1. ✅ **已完成**:坐标系探索按钮 +1. ✅ **已完成**:坐标系检测按钮 2. ✅ **已完成**:可靠的检测方法(WorldUpVector) 3. ⏳ **待实施**:更新 `CoordinateSystemManager` 使用新方法 4. ⏳ **待实施**:实现坐标系抽象层适配 diff --git a/doc/working/navisworks-coordinate-system-api-exploration.md b/doc/working/navisworks-coordinate-system-api-exploration.md index 9777a44..fbdd401 100644 --- a/doc/working/navisworks-coordinate-system-api-exploration.md +++ b/doc/working/navisworks-coordinate-system-api-exploration.md @@ -1,4 +1,4 @@ -# Navisworks API 坐标系探索文档 +# Navisworks API 坐标系检测文档 ## 概述 @@ -186,7 +186,7 @@ using ComApiBridge = Autodesk.Navisworks.Api.ComApi.ComApiBridge; namespace NavisworksTransport.Commands { - [Plugin("CoordinateSystemExplorer", "NavisworksTransport", DisplayName = "坐标系探索")] + [Plugin("CoordinateSystemExplorer", "NavisworksTransport", DisplayName = "坐标系检测")] [AddInPlugin(AddInLocation.AddIn)] public class CoordinateSystemExplorerCommand : AddInPlugin { @@ -195,7 +195,7 @@ namespace NavisworksTransport.Commands var doc = Application.ActiveDocument; var sb = new System.Text.StringBuilder(); - sb.AppendLine("=== 坐标系探索 ===\n"); + sb.AppendLine("=== 坐标系检测 ===\n"); // 1. 检查 Document 级别的选项 sb.AppendLine("1. Document 级别信息:"); @@ -250,7 +250,7 @@ namespace NavisworksTransport.Commands sb.AppendLine($" 检测建议: {(ySpan > zSpan * 3 ? "可能是 Y-Up" : "可能是 Z-Up")}"); // 显示结果 - MessageBox.Show(sb.ToString(), "坐标系探索结果"); + MessageBox.Show(sb.ToString(), "坐标系检测结果"); LogManager.Info(sb.ToString()); return 0; diff --git a/src/Commands/CoordinateSystemExplorerCommand.cs b/src/Commands/CoordinateSystemExplorerCommand.cs index ad14490..4fffe83 100644 --- a/src/Commands/CoordinateSystemExplorerCommand.cs +++ b/src/Commands/CoordinateSystemExplorerCommand.cs @@ -11,9 +11,9 @@ using NavisworksTransport.Utils; namespace NavisworksTransport.Commands { /// - /// 坐标系探索命令 - 用于探索 Navisworks API 中的坐标系相关信息 + /// 坐标系检测命令 - 用于探索 Navisworks API 中的坐标系相关信息 /// - [Plugin("CoordinateSystemExplorer", "NavisworksTransport", DisplayName = "坐标系探索")] + [Plugin("CoordinateSystemExplorer", "NavisworksTransport", DisplayName = "坐标系检测")] [AddInPlugin(AddInLocation.AddIn)] public class CoordinateSystemExplorerCommand : AddInPlugin { @@ -29,7 +29,7 @@ namespace NavisworksTransport.Commands } var sb = new StringBuilder(); - sb.AppendLine("=== Navisworks 坐标系探索 ===\n"); + sb.AppendLine("=== Navisworks 坐标系检测 ===\n"); // 1. Document 级别信息 sb.AppendLine("【1. Document 级别信息】"); @@ -185,13 +185,13 @@ namespace NavisworksTransport.Commands ? result.Substring(0, maxLength) + "\n\n... (内容已截断,请查看完整日志)" : result; - MessageBox.Show(displayText, "坐标系探索结果", MessageBoxButton.OK, MessageBoxImage.Information); + MessageBox.Show(displayText, "坐标系检测结果", MessageBoxButton.OK, MessageBoxImage.Information); return 0; } catch (Exception ex) { - string errorMsg = $"坐标系探索失败: {ex.Message}\n{ex.StackTrace}"; + string errorMsg = $"坐标系检测失败: {ex.Message}\n{ex.StackTrace}"; LogManager.Error(errorMsg); MessageBox.Show(errorMsg, "错误", MessageBoxButton.OK, MessageBoxImage.Error); return 1; diff --git a/src/UI/WPF/ViewModels/SystemManagementViewModel.cs b/src/UI/WPF/ViewModels/SystemManagementViewModel.cs index 7c88a51..06b6711 100644 --- a/src/UI/WPF/ViewModels/SystemManagementViewModel.cs +++ b/src/UI/WPF/ViewModels/SystemManagementViewModel.cs @@ -1392,7 +1392,7 @@ namespace NavisworksTransport.UI.WPF.ViewModels } /// - /// 执行坐标系探索命令 + /// 执行坐标系检测命令 /// private void ExecuteCoordinateSystemExplorer() { @@ -1400,8 +1400,8 @@ namespace NavisworksTransport.UI.WPF.ViewModels { try { - UpdateMainStatus("正在执行坐标系探索..."); - LogManager.Info("开始坐标系探索"); + UpdateMainStatus("正在执行坐标系检测..."); + LogManager.Info("开始坐标系检测"); var doc = Autodesk.Navisworks.Api.Application.ActiveDocument; if (doc == null || doc.IsClear) @@ -1411,12 +1411,12 @@ namespace NavisworksTransport.UI.WPF.ViewModels "错误", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Error); - UpdateMainStatus("坐标系探索失败:无活动文档"); + UpdateMainStatus("坐标系检测失败:无活动文档"); return; } var sb = new StringBuilder(); - sb.AppendLine("=== Navisworks 坐标系探索 ===\n"); + sb.AppendLine("=== Navisworks 坐标系检测 ===\n"); // 1. Document 级别信息 sb.AppendLine("【1. Document 级别信息】"); @@ -1637,7 +1637,7 @@ namespace NavisworksTransport.UI.WPF.ViewModels // 使用可复制的对话框显示结果 var resultDialog = new NavisworksTransport.UI.WPF.Views.CoordinateSystemResultDialog { - Title = "坐标系探索结果", + Title = "坐标系检测结果", ResultText = result }; @@ -1645,20 +1645,20 @@ namespace NavisworksTransport.UI.WPF.ViewModels DialogHelper.SetOwnerSafely(resultDialog); resultDialog.ShowDialog(); - UpdateMainStatus("坐标系探索完成"); - LogManager.Info("坐标系探索成功完成"); + UpdateMainStatus("坐标系检测完成"); + LogManager.Info("坐标系检测成功完成"); } catch (Exception ex) { - LogManager.Error($"坐标系探索异常: {ex.Message}", ex); + LogManager.Error($"坐标系检测异常: {ex.Message}", ex); System.Windows.MessageBox.Show( - $"坐标系探索出现异常:\n{ex.Message}", + $"坐标系检测出现异常:\n{ex.Message}", "错误", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Error); - UpdateMainStatus($"坐标系探索异常: {ex.Message}"); + UpdateMainStatus($"坐标系检测异常: {ex.Message}"); } - }, "坐标系探索"); + }, "坐标系检测"); } /// diff --git a/src/UI/WPF/Views/CoordinateSystemResultDialog.xaml b/src/UI/WPF/Views/CoordinateSystemResultDialog.xaml index 0143941..cc2c671 100644 --- a/src/UI/WPF/Views/CoordinateSystemResultDialog.xaml +++ b/src/UI/WPF/Views/CoordinateSystemResultDialog.xaml @@ -1,7 +1,7 @@  diff --git a/src/UI/WPF/Views/CoordinateSystemResultDialog.xaml.cs b/src/UI/WPF/Views/CoordinateSystemResultDialog.xaml.cs index 0eef36b..6b3a7ff 100644 --- a/src/UI/WPF/Views/CoordinateSystemResultDialog.xaml.cs +++ b/src/UI/WPF/Views/CoordinateSystemResultDialog.xaml.cs @@ -4,7 +4,7 @@ using System.Windows; namespace NavisworksTransport.UI.WPF.Views { /// - /// 坐标系探索结果对话框 - 支持文本选择和复制 + /// 坐标系检测结果对话框 - 支持文本选择和复制 /// public partial class CoordinateSystemResultDialog : Window { diff --git a/src/UI/WPF/Views/SystemManagementView.xaml b/src/UI/WPF/Views/SystemManagementView.xaml index ea8e40b..101a99d 100644 --- a/src/UI/WPF/Views/SystemManagementView.xaml +++ b/src/UI/WPF/Views/SystemManagementView.xaml @@ -161,12 +161,6 @@ NavisworksTransport 系统管理页签视图 - 采用与其他页签一致的Nav