Commit Graph

159 Commits

Author SHA1 Message Date
66e68c6bd1 fix: 贴合地面后正确回写 correction 和 lift,确认/动画不再偏移
贴地后 overrideQ 是绝对旋转,但 _objectRotationCorrection 语义是
相对于 baseline(pathYaw) 的增量,且 PathAnimationManager 增量链从
CAD 姿态出发:finalQ = qup(pathYaw-currentYaw) * correctionHostQ * cadQ。
之前直接转 overrideQ 导致确认/动画时重复旋转。

核心改动:
- ComposeHostCorrection 接受 cadQ,从中提取 currentYaw,
  correctionHostQ = qup(currentYaw - pathYaw) * overrideQ
- HostQuaternionToCanonical 用相似变换 R_canon = M^-1 * R_host * M
  (非列向量映射,保证 Identity 不变性)
- CanonicalQuaternionToHostEulerCorrection 加 hostType 参数重载,
  去除全局 CoordinateSystemManager 依赖
- ComputeGroundLiftForCorrection:与自动调整同方法实测底边算 lift,
  finally 用新 correction+lift 完整重建(skipCadRestore=false),
  使物体停留在贴地等价姿态
- 新增 5 个增量链闭环单测(含 CAD 歪斜场景)
2026-06-24 08:24:38 +08:00
f86e8c8bf4 fix: 贴合地面后绕垂直轴搜索最小截面 yaw,对齐路径方向
贴地旋转已固定俯仰/翻滚,只剩绕宿主 Up 的 yaw 自由度。
对 CAD 姿态天然歪斜的物体,假设 local +X 是长轴会失败,
改为搜索 [0,360) 使物体在路径方向的截面投影面积最小,
与自动调整同目标但单自由度搜索更稳定。

- 新增 AlignToGroundMinCrossSectionYawSearcher(粗搜5°+细搜1°)
- 复用 ObjectPassageProjectionOptimizer.ProjectExtent 的 AABB 投影公式
- 新增 7 个单测覆盖平地/倾斜/CAD歪斜/垂直退化/立方体
- 经多物体实测验证:Chair Lounge Couch / Chair Sitting Square 均正确对齐
2026-06-23 23:09:59 +08:00
82caa3e155 feat: 贴合地面加入路径yaw补偿,物体旋转后长边对齐路径方向 2026-06-09 11:37:03 +08:00
63b59890e4 refactor: 贴合地面改为独立操作(选面即生效),确认按钮去分支,上下偏移默认物流车高度 2026-06-09 11:25:50 +08:00
999fffcaa7 fix: 贴合地面:恢复git版本旋转逻辑 + 底边贴地高度修正 2026-06-09 10:06:12 +08:00
034acb1d65 fix: 贴合地面旋转修正 — 路径起点法向量→CAD空间算对齐,直接 OverridePermanentTransform 施压
- 读路径起点 ActiveTransform 取 psQ,复位 CAD 后取 cadQ
- 路径起点世界法向量→inv(psQ)→局部→cadQ→CAD 世界法向量
- CAD 世界法向量→-hostUp 算 overrideQ
- 直接 OverridePermanentTransform 施加,不走 ApplyRotationCorrectionInPlace
- 待加平移
2026-06-09 08:42:42 +08:00
f75dcb1f50 refactor: use PathAnimationManager.ApplyQuaternionRotationInPlace
- New method mirrors proven ApplyRotationCorrectionInPlace pattern
- ViewModel only calls existing project APIs, no raw OverridePermanentTransform
2026-06-09 03:39:56 +08:00
3634551e53 fix: use incremental transform to preserve path start position
- Don't ResetPermanentTransform (keeps path placement)
- Apply rotation around object center as incremental transform
- T(-center) * R * T(center) via Transform3D.Multiply
2026-06-09 03:37:35 +08:00
c8d48755db fix: apply face-to-ground rotation directly via quaternion, skip Euler decomposition
- Use existing OverridePermanentTransform pattern from PathAnimationManager
- Compute quaternion from face normal → ground direction
- Apply directly as Rotation3D with center-preserving translation
- Sync tracked state after application
2026-06-09 03:32:26 +08:00
10a0ad754c fix: move face-to-ground mate logic from modal dialog to ViewModel
- Modal ShowDialog blocks Navisworks ToolPlugin message loop
- Now: '贴地面' sets MateToGroundRequested flag, closes dialog
- AnimationControlViewModel handles FaceInferToolPlugin activation
- OnFaceToGroundInferred computes rotation and applies directly
2026-06-09 03:22:50 +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
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
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
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
b849bd9aed Add Navisworks automation integration tests 2026-04-13 02:33:29 +08:00
da5f8a1ae1 add ground object lift adjustment 2026-04-09 23:53:40 +08:00
24951d4205 Stabilize hoisting start-pose logging and caching 2026-04-02 01:32:31 +08:00
2e0b26e032 Refine rail assembly workflow and viewpoint strategies 2026-04-01 10:47:34 +08:00
d4c49fc227 Stabilize hoisting pose adjustment flow 2026-03-31 00:14:18 +08:00
cb56737041 Preserve terminal pose when translating rail objects to path start 2026-03-30 23:35:01 +08:00
766b5af887 Stop auto-switching to path view before animation playback 2026-03-29 18:28:41 +08:00
95500c9717 修改部分日志级别为Debug 2026-03-28 12:42:54 +08:00
a5d1db6416 Refine collision analysis dialog and rail assembly markers 2026-03-26 22:49:45 +08:00
3a5693a453 Add rail mount placement controls and persistence 2026-03-26 01:01:01 +08:00
029c7e37ad Checkpoint current pose and path state 2026-03-25 01:41:15 +08:00
138eb43a67 Unify real-object rail pose interpretation 2026-03-25 00:11:07 +08:00
6c74ea1319 Fix host-axis rotation correction for real objects 2026-03-24 21:59:53 +08:00
eaf24420b7 修正真实物体的旋转和通行空间不适配的问题 2026-03-23 22:46:38 +08:00
d52b1aef08 Checkpoint animation rotation refactor state 2026-03-23 21:00:02 +08:00
7ccce8cf5a Stabilize rail collision pose recovery and canonical tracking 2026-03-21 21:58:11 +08:00
c53db7a6fd Finalize canonical rail coordinate integration 2026-03-21 19:19:13 +08:00
a651b69459 Fix batch queue detection record snapshots 2026-03-20 15:42:16 +08:00
015a2863ea Fix collision pose restore and deployment verification 2026-03-20 14:59:41 +08:00
ae845bc571 检查并修复弹出窗口、对话框、消息框,未设置owner的情况 2026-02-23 00:25:17 +08:00
cc14e8c41d 移除过时的 animationCollisionCount 变量和相关输出 2026-02-21 11:49:45 +08:00
1047c82c66 纠正先选物体时没记录原始尺寸的问题;清除物体时将角度修正值归零。 2026-02-21 11:26:11 +08:00
65939f262c 修复没选择路径先选择物体,造成的路径可视化错误问题。修复临时路径保存到数据库的问题。 2026-02-21 10:28:13 +08:00
5c0e72ec98 修正时序问题导致 _route 为空,日志报错的问题 2026-02-20 23:16:12 +08:00
5ca793e093 修正检测配置重复,动画结束还检测的问题。自动打开重复的历史记录报告 2026-02-20 00:13:15 +08:00
76d277b6c2 从数据库中比对历史检测配置是否重复 2026-02-18 23:25:39 +08:00
7fbbcdd448 合并检测记录和碰撞记录表,重构检测过程 2026-02-18 22:34:18 +08:00
7da2ddf230 修正存储单位错误,规范单位使用 2026-02-18 16:10:36 +08:00
9751287884 纠正碰撞对不显示虚拟物体的问题 2026-02-18 15:19:58 +08:00
dc1380d7fe 增加检测记录表,完善批处理过程 2026-02-18 12:29:09 +08:00