For each piece you really need several extra columns in the worksheet, giving the x/y/z location in the world, the x/y/z rotation in the world and the x/y/z scaling in the world - ideally it should be a 16 item transformation matrix so you can easily set the piece's transformation from it...
tr=object.transformation trans=tr.to_a scalex=Math.sqrt(trans[0]**2+trans[1]**2+trans[2]**2) scaley=Math.sqrt(trans[4]**2+trans[5]**2+trans[6]**2) scalez=Math.sqrt(trans[8]**2+trans[9]**2+trans[10]**2) scale=scalex scale=scaley if scaley>scale scale=scalez if scalez>scale puts " <pos>#{trans[12]} #{trans[13]} #{trans[14]}</pos>\n" puts " <scale>#{scale}</scale>\n" puts " <rotation>\n" puts " <matrix>\n" puts " #{trans[0]/scalex} #{trans[4]/scaley} #{trans[8]/scalez} #{trans[1]/scalex} #{trans[5]/scaley} #{trans[9]/scalez} #{trans[2]/scalex} #{trans[6]/scaley} #{trans[10]/scalez}\n" puts " </matrix>\n" puts " </rotation>\n"The rotation/scaling are inexorability linked using sines/cosines of the rotation angles in x/y/z etc in a complex but predictable way...