Part orientation and build cost determination in layered manufacturing