A rectangle of pinned bars folds flat. Make the corners rigid instead of adding a diagonal and it does not — which buys an unobstructed opening and costs bending in every member of it.
All ladders