You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
viewer: two-point align for federation — rotation and move from two point pairs, with a check line #11505
To federate a model, the Reposition tool (Placement panel → Local → Reposition models) supports a point-to-point move (source point → target point, with a ΔX/ΔY/ΔZ readout) and a typed rotation about a pivot. The rotation is the hard part. For models that are not georeferenced, nothing in the UI shows a model's orientation, so the angle has to be measured by hand and computed.
Proposal: two-point align (as in CAD ALIGN)
Pick A on the moving model and A′, the matching point, on the reference.
Pick B on the moving model and B′ on the reference, ideally far from A.
Compute the rotation about the vertical axis from the plan direction A→B to A′→B′, and the translation that puts A on A′.
Preview it and show a readout before applying:
rotation in degrees, with pivot A;
ΔX, ΔY, ΔZ;
a check line: how far B lands from B′ after the transform, so a wrong pick or a scale or unit mismatch is visible.
Apply with undo, and a Copy transformation button that copies the readout as text.
This reuses the existing pick flow, including per-role eligibility (#11419), rotation about a pivot, translation, and undo. It pairs with #11504 (CAD-style corner snapping) for reliable corner picks, but does not depend on it.
Implementation on branch feat/11505-two-point-align (a1c7f8f):
lib/model-placement/two-point-align.ts computes heading, pivot, move and the check.
two-point-align-apply.ts and an alignModels store action commit it as one undoable step, composed with each model's existing heading.
A TwoPointAlignPanel in the Local tab, with keys in en/de/fr/it/ru.
Revert-oracle evidence is in tests/evidence/two-point-align-11505/.
The math, apply and session tests pass locally (30). With the evidence mutation applied, 16 of them fail. The panel test needs built package dists and is left to CI.
Known limit: the heading absorbs a sideways miss of B′, so the check line exposes a length, scale or Z mismatch, not a mis-picked B′ at the right distance. I'll open the PR once this issue is triaged.
Activity
petruconduraru commentedon Nov 25, 2026
Implementation on branch
feat/11505-two-point-align(a1c7f8f):lib/model-placement/two-point-align.tscomputes heading, pivot, move and the check.two-point-align-apply.tsand analignModelsstore action commit it as one undoable step, composed with each model's existing heading.TwoPointAlignPanelin the Local tab, with keys in en/de/fr/it/ru.tests/evidence/two-point-align-11505/.The math, apply and session tests pass locally (30). With the evidence mutation applied, 16 of them fail. The panel test needs built package dists and is left to CI.
Known limit: the heading absorbs a sideways miss of B′, so the check line exposes a length, scale or Z mismatch, not a mis-picked B′ at the right distance. I'll open the PR once this issue is triaged.