Merge pull request 'fix(assembly): update flip-detection baseline during drag steps' (#312) from fix/assembly-drag-flip-detection into main
Some checks failed
Build and Test / build (push) Has been cancelled
Some checks failed
Build and Test / build (push) Has been cancelled
Reviewed-on: #312
This commit was merged in pull request #312.
This commit is contained in:
@@ -515,6 +515,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()) {
|
||||
|
||||
Reference in New Issue
Block a user