修改坐标系探索为检测;去掉坐标系设置的介绍
This commit is contained in:
parent
0fbff5f114
commit
dc29c3526e
@ -124,7 +124,7 @@ type = "AutoDetect"
|
||||
|
||||
## 下一步行动
|
||||
|
||||
1. ✅ **已完成**:坐标系探索按钮
|
||||
1. ✅ **已完成**:坐标系检测按钮
|
||||
2. ✅ **已完成**:可靠的检测方法(WorldUpVector)
|
||||
3. ⏳ **待实施**:更新 `CoordinateSystemManager` 使用新方法
|
||||
4. ⏳ **待实施**:实现坐标系抽象层适配
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -11,9 +11,9 @@ using NavisworksTransport.Utils;
|
||||
namespace NavisworksTransport.Commands
|
||||
{
|
||||
/// <summary>
|
||||
/// 坐标系探索命令 - 用于探索 Navisworks API 中的坐标系相关信息
|
||||
/// 坐标系检测命令 - 用于探索 Navisworks API 中的坐标系相关信息
|
||||
/// </summary>
|
||||
[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;
|
||||
|
||||
@ -1392,7 +1392,7 @@ namespace NavisworksTransport.UI.WPF.ViewModels
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 执行坐标系探索命令
|
||||
/// 执行坐标系检测命令
|
||||
/// </summary>
|
||||
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}");
|
||||
}
|
||||
}, "坐标系探索");
|
||||
}, "坐标系检测");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<Window x:Class="NavisworksTransport.UI.WPF.Views.CoordinateSystemResultDialog"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Title="坐标系探索结果"
|
||||
Title="坐标系检测结果"
|
||||
Height="600" Width="700"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
ResizeMode="CanResize"
|
||||
@ -16,7 +16,7 @@
|
||||
|
||||
<!-- 标题 -->
|
||||
<TextBlock Grid.Row="0"
|
||||
Text="坐标系探索结果 - 可复制以下内容"
|
||||
Text="坐标系检测结果 - 可复制以下内容"
|
||||
FontWeight="Bold"
|
||||
FontSize="14"
|
||||
Margin="0,0,0,10"/>
|
||||
|
||||
@ -4,7 +4,7 @@ using System.Windows;
|
||||
namespace NavisworksTransport.UI.WPF.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// 坐标系探索结果对话框 - 支持文本选择和复制
|
||||
/// 坐标系检测结果对话框 - 支持文本选择和复制
|
||||
/// </summary>
|
||||
public partial class CoordinateSystemResultDialog : Window
|
||||
{
|
||||
|
||||
@ -161,12 +161,6 @@ NavisworksTransport 系统管理页签视图 - 采用与其他页签一致的Nav
|
||||
<StackPanel>
|
||||
<Label Content="坐标系设置" Style="{StaticResource SectionHeaderStyle}"/>
|
||||
|
||||
<TextBlock Text="配置模型坐标系(用于适配Y-up坐标系模型)"
|
||||
FontSize="10"
|
||||
Foreground="{StaticResource NavisworksDarkBrush}"
|
||||
Margin="0,5,0,10"
|
||||
TextWrapping="Wrap"/>
|
||||
|
||||
<!-- 坐标系选择 -->
|
||||
<Grid Margin="0,5,0,10">
|
||||
<Grid.ColumnDefinitions>
|
||||
@ -272,11 +266,11 @@ NavisworksTransport 系统管理页签视图 - 采用与其他页签一致的Nav
|
||||
Style="{StaticResource ActionButtonStyle}"
|
||||
ToolTip="读取选中对象的Transform信息(包括旋转角度)"/>
|
||||
|
||||
<!-- 坐标系探索按钮 -->
|
||||
<Button Content="坐标系探索"
|
||||
<!-- 坐标系检测按钮 -->
|
||||
<Button Content="坐标系检测"
|
||||
Command="{Binding CoordinateSystemExplorerCommand}"
|
||||
Style="{StaticResource ActionButtonStyle}"
|
||||
ToolTip="探索当前文档的坐标系信息(用于适配Y-up坐标系模型)"/>
|
||||
ToolTip="检测当前文档的坐标系信息(用于适配Y-up坐标系模型)"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user