Automated sequencing and subassembly detection in assembly planning