fix(assembly): update flip-detection baseline during drag steps #312

Merged
forbes merged 1 commits from fix/assembly-drag-flip-detection into main 2026-02-21 15:59:57 +00:00

View File

@@ -509,6 +509,14 @@ void AssemblyObject::doDragStep()
if (validateNewPlacements()) {
setNewPlacements();
// Update the baseline positions after each accepted drag step so that
// the orientation-flip check in validateNewPlacements() compares against
// the last accepted state rather than the pre-drag origin. Without this,
// cumulative rotation during a long drag easily exceeds the 91-degree
// threshold and causes the solver result to be rejected ("flipped
// orientation"), making parts appear to explode.
savePlacementsForUndo();
auto joints = getJoints(false);
for (auto* joint : joints) {
if (joint->Visibility.getValue()) {