Automatic design of truss