Face-to-face linking alignment needs tuning #2

Open
opened 2026-03-09 05:29:48 +00:00 by valis · 1 comment
Owner

Linking (L key) merges two voxels but the face alignment (rotation + translation) is not always precise. The world-space merge approach works but the initial snap needs refinement — faces should dock flush.

Linking (L key) merges two voxels but the face alignment (rotation + translation) is not always precise. The world-space merge approach works but the initial snap needs refinement — faces should dock flush.
Author
Owner

Session 23: Linking alignment significantly improved.

  1. In-plane rotation solved. After normal alignment (setFromUnitVectors), solve remaining 1-DOF via 2D cross-covariance: θ = atan2(h10 - h01, h00 + h11). Tries all cyclic offsets with winding reversal to find best vertex correspondence.

  2. Arc-length resampling replaces edge splitting for vertex count matching. Both face boundaries resampled at equal intervals.

  3. Explicit vertex pairing replaces threshold welding. Cyclic offset search with winding reversal finds optimal correspondence, then welds paired vertices.

Needs testing to confirm flush docking. May need further tuning.

Commit: e9f35bd

Session 23: **Linking alignment significantly improved.** 1. **In-plane rotation solved.** After normal alignment (setFromUnitVectors), solve remaining 1-DOF via 2D cross-covariance: `θ = atan2(h10 - h01, h00 + h11)`. Tries all cyclic offsets with winding reversal to find best vertex correspondence. 2. **Arc-length resampling** replaces edge splitting for vertex count matching. Both face boundaries resampled at equal intervals. 3. **Explicit vertex pairing** replaces threshold welding. Cyclic offset search with winding reversal finds optimal correspondence, then welds paired vertices. Needs testing to confirm flush docking. May need further tuning. Commit: e9f35bd
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
valis/soma#2
No description provided.