fddefde1ed
docs: 更新别名树实施方案 — 新增显示原则 + 修正标识/定位/联动描述
...
- 新增第7节「别名树显示原则」:二条件OR逻辑、深度限制、别名特殊规则、按需加载生命周期
- 第4节:标识改为 CreatePathId格式,定位改为 Models.ResolvePathId
- 第10节:JSON导出格式改为 key 字段
- 第11节:双向联动改为 ModelItem.Parent链 + ExpandAndSelect
- 清理 CleanupOnDemandNodes 逻辑文档化
2026-06-01 09:10:47 +08:00
6260c175d4
fix: 别名树 IndexPath 改用 Navisworks 官方 API CreatePathId/ResolvePathId
...
- AliasNodeIdentity.FromModelItem: 用 doc.Models.CreatePathId 替代 GetModelItemIndexPaths
- 存储格式统一为 'modelIndex:PathId'(冒号分隔,PathId 为斜杠分隔)
- FindModelItemByNodeKey: 用 Models.ResolvePathId 替代手写 LocateByIndexPath
- 删除 LocateByIndexPath、LocateByDisplayPath、LoadPathChild、EnsureChildLoaded
- 与 PathAnimationManager/BatchQueueManager 使用完全一致的 PathId 格式
2026-05-31 23:26:54 +08:00
f7544a2095
fix: 别名树深度超限节点导航 — 改用 ModelItem.Parent 链替代 IndexPath
...
- 移除 IndexPath 解析/偏移量等易错逻辑
- ExpandAndSelect 改为沿 ModelItem.Parent 链回溯,ModelItem.Equals 匹配
- 深层节点通过 BuildNode 直接创建,不依赖占位/懒加载通道
- 删除 LoadPathChild、EnsureChildLoaded 等废弃方法
- 清理约 10 行净代码
2026-05-31 22:30:54 +08:00
ea49774f39
fix: no silent catch - log all exceptions
2026-05-31 18:14:09 +08:00
6a3be184a6
fix: crash from VisualTreeHelper.GetParent during rapid clicks
...
- OnTreeViewItemLeftClick: use e.OriginalSource.DataContext directly,
not visual tree traversal (FindAncestor)
- _isProgrammaticExpand prevents Expanded event from triggering bulk
LazyLoadChildren during ExpandAndSelect
- OnNavisSelectionChanged: synchronous processing with _isInternalSelection
guard prevents feedback loop
- Try-catch wrappers on all COM API call sites (FromModelItem, BuildNode)
2026-05-31 18:12:34 +08:00
cba8e3f3b7
feat: depth-limited tree display for performance
...
- MaxFullDisplayDepth=2: only show full tree up to level 2
- Beyond max depth, nodes only expand if they have an alias
- AliasNodeViewModel.Depth tracks tree depth
- Reduces loaded nodes for large models with deep unaliased branches
2026-05-31 17:28:05 +08:00
7418fe28aa
feat: JSON import/export for aliases + crash protection
...
- Export: JavaScriptSerializer, .alias.json format matching path data pattern
- Import: merge mode (overwrites existing keys, adds new)
- Try-catch wraps on SetAlias, RefreshAliases, NW selection operations
- Prevents crashes from database inconsistency or API exceptions
2026-05-31 17:10:32 +08:00
4da6669707
refactor: lazy database creation - match path planning pattern
...
- TryConnectToDatabase: createIfMissing=false (only connect, don't create)
- New BeforeSaveAlias event + EnsureDatabaseCreated: creates DB on first save
- Matches MainPlugin.TryConnectPathDatabase pattern
2026-05-31 16:56:57 +08:00
af7099d682
fix: alias persistence - trigger DatabaseInitialize on connect
...
- TryConnectToDatabase calls DatabaseInitialize(createIfMissing:true)
- Alias saving now creates .db file if it doesn't exist
- Removed delayed retry code (no longer needed)
- Added diagnostic logging for SetDataStore/RefreshAliases
2026-05-31 16:40:54 +08:00
903ed856e3
feat: display alias with [original name] suffix, fix false alias detection
...
- Two stacked TextBlocks: alias (red, bold) + [原文] (black, bold)
- [原文] suffix only visible when HasAlias=true
- CommitEdit/toolbar: treat unchanged text as no alias (set to null)
- Fixes: nodes edited without actual changes no longer show false [原文] suffix
2026-05-31 16:29:17 +08:00
d358c31a7d
feat: inline editing with click-to-edit, TextBox overlay, Focus+SelectAll
...
- Grid overlay: TextBox covers TextBlock when editing (no more dual display)
- EditValue property: auto-initialized to DisplayName on edit start
- Click on already-selected node enters inline edit (PreviewMouseLeftButtonDown)
- Right-click auto-selects node before context menu
- TextBox IsVisibleChanged: Focus + SelectAll on Loaded priority
- XAML Visibility moved to Style setter (fix DataTrigger precedence)
- Light yellow background (#FFFFFDE6)
2026-05-31 15:52:03 +08:00
ad398652a7
feat: alias persistence via PathDatabase SQLite
...
- AliasTreePlugin 监听文档生命周期,连接 PathDatabase
- AliasDataStore 写入 PathDatabase.SQLiteConnection
- 编辑别名实时持久化,重启后自动恢复
- 修复 _isInternalSelection 阻塞 _currentSelectionItem 更新导致编辑写错节点
2026-05-31 14:59:54 +08:00
9a6859cdb5
style: match Navisworks Selection Tree font/color
...
- 别名用暗红色字体 (#C62828),原名用黑色
- 选中态:浅灰蓝底色 (#3A6EA5) + 白色字体,无焦点时也保持
- 字体加粗 SemiBold,字号 12px
- 移除斜体灰色样式和方块标记
2026-05-31 14:47:01 +08:00
b42cf02710
fix: bidirectional sync working for deep nodes + scroll-into-view
...
- 关掉 VirtualizingPanel 虚拟化(树是懒加载,虚拟化收益小但导致 ContainerFromItem 失败)
- ExpandAndSelect 重写为 IndexPath 纯 ViewModel 导航,不依赖 TreeViewItem
- 新增 GetTreeViewItemForNode:从 TreeView 根沿 parent 链找 Tvi
- IndexPath -1 修正(COM 路径从 1 开始计数,.NET Children 从 0)
- BringIntoView 延迟到 Dispatcher.Background
- 清理无用代码(ExpandAndSelectRecursive)
2026-05-31 14:21:50 +08:00
c002feee51
fix: ExpandAndSelect uses ModelItem.Equals for precise sibling matching
...
- 新增 AliasNodeViewModel.ModelItem 属性(持有 Navisworks 原生引用)
- BuildNode 中存储 ModelItem
- ExpandAndSelect 重写为 DFS 递归,用 ModelItem.Equals 精确匹配
(同 ModelItemAnalysisHelper.ModelItemEquals 逻辑,底层原生对象比较)
- 不再依赖 IndexPath 或 _nodeMap 做选中同步
2026-05-31 13:17:52 +08:00
4feb12f6b9
refactor: AliasNodeIdentity dual-field + reuse ModelItemAnalysisHelper
...
- 新增 IndexPath(COM 树索引路径),复用 ModelItemAnalysisHelper.GetModelItemIndexPaths
- 保留 DisplayPath(父链 DisplayName 拼接)作为降级匹配
- 序列化格式:"IndexPath||DisplayPath",向后兼容纯 DisplayPath
- FindModelItemByNodeKey: IndexPath 优先定位,DisplayPath 降级
- BuildNode: 新增旧格式兼容查找
- 单元测试全面更新覆盖新/旧格式、双字段解析、前缀匹配
2026-05-31 12:52:26 +08:00
56d18c696c
phase 2b: add AliasTreePlugin DockPanePlugin entry + wiring
...
- AliasTreePlugin.cs: DockPanePlugin with ElementHost wrapper
- XAML: wire Expanded/Selected event handlers via TreeViewItem
- Both projects compile, plugin deployed to Navisworks
2026-05-31 12:49:50 +08:00
f3392ddbf6
phase 2: VM + TreeView skeleton for alias tree
...
- AliasNodeViewModel: INotifyPropertyChanged, alias/display/editing state
- AliasTreeIcons.xaml: vector icon geometry + toolbar/button styles
- AliasTreeControl.xaml: TreeView with icon toolbar, status bar, context menu
- AliasTreeControl.xaml.cs: tree building, lazy loading, bidir selection sync,
inline editing, alias highlight (via ModelHighlightHelper)
- Both projects compile successfully
2026-05-31 12:49:14 +08:00
3f985aa235
phase 1: data layer for alias tree
...
- AliasNodeIdentity: stable composite node identifier (path + sibling index)
- AliasDataStore: CRUD operations on SQLite AliasMap table
- PathDatabase: add AliasMap table creation + index
- Unit tests: 30 tests for identity parsing/equality, store CRUD/batch/import
- Both projects compile successfully
2026-05-31 12:46:33 +08:00
378bb6264c
add edit tool usage notes to AGENTS.md
2026-05-30 19:17:30 +08:00
56a1ef55f4
0.15.3: misc fixes - rail helper cleanup, screenshot + button, database version
2026-05-30 19:15:34 +08:00
7189e17e3d
fix indentation for AabbSx/Sy/Sz properties
2026-05-30 02:54:42 +08:00
1743704d78
update CHANGELOG for 0.15.3 fixes
2026-05-30 02:52:16 +08:00
1ca2a8e1bc
0.15.3: auto-adjust uses optimizer AABB directly for passage space visualization
...
- Optimizer now returns AABB extents (sx, sy, sz) from measured object
- UpdatePassageSpaceVisualization uses optimizer AABB directly:
Forward=sx, Width=sz, Height=sy - no cuboid projection needed
- Fixed negative passageNormalToPath when lift offset is negative
- Removed host-axis cuboid projection from TryCalculateCurrentRealObjectPlanarProjectedExtents
2026-05-30 02:48:39 +08:00
b25a3a04a1
0.15.3: fix auto-adjust rotation order mismatch in CreateCanonicalRotationCorrection / CreateHostRotationCorrection
...
- Rotation multiplication order was qz*qy*qx (Z*Y*X) which didn't match
MoveItemCombinedAxisRotationAndTranslation's up*nonUp*X order for YUp hosts.
Switched to qup * qnonUp * qx using canonical space axes, works for both YUp and ZUp without HostType branching.
- ComputedLiftOffsetMeters -> ComputedLiftOffsetModelUnits, removed intermediate meter conversions.
- EditRotationWindow auto-adjust button now shows wait cursor.
2026-05-30 00:22:42 +08:00
af141aa37c
自动调整:去掉米单位混用,内部统一模型单位;ComputedLiftOffsetMeters -> ComputedLiftOffsetModelUnits;EditRotationWindow 添加等待光标
2026-05-30 00:01:20 +08:00
90367db214
自动调整Info日志改为Debug
2026-05-29 01:49:39 +08:00
c67dee4f11
约束保留门型偏好,评估改用固定宿主X轴前向,结果加回路径yaw
2026-05-29 01:44:23 +08:00
649c7b50f1
0.15.2 WIP: 自动调整 — 门型偏好、物流车高、上下偏移自动计算、性能优化、日志清理
2026-05-28 23:58:27 +08:00
e224e332a3
更新版本号至 0.15.2,更新 CHANGELOG 和 todo_features
...
- VERSION.md: 0.15.0 → 0.15.2
- CHANGELOG.md: 新增 [0.15.2] 条目(自动最优朝向、Y 轴旋转按钮、上下偏移、
性能优化、布局优化)
- todo_features.md: 新增 [2026/5/27] 条目,4 项已完成
2026-05-27 15:42:28 +08:00
61b063d8c6
Y轴输入框添加旋转90°图标按钮; 窗口布局优化
...
- Y 轴输入框后增加 ↻ 按钮(IconButtonStyle + RotateIconGeometry),
点击使当前 Y 值增加 90°
- 角度超过 360° 自动归一化(NormalizeDisplayDegrees)
- 布局改为 3 列统一宽度,Y 轴第 3 列与 X/Z 一致
- 快捷角度按钮和底部操作按钮均居中分布
- 窗口宽度 440→470 适配按钮空间
2026-05-27 15:24:12 +08:00
16a81964f1
优化自动调整: 合并三次旋转为单次 OverridePermanentTransform,NW 调用减少 80%
...
旧代码在 TryApplyPlanarRealObjectStartIncrementalTransform 中通过三次
MoveItemIncrementallyByAxisRotationAndTranslation 依次施加 X、非-up、up 轴
旋转,每轴内部 3 步 (toOrigin→rotate→toTarget),合计 9 次 Override 调用。
新方法 MoveItemCombinedAxisRotationAndTranslation 将三个轴旋转用
四元数 (qYaw × qNonUp × qX) 合成一次,配合组合平移做单次 Reset+Override,
每轮 Evaluator 调用从 ~10 次 NW API 降至 ~3 次,自动调整整体从 5s 降至 <2s。
语义完全保留:三次旋转的轴/角度/顺序与原来一致(X→Z/Y→Yaw,
通过 q3×q2×q1 左乘合成),路径 yaw 加减抵消链路不变。实测结果与老版本一致。
2026-05-27 15:06:33 +08:00
bbb58c9634
调整物体窗口: 提升高度→上下偏移, 允许负值, 窗口加宽, 清理提示文字
...
- 字段名: 提升高度 → 上下偏移 (UI标签/日志/注释/状态栏)
- 移除负值校验,允许向下偏移 (EditRotationWindow.xaml.cs)
- 修复两处 <=0 拦截 (ApplyGroundPathObjectLiftOffset, ResolveGroundPathObjectLiftOffsetVector)
- 窗口宽度 400→440, 调低标题栏/去除副标题/去除提示文字行
2026-05-27 14:38:27 +08:00
3e43b20102
自动调整: 回调内扣除路径 yaw,使 correction 成为绝对角度
...
优化器通过 OptimizeWithEvaluator 传回调函数,回调接收 correction 后
经真实动画链路评估。动画链路 targetYaw = pathYaw + correctionY,
导致 correction.Y 被错误地当成额外增量而非绝对角度。
修复: 回调内从 correction 的 up 轴角度扣除路径 yaw,
使 targetYaw = pathYaw + (correctionY - pathYaw) = correctionY。
优化器现在正确地将 correction 作为从 CAD 出发的总 yaw 角度搜索。
2026-05-27 13:10:15 +08:00
7187bcf622
自动最优朝向: 黑盒实测模式
...
- 新增 ObjectPassageProjectionOptimizer(SO(3)粗搜索+Nelder-Mead)
- EditRotationWindow 加入"自动调整"按钮
- AnimationControlViewModel 实现黑盒实测评估(临时摆位→读BoundingBox→恢复)
- 设计文档和实现计划
2026-05-27 12:24:01 +08:00
19a38e5446
0.15.1: 修复角度输入崩溃、Y轴修正动画丢失、数据库连接缺失三个bug
...
- 修复编辑角度窗口空输入反复确认崩溃 (UpdateSourceTrigger LostFocus→Explicit)
- 修复Y轴角度修正在动画播放时双重叠加导致丢失 (删除 ApplyPlanarTrackedPose 中重复的 ResolvePlanarHostUpCorrectionRadians)
- 修复先开文档后加载插件时路径数据库未连接 (InitializePathPlanningManager 中加入数据库连接)
- 重构: TryConnectPathDatabase 辅助方法; TryUpdateNumberTextBox 拆分验证逻辑
- 更新 AGENTS.md 精简版; 更新 CHANGELOG.md 0.15.1; 更新 todo_features.md 5/18 条目
2026-05-26 21:02:48 +08:00
be06878346
剖面盒导出添加 debug 日志:遍历耗时/对象数/隐藏数/导出耗时/文件大小
...
- ValidateAndTraverse: Models数量、遍历耗时、盒内对象数、隐藏节点数
- ExportTraversalToNwd: 导出开始参数、导出耗时、文件大小
2026-05-18 19:45:10 +08:00
595f5225b5
拆分导出为两步:遍历(后台线程)+导出(UI线程)
...
- SectionBoxExporter 新增 ValidateAndTraverse / ExportTraversalToNwd
- ViewModel 拆为两个 await 间有喘息,避免第二次导出时 UI 线程拥塞
2026-05-18 19:37:58 +08:00
b34d17f2d1
恢复 Task.Run 包装 ExportSectionBoxFromActiveView,修复大模型导出性能回归
...
- 树遍历(GetObjectsAndHiddenItems)在后台线程执行,恢复 4月15日版本的性能
- 导出阶段 NwdExportHelper 内部 Dispatcher.Invoke 回 UI 线程
2026-05-18 19:26:52 +08:00
36a5944548
删除JSON导出功能;去掉ExportSelectedItemsAsync中残留的Task.Run
...
- SectionBoxExporter: 删除 ExportToJson/BuildExportData/GetFullPathName
- LayerManagementViewModel: 保存对话框去掉JSON格式选项,去掉JSON/NWD分支的Task.Run
2026-05-16 15:36:23 +08:00
1e8916b828
补充剖面盒恢复修复报告
2026-05-16 15:22:17 +08:00
e5f710407c
导出后自动恢复剖面盒(Navisworks ExportToNwd 内部关闭剖分)
...
- SectionClipHelper 新增 RestoreClipBox 公开方法
- VisibilityHelper.ExecuteWithPrecomputedHiddenItems 导出前保存剖面盒状态,导出后恢复
2026-05-16 15:21:37 +08:00
47af2443cd
数据库schema兼容+剖面盒导出修复+代码重构
...
- 数据库:SafeCreateIndex/EnsureColumnExists 防御旧schema;去掉无用PRAGMA user_version;去掉重复throw;清理注释编号
- 剖面盒导出:修复NWF多Model无统一根节点时空白子树泄露(RootItem级隐藏)
- 崩溃修复:去掉LayerManagementViewModel中两处Task.Run,消除COM跨线程STA违规
- 重构:SectionBoxExporter新增ExportSectionBoxFromActiveView统一业务入口;LayerManagementViewModel删ExportSectionBoxToNwdAsync;删死代码ExportToJson(Document)/ShowSaveFileDialog
- deploy-plugin.bat: powershell→pwsh;AGENTS.md补充编译部署调用说明
2026-05-16 14:59:56 +08:00
928edb8328
Merge codex/rail-mount-modes into stable
2026-05-13 09:45:31 +08:00
413c0ea869
Add project-tools skill frontmatter metadata
2026-05-13 09:44:49 +08:00
0a318f4dca
Update completed todo items
2026-04-26 19:13:40 +08:00
454f1e6584
Fix auto path grid restore and validation
2026-04-26 19:11:03 +08:00
28d0708858
Lock selection clip box after activation
2026-04-15 16:02:12 +08:00
1a9d0972f0
Fix auto path obstacle geometry collection
2026-04-14 09:22:01 +08:00
fdb857af17
Refactor auto path planning coordinate semantics
2026-04-13 10:31:14 +08:00