apply_matrix_flip_or_swap_axis seems to have no effect
cvolpe opened this issue · comments
I have tried calling the above function but it does not seem to have any impact on the mesh's internal transform matrix. With "ms" as a MeshSet and "m" as a Mesh, I call the following:
ms.set_matrix_identity()
m.trasform_matrix()
array([[1., 0., 0., 0.],
[0., 1., 0., 0.],
[0., 0., 1., 0.],
[0., 0., 0., 1.]])
Then I do this:
ms.apply_matrix_flip_or_swap_axis(swapxy=True, flipz=True)
m.trasform_matrix()
array([[1., 0., 0., 0.],
[0., 1., 0., 0.],
[0., 0., 1., 0.],
[0., 0., 0., 1.]])
I expect it to look like this:
m.trasform_matrix()
array([[0., 1., 0., 0.],
[1., 0., 0., 0.],
[0., 0., -1., 0.],
[0., 0., 0., 1.]])
Am I doing it wrong?
BTW, "transform" is misspelled as "trasform" (missing "n") in both the documentation AND the API for trasform_matrix().
As documented in the filter documentation here, the parameter freeze
has default value True
, meaning that the transformation is applied to the vertex coordinates (same behavior has MeshLab). You need to set it to False
.
The typo has been already fixed and will be available in the next pymeshlab version.
As documented in the filter documentation here, the parameter
freeze
has default valueTrue
, meaning that the transformation is applied to the vertex coordinates (same behavior has MeshLab). You need to set it toFalse
.
Ugh! I missed that! Thanks!!
The typo has been already fixed and will be available in the next pymeshlab version.
Cool. Thank you.