View Full Version : trimesh position

01 January 2005, 06:54 AM

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",etc ... 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 "setMesh mesh vertices:vp faces:fl "

i want the position because when i detach some faces , it put these at [0,0,0]

i use the function

tmp = meshop.detachFaces mesh #{229..600} delete:true asMesh:true

Update mesh

emesh = Editable_mesh()

emesh.mesh = tmp

update emesh

please help me !!

01 January 2005, 08:46 AM
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.

01 January 2005, 12:11 PM
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.

CGTalk Moderation
01 January 2006, 10:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.