From fc8ff51ae1f04dffd42ab77601b7a50946c80fc7 Mon Sep 17 00:00:00 2001 From: tian <11429339@qq.com> Date: Sat, 1 Aug 2026 12:48:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B9=B3=E7=A7=BB=E5=8A=9F=E8=83=BD=20F?= =?UTF-8?q?ree=20=E8=B7=AF=E5=BE=84=E7=89=A9=E4=BD=93=E4=B8=AD=E5=BF=83?= =?UTF-8?q?=E5=AF=B9=E9=BD=90=E8=B5=B7=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MoveObjectToPathStartPreservingInitialPose 无 Free 分支,Free 落入 else(Ground)逻辑加了半高偏移,导致平移后物体中心不在起点。 新增 Free 分支:路径点即物体几何中心,仅叠加上下偏移。 257 单测全过 --- src/Core/Animation/PathAnimationManager.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Core/Animation/PathAnimationManager.cs b/src/Core/Animation/PathAnimationManager.cs index 5ec70df..1b7dce7 100644 --- a/src/Core/Animation/PathAnimationManager.cs +++ b/src/Core/Animation/PathAnimationManager.cs @@ -1049,7 +1049,12 @@ namespace NavisworksTransport.Core.Animation Point3D pathStartPoint = _pathPoints[0]; Point3D startPosition = pathStartPoint; - if (_route.PathType == PathType.Hoisting) + if (_route.PathType == PathType.Free) + { + // 自由路径:路径点即物体几何中心,无需半高偏移,仅叠加上下偏移 + startPosition = ApplyGroundPathObjectLiftOffset(startPosition); + } + else if (_route.PathType == PathType.Hoisting) { startPosition = ResolveGroundTrackedCenter(startPosition, GetAnimatedObjectGroundContactHeight()); }