Transforms in CC applied in Metashape

Cloud Compare is excellent. Especially cloud-to-cloud alignment. Sometimes it’s nice to reflect the repositioning possible in Cloud Compare, in the original metashape file, especially in reconstructed objects. Can be done easily using the Cloud Compare transform matrix and some simple python.

Example below.
italic – delete from Cloud Compare copied transform.
Bold – add.
Save as .py file and open from ‘run script’ in metashape.

doc=Metashape.app.document
chunk=doc.chunk

M = [[[14:45:15] 0.975619614124, -0.219468384981, 0.000000000000, -0.067751213908],
[0.219468384981, 0.975619614124, 0.000000000000, -0.004536916502],
[0.000000000000, 0.000000000000, 1.000000000000, 0.093857482076],
[0.000000000000, 0.000000000000, 0.000000000000, 1.000000000000]]

chunk.transform.matrix = Metashape.Matrix(M)*chunk.transform.matrix