Commit Graph

650 Commits

Author SHA1 Message Date
cd05553dd9 fix: remove all generic/instructional text from error dialogs
- Keep only the actual error reason, no '请先...' guidance
- Each condition shows its specific cause, exceptions pass through raw
2026-06-09 02:48:33 +08:00
5be6dfdaf3 fix: split ambiguous failure message in OnInstallationFaceInferred
- Separate 'no terminal object' from 'invalid pick' case
- Remove misleading '请先取端面' from surface pick failure
2026-06-09 02:42:51 +08:00
6a1318602e fix: pass through exception message directly instead of generic wrapper
- BuildFromFaceNormal already provides specific error like '面法向与光轴平行'
- Catch now shows raw ex.Message instead of prefixing with generic text
2026-06-09 02:40:35 +08:00
9e1056b92c feat: add DialogHelper.ShowStatusAndDialog for unified status+dialog feedback
- Replaces scattered UpdateMainStatus + ShowAutoClosingMessageBox calls
- Accepts Action<string> callback for ViewModel status bar update
- Applied to all end face and installation face failure handlers
2026-06-09 02:36:21 +08:00
6b78b851db refactor: rename to remove 'Quick' prefix after old method removal
- QuickAnalyzeAssemblyEndFaceCommand → AnalyzeAssemblyEndFaceCommand
- CanQuickAnalyzeAssemblyEndFace → CanAnalyzeAssemblyEndFace
- BeginAssemblyEndFaceQuickPick → BeginAssemblyEndFacePick
- OnQuickEndFaceInferred → OnEndFaceInferred
2026-06-09 02:06:44 +08:00
0fe7179494 refactor: replace 3-click end face detection with single-click FaceInferTool
- Remove '找端面' button and all 3-click logic
- Keep single-click '取端面' button only
- Remove: AnalyzeCurrentAssemblyEndFace, BeginAssemblyEndFaceSelection,
  OnAssemblyEndFaceMouseClicked, ExecuteAnalyzeAssemblyTerminalFaceAsync
- Retain CleanupAssemblyEndFaceSelection (shared with quick pick)
2026-06-09 02:04:54 +08:00
01195434b7 fix: use ancestor chain check for pick item matching terminal object
- PickItemFromPoint returns leaf geometry, not the parent container
- Check if pickItem is terminalObject or its descendant via AncestorsAndSelf
2026-06-09 01:58:09 +08:00
e485629360 tweak: rename quick end-face button to '取端面' 2026-06-09 01:53:53 +08:00
16bf5cc10e feat: integrate FaceInferToolPlugin with Rail assembly end face detection
- Add '快速取端面' button in Rail assembly workflow
- Single click → FaceInferToolPlugin → AssemblyEndFaceAnalyzer.Analyze(hitPoint, normal)
- Replaces 3-click manual seed point workflow
2026-06-09 01:53:36 +08:00
e7b5206198 feat: add single-point+normal overload to AssemblyEndFaceAnalyzer
- New Analyze(triangles, hitPoint, normal) bypasses 3-point seed plane construction
- New Analyze(modelItem, hitPoint, normal) for Navisworks types
- Same triangle extraction and centroid computation as 3-point version
- Enables single-click end face detection via FaceInferToolPlugin
2026-06-09 01:51:05 +08:00
1e45546aed chore: 更新 CHANGELOG 和 VERSION 至 0.15.7 2026-06-08 04:20:59 +08:00
b533153234 chore: 删除废弃的 PatternSearchDeltas 和 NormalizeDegrees 2026-06-08 03:36:16 +08:00
b17df9aa31 fix: 四元数均匀采样替代欧拉角网格,模式搜索改为四元数邻域
- 网格搜索: S³ 均匀随机四元数 → canonical→host Euler,512→256 采样点
- 模式搜索: 7轴×2方向四元数乘法搜索,替代欧拉角 delta
- 去掉 CandidateAngles/Euler 网格+PatternSearchDeltas/NormalizeDegrees
- canonical 空间桥接保证 YUp/ZUp 兼容
2026-06-08 03:35:33 +08:00
51453df037 chore: 更新 CHANGELOG 和 VERSION 至 0.15.6
- 记录自动调整评测与姿态对准修正、skipCadRestore 重构
- 记录别名树 DisplayPath 重名修复
- 版本号 0.15.4 → 0.15.6
2026-06-06 13:12:18 +08:00
f5387c8699 fix: 自动调整评测与姿态对准修正
1. GetYawFromRotation: 通过 canonical space 转换计算 yaw,修复 YUp 下 atan2(Y,X) 用错平面
2. ApplyRotationCorrectionInPlace: 新增 CAD 原位纯旋转,评测旋转顺序与增量链一致
3. 评测器两轮优化: 先无约束找最小面积,不满足约束再带约束重搜
4. ApplyAutoAdjustedPoseAndMoveToPathStart: 确认时先校正再偏航,不读 CAD yaw
5. OnAutoAdjustClick: 去掉 Y 轴 yaw 叠加
2026-06-06 12:47:12 +08:00
f38fba6506 fix: DisplayPath 所有层级加#N去重 + 移除旧格式兼容
- BuildNode 不再剥离父路径#N后缀
- FromModelItem 对每层祖先计算 siblingIndex 追加#N,与树加载一致
- 解决复制子树中节点别名泄露给其他子树的问题
- FromKey 移除纯 DisplayPath 旧格式兼容
2026-06-06 10:05:35 +08:00
7dec26b1ac fix: replace RowStyle IsSelected binding with SelectionChanged event
- RowStyle TwoWay binding on IsSelected is unreliable with virtualizing DataGrid
- Switched to DataGrid.SelectionChanged event handler in code-behind
- Syncs RemovedItems/AddedItems to ViewModel.IsSelected reliably
2026-06-04 21:42:07 +08:00
6b8bae2afc fix: clear all IsSelected flags after export to prevent stale selections
- Added finally block to reset IsSelected on all PathRoutes
- Prevents multi-select state from leaking into subsequent single exports
2026-06-04 21:36:52 +08:00
897280bb3f fix: show concatenated path names as dialog filename for multi-select export
- Single: path name as default filename (unchanged)
- Multi: semicolon-separated names as hint, each file still saved individually
2026-06-03 21:16:52 +08:00
1beaa7b24d Revert "fix: use folder dialog for multi-select export, file dialog for single"
This reverts commit 6d14d1d26f.
2026-06-03 21:16:28 +08:00
6d14d1d26f fix: use folder dialog for multi-select export, file dialog for single
- Single selection: SaveFileDialog with path name as default filename
- Multi selection: FolderBrowserDialog to pick output directory
- Export format: XML for multi (simpler UX), selectable for single
2026-06-03 21:11:41 +08:00
ac2de23e32 feat: support multi-select and batch export in path list
- DataGrid: SelectionMode Extended with RowStyle IsSelected binding
- PathRouteViewModel: add IsSelected property
- Export: iterates selected paths, saves each to separate file
- Ctrl/Shift+click to multi-select, then Export button batches them
2026-06-03 21:06:32 +08:00
c0714a5180 fix: regenerate path point IDs and rebuild edges on import rename
- Also regenerate all PathPoint.Id to avoid UNIQUE constraint on PathPoints.Id
- Call RecalculateRoute() to rebuild edges with new point references
- Edge constructor auto-generates new Id, so edges are fresh too
2026-06-03 20:58:49 +08:00
c6afef13de fix: generate new GUID when renaming imported path to avoid DB conflict
- Imported routes with same Id would overwrite each other in DB
- Now assign route.Id = Guid.NewGuid() on rename, ensuring unique DB entry
2026-06-03 20:54:08 +08:00
0cff495331 fix: prevent duplicate database save during XML import deserialization
- ParseRouteElement used route.AddPoint() which called RecalculateAndSaveRoute
- This saved the path to DB with original name before ImportPathCommand could rename it
- Changed to route.Points.Add() + route.RecalculateRoute() to skip DB save
- Only ImportPathCommand → AddRoute → SavePathToDatabase now persists renamed path
2026-06-03 20:44:52 +08:00
c2a37fe007 fix: only count rename when name actually changed during import
- Capture original name before GenerateUniqueName
- Skip RenamedCount increment if names are identical
- Fix misleading log showing same name twice
2026-06-03 20:34:49 +08:00
0967f7a9bc feat: show renamed count in import result dialog
- Add RenamedCount to ImportPathResult
- Track per-file and aggregate across multi-file imports
- Dialog now shows '重名自动重命名: N 个路径' when applicable
2026-06-03 20:29:28 +08:00
27ab485558 fix: use DialogHelper.ShowAutoClosingMessageBox for import result dialog
- 5s auto-close, test automation mode skips dialog
- Consistent with existing project patterns
2026-06-03 20:25:15 +08:00
ab0b5760d8 feat: show import result dialog after multi-file import 2026-06-03 20:22:58 +08:00
5692fde956 feat: rename export button, support multi-file import
- Rename '导出选中路径' to '导出', move before '导出全部'
- Import dialog: enable MultiSelect, loop through all selected files
- Aggregate import results across files
2026-06-03 20:17:19 +08:00
b3a8364e7e tweak: remove redundant '路径' from path creation button labels 2026-06-03 20:11:09 +08:00
a8a786d807 refactor: rename and reorder path creation buttons
- Rename '手动创建' to '地面路径'
- Rename '传统空轨路径' to '空轨路径'
- Move 空轨路径 after 吊装路径 (Ground → Hoisting → Rail order)
2026-06-03 20:07:33 +08:00
469f529fa0 tweak: increase path list DataGrid height from 200 to 340 (7→12 rows) 2026-06-03 20:02:51 +08:00
750559a560 refactor: collapsible test section with Grid layout in SystemManagement
- Wrap test buttons in Expander (default collapsed)
- Replace horizontal StackPanel with 3-column Grid layout
- Simplify button labels by removing redundant 'test' wording
2026-06-03 20:00:00 +08:00
6bc77672e9 fix: prevent crash when invalid characters typed in coordinate editor
EditableNumberConverter.ConvertBack was throwing FormatException
when users typed '=' or other non-numeric characters, causing
WPF binding validation to crash the application on focus change.
Changed to return Binding.DoNothing to silently reject invalid input.
2026-06-03 19:49:44 +08:00
0ed24b21a2 refactor: change virtual object RadioButton to CheckBox in AnimationControlView 2026-06-03 19:45:07 +08:00
c7a1eeebb8 feat: add FaceInferToolPlugin - single-click face normal inference tool
- New FaceInferToolPlugin: pixel-neighborhood method with {2,5,10}px offsets
- New FaceInferResult data class
- Test button in SystemManagement page
- Cursor: MarkupAutoPoly (arrow + dashed box)
- Uses project-standard tools: FindNamedParentContainer, viewpoint.Position
- Design doc at doc/design/2026/face-infer-tool-design.md
2026-06-02 23:11:11 +08:00
922864ce4f style: 别名树字体 SemiBold → Bold 2026-06-02 13:02:16 +08:00
337ccbb43b fix: OnTreeViewSelected NRE + 日志清理
- _isInternalSelection 为 true 时 OnTreeViewSelected 直接 return,阻断 NW→树→NW 循环
- 调试日志降为 Debug 级别
- doc.CurrentSelection 加空检查
2026-06-02 12:58:38 +08:00
8a8153dba0 fix: use ShouldUseReferenceBasedRealObjectPlanarPose to guard reference rotation capture
Ground and Hoisting paths don't consume fragment reference rotation, only Rail does.
Replace manual PathType checks with the existing semantic utility method.

Also fix GetPathRouteSync SELECT missing IsTwoPointVertical column.
2026-06-02 12:41:31 +08:00
2ff4cb1678 fix: 2-point vertical path point modification no longer constrained by hoisting height limits
- Skip height constraints, orthogonalization, and intermediate point insertion
- Auto-recalculate LiftHeight from elevation difference between the two points
2026-06-01 23:55:04 +08:00
a8c5681dfb feat: separate 2-point vertical hoisting path from regular hoisting
- Add IsTwoPointVertical flag on PathRoute to distinguish pure vertical paths
- 2-point paths skip hoisting-specific logic: ResolveHoistingTrackedCenter,
  TryCreatePlanarPathRotationForFrame, ground-contact segment classification
- Endpoint semantics: center reaches endpoint (not top-face constrained)
- Frame interpolation applies same ResolveGroundTrackedCenter as move-to-start
- Add database migration for IsTwoPointVertical column
- Update CHANGELOG for v0.15.4
2026-06-01 23:31:00 +08:00
64a27f4c29 feat: add 2-point vertical hoisting path support
- Add '2点路径' button in AerialHeightDialog for pure vertical lift
- Handle IsTwoPointMode on first click to create 2-point path directly
- Fix PathTargetFrameResolver to accept 2-point Hoisting paths
- Fix animation yaw for 2-point vertical paths (use _currentYaw)
- Fix TryApplyPlanarRealObjectStartIncrementalTransform to translate even
  when no rotation change (was skipping translation for pure vertical)
- Guard _pathPoints[2] access in animation code for <3 points
2026-06-01 22:56:50 +08:00
a375e977d4 style: 别名树面板统一白色背景 + TreeView MinWidth=300 2026-06-01 11:04:18 +08:00
f8319438e9 fix: 无 DisplayName 的几何体节点显示为「几何对象」而非空字符 2026-06-01 10:39:57 +08:00
a5f9e4da24 feat: MaxFullDisplayDepth 改为从配置文件读取,支持实时生效
- SystemConfig 新增 AliasTreeConfig,含 MaxFullDisplayDepth 属性(默认 2)
- ConfigManager 添加 [alias_tree] 段的 TOML 解析和写入
- default_config.toml 添加 [alias_tree] 配置项
- AliasTreeControl 构造时读取配置 + 订阅 CategoryConfigurationChanged 实时重建
2026-06-01 10:30:21 +08:00
d670ae5c3c perf: BuildNode 延迟 CreatePathId + DisplayPath 同名去重修复
- BuildNode 不再调 FromModelItem/CreatePathId,改用父节点 DisplayPath 拼接
- CreatePathId 只在保存别名时通过 EnsureFullNodeKey 触发
- LazyLoadChildren 用 nameCount 字典计算 siblingIndex,BuildNode 追加 #N 去重
- 子节点 DisplayPath 拼接时剥离父路径中的 ||前缀和#N后缀,与 FromModelItem 一致
- LazyLoadChildren 直接用 parentNode.ModelItem,不再调 FindModelItemByNodeKey
- 别名匹配去掉 fallback,精确到#N
- _dataStore.LoadAll() 提升到循环外
2026-06-01 10:21:02 +08:00
61318b450d chore: DockPane 标题「别名导航树」→「别名树」 2026-06-01 09:12:28 +08:00
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