A new approach to motion planning to achieve contact state transitions in robotic assembly of polyhedral parts is presented. The contact state of a pair of spatial polyhedra is represented by qualitative contact models, which include Feature Interaction Matrices (FIM's) representation is adopted. Given the desired contact transition (i.e., the current contact state and the next desired contact state) and the current moving object configuration, we want to generate the compliant motion parameters for the robot system to guide the work piece to the next desired contact state. In this work, optimization method is used to derive the compliant motion parameters. Four motion control conditions are defined to provide constraints; a cost function representing the moving distance is also defined. Minimizing the cost function, the compliant motion parameters can be generated. The method is demonstrated by both translation and rotation examples.