function to write an Abaqus .inp file from Matlab patch objects