Computer-aided synthesis of two-closed-loop RSSR-SS spatial motion generator with branching and sequence constraints