[Closed] trimesh position
hi!
I spent a lot of time around the internet to find a way to get the position of a trimesh but there is nothing about that.
so i tried many things like “getProperty mesh #pos” ” mesh.pos” “mesh.transform” and nothing work.
I need your help ! i just want to know how to get the position of a trimesh created on a scripted plugin with “[size=2]setMesh mesh vertices:vp faces:fl “[/size]
[size=2][/size]
[size=2]i want the position because when I detach some faces , it put these at [0,0,0][/size]
[size=2]i use the function[/size]
[size=1][/size]
[size=1][size=2]tmp = meshop.detachFaces mesh #{229…600} delete:true asMesh:true
update mesh
emesh = Editable_mesh()
emesh.mesh = tmp
update emesh
please help me !!
[/size][/size]
A mesh (as in TriMesh) doesn’t have a position. That is, it’s position is always [0,0,0] but it is transformed by the object that “owns” it, in your case eMesh.
If you want the detached faces to be positioned where they were previously you may want to add
eMesh.transform = mesh.transform
to the end of your script.
Note: It’s best not to use mesh as a variable because it’s a MaxScript Keyword and can cause confusion.
I hope this helps.
thanks for your answer ; but when i try this, i have this mistake
” tansform is an unknown property of trimesh “
I have to use the word “mesh” to make my object.