fix(assembly): classify datum plane references in Distance joints #315

Merged
forbes merged 1 commits from fix/distance-datum-plane-classification into main 2026-02-22 18:25:34 +00:00
Owner

When a Distance joint references a datum plane (XY_Plane, XZ_Plane,
YZ_Plane), getDistanceType() failed to recognize it because datum
plane sub-names yield an empty element type. This caused the fallback
to DistanceType::Other → BaseJointKind::Planar, which adds spurious
parallel-normal residuals that overconstrain the system.

For example, three vertex-to-datum-plane Distance joints produced
10 residuals (3×Planar) with 6 mutually contradictory orientation
constraints, causing the solver to find garbage least-squares
solutions.

Add early detection of App::Plane datum objects before the main
geometry classification chain. Datum planes are now correctly mapped:

  • Vertex + DatumPlane → PointPlane → PointInPlane (1 residual)
  • Edge + DatumPlane → LinePlane → LineInPlane
  • Face/DatumPlane + DatumPlane → PlanePlane → Planar

Summary

Changes

Checklist

  • Commit messages follow conventional commits (feat:, fix:, chore:, docs:, art:)
  • Code follows project style (clang-format for C++, black for Python)
  • Changes are tested locally
  • Documentation updated (if applicable)
When a Distance joint references a datum plane (XY_Plane, XZ_Plane, YZ_Plane), getDistanceType() failed to recognize it because datum plane sub-names yield an empty element type. This caused the fallback to DistanceType::Other → BaseJointKind::Planar, which adds spurious parallel-normal residuals that overconstrain the system. For example, three vertex-to-datum-plane Distance joints produced 10 residuals (3×Planar) with 6 mutually contradictory orientation constraints, causing the solver to find garbage least-squares solutions. Add early detection of App::Plane datum objects before the main geometry classification chain. Datum planes are now correctly mapped: - Vertex + DatumPlane → PointPlane → PointInPlane (1 residual) - Edge + DatumPlane → LinePlane → LineInPlane - Face/DatumPlane + DatumPlane → PlanePlane → Planar ## Summary <!-- Brief description of what this PR does --> ## Changes <!-- List the key changes made --> ## Related Issues <!-- Link related issues: Closes #123, Fixes #456 --> ## Checklist - [ ] Commit messages follow [conventional commits](https://www.conventionalcommits.org/) (`feat:`, `fix:`, `chore:`, `docs:`, `art:`) - [ ] Code follows project style (clang-format for C++, black for Python) - [ ] Changes are tested locally - [ ] Documentation updated (if applicable)
forbes added 1 commit 2026-02-22 18:23:46 +00:00
fix(assembly): classify datum plane references in Distance joints
Some checks failed
Build and Test / build (pull_request) Has been cancelled
a6288fd36a
When a Distance joint references a datum plane (XY_Plane, XZ_Plane,
YZ_Plane), getDistanceType() failed to recognize it because datum
plane sub-names yield an empty element type. This caused the fallback
to DistanceType::Other → BaseJointKind::Planar, which adds spurious
parallel-normal residuals that overconstrain the system.

For example, three vertex-to-datum-plane Distance joints produced
10 residuals (3×Planar) with 6 mutually contradictory orientation
constraints, causing the solver to find garbage least-squares
solutions.

Add early detection of App::Plane datum objects before the main
geometry classification chain. Datum planes are now correctly mapped:
- Vertex + DatumPlane → PointPlane → PointInPlane (1 residual)
- Edge + DatumPlane → LinePlane → LineInPlane
- Face/DatumPlane + DatumPlane → PlanePlane → Planar
forbes force-pushed fix/distance-datum-plane-classification from a6288fd36a to e5b07449d7 2026-02-22 18:25:05 +00:00 Compare
forbes merged commit cf2fc82eac into main 2026-02-22 18:25:34 +00:00
forbes deleted branch fix/distance-datum-plane-classification 2026-02-22 18:25:34 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/create#315