Scaling mesh
#2816
-
With python, when I have loaded a mesh, how can I scale it ? For me, scaling is multiplying the coordinates of each vertices by a scaling factor. |
Beta Was this translation helpful? Give feedback.
Answered by
Grantim
Jun 6, 2024
Replies: 1 comment
-
Hello! from meshlib import mrmeshpy as mm
mesh = mm.loadMesh( "path/to/mesh.stl" )
scaleFactor = 2
scaleXf = mm.AffineXf3f.linear( mm.Matrix3f.scale( scaleFactor ) )
mesh.transform( scaleXf ) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
oscalbert
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello!
You can do it like this: