# Getting vertex pos using normals, for distance

 4 Weeks Ago ehWasilii portfolio Getting vertex pos using normals, for distance Hiall, writing my first script (uhm, yeah, well). Tried to use search for info, but failed. I need to find a distance between vertices and all I got is normal ids. There're seems to be no methods in #editNormals to acquire vertex id using normal id. What's the best way to get vertex id only knowing normal id? Should I iterate all vertices, get their normals, iterate vertex normals array to see if they are matching?  ps.: i'm feeding  normals to different arrays to smooth one of the arrays depending on others. After I find closeset points, I would like to lerp normal between closeset points' normals, therefore, smoothing needed normals. General recommendations are welcome. Cheers! share quote
 4 Weeks Ago ivanisavich Some kind of robot   Tyson Ibele Animator MAKE LLC. Toronto, Canada I don't really understand the question....a mesh's vertex normal array corresponds 1:1 to the vertex array itself. Ie, 'getNormal mesh i' gets the i'th vertex's normal. __________________ http://www.tysonibele.com share quote
 4 Weeks Ago ehWasilii portfolio Originally Posted by ivanisavich: I don't really understand the question....a mesh's vertex normal array corresponds 1:1 to the vertex array itself. Ie, 'getNormal mesh i' gets the i'th vertex's normal. Hey! Thanks for joining. Here is what I'm doing. I have a poly mesh with Edit Normals modifier applied. I select different normals by hand and fill arrays with \$.modifiers[#editNormals].GetSelection(). So, all I've got in a script are normal ids. Now, I need to get vertex id of every normal in every array to measure distance between them. When I try to access a poly vertex with ID of a normal, naturally, I do get an exception of array out of bounds. That's because there might be more than one normal under one vertex.  Sorry, if I didn't make myself clear from the start. I'm not familiar with maxscript, I'll go look at 'getNormal' to see if it gets me anywhere. thanks! share quote
 4 Weeks Ago ehWasilii portfolio okay, i got it the most monstrous way possible.  I parse all vertices of a mesh, get vertex normals using  .ConvertVertexSelection, iterate every normal of every vertex, compare normal ids with the one i've selected.  cya! share quote

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts vB code is On Smilies are On [IMG] code is On HTML code is Off CGSociety Society of Digital Artists www.cgsociety.org Powered by vBulletinCopyright ©2000 - 2006, Jelsoft Enterprises Ltd.