移除碰撞检测中的自定义进度条,避免与ClashDetective进度条冲突

问题:
- 在CreateAllAnimationCollisionTests中显示自定义进度条
- 调用TestsRunTest()时ClashDetective显示自己的自动保存进度条
- 两个进度条同时出现,造成视觉混乱

修改:
- 移除Progress progress变量声明
- 移除BeginProgress()调用
- 移除finally块中的EndProgress()调用

解决方案:
- 只显示ClashDetective的原生自动保存进度条
- 保持与Navisworks API的一致性
- 避免进度条冲突,提供更简洁的用户体验

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
tian 2025-10-13 13:00:01 +08:00
parent 89722efaca
commit ca8bcc0bba

View File

@ -249,7 +249,6 @@ namespace NavisworksTransport
string pathName = "未知路径", string routeId = null, string animatedObjectName = null,
int frameRate = 30, double duration = 10.0)
{
Progress progress = null;
try
{
LogManager.Info($"=== 使用预计算碰撞数据创建ClashDetective测试容差: {detectionGap}米) ===");
@ -357,10 +356,6 @@ namespace NavisworksTransport
LogManager.Info($"[分组测试] 创建碰撞分组: {collisionGroup.DisplayName}");
// 🎯 创建进度条
progress = Application.BeginProgress("碰撞检测",
$"正在处理 {validCollisions.Count} 个碰撞点...");
int resultCount = 0;
foreach (var collision in validCollisions)
{
@ -615,21 +610,6 @@ namespace NavisworksTransport
{
LogManager.Error($"动画结束后创建测试失败: {ex.Message}");
}
finally
{
// 🎯 确保进度条被关闭
if (progress != null)
{
try
{
Application.EndProgress();
}
catch (Exception progressEx)
{
LogManager.Error($"[碰撞检测] 关闭进度条失败: {progressEx.Message}");
}
}
}
}
/// <summary>