fix(assembly): classify datum plane references in Distance joints #316
Reference in New Issue
Block a user
Delete Branch "fix/distance-datum-plane-classification"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.
Fix
Add early detection of App::Plane datum objects before the main geometry classification chain in getDistanceType(). Datum planes are now correctly mapped:
49cc89e8catob961037b18b961037b18tob4835e1b05