3.1 KiB
3.1 KiB
| name | description |
|---|---|
| geometry-transform | NavisworksTransport 几何与姿态专用技能,用于坐标系变换、物体旋转平移、虚拟物体定位、通行空间几何和相关单元测试;处理 Navisworks 中的姿态问题时优先使用。 |
Geometry & Transform
Use this skill for any work involving coordinate-system transforms, object pose, rotation, translation, virtual-object placement, passage-space geometry, and the tests that lock those behaviors down.
Scope
- Keep host coordinates, internal canonical coordinates, and asset coordinates distinct.
- Prefer existing helpers over ad hoc math.
- Protect the object-start, restore, and playback chains from regressions.
- Treat geometry changes as test-first work whenever practical.
Expected Ownership
src/Utils/CoordinateSystem/HostCoordinateAdapter.cssrc/Utils/CoordinateSystem/ModelAxisConvention.cssrc/Utils/CoordinateSystem/RotatedObjectExtentHelper.cssrc/Utils/CoordinateSystem/CanonicalPlanarPoseBuilder.cssrc/Utils/CoordinateSystem/CanonicalRailPoseBuilder.cssrc/Utils/CoordinateSystem/CanonicalTrackedPositionResolver.cssrc/Utils/CoordinateSystem/RealObjectPlanarPoseSolver.cssrc/Utils/CoordinateSystem/FragmentRepresentativePoseHelper.cssrc/Utils/ModelItemTransformHelper.cssrc/Core/Animation/PathAnimationManager.cssrc/Core/VirtualObjectManager.cssrc/UI/WPF/ViewModels/AnimationControlViewModel.cs- geometry-focused tests under
UnitTests/CoordinateSystem/
Invariants
- UI, logs, and user inputs/output stay in host coordinates.
- Internal pose solving stays in canonical space.
- Asset coordinates only apply to plugin-owned assets such as the virtual object and the unit cylinder/reference rod.
- Real-object planar pose solving must stay in host coordinates and should keep the reference-pose source injectable so fragment-derived representative pose can be wired in later.
- Real-object planar pose solving should prefer fragment-derived representative pose when available; original
Transformis only an explicit fallback, not the primary source. - Do not assume
BoundingBox.Centeris a stable pose anchor after rotation unless the flow explicitly proves it. - Do not add temporary force-sync or fallback logic unless it is removed after the root cause is fixed.
- Do not mix virtual-object behavior into real-object behavior through shared mutable mode flags.
Working Rules
- Identify which coordinate system each value lives in before changing code.
- Reuse project helpers first.
- If a rotation change affects position, extents, or restore behavior, update the corresponding tests in the same change.
- For Navisworks API details and examples, also consult the
nw-apiskill anddoc/design/2026/NavisworksAPI使用方法.md.
Test Expectations
- Add or update host-type coverage for both
YUpandZUpwhen the change touches transforms. - Lock baseline pose, rotated pose, and restore behavior.
- For passage-space or footprint changes, verify extents after rotation, not just orientation.
- For virtual objects, verify scale preservation and CAD restore behavior.