Design and optimization of composite and lattice structures by load path analysis